个人中心登录逻辑调整

This commit is contained in:
唐明明
2022-06-07 17:38:39 +08:00
parent b76167eb0d
commit 76554a096c
5 changed files with 4504 additions and 4525 deletions

View File

@@ -90,7 +90,6 @@
this.$Router.replace({name: 'AuthRole'})
return
}
this.$Router.back()
this.$Router.pushTab({name: 'Life'})
uni.hideLoading()
}).catch((err) => {

View File

@@ -72,7 +72,7 @@
storage_id : this.storageId
}).then(res => {
this.$store.commit('setIsNew', 1)
this.$Router.back()
this.$Router.pushTab({name: 'Life'})
}).catch(err => {
this.disabled = false
uni.showToast({

View File

@@ -225,45 +225,25 @@
},
// 个人档案
onFiles() {
if (this.isLogin()) {
console.log("登录")
}
console.log("登录")
},
// 按钮导航
onBtn(name, params) {
if (this.isLogin()) {
this.$Router.push({
name,
params
});
}
this.$Router.push({
name,
params
});
},
goSetting() {
if (this.isLogin()) {
this.$Router.push({
name: 'Setting'
})
}
},
// 检查登录
isLogin() {
if (this.$store.state.token === '') {
const Auth = new userAuth();
Auth.Login();
return false;
}
return true;
this.$Router.push({
name: 'Setting'
})
},
// 退出登录
logOut() {
this.userInfo = {
nickname: '',
avatar: '',
identity: []
};
this.$store.commit('setToken', '');
// 断开IM链接
im.disconnect()
this.$store.commit('setIsNew', '');
this.$Router.replaceAll({name: 'Auth'})
},
copy(data) {
uni.setClipboardData({

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long