|
|
@ -1,5 +1,5 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div class="aui-wrapper aui-page__login"> |
|
|
<div v-if="isShowLogin" class="aui-wrapper aui-page__login"> |
|
|
|
|
|
|
|
|
<div class="aui-content__wrapper"> |
|
|
<div class="aui-content__wrapper"> |
|
|
<main class="aui-content"> |
|
|
<main class="aui-content"> |
|
|
@ -147,6 +147,7 @@ let loading // 加载动画 |
|
|
export default { |
|
|
export default { |
|
|
data () { |
|
|
data () { |
|
|
return { |
|
|
return { |
|
|
|
|
|
isShowLogin: true, |
|
|
i18nMessages: messages, |
|
|
i18nMessages: messages, |
|
|
captchaPath: '', |
|
|
captchaPath: '', |
|
|
dataForm: { |
|
|
dataForm: { |
|
|
@ -184,7 +185,13 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
created () { |
|
|
created () { |
|
|
|
|
|
//平阴联动平台 登陆 |
|
|
|
|
|
if (this.$route.query.platformToken) { |
|
|
|
|
|
this.isShowLogin = false; |
|
|
|
|
|
this.getAutoLogin(this.$route.query.platformToken) |
|
|
|
|
|
}else{ |
|
|
this.getCaptcha() |
|
|
this.getCaptcha() |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
methods: { |
|
|
methods: { |
|
|
@ -230,6 +237,25 @@ export default { |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 平阴联动 自动登录接口 |
|
|
|
|
|
getAutoLogin (platformToken) { |
|
|
|
|
|
this.dataForm.thirdToken = platformToken; |
|
|
|
|
|
this.dataForm.platform = "pyld"; |
|
|
|
|
|
this.$http.post(`/auth/sso/oper/third/login`,this.dataForm).then(({ data: res }) => { |
|
|
|
|
|
if (res.code !== 0) { |
|
|
|
|
|
if(res.code == 8302){ |
|
|
|
|
|
return this.$message.error(res.internalMsg) |
|
|
|
|
|
} |
|
|
|
|
|
return this.$message.error(res.msg) |
|
|
|
|
|
} |
|
|
|
|
|
localStorage.setItem('customerId', '613cc61a6b8ce4c70d21bd413dac72cc') |
|
|
|
|
|
localStorage.setItem('userType', 'work') |
|
|
|
|
|
localStorage.setItem('showHeader', '0') |
|
|
|
|
|
Cookies.set('token', res.data.token) |
|
|
|
|
|
this.$router.replace({ name: 'home' }) |
|
|
|
|
|
}).catch(() => { }) |
|
|
|
|
|
// epmet-ext9.elinkservice.cn/platform-admin |
|
|
|
|
|
}, |
|
|
//选择客户 |
|
|
//选择客户 |
|
|
selectCustomer (row) { |
|
|
selectCustomer (row) { |
|
|
localStorage.setItem('customerId', row.customerId) |
|
|
localStorage.setItem('customerId', row.customerId) |
|
|
|