|
|
|
@ -75,6 +75,7 @@ function handleSubmit(e) {
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
const { code, message: msg } = await userStore.login(params)
|
|
|
|
|
if (code === ResultEnum.SUCCESS) {
|
|
|
|
|
await userStore.getInformation()
|
|
|
|
|
const response = await getFilter()
|
|
|
|
|
|
|
|
|
@ -91,7 +92,7 @@ function handleSubmit(e) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message.destroyAll()
|
|
|
|
|
if (code === ResultEnum.SUCCESS) {
|
|
|
|
|
|
|
|
|
|
const toPath = decodeURIComponent((route.query?.redirect || '/') as string)
|
|
|
|
|
message.success('登录成功,即将进入系统')
|
|
|
|
|
if (route.name === LOGIN_NAME)
|
|
|
|
@ -99,6 +100,7 @@ function handleSubmit(e) {
|
|
|
|
|
else router.replace(toPath)
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
message.destroyAll()
|
|
|
|
|
message.info(msg || '登录失败')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -126,6 +128,8 @@ function handleSmsSubmit(e) {
|
|
|
|
|
agentcode,
|
|
|
|
|
phonecode,
|
|
|
|
|
})
|
|
|
|
|
const { code, message: msg } = res
|
|
|
|
|
if (code === ResultEnum.SUCCESS) {
|
|
|
|
|
// const { code, message: msg } = await userStore.login(params)
|
|
|
|
|
await userStore.getInformation()
|
|
|
|
|
const response = await getFilter()
|
|
|
|
@ -143,7 +147,6 @@ function handleSmsSubmit(e) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message.destroyAll()
|
|
|
|
|
if (code === ResultEnum.SUCCESS) {
|
|
|
|
|
const toPath = decodeURIComponent((route.query?.redirect || '/') as string)
|
|
|
|
|
message.success('登录成功,即将进入系统')
|
|
|
|
|
if (route.name === LOGIN_NAME)
|
|
|
|
@ -151,6 +154,7 @@ function handleSmsSubmit(e) {
|
|
|
|
|
else router.replace(toPath)
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
message.destroyAll()
|
|
|
|
|
message.info(msg || '登录失败')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -181,7 +185,6 @@ async function sendCode(value) {
|
|
|
|
|
phone: 13311111111,
|
|
|
|
|
agentcode: '三方系统标识8',
|
|
|
|
|
})
|
|
|
|
|
console.log(res)
|
|
|
|
|
startCount()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|