Sfoglia il codice sorgente

opt:用户退出登录后会将身份证信息置为空数组

Shu 3 mesi fa
parent
commit
6cbfa7a77b
1 ha cambiato i file con 7 aggiunte e 4 eliminazioni
  1. 7 4
      pages/my/my.vue

+ 7 - 4
pages/my/my.vue

@@ -97,7 +97,7 @@
 		},
 		methods: {
 			...mapMutations('m_user', ['updateUserInfo', 'updateToken']),
-			...mapMutations('m_business', ['updateCurrentHotel']),
+			...mapMutations('m_business', ['updateCurrentHotel', 'updateIdCardInfo']),
 			navigateTo(url) {
 				if (url !== '' && url !== null && url !== undefined) {
 					if (url === '/pages/order/order') {
@@ -117,12 +117,15 @@
 				console.log(this.token)
 				let res = await uni.$http.post('/logout')
 				console.log(res)
-				uni.redirectTo({
-					url: '/pages/login/login'
-				})
 				this.updateUserInfo({name:''})
 				this.updateToken('')
 				this.updateCurrentHotel({})
+				this.updateIdCardInfo([])
+
+				uni.redirectTo({
+					url: '/pages/login/login'
+				})
+				
 			},
 			renderPhoneNumber(str) {
 				if(!stringHasText(this.userInfo.phone)) return ""