able99 4 years ago
parent
commit
36c695017e
4 changed files with 20 additions and 3 deletions
  1. 4 1
      pages/index/authorize.vue
  2. 13 1
      pages/index/index.vue
  3. 2 1
      pagesMain/aboutUs.vue
  4. 1 0
      utils/request.js

+ 4 - 1
pages/index/authorize.vue

@@ -40,7 +40,10 @@
 						type: 'success',
 					})
 					setTimeout(() => {
-						uni.switchTab({
+						// uni.switchTab({
+						// 	url: '/pages/index/index'
+						// });
+						uni.navigateTo({
 							url: '/pages/index/index'
 						});
 					}, 2000)

+ 13 - 1
pages/index/index.vue

@@ -248,6 +248,17 @@
 				windowHeight: 0
 			}
 		},
+		onLoad() {
+			uni.removeStorage({
+				key: 'token'
+			})
+			uni.removeStorage({
+				key: 'userData'
+			})
+			uni.removeStorage({
+				key: 'wxLoginData'
+			})
+		},
 		onReady() {
 			// this.appLoginWx()
 			uni.getSystemInfo({
@@ -391,6 +402,7 @@
 							isMaster: res.extra.auth.isMaster,
 							registerFlag: res.extra.auth.registerFlag,
 							auditState: res.extra.auth.auditState,
+							roleInfos: res.extra.auth2.roleInfos
 						}
 					})
 					if (res.extra.auth.registerFlag == 1 && res.extra.auth.auditState == 2) {
@@ -443,7 +455,7 @@
 			float: left;
 			position: absolute;
 			left: 50%;
-			top: 40px;
+			top: 20%;
 			transform: translateX(-50%);
 		}
 

+ 2 - 1
pagesMain/aboutUs.vue

@@ -1,7 +1,7 @@
 <template>
     <view class="container">
         <view class="logoView">
-            <image mode="aspectFit" :style="{width: windowWidth*0.5, height: windowWidth*0.5}" src="../static/images/loginLogo.png"></image> 
+            <image mode="aspectFit" :style="{width: '90px', height: '90px'}" src="../static/images/loginLogo.png"></image> 
         </view>
         <view class="logoText">千家地</view>
         <view class="copyright">
@@ -30,6 +30,7 @@
 <style lang="less" scoped>
 .container {
     .logoView {
+        margin-top: 20%;
         text-align: center;
         padding: 0 20px;
     }

+ 1 - 0
utils/request.js

@@ -21,6 +21,7 @@ const request = (url, data, method = 'GET') => {
 				if (res.statusCode == 200) {
 					let data = res.data
 					if (data.code == 40001) {
+						uni.clearStorageSync()
 						uni.navigateTo({
 							url: '/pages/index/index'
 						});