Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
504452087e | ||
|
|
e077da1515 | ||
|
|
55a6b589ab | ||
|
|
1150eb5a9d | ||
|
|
4834ebfdf7 |
|
|
@ -8,30 +8,28 @@ import RequestManager from '@/common/request.js'
|
|||
let configData = null;
|
||||
let isLoading = false;
|
||||
let loadPromise = null;
|
||||
const wx_version = "100";
|
||||
const defaultConfig = {
|
||||
"good_type": [{ "value": 0, "sort_order": 0, "is_show": 1, "name": "全部", "pay_wechat": 1, "pay_balance": 1, "pay_currency": 1, "pay_currency2": 1, "pay_coupon": 1, "is_deduction": 1 }, { "value": 1, "sort_order": 1, "is_show": 0, "name": "一番赏", "pay_wechat": 1, "pay_balance": 1, "pay_currency": 1, "pay_currency2": 1, "pay_coupon": 1, "is_deduction": 1 }, { "value": 2, "sort_order": 2, "is_show": 1, "name": "无限赏", "pay_wechat": 1, "pay_balance": 1, "pay_currency": 1, "pay_currency2": 1, "pay_coupon": 1, "is_deduction": 1 }, { "value": 3, "sort_order": 3, "is_show": 0, "name": "擂台赏", "pay_wechat": 1, "pay_balance": 1, "pay_currency": 1, "pay_currency2": 1, "pay_coupon": 1, "is_deduction": 1 }, { "value": 5, "sort_order": 4, "is_show": 0, "name": "积分赏", "pay_wechat": 0, "pay_balance": 0, "pay_currency": 0, "pay_currency2": 1, "pay_coupon": 1, "is_deduction": 0 }, { "value": 6, "sort_order": 5, "is_show": 1, "name": "限时活动", "pay_wechat": 1, "pay_balance": 1, "pay_currency": 1, "pay_currency2": 1, "pay_coupon": 1, "is_deduction": 1 }, { "value": 8, "sort_order": 6, "is_show": 1, "name": "领主赏", "pay_wechat": 1, "pay_balance": 1, "pay_currency": 1, "pay_currency2": 1, "pay_coupon": 1, "is_deduction": 1 }, { "value": 9, "sort_order": 7, "is_show": 0, "name": "连击赏", "pay_wechat": 1, "pay_balance": 1, "pay_currency": 1, "pay_currency2": 1, "pay_coupon": 1, "is_deduction": 1 }, { "value": 10, "sort_order": 8, "is_show": 0, "name": "商城赏", "pay_wechat": 1, "pay_balance": 0, "pay_currency": 0, "pay_currency2": 1, "pay_coupon": 0, "is_deduction": 0 }, { "value": 11, "sort_order": 9, "is_show": 0, "name": "自制赏", "pay_wechat": 1, "pay_balance": 1, "pay_currency": 1, "pay_currency2": 1, "pay_coupon": 1, "is_deduction": 1 }, { "value": 15, "sort_order": 15, "is_show": 0, "name": "福利屋", "pay_wechat": 1, "pay_balance": 1, "pay_currency": 0, "pay_currency2": 0, "pay_coupon": 0, "is_deduction": 0 }, { "value": 16, "sort_order": 16, "is_show": 1, "name": "翻倍赏", "pay_wechat": 1, "pay_balance": 1, "pay_currency": 1, "pay_currency2": 1, "pay_coupon": 1, "is_deduction": 1 }, { "value": 17, "sort_order": 17, "is_show": 0, "name": "外卖盒子", "pay_wechat": 1, "pay_balance": 1, "pay_currency": 0, "pay_currency2": 0, "pay_coupon": 0, "is_deduction": 0 }],
|
||||
"good_type": [{"value":0,"sort_order":0,"is_show":1,"name":"全部","pay_wechat":1,"pay_balance":1,"pay_currency":1,"pay_currency2":1,"pay_coupon":1,"is_deduction":1},{"value":1,"sort_order":1,"is_show":0,"name":"一番赏","pay_wechat":1,"pay_balance":1,"pay_currency":1,"pay_currency2":1,"pay_coupon":1,"is_deduction":1},{"value":2,"sort_order":2,"is_show":1,"name":"无限赏","pay_wechat":1,"pay_balance":1,"pay_currency":1,"pay_currency2":1,"pay_coupon":1,"is_deduction":1},{"value":3,"sort_order":3,"is_show":0,"name":"擂台赏","pay_wechat":1,"pay_balance":1,"pay_currency":1,"pay_currency2":1,"pay_coupon":1,"is_deduction":1},{"value":5,"sort_order":4,"is_show":0,"name":"积分赏","pay_wechat":0,"pay_balance":0,"pay_currency":0,"pay_currency2":1,"pay_coupon":1,"is_deduction":0},{"value":6,"sort_order":5,"is_show":1,"name":"限时活动","pay_wechat":1,"pay_balance":1,"pay_currency":1,"pay_currency2":1,"pay_coupon":1,"is_deduction":1},{"value":8,"sort_order":6,"is_show":1,"name":"领主赏","pay_wechat":1,"pay_balance":1,"pay_currency":1,"pay_currency2":1,"pay_coupon":1,"is_deduction":1},{"value":9,"sort_order":7,"is_show":0,"name":"连击赏","pay_wechat":1,"pay_balance":1,"pay_currency":1,"pay_currency2":1,"pay_coupon":1,"is_deduction":1},{"value":10,"sort_order":8,"is_show":0,"name":"商城赏","pay_wechat":1,"pay_balance":0,"pay_currency":0,"pay_currency2":1,"pay_coupon":0,"is_deduction":0},{"value":11,"sort_order":9,"is_show":0,"name":"自制赏","pay_wechat":1,"pay_balance":1,"pay_currency":1,"pay_currency2":1,"pay_coupon":1,"is_deduction":1},{"value":15,"sort_order":15,"is_show":0,"name":"福利屋","pay_wechat":1,"pay_balance":1,"pay_currency":0,"pay_currency2":0,"pay_coupon":0,"is_deduction":0},{"value":16,"sort_order":16,"is_show":1,"name":"翻倍赏","pay_wechat":1,"pay_balance":1,"pay_currency":1,"pay_currency2":1,"pay_coupon":1,"is_deduction":1},{"value":17,"sort_order":17,"is_show":0,"name":"外卖盒子","pay_wechat":1,"pay_balance":1,"pay_currency":0,"pay_currency2":0,"pay_coupon":0,"is_deduction":0}],
|
||||
"app_setting": {
|
||||
"key": "app_setting",
|
||||
"app_name": "友达赏",
|
||||
"purchase_popup": "1",
|
||||
"exchange_times": "2",
|
||||
"balance_name": "钻石",
|
||||
"balance_icon": "https://image.zfunbox.cn/app/icons/20250412/a482b527477e74f8a18ec02ebc7f0b4e.png",
|
||||
"currency1_name": "UU币",
|
||||
"currency1_icon": "https://image.zfunbox.cn/app/icons/20250412/3d1741965e9439372d1ce101bd110616.png",
|
||||
"currency2_name": "达达券",
|
||||
"currency2_icon": "https://image.zfunbox.cn/app/icons/20250412/19a9f69011fd82c85ab0df3a064a309c.png",
|
||||
"win_audio": "https://image.zfunbox.cn/app/20250407/14ba53d367e1d131a344c6fd5cc0e28e.mp3",
|
||||
"applet_version": "v1.0.3",
|
||||
"sign_in_spend_limit": "1",
|
||||
"waimai_box_id": "1049",
|
||||
"daily_free_draw_id": "1050",
|
||||
"cabinet_exchange_limit": "0",
|
||||
"daily_coupon_limit": "0",
|
||||
"update_time": 1744550962
|
||||
},
|
||||
version: "100"
|
||||
"key": "app_setting",
|
||||
"app_name": "友达赏",
|
||||
"purchase_popup": "1",
|
||||
"exchange_times": "2",
|
||||
"balance_name": "钻石",
|
||||
"balance_icon": "https://image.zfunbox.cn/app/icons/20250412/a482b527477e74f8a18ec02ebc7f0b4e.png",
|
||||
"currency1_name": "UU币",
|
||||
"currency1_icon": "https://image.zfunbox.cn/app/icons/20250412/3d1741965e9439372d1ce101bd110616.png",
|
||||
"currency2_name": "达达券",
|
||||
"currency2_icon": "https://image.zfunbox.cn/app/icons/20250412/19a9f69011fd82c85ab0df3a064a309c.png",
|
||||
"win_audio": "https://image.zfunbox.cn/app/20250407/14ba53d367e1d131a344c6fd5cc0e28e.mp3",
|
||||
"applet_version": "v1.0.3",
|
||||
"sign_in_spend_limit": "1",
|
||||
"waimai_box_id": "1049",
|
||||
"daily_free_draw_id": "1050",
|
||||
"cabinet_exchange_limit": "0",
|
||||
"daily_coupon_limit": "0",
|
||||
"update_time": 1744550962
|
||||
}
|
||||
};
|
||||
|
||||
// 配置类
|
||||
|
|
@ -74,12 +72,12 @@ class ConfigManager {
|
|||
success(res) {
|
||||
if (res.confirm) {
|
||||
console.log('开始重启');
|
||||
wx.restartMiniProgram({ path: "/pages/shouye/index" });
|
||||
wx.restartMiniProgram({path:"/pages/shouye/index"});
|
||||
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
|
||||
//updateManager.applyUpdate();
|
||||
|
||||
|
||||
//#ifdef MP-WEIXIN
|
||||
|
||||
|
||||
//#endif
|
||||
}
|
||||
},
|
||||
|
|
@ -135,7 +133,7 @@ class ConfigManager {
|
|||
} else {
|
||||
configData = defaultConfig;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return key in configData ? configData[key] : defaultConfig[key];
|
||||
}
|
||||
|
|
@ -231,18 +229,6 @@ class ConfigManager {
|
|||
}
|
||||
return key in appSetting ? appSetting[key] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取版本号
|
||||
* @returns {Boolean} 是否为微信版本
|
||||
*/
|
||||
static GetVersion() {
|
||||
let version = this.get('version');
|
||||
if (version == wx_version) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
export default ConfigManager;
|
||||
|
|
@ -17,10 +17,10 @@ const development = {
|
|||
|
||||
// 生产环境配置
|
||||
const production = {
|
||||
// baseUrl: 'https://youda.zfunbox.cn',
|
||||
baseUrl: 'https://api.zfunbox.cn',
|
||||
|
||||
baseUrl: 'https://youda.zfunbox.cn',
|
||||
imageUrl: 'https://image.zfunbox.cn',
|
||||
loginPage: 'https://api.zfunbox.cn/login.html',
|
||||
loginPage: 'https://youda.zfunbox.cn/login.html',
|
||||
wxAppId: 'wx0e33d80d35e4a3b1'
|
||||
};
|
||||
|
||||
|
|
@ -33,7 +33,7 @@ const testing = {
|
|||
};
|
||||
|
||||
// 根据环境变量选择对应配置
|
||||
let currentEnv = testing;
|
||||
let currentEnv = development;
|
||||
|
||||
// 判断当前环境
|
||||
// #ifdef H5
|
||||
|
|
@ -46,7 +46,7 @@ if (process.env.NODE_ENV === 'production') {
|
|||
|
||||
// #ifdef MP-WEIXIN
|
||||
// currentEnv =testing;//小程序默认使用测试环境配置
|
||||
// currentEnv = production; // 小程序默认使用生产环境配置
|
||||
currentEnv = production; // 小程序默认使用生产环境配置
|
||||
// #endif
|
||||
|
||||
// 衍生配置
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
import EnvConfig from '@/common/env.js'
|
||||
import md5 from 'js-md5'
|
||||
import ConfigManager from '@/common/config.js'
|
||||
|
||||
class RequestManager {
|
||||
/**
|
||||
|
|
@ -22,16 +21,6 @@ class RequestManager {
|
|||
'api/warehouse_send_record'
|
||||
]
|
||||
|
||||
|
||||
// 白名单URL列表
|
||||
const whitelistUrls2 = [
|
||||
'login_record',
|
||||
]
|
||||
let iswx = ConfigManager.GetVersion();
|
||||
|
||||
if (!iswx) {
|
||||
return whitelistUrls2.some(whiteItem => url.indexOf(whiteItem) > -1)
|
||||
}
|
||||
// 检查URL是否包含白名单中的任一项
|
||||
return whitelistUrls.some(whiteItem => url.indexOf(whiteItem) > -1)
|
||||
}
|
||||
|
|
@ -58,7 +47,7 @@ class RequestManager {
|
|||
* @returns {Promise} 返回请求Promise
|
||||
*/
|
||||
static request(param, backpage, backtype) {
|
||||
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
// 参数检查
|
||||
if (!param || typeof param !== 'object') {
|
||||
|
|
@ -113,7 +102,7 @@ class RequestManager {
|
|||
const hostRegex = /^(?:https?:\/\/)?([^\/]+)/i
|
||||
const matches = requestUrl.match(hostRegex)
|
||||
const host = matches && matches[1] ? matches[1] : 'localhost'
|
||||
|
||||
|
||||
let header = {}
|
||||
|
||||
// 添加签名和防重放攻击参数
|
||||
|
|
@ -257,7 +246,7 @@ class RequestManager {
|
|||
}
|
||||
console.log(requestUrl);
|
||||
if (RequestManager.isUrlInWhitelist(requestUrl)) {
|
||||
|
||||
|
||||
reject(res.data)
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@
|
|||
"quickapp" : {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
"appid" : "wx683d8a8a499d7ec6",
|
||||
"appid" : "wx9ade414ae5755f0d",
|
||||
"setting" : {
|
||||
"urlCheck" : false,
|
||||
"es6" : false,
|
||||
|
|
|
|||
|
|
@ -3,12 +3,10 @@
|
|||
<banner :type-id="10" :height="326"></banner>
|
||||
<view style="padding-bottom: 300rpx; background-color: white;">
|
||||
<view class="" style="display: flex; flex-direction: column;">
|
||||
<view class="grid-container" :style="datas.length === 0 ? 'display:flex;justify-content:center;align-items:center;' : ''">
|
||||
<empty-state v-if="datas.length === 0" message="暂无商品数据"></empty-state>
|
||||
<view v-else v-for="(item, index) in datas" :key="index" class="grid-item" @click="order_money(item)">
|
||||
<view class="grid-container">
|
||||
<view v-for="(item, index) in datas" :key="index" class="grid-item" @click="order_money(item)">
|
||||
|
||||
<view class=""
|
||||
style="background-color: #D8D8D8; height: 324rpx; border-radius: 16rpx 16rpx 0rpx 0rpx;">
|
||||
<view class="" style="background-color: #D8D8D8; height: 324rpx; border-radius: 16rpx 16rpx 0rpx 0rpx;">
|
||||
<image :src="item.imgurl"
|
||||
style=" width: 326.39rpx; height: 324rpx; position: absolute; left: 2rpx; border-radius: 16rpx"
|
||||
mode="">
|
||||
|
|
@ -139,9 +137,7 @@
|
|||
|
||||
<script>
|
||||
export default {
|
||||
components: {
|
||||
EmptyState: () => import('@/components/empty-state/empty-state.vue')
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
statusBarHeight: 0,
|
||||
|
|
@ -204,11 +200,6 @@ export default {
|
|||
|
||||
getData() {
|
||||
let that = this
|
||||
let isWXPay = this.$config.GetVersion()
|
||||
if (isWXPay) {
|
||||
that.datas = [];
|
||||
return;
|
||||
}
|
||||
that.req({
|
||||
url: 'goods',
|
||||
data: {
|
||||
|
|
@ -218,7 +209,6 @@ export default {
|
|||
use_integral_is: this.isWXPay ? 1 : 2,
|
||||
},
|
||||
success(res) {
|
||||
|
||||
that.datas = res.data.data
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user