jwg 8 months ago
parent 899a8d9275
commit 847d7f3409

@ -84,7 +84,7 @@ export default {
}), }),
}, },
created() { created() {
/* if (/wxwork/i.test(navigator.userAgent)) { if (/wxwork/i.test(navigator.userAgent)) {
// //
} else { } else {
// //
@ -93,7 +93,7 @@ export default {
// //
return return
// window.location.href = 'https://your-company-wechat-url' // window.location.href = 'https://your-company-wechat-url'
} */ }
this.handleInit() this.handleInit()
this.handleAlive() this.handleAlive()
}, },

@ -115,7 +115,7 @@ export default {
}, },
created() { created() {
// //
/* isProhibited().then((res) => { isProhibited().then((res) => {
if (res.data) { if (res.data) {
console.log(res.data, 'isProhibited') console.log(res.data, 'isProhibited')
if (/wxwork/i.test(navigator.userAgent)) { if (/wxwork/i.test(navigator.userAgent)) {
@ -129,7 +129,7 @@ export default {
return return
} }
} }
}) */ })
// //
// this.tenantEnable = getTenantEnable(); // this.tenantEnable = getTenantEnable();
// if (this.tenantEnable) { // if (this.tenantEnable) {
@ -155,15 +155,6 @@ export default {
// // code // // code
sendCode({ code: this.code, state: this.state, type: 40 }) sendCode({ code: this.code, state: this.state, type: 40 })
.then(async (res) => { .then(async (res) => {
if (res.data.code == 500) {
/* Toast.loading({
duration: 3, // toast
forbidClick: false,
message: res.data.msg,
}) */
this.firstLogin = true
return
}
await setToken(res.data) await setToken(res.data)
await this.$store.dispatch( await this.$store.dispatch(
'common/user/setAuthorization', 'common/user/setAuthorization',
@ -186,7 +177,16 @@ export default {
window.location.href = process.env.VUE_APP_BASE_API + '/#/home' window.location.href = process.env.VUE_APP_BASE_API + '/#/home'
}) })
.catch((error) => { .catch((error) => {
console.log(error, 'error') this.$loading(false)
Toast({
duration: 3000, // toast
forbidClick: false,
message: '请输入账号密码首次绑定',
})
this.firstLogin = true
this.$nextTick(() => {
return
})
}) })
} }
}, },

Loading…
Cancel
Save