diff --git a/pages/login/login.vue b/pages/login/login.vue index 78a3c13..40661cf 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -117,7 +117,8 @@ export default { uni.setStorageSync('userinfo', res.data); uni.setStorageSync('rongyun', res.data.rongcloud_token); this.$u.route({ - url: '/pages/user/myinfo' + url: '/pages/user/myinfo', + type:"redirect" }); } }); diff --git a/pages/user/myinfo.vue b/pages/user/myinfo.vue index b143f52..5d461ae 100644 --- a/pages/user/myinfo.vue +++ b/pages/user/myinfo.vue @@ -54,8 +54,10 @@ export default { info:{}, } }, - onLoad() { + onShow(){ this.getmyinfo() + }, + onLoad() { const user = uni.getStorageSync('userinfo'); console.log(user) this.imService.login(user.userId,user.member_nickname,user.member_avatar)