提交代码
This commit is contained in:
parent
7b9327a344
commit
729fe41f30
|
|
@ -8,8 +8,9 @@ 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": "友达赏",
|
||||
|
|
@ -29,7 +30,8 @@ const defaultConfig = {
|
|||
"cabinet_exchange_limit": "0",
|
||||
"daily_coupon_limit": "0",
|
||||
"update_time": 1744550962
|
||||
}
|
||||
},
|
||||
version: "100"
|
||||
};
|
||||
|
||||
// 配置类
|
||||
|
|
@ -72,7 +74,7 @@ class ConfigManager {
|
|||
success(res) {
|
||||
if (res.confirm) {
|
||||
console.log('开始重启');
|
||||
wx.restartMiniProgram({path:"/pages/shouye/index"});
|
||||
wx.restartMiniProgram({ path: "/pages/shouye/index" });
|
||||
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
|
||||
//updateManager.applyUpdate();
|
||||
|
||||
|
|
@ -229,6 +231,18 @@ 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;
|
||||
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
import EnvConfig from '@/common/env.js'
|
||||
import md5 from 'js-md5'
|
||||
import ConfigManager from '@/common/config.js'
|
||||
|
||||
class RequestManager {
|
||||
/**
|
||||
|
|
@ -21,6 +22,16 @@ 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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,10 +3,12 @@
|
|||
<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">
|
||||
<view v-for="(item, index) in datas" :key="index" class="grid-item" @click="order_money(item)">
|
||||
<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="" 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="">
|
||||
|
|
@ -137,7 +139,9 @@
|
|||
|
||||
<script>
|
||||
export default {
|
||||
|
||||
components: {
|
||||
EmptyState: () => import('@/components/empty-state/empty-state.vue')
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
statusBarHeight: 0,
|
||||
|
|
@ -200,6 +204,11 @@ export default {
|
|||
|
||||
getData() {
|
||||
let that = this
|
||||
let isWXPay = this.$config.GetVersion()
|
||||
if (isWXPay) {
|
||||
that.datas = [];
|
||||
return;
|
||||
}
|
||||
that.req({
|
||||
url: 'goods',
|
||||
data: {
|
||||
|
|
@ -209,6 +218,7 @@ export default {
|
|||
use_integral_is: this.isWXPay ? 1 : 2,
|
||||
},
|
||||
success(res) {
|
||||
|
||||
that.datas = res.data.data
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user