diff --git a/App.vue b/App.vue index b485264..07ebc11 100644 --- a/App.vue +++ b/App.vue @@ -24,10 +24,16 @@ positionGunPrice:0 }, onLaunch: function() { - console.log('App Launch') + if(!uni.getStorageSync('oiluser')||!uni.getStorageSync('oiltoken')){ + uni.reLaunch({ + url:'/pages/login/login/login' + }) + } }, onShow: function() { - console.log('App Show') + this.globalData.userInfo = uni.getStorageSync('oiluser') || ''; + this.globalData.token = uni.getStorageSync('oiltoken') || ''; + }, onHide: function() { console.log('App Hide') diff --git a/Utils/Request.js b/Utils/Request.js index 38d3043..bccfac4 100644 --- a/Utils/Request.js +++ b/Utils/Request.js @@ -18,11 +18,11 @@ function request(method, url, data) { app.globalData.userInfo = ''; app.globalData.token = ''; uni.setStorage({ - key: "user", + key: "oiluser", data: '' }) uni.setStorage({ - key: "token", + key: "oiltoken", data: '' }) uni.showToast({ diff --git a/manifest.json b/manifest.json index 936198d..1877f41 100644 --- a/manifest.json +++ b/manifest.json @@ -52,7 +52,8 @@ "mp-weixin" : { "appid" : "wx6c929e52fcd8913a", "setting" : { - "urlCheck" : false + "urlCheck" : true, + "minified" : true }, "usingComponents" : true }, diff --git a/pages.json b/pages.json index a738834..c536cb7 100644 --- a/pages.json +++ b/pages.json @@ -1,5 +1,19 @@ { "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages + { + "path": "pages/tabBar/home/home", + "style": { + "navigationBarTextStyle": "white", + "navigationBarTitleText": "嗨森逛", + "navigationBarBackgroundColor": "#0083f5", + "backgroundColorTop": "#0083f5", + "onReachBottomDistance": 50, + "app-plus": { + "titleNView": false, //禁用原生导航栏 + "softinputNavBar": "none" + } + } + }, { "path": "pages/login/login/login", "style": { @@ -27,19 +41,6 @@ "enablePullDownRefresh": false } - }, { - "path": "pages/tabBar/home/home", - "style": { - "navigationBarTextStyle": "white", - "navigationBarTitleText": "嗨森逛", - "navigationBarBackgroundColor": "#0083f5", - "backgroundColorTop": "#0083f5", - "onReachBottomDistance": 50, - "app-plus": { - "titleNView": false, //禁用原生导航栏 - "softinputNavBar": "none" - } - } }, { "path": "pages/home/oderDetails/oderDetails", "style": { diff --git a/pages/home/oderDetails/oderDetails.vue b/pages/home/oderDetails/oderDetails.vue index a1f0fd5..4531f87 100644 --- a/pages/home/oderDetails/oderDetails.vue +++ b/pages/home/oderDetails/oderDetails.vue @@ -1,19 +1,20 @@