|
|
@ -75,23 +75,24 @@ function handleSubmit(e) {
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
const { code, message: msg } = await userStore.login(params)
|
|
|
|
const { code, message: msg } = await userStore.login(params)
|
|
|
|
await userStore.getInformation()
|
|
|
|
if (code === ResultEnum.SUCCESS) {
|
|
|
|
const response = await getFilter()
|
|
|
|
await userStore.getInformation()
|
|
|
|
|
|
|
|
const response = await getFilter()
|
|
|
|
// 添加个默认显示配置
|
|
|
|
|
|
|
|
if (response.data === null) {
|
|
|
|
// 添加个默认显示配置
|
|
|
|
const systemConfig = await getConfig()
|
|
|
|
if (response.data === null) {
|
|
|
|
const onList: string[] = []
|
|
|
|
const systemConfig = await getConfig()
|
|
|
|
Object.keys(systemConfig.data).forEach((key) => {
|
|
|
|
const onList: string[] = []
|
|
|
|
|
|
|
|
Object.keys(systemConfig.data).forEach((key) => {
|
|
|
|
// 系统配置开启且个人配置开启
|
|
|
|
// 系统配置开启且个人配置开启
|
|
|
|
if (key.startsWith('iz') && systemConfig.data[key] === 'Y' && asideMap[key]?.isDefaultFilter)
|
|
|
|
if (key.startsWith('iz') && systemConfig.data[key] === 'Y' && asideMap[key]?.isDefaultFilter)
|
|
|
|
onList.push(key)
|
|
|
|
onList.push(key)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
await setFilter({ searchcount: onList.join(',') })
|
|
|
|
await setFilter({ searchcount: onList.join(',') })
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
message.destroyAll()
|
|
|
|
|
|
|
|
|
|
|
|
message.destroyAll()
|
|
|
|
|
|
|
|
if (code === ResultEnum.SUCCESS) {
|
|
|
|
|
|
|
|
const toPath = decodeURIComponent((route.query?.redirect || '/') as string)
|
|
|
|
const toPath = decodeURIComponent((route.query?.redirect || '/') as string)
|
|
|
|
message.success('登录成功,即将进入系统')
|
|
|
|
message.success('登录成功,即将进入系统')
|
|
|
|
if (route.name === LOGIN_NAME)
|
|
|
|
if (route.name === LOGIN_NAME)
|
|
|
@ -99,6 +100,7 @@ function handleSubmit(e) {
|
|
|
|
else router.replace(toPath)
|
|
|
|
else router.replace(toPath)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
|
|
|
|
message.destroyAll()
|
|
|
|
message.info(msg || '登录失败')
|
|
|
|
message.info(msg || '登录失败')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -126,24 +128,25 @@ function handleSmsSubmit(e) {
|
|
|
|
agentcode,
|
|
|
|
agentcode,
|
|
|
|
phonecode,
|
|
|
|
phonecode,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
const { code, message: msg } = res
|
|
|
|
|
|
|
|
if (code === ResultEnum.SUCCESS) {
|
|
|
|
// const { code, message: msg } = await userStore.login(params)
|
|
|
|
// const { code, message: msg } = await userStore.login(params)
|
|
|
|
await userStore.getInformation()
|
|
|
|
await userStore.getInformation()
|
|
|
|
const response = await getFilter()
|
|
|
|
const response = await getFilter()
|
|
|
|
|
|
|
|
|
|
|
|
// 添加个默认显示配置
|
|
|
|
// 添加个默认显示配置
|
|
|
|
if (response.data === null) {
|
|
|
|
if (response.data === null) {
|
|
|
|
const systemConfig = await getConfig()
|
|
|
|
const systemConfig = await getConfig()
|
|
|
|
const onList: string[] = []
|
|
|
|
const onList: string[] = []
|
|
|
|
Object.keys(systemConfig.data).forEach((key) => {
|
|
|
|
Object.keys(systemConfig.data).forEach((key) => {
|
|
|
|
// 系统配置开启且个人配置开启
|
|
|
|
// 系统配置开启且个人配置开启
|
|
|
|
if (key.startsWith('iz') && systemConfig.data[key] === 'Y' && asideMap[key]?.isDefaultFilter)
|
|
|
|
if (key.startsWith('iz') && systemConfig.data[key] === 'Y' && asideMap[key]?.isDefaultFilter)
|
|
|
|
onList.push(key)
|
|
|
|
onList.push(key)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
await setFilter({ searchcount: onList.join(',') })
|
|
|
|
await setFilter({ searchcount: onList.join(',') })
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message.destroyAll()
|
|
|
|
message.destroyAll()
|
|
|
|
if (code === ResultEnum.SUCCESS) {
|
|
|
|
|
|
|
|
const toPath = decodeURIComponent((route.query?.redirect || '/') as string)
|
|
|
|
const toPath = decodeURIComponent((route.query?.redirect || '/') as string)
|
|
|
|
message.success('登录成功,即将进入系统')
|
|
|
|
message.success('登录成功,即将进入系统')
|
|
|
|
if (route.name === LOGIN_NAME)
|
|
|
|
if (route.name === LOGIN_NAME)
|
|
|
@ -151,6 +154,7 @@ function handleSmsSubmit(e) {
|
|
|
|
else router.replace(toPath)
|
|
|
|
else router.replace(toPath)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
|
|
|
|
message.destroyAll()
|
|
|
|
message.info(msg || '登录失败')
|
|
|
|
message.info(msg || '登录失败')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -181,7 +185,6 @@ async function sendCode(value) {
|
|
|
|
phone: 13311111111,
|
|
|
|
phone: 13311111111,
|
|
|
|
agentcode: '三方系统标识8',
|
|
|
|
agentcode: '三方系统标识8',
|
|
|
|
})
|
|
|
|
})
|
|
|
|
console.log(res)
|
|
|
|
|
|
|
|
startCount()
|
|
|
|
startCount()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|