From 553163ca7cdc0158dbbc49d2438f83b2df87c22b Mon Sep 17 00:00:00 2001 From: zpc Date: Sat, 7 Jun 2025 18:29:20 +0800 Subject: [PATCH] 333 --- common/platform/AppPlatform.js | 56 +++++++++++++-- pages.json | 15 ++-- pages/index/index.vue | 121 +++++++++++++++++++++++++++++++++ 3 files changed, 181 insertions(+), 11 deletions(-) create mode 100644 pages/index/index.vue diff --git a/common/platform/AppPlatform.js b/common/platform/AppPlatform.js index 2ce520c..a1a8cbf 100644 --- a/common/platform/AppPlatform.js +++ b/common/platform/AppPlatform.js @@ -3,10 +3,13 @@ import RequestManager from '@/common/request.js' import { sleep, parseQueryString -} from '@/common/util.js' +} from '@/common/util.js'; import { getOrderStatus -} from '@/common/server/order.js' +} from '@/common/server/order.js'; +import { + getPlatform +} from '../server/config'; class AppPlatform extends BasePlatform { constructor() { super(); @@ -16,12 +19,43 @@ class AppPlatform extends BasePlatform { getPayData(url, data) { return data; } + // async getPlatformConfig() { + // console.log("开启动态获取数据。。。。。。。。"); + // const res = await getPlatform(); + // if (this.config != null) { + // if (this.config.isCheck != res.isCheck) { + // uni.setStorageSync('platformConfig', res); + // plus.runtime.restart(); + // } + // } + // this.config = res; + // uni.setStorageSync('platformConfig', res); + // } + // async getConfig() { + // // return new Promise((resolve, reject) => { + // if (this.config) { + // return this.config; + // } + // if (uni.getStorageSync('platformConfig')) { + // this.config = uni.getStorageSync('platformConfig'); + // this.getPlatformConfig(); + // return this.config; + // } + // this.config = { + // isCheck: true, + // isWebPay: false, + // version: '1.0.0', + // }; + // this.getPlatformConfig(); + // // const res = await getPlatform(); + // // this.config = res; + // return this.config; + // } AppLaunch(options) { console.log("AppLaunch", options); - uni.hideTabBar({}) + // uni.hideTabBar({}) this.getConfig().then(res => { console.log("AppLaunch", res); - if (res.isCheck) { console.log("开启审核模式开启审核模式开启审核模式开启审核模式开启审核模式开启审核模式开启审核模式"); uni.setTabBarItem({ @@ -37,11 +71,23 @@ class AppPlatform extends BasePlatform { index: 3, visible: false, }); - uni.showTabBar({}) + // uni.showTabBar({}) uni.switchTab({ url: '/pages/mall/index' }); // uni.tos + } else { + uni.setTabBarItem({ + index: 0, + visible: true, + }); + uni.setTabBarItem({ + index: 3, + visible: true, + }); + uni.switchTab({ + url: '/pages/shouye/index' + }); } }) diff --git a/pages.json b/pages.json index 9fc8c71..a47287d 100644 --- a/pages.json +++ b/pages.json @@ -8,6 +8,11 @@ "^banner$": "@/components/banner/banner.vue" }, "pages": [{ + "path": "pages/index/index", + "style": { + "navigationStyle": "custom" + } + }, { "path": "pages/shouye/index", "style": { "navigationStyle": "custom", @@ -388,16 +393,14 @@ } }, { - "path" : "pages/user/cancel-account-page", - "style" : - { + "path": "pages/user/cancel-account-page", + "style": { "navigationStyle": "custom" } }, { - "path" : "pages/hegui/hegui", - "style" : - { + "path": "pages/hegui/hegui", + "style": { "navigationStyle": "custom" } } diff --git a/pages/index/index.vue b/pages/index/index.vue new file mode 100644 index 0000000..93858a7 --- /dev/null +++ b/pages/index/index.vue @@ -0,0 +1,121 @@ + + + + +