个人中心登录逻辑调整
This commit is contained in:
@@ -90,7 +90,6 @@
|
||||
this.$Router.replace({name: 'AuthRole'})
|
||||
return
|
||||
}
|
||||
this.$Router.back()
|
||||
this.$Router.pushTab({name: 'Life'})
|
||||
uni.hideLoading()
|
||||
}).catch((err) => {
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -225,45 +225,25 @@
|
||||
},
|
||||
// 个人档案
|
||||
onFiles() {
|
||||
if (this.isLogin()) {
|
||||
console.log("登录")
|
||||
}
|
||||
},
|
||||
// 按钮导航
|
||||
onBtn(name, params) {
|
||||
if (this.isLogin()) {
|
||||
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;
|
||||
},
|
||||
// 退出登录
|
||||
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({
|
||||
|
||||
6596
unpackage/dist/dev/app-plus/app-service.js
vendored
6596
unpackage/dist/dev/app-plus/app-service.js
vendored
File diff suppressed because one or more lines are too long
2424
unpackage/dist/dev/app-plus/app-view.js
vendored
2424
unpackage/dist/dev/app-plus/app-view.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user