|
|
|
|
@ -8,28 +8,30 @@ 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
|
|
|
|
|
}
|
|
|
|
|
"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"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 配置类
|
|
|
|
|
@ -72,12 +74,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
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
@ -133,7 +135,7 @@ class ConfigManager {
|
|
|
|
|
} else {
|
|
|
|
|
configData = defaultConfig;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return key in configData ? configData[key] : defaultConfig[key];
|
|
|
|
|
}
|
|
|
|
|
@ -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;
|