fix: 统一退出登录跳转逻辑并使用store的logout方法

This commit is contained in:
yangzhe 2025-12-08 09:49:07 +08:00
parent 036064de5e
commit ac24af1cf9
2 changed files with 6 additions and 4 deletions

View File

@ -297,7 +297,7 @@ export default {
// 退 // 退
handleLogout() { handleLogout() {
this.$store.commit("logout"); this.$store.commit("logout");
uni.navigateTo({ uni.reLaunch({
// //
url: "/pages/login/login/index?type=" + this.vuex_userType, url: "/pages/login/login/index?type=" + this.vuex_userType,
}); });

View File

@ -122,11 +122,13 @@ export default {
success: (res) => { success: (res) => {
if (res.confirm) { if (res.confirm) {
// //
this.$u.vuex('vuex_teacherInfo', {}); // this.$u.vuex('vuex_teacherInfo', {});
this.$u.vuex('vuex_token', ''); // this.$u.vuex('vuex_token', '');
this.$store.commit("logout");
// //
uni.reLaunch({ uni.reLaunch({
url: '/pages/login/login/login' //
url: "/pages/login/login/index?type=" + this.vuex_userType,
}); });
} }
} }