From 1d202d3e8688dc1aa3345bbe74a2e0a9d5e5bb97 Mon Sep 17 00:00:00 2001 From: youmengting <2080639302@qq.com> Date: Wed, 22 Nov 2023 16:51:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=AE=A2=E5=8D=95=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 10 +- Utils/Request.js | 4 +- manifest.json | 3 +- pages.json | 27 +++-- pages/home/oderDetails/oderDetails.vue | 58 +++++---- pages/login/login/login.vue | 14 +-- pages/login/updatePsd/updatePsd.vue | 13 +- pages/tabBar/home/home.vue | 110 +++++++++-------- pages/tabBar/user/user.vue | 5 +- .../user/orderStatistics/orderStatistics.vue | 114 +++++++++++------- uni.scss | 23 ++++ 11 files changed, 224 insertions(+), 157 deletions(-) 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 @@