Browse Source

fix 登录

he2802 3 years ago
parent
commit
785d2ca218
1 changed files with 7 additions and 1 deletions
  1. 7 1
      pages2/register/bind.vue

+ 7 - 1
pages2/register/bind.vue

@@ -64,9 +64,15 @@ export default {
 						uni.setStorageSync('token',uni.getStorageSync('token_temp'));
 						uni.removeStorageSync('user_account_temp') //移除临时账号
 						uni.removeStorageSync('token_temp') //移除临时token
-						uni.switchTab({
+						uni.reLaunch({
 							url:'/pages/index/index'
 						})
+						that.$api.getInfo().then(resdata => {
+							if(resdata.data.code == 200){
+								that.$store.state.userInfo = resdata.data.data;
+							}
+							
+						});
 					} else {
 						that.$u.toast(res.data.msg);
 					}