diff --git a/common/common.js b/common/common.js index a7e9c07..e940acd 100644 --- a/common/common.js +++ b/common/common.js @@ -51,6 +51,11 @@ export default { * @returns */ removeTrailingZeros(numStr) { + // 判断传入参数是否为字符串,如果不是则转为字符串 + if (typeof numStr !== 'string') { + numStr = String(numStr); + } + if (numStr.includes('.')) { numStr = numStr.replace(/0+$/, ''); // 移除末尾的零 if (numStr.endsWith('.')) { diff --git a/common/config.js b/common/config.js index bee9d11..51fc8de 100644 --- a/common/config.js +++ b/common/config.js @@ -8,7 +8,7 @@ import RequestManager from '@/common/request.js' let configData = null; let isLoading = false; let loadPromise = null; -const wx_version = "103"; +const wx_version = "104"; 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 }], "app_setting": { @@ -147,8 +147,17 @@ class ConfigManager { static getGoodType() { let goodType = this.get('good_type'); if (goodType != null) { - // goodType数组过滤,只保留is_show=1的项目 + if (this.GetVersion()) { + return goodType.filter(item => item.is_show === 1 && (item.value === 2||item.value === 0)).map(item => { + return { + id: item.value, + title: item.name + } + }); + } return goodType.filter(item => item.is_show === 1).map(item => { + console.log(item); + return { id: item.value, title: item.name diff --git a/package/index/coupon-center.vue b/package/index/coupon-center.vue deleted file mode 100644 index f30d92c..0000000 --- a/package/index/coupon-center.vue +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - diff --git a/package/index/leitai.vue b/package/index/leitai.vue deleted file mode 100644 index 32adbbe..0000000 --- a/package/index/leitai.vue +++ /dev/null @@ -1,1941 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/package/index/lian-ji.vue b/package/index/lian-ji.vue deleted file mode 100644 index 5301bee..0000000 --- a/package/index/lian-ji.vue +++ /dev/null @@ -1,2186 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/package/index/sign.vue b/package/index/sign.vue deleted file mode 100644 index 2f207f8..0000000 --- a/package/index/sign.vue +++ /dev/null @@ -1,312 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/package/mine/collect.vue b/package/mine/collect.vue deleted file mode 100644 index 0479772..0000000 --- a/package/mine/collect.vue +++ /dev/null @@ -1,399 +0,0 @@ - - - - - \ No newline at end of file diff --git a/package/mine/coupon-detail.vue b/package/mine/coupon-detail.vue deleted file mode 100644 index a6639e8..0000000 --- a/package/mine/coupon-detail.vue +++ /dev/null @@ -1,540 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/package/mine/equity.vue b/package/mine/equity.vue deleted file mode 100644 index fbdb25d..0000000 --- a/package/mine/equity.vue +++ /dev/null @@ -1,899 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/package/mine/qy-rule.vue b/package/mine/qy-rule.vue deleted file mode 100644 index 7343d1b..0000000 --- a/package/mine/qy-rule.vue +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/package/mine/skill-card.vue b/package/mine/skill-card.vue deleted file mode 100644 index 25e4ed7..0000000 --- a/package/mine/skill-card.vue +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - diff --git a/package/mine/ti-qu.vue b/package/mine/ti-qu.vue deleted file mode 100644 index 4c72a63..0000000 --- a/package/mine/ti-qu.vue +++ /dev/null @@ -1,622 +0,0 @@ - - - - - - diff --git a/pages.json b/pages.json index a00c583..ab950d4 100644 --- a/pages.json +++ b/pages.json @@ -45,14 +45,6 @@ "navigationBarTextStyle": "black" } }, - { - "path": "pages/shouye/wxl", - "style": { - "navigationBarTitleText": "无限令", - "navigationBarBackgroundColor": "#222222", - "navigationBarTextStyle": "black" - } - }, { "path": "pages/shouye/huanxiang", "style": { @@ -160,15 +152,6 @@ "navigationBarTextStyle": "black" } }, - - { - "path": "pages/guize/guize", - "style": { - "navigationBarBackgroundColor": "#FFFFFF", - "navigationBarTitleText": "", - "navigationBarTextStyle": "black" - } - }, { "path": "pages/user/my_coupon", "style": { @@ -203,14 +186,6 @@ "navigationBarTextStyle": "black" } }, - { - "path": "pages/sangdai/hegui", - "style": { - "navigationBarTextStyle": "black", - "navigationStyle": "custom", - "disableSwipeBack": true - } - }, { "path": "pages/sangdai/sangdai", "style": { @@ -244,43 +219,7 @@ "navigationBarTextStyle": "black" } }, - { - "path": "pages/DrawCard/index", - "style": { - "navigationBarTextStyle": "black", - "navigationStyle": "custom" - } - }, - { - "path": "pages/DrawCard/cardDetail", - "style": { - "navigationBarTextStyle": "black", - "navigationStyle": "custom" - } - }, - { - "path": "pages/DrawCard/tujian", - "style": { - "navigationBarBackgroundColor": "#222222", - "navigationBarTitleText": "图鉴", - "navigationBarTextStyle": "black" - } - }, - { - "path": "pages/chouka/ka", - "style": { - "navigationBarTextStyle": "black", - "navigationStyle": "custom" - } - }, - { - "path": "pages/chouka/kace", - "style": { - "navigationBarBackgroundColor": "#222222", - "navigationBarTitleText": "卡册", - "navigationBarTextStyle": "black" - } - }, + { "path": "pages/chouka/detail", "style": { @@ -295,22 +234,7 @@ "navigationStyle": "custom" } }, - { - "path": "pages/zizhi/index", - "style": { - "navigationBarTextStyle": "black", - "navigationBarTitleText": "自制赏", - "navigationBarBackgroundColor": "#222222" - } - }, - { - "path": "pages/zizhi/detail", - "style": { - "navigationBarTextStyle": "black", - "navigationBarTitleText": "龙珠手办店", - "navigationBarBackgroundColor": "#222222" - } - }, + { "path": "pages/infinite/index", "style": { @@ -319,62 +243,6 @@ "navigationBarBackgroundColor": "#222222" } }, - { - "path": "pages/infinite/UnlimitedOrder", - "style": { - "navigationBarTextStyle": "black", - "navigationBarTitleText": "魔晶令", - "navigationBarBackgroundColor": "#222222", - "navigationStyle": "custom" - } - }, - // { - // "path": "pages/shop/index", - // "style": { - // "navigationStyle": "custom", - // "transparentTitle": "none" - // } - // }, - // { - // "path": "pages/shop/list", - // "style": { - // "navigationBarTitleText": "", - // "navigationBarBackgroundColor": "#000000", - // "navigationBarTextStyle": "white" - // } - // }, - // { - // "path": "pages/shop/detail", - // "style": { - // "navigationBarTitleText": "商品详请", - // "navigationBarBackgroundColor": "#000000", - // "navigationBarTextStyle": "white" - // } - // }, - // { - // "path": "pages/shop/shop_order", - // "style": { - // "navigationBarTitleText": "我的订单", - // "navigationBarBackgroundColor": "#000000", - // "navigationBarTextStyle": "white" - // } - // }, - // { - // "path": "pages/shop/order_detail", - // "style": { - // "navigationBarTitleText": "订单详情", - // "navigationBarBackgroundColor": "#000000", - // "navigationBarTextStyle": "white" - // } - // }, - // { - // "path": "pages/shop/wuliu_detail", - // "style": { - // "navigationBarTitleText": "物流详情", - // "navigationBarBackgroundColor": "#000000", - // "navigationBarTextStyle": "white" - // } - // }, { "path": "pages/mall/index", "style": { @@ -383,23 +251,6 @@ "navigationStyle": "custom" } }, - - { - "path": "pages/fuli/fuli", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false, - "navigationStyle": "custom" - } - }, - { - "path": "pages/fuli/fuli-detail", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false, - "navigationStyle": "custom" - } - }, { "path": "pages/user/coupon", "style": { @@ -496,76 +347,7 @@ } } ], - "subPackages": [{ - "root": "package/index", - "pages": [{ - "path": "sign", - "style": { - "navigationStyle": "custom" - } - }, - { - "path": "lian-ji", - "style": { - "navigationStyle": "custom" - } - }, - { - "path": "coupon-center", - "style": { - "navigationStyle": "custom" - } - }, - { - "path": "leitai", - "style": { - "navigationBarTitleText": "擂台赏", - "navigationStyle": "custom" - } - } - ] - }, - { - "root": "package/mine", - "pages": [{ - "path": "collect", - "style": { - "navigationStyle": "custom" - } - }, - { - "path": "skill-card", - "style": { - "navigationStyle": "custom" - } - }, - { - "path": "equity", - "style": { - "navigationStyle": "custom" - } - }, - { - "path": "qy-rule", - "style": { - "navigationStyle": "custom" - } - }, - { - "path": "coupon-detail", - "style": { - "navigationStyle": "custom" - } - }, - { - "path": "ti-qu", - "style": { - "navigationStyle": "custom" - } - } - ] - } - ], + "subPackages": [], "globalStyle": { "navigationBarTextStyle": "black", "navigationBarTitleText": "友达赏", diff --git a/pages/fuli/fuli-detail.vue b/pages/fuli/fuli-detail.vue deleted file mode 100644 index f721023..0000000 --- a/pages/fuli/fuli-detail.vue +++ /dev/null @@ -1,2478 +0,0 @@ - - - - \ No newline at end of file diff --git a/pages/fuli/fuli.vue b/pages/fuli/fuli.vue deleted file mode 100644 index e5e3182..0000000 --- a/pages/fuli/fuli.vue +++ /dev/null @@ -1,408 +0,0 @@ - - - - - - diff --git a/pages/guize/guize.vue b/pages/guize/guize.vue deleted file mode 100644 index e33dc57..0000000 --- a/pages/guize/guize.vue +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - diff --git a/pages/infinite/UnlimitedOrder.vue b/pages/infinite/UnlimitedOrder.vue deleted file mode 100644 index e3d3e74..0000000 --- a/pages/infinite/UnlimitedOrder.vue +++ /dev/null @@ -1,446 +0,0 @@ - - - - - diff --git a/pages/sangdai/hegui.vue b/pages/sangdai/hegui.vue deleted file mode 100644 index 61e7a95..0000000 --- a/pages/sangdai/hegui.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/pages/sangdai/sangdai copy.vue b/pages/sangdai/sangdai copy.vue deleted file mode 100644 index 9b32055..0000000 --- a/pages/sangdai/sangdai copy.vue +++ /dev/null @@ -1,1916 +0,0 @@ - - - - - diff --git a/pages/zizhi/detail.vue b/pages/zizhi/detail.vue deleted file mode 100644 index 8982be1..0000000 --- a/pages/zizhi/detail.vue +++ /dev/null @@ -1,315 +0,0 @@ - - - - - diff --git a/pages/zizhi/index.vue b/pages/zizhi/index.vue deleted file mode 100644 index 900ab14..0000000 --- a/pages/zizhi/index.vue +++ /dev/null @@ -1,238 +0,0 @@ - - - - -