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 @@
+
+
+
+
+
+
+
+
+
+
+
+
+