|
@@ -146,9 +146,14 @@ export const userStore = defineStore('user', {
|
|
|
|
|
|
// 登出系统
|
|
|
async handleLogout() {
|
|
|
- await logout(uni.getStorageSync('token'))
|
|
|
- this.resetUserData();
|
|
|
- return !this.isLogin;
|
|
|
+ try {
|
|
|
+ await logout(uni.getStorageSync('token'))
|
|
|
+ this.resetUserData()
|
|
|
+ } catch (error) {
|
|
|
+ console.log('handleLogout:error', error)
|
|
|
+ this.resetUserData()
|
|
|
+ }
|
|
|
+ // return !this.isLogin;
|
|
|
},
|
|
|
// 账号注册-回到首页
|
|
|
async handleUserLogout () {
|