fix: 统一退出登录跳转逻辑并使用store的logout方法
This commit is contained in:
parent
036064de5e
commit
ac24af1cf9
|
|
@ -297,7 +297,7 @@ export default {
|
|||
// 退出登录
|
||||
handleLogout() {
|
||||
this.$store.commit("logout");
|
||||
uni.navigateTo({
|
||||
uni.reLaunch({
|
||||
// 与项目其余位置保持一致的登录页路径
|
||||
url: "/pages/login/login/index?type=" + this.vuex_userType,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -122,11 +122,13 @@ export default {
|
|||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
// 清除用户信息
|
||||
this.$u.vuex('vuex_teacherInfo', {});
|
||||
this.$u.vuex('vuex_token', '');
|
||||
// this.$u.vuex('vuex_teacherInfo', {});
|
||||
// this.$u.vuex('vuex_token', '');
|
||||
this.$store.commit("logout");
|
||||
// 跳转到登录页
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login/login'
|
||||
// 与项目其余位置保持一致的登录页路径
|
||||
url: "/pages/login/login/index?type=" + this.vuex_userType,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue