diff --git a/common/config.js b/common/config.js index 92f77cf..405003d 100644 --- a/common/config.js +++ b/common/config.js @@ -8,6 +8,10 @@ import RequestManager from '@/common/request.js' let configData = null; let isLoading = false; let loadPromise = null; +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": 1, "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 }], + "app_setting": { "key": "app_setting", "app_name": "友达赏", "purchase_popup": "1", "exchange_times": "2", "balance_name": "钻石", "balance_icon": "https://mh.shhuanmeng.com/app/icons/20250322/3d823aaa01e96aeeafc39cbb2d579612.jpg", "currency1_name": "货币", "currency1_icon": "https://mh.shhuanmeng.com/app/icons/20250322/8188634352e7f9edf5a2a42329b7c2c9.jpg", "currency2_name": "积分1", "currency2_icon": "", "win_audio": "https://mh.shhuanmeng.com/static/web/static/mp3/open.mp3", "update_time": 1742716262 } +}; // 配置类 class ConfigManager { @@ -77,14 +81,22 @@ class ConfigManager { * @param {any} defaultValue 默认值,当键不存在时返回 * @returns {any} 配置值 */ - static get(key, defaultValue = null) { + static get(key) { if (!configData) { console.warn('配置数据尚未加载,获取本地缓存中。。。'); configData = uni.getStorageSync("configData"); - if (configData != null) { + if (configData != null && configData != "") { return configData; } - return defaultValue; + configData = defaultConfig; + // wx.restartMiniProgram({ + // success(res) { + // console.log('重启小程序成功', res); + // }, + // fail(err) { + // console.error('重启小程序失败', err); + // } + // }); } return key in configData ? configData[key] : defaultValue; } @@ -96,7 +108,8 @@ class ConfigManager { static getGoodType() { let goodType = this.get('good_type'); if (goodType != null) { - return goodType.map(item => { + // goodType数组过滤,只保留is_show=1的项目 + return goodType.filter(item => item.is_show === 1).map(item => { return { id: item.value, title: item.name @@ -106,6 +119,18 @@ class ConfigManager { return []; } + /** + * 获取指定盒子类型 + * @param {Number} type 盒子类型 + * @returns {Object} 盒子类型对象 + */ + static getGoodTypeFind(type) { + let goodType = this.get('good_type'); + if (goodType != null) { + return goodType.find(item => item.value == type); + } + } + /** * 刷新配置数据 * @returns {Promise} 返回刷新完成的Promise diff --git a/components/order-confirm-popup/order-confirm-popup.vue b/components/order-confirm-popup/order-confirm-popup.vue new file mode 100644 index 0000000..93a83fa --- /dev/null +++ b/components/order-confirm-popup/order-confirm-popup.vue @@ -0,0 +1,497 @@ + + + + + \ No newline at end of file diff --git a/components/order-confirm-popup/order-confirm-popup.vue.bak b/components/order-confirm-popup/order-confirm-popup.vue.bak new file mode 100644 index 0000000..1f7e35a Binary files /dev/null and b/components/order-confirm-popup/order-confirm-popup.vue.bak differ diff --git a/package/index/sign.vue b/package/index/sign.vue index e73d8db..fa82e6d 100644 --- a/package/index/sign.vue +++ b/package/index/sign.vue @@ -17,12 +17,12 @@ + backgroundImage: `url(${$img('/static/img/1_sign_bg.png')})` + }"> - + + backgroundImage: `url(${$img('/static/img/signBg.png')})` + + }"> - 恭喜获得 {{ sucData.num }} 吧唧币 + 恭喜获得 {{ sucData.num }} {{$config.getAppSetting('currency1_name')}} @@ -77,232 +77,232 @@ \ No newline at end of file diff --git a/pages/mall/index.vue b/pages/mall/index.vue index c00539a..77dfd66 100644 --- a/pages/mall/index.vue +++ b/pages/mall/index.vue @@ -5,24 +5,11 @@ 商城好物 - - - - - - + @@ -33,12 +20,12 @@ - {{item.title}} + {{ item.title }} - ¥{{item.price}} + ¥{{ item.price }} @@ -91,7 +78,7 @@ 微信支付 - + @@ -99,28 +86,16 @@ - 吧唧币 - {{ orderData.goods.price*100 }} (剩余:{{ orderData.use_integral }}) + {{ $config.getAppSetting('currency2_name') }} + {{ orderData.goods.price * 100 }} (剩余:{{ orderData.use_integral }}) - + - @@ -148,15 +123,15 @@ - + {{ - ` ¥${orderData.price}` + ` ¥${orderData.price}` }} - - {{orderData.price*100}}吧唧币 + + {{ orderData.price * 100 }}{{ $config.getAppSetting('currency2_name') }} @@ -167,578 +142,569 @@ \ No newline at end of file diff --git a/pages/shouye/detail.vue b/pages/shouye/detail.vue index 9e624c5..4f8f8ac 100644 --- a/pages/shouye/detail.vue +++ b/pages/shouye/detail.vue @@ -10,30 +10,30 @@ + background: + 'url(' + pageData.goods.imgurl_detail + ') no-repeat 0 0 / 100% 100%', + }"> {{ pageData.goods.title }} + pageData.goods.lock_is == 1 && + pageData.lock_info.goods_lock_surplus_time > 0 + "> + pageData.lock_info.goods_lock_user_nickname + }} 倒计时:{{ secNum }}S + background: + 'url(' + + $img1('common/chouTitle.png') + + ') no-repeat 0 0 / 100% 100%', + }"> @@ -65,12 +65,13 @@ {{ pageData.goods.num }} /{{ - pageData.goods.stock - }}箱 + pageData.goods.stock + }}箱 赏品余量 - {{ pageData.goods.goodslist_surplus_stock }}/{{ pageData.goods.goodslist_stock }} + {{ pageData.goods.goodslist_surplus_stock }}/{{ pageData.goods.goodslist_stock + }} @@ -86,8 +87,8 @@ + background: item.shang_info ? item.shang_info.color : '#FFFFFF', + }"> {{ item.shang_info ? item.shang_info.title : "" }} {{ item.surplus_stock }}/{{ item.stock }} @@ -130,180 +131,11 @@ - - - - - 确认订单 - - - - - - - - - - - - - - - {{ orderData.goods.title }} - - - 类型:明信片 - - - - - - - {{ orderData.goods.price }} - - - - ×{{ orderData.goods.prize_num }} - - - - - - - - - - - - - 使用积分抵扣 - {{ orderData.use_score }} - (剩余:{{ orderData.score }}) - - - - - - - - - - - - - -
-
-
- - - - - - - - 我已满18岁,阅读并同意 - - - 《用户协议》 - - - - 《隐私政策》 - - - - - 确认支付 - {{ - pageData.goods.type == 5 - ? ` ${orderData.use_score}积分` - : ` ¥${orderData.price}` - }} - -
-
+ @@ -329,14 +161,14 @@ + backgroundImage: `url(${$img1('common/quhegui.png')})`, + }" @click="toBag"> 去发货 + backgroundImage: `url(${$img1('common/jixuchou.png')})`, + }" @click="close('resPop')"> 继续抽 @@ -354,949 +186,1099 @@ \ No newline at end of file diff --git a/pages/user/index.vue b/pages/user/index.vue index c87723a..89ab7ec 100644 --- a/pages/user/index.vue +++ b/pages/user/index.vue @@ -52,7 +52,7 @@