张文飞 3 vuotta sitten
vanhempi
commit
edda9890ce
1 muutettua tiedostoa jossa 6 lisäystä ja 5 poistoa
  1. 6 5
      components/subComponents/dmLogin.vue

+ 6 - 5
components/subComponents/dmLogin.vue

@@ -154,15 +154,16 @@
 				});
 			    
 				if(ret.data.success){
+					uni.$emit('request');
+					this.knowAction();
 					uni.showToast({
 						icon:"none",
 						title:"登录成功"
 					});
-					this.token = ret.data.single;
-					this.$cache.set('_token_owner_union', this.token);
-					app.globalData.token = this.token;
-					uni.$emit('request');
-					this.knowAction();
+					let token = ret.data.single;
+					this.$cache.set('_token_owner_union', token);
+					app.globalData.token = token;
+					
 				}else{
 					uni.showToast({
 						icon:"none",