提交 e0862d0a 编写于 作者: Yuanzhao.dai's avatar Yuanzhao.dai

login out

上级 45e6f108
......@@ -86,14 +86,27 @@ export default {
vm.$router.push({ path: 'home' })
} else {
if(!localStorage.getItem('storageToken')) {
window.location.href = getLoginUrl('?from=work&type=logout') // 没有token返回登录页面
return
console.log('域名',window.location.host)
if(window.location.host.indexOf("work.yunqueyi") != -1) {
window.location.href = getLoginUrl('?from=work&type=logout') // 没有token返回登录页面
return;
} else {
this.$router.push('/login')
return;
}
}
}
}else {
if(!localStorage.getItem('storageToken')) {
window.location.href = getLoginUrl('?from=work&type=logout') // 没有token返回登录页面
return
if(window.location.host.indexOf("work.yunqueyi") != -1) {
window.location.href = getLoginUrl('?from=work&type=logout') // 没有token返回登录页面
return;
} else {
this.$router.push('/login');
return;
}
}
}
vm.changeToken(vm.token)
......
......@@ -55,7 +55,12 @@ export default {
if(vm.idType == 1) { // 内部
window.location.href = getInnerLoginUrl()
} else {
window.location.href = getLoginUrl('?from=work&type=logout')
if(window.location.host.indexOf("work.yunqueyi") != -1) {
window.location.href = getLoginUrl('?from=work&type=logout')
} else {
this.$router.push('/login')
}
}
}
if(command === 'forward') {
......
......@@ -147,9 +147,16 @@
},
goToLogin() {
this.loginFlag = true
this.resetMobileErr = false;
this.resetCodeErr = false;
this.resetPWDErr = false
this.resetPassword = {}
},
goToResetPassword() {
this.loginFlag = false
this.loginFlag = false;
this.loginMobileErr = false;
this.loginPWDErr = false
this.loginData = {}
},
showVR() {
this.showVRCode = true;
......@@ -184,7 +191,6 @@
deviceInfo: getDeviceInfo()
};
this.saasPOST('/mobiles/sendCaptchaNew',params, 'application/x-www-form-urlencoded;charset=UTF-8').then(data => {
console.log('返回结果', data)
if (data.mobileFlag == 2) {
this.resetMobileErr = true;
this.resetMobileErrText = '该手机号尚未注册!';
......@@ -243,10 +249,8 @@
ipAddress: localStorage.getItem("ipAddress"),
password: md5(this.loginData.password).toUpperCase(),
token: localStorage.getItem("token"),
}
console.log('params',params)
};
this.saasGET('/registers/saasLogin',params).then(data => {
console.log('返回结果', data)
if (data.mobileFlag == 1) {
/*this.$message({
message: '手机号或密码不正确!',
......@@ -266,6 +270,7 @@
return;
}
localStorage.setItem("token", data.token);
localStorage.setItem("storageToken", data.token);
localStorage.setItem('doctorId',data.picapDoctor.id);
localStorage.setItem("mobilePhone", params.mobile);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册