个人中心登录逻辑调整
This commit is contained in:
@@ -90,7 +90,6 @@
|
|||||||
this.$Router.replace({name: 'AuthRole'})
|
this.$Router.replace({name: 'AuthRole'})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.$Router.back()
|
|
||||||
this.$Router.pushTab({name: 'Life'})
|
this.$Router.pushTab({name: 'Life'})
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
|
|||||||
@@ -72,7 +72,7 @@
|
|||||||
storage_id : this.storageId
|
storage_id : this.storageId
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.$store.commit('setIsNew', 1)
|
this.$store.commit('setIsNew', 1)
|
||||||
this.$Router.back()
|
this.$Router.pushTab({name: 'Life'})
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|||||||
@@ -225,45 +225,25 @@
|
|||||||
},
|
},
|
||||||
// 个人档案
|
// 个人档案
|
||||||
onFiles() {
|
onFiles() {
|
||||||
if (this.isLogin()) {
|
console.log("登录")
|
||||||
console.log("登录")
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
// 按钮导航
|
// 按钮导航
|
||||||
onBtn(name, params) {
|
onBtn(name, params) {
|
||||||
if (this.isLogin()) {
|
this.$Router.push({
|
||||||
this.$Router.push({
|
name,
|
||||||
name,
|
params
|
||||||
params
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
goSetting() {
|
goSetting() {
|
||||||
if (this.isLogin()) {
|
this.$Router.push({
|
||||||
this.$Router.push({
|
name: 'Setting'
|
||||||
name: 'Setting'
|
})
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 检查登录
|
|
||||||
isLogin() {
|
|
||||||
if (this.$store.state.token === '') {
|
|
||||||
const Auth = new userAuth();
|
|
||||||
Auth.Login();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
},
|
},
|
||||||
// 退出登录
|
// 退出登录
|
||||||
logOut() {
|
logOut() {
|
||||||
this.userInfo = {
|
|
||||||
nickname: '',
|
|
||||||
avatar: '',
|
|
||||||
identity: []
|
|
||||||
};
|
|
||||||
this.$store.commit('setToken', '');
|
this.$store.commit('setToken', '');
|
||||||
// 断开IM链接
|
this.$store.commit('setIsNew', '');
|
||||||
im.disconnect()
|
this.$Router.replaceAll({name: 'Auth'})
|
||||||
},
|
},
|
||||||
copy(data) {
|
copy(data) {
|
||||||
uni.setClipboardData({
|
uni.setClipboardData({
|
||||||
|
|||||||
6574
unpackage/dist/dev/app-plus/app-service.js
vendored
6574
unpackage/dist/dev/app-plus/app-service.js
vendored
File diff suppressed because one or more lines are too long
2412
unpackage/dist/dev/app-plus/app-view.js
vendored
2412
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