|
|
|
@ -107,37 +107,37 @@ onMounted(async () => { |
|
|
|
console.log(res, 'res'); |
|
|
|
console.log(res, 'res'); |
|
|
|
}) |
|
|
|
}) |
|
|
|
// 渠道校验 |
|
|
|
// 渠道校验 |
|
|
|
let checkToast = null |
|
|
|
// let checkToast = null |
|
|
|
try { |
|
|
|
// try { |
|
|
|
checkToast = showLoadingToast({ |
|
|
|
// checkToast = showLoadingToast({ |
|
|
|
message: '加载中...', |
|
|
|
// message: '加载中...', |
|
|
|
duration: 0, |
|
|
|
// duration: 0, |
|
|
|
loadingType: 'spinner', |
|
|
|
// loadingType: 'spinner', |
|
|
|
forbidClick: true, |
|
|
|
// forbidClick: true, |
|
|
|
}) |
|
|
|
// }) |
|
|
|
const checkRes = await Post('config/downSource', { |
|
|
|
// const checkRes = await Post('config/downSource', { |
|
|
|
source: urlParams.value.ht || '95810000', |
|
|
|
// source: urlParams.value.ht || '95810000', |
|
|
|
}) |
|
|
|
// }) |
|
|
|
checkToast.close() |
|
|
|
// checkToast.close() |
|
|
|
if (checkRes.code === 0 && checkRes.data !== null) { |
|
|
|
// if (checkRes.code === 0 && checkRes.data !== null) { |
|
|
|
showDialog({ |
|
|
|
// showDialog({ |
|
|
|
title: '提示', |
|
|
|
// title: '提示', |
|
|
|
message: checkRes.data.toast, |
|
|
|
// message: checkRes.data.toast, |
|
|
|
confirmButtonText: '确定', |
|
|
|
// confirmButtonText: '确定', |
|
|
|
}).then((res) => { |
|
|
|
// }).then((res) => { |
|
|
|
Utils.closeWindow() |
|
|
|
// Utils.closeWindow() |
|
|
|
}) |
|
|
|
// }) |
|
|
|
return |
|
|
|
// return |
|
|
|
} |
|
|
|
// } |
|
|
|
} catch (error) { |
|
|
|
// } catch (error) { |
|
|
|
console.log('渠道校验异常:', error) |
|
|
|
// console.log('渠道校验异常:', error) |
|
|
|
if (checkToast) { |
|
|
|
// if (checkToast) { |
|
|
|
checkToast.close(); |
|
|
|
// checkToast.close(); |
|
|
|
} |
|
|
|
// } |
|
|
|
} |
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
urlParams.value = Utils.getUrlParams() |
|
|
|
urlParams.value = Utils.getUrlParams() |
|
|
|
await initToken() |
|
|
|
initToken() |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
// 方法 |
|
|
|
// 方法 |
|
|
|
@ -210,6 +210,9 @@ const initToken = async () => { |
|
|
|
if (store.hotUser) { |
|
|
|
if (store.hotUser) { |
|
|
|
getHotUserData() |
|
|
|
getHotUserData() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//保存分支机构 |
|
|
|
|
|
|
|
const branchCompany = res.data.branchCompany || ''; |
|
|
|
|
|
|
|
store.setBranchCompany(branchCompany); |
|
|
|
|
|
|
|
|
|
|
|
// 微信鉴权异步执行,不阻塞 token 初始化主流程。 |
|
|
|
// 微信鉴权异步执行,不阻塞 token 初始化主流程。 |
|
|
|
if (((Utils.isWeiXin() && !Utils.isMiniProgram()) || isDev()) && nextUserInfo.versionNo1) { |
|
|
|
if (((Utils.isWeiXin() && !Utils.isMiniProgram()) || isDev()) && nextUserInfo.versionNo1) { |
|
|
|
@ -217,20 +220,25 @@ const initToken = async () => { |
|
|
|
console.warn('微信鉴权异步执行失败:', error) |
|
|
|
console.warn('微信鉴权异步执行失败:', error) |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 获取 ASR 配置(elderlyData 必须是可解密的字符串) |
|
|
|
try { |
|
|
|
try { |
|
|
|
if (isElder && data.elderlyData && nextUserInfo.versionNo1) { |
|
|
|
const elderlyData = data.elderlyData |
|
|
|
|
|
|
|
if (isElder && typeof elderlyData === 'string' && elderlyData && nextUserInfo.versionNo1) { |
|
|
|
const year = new Date().getFullYear() |
|
|
|
const year = new Date().getFullYear() |
|
|
|
const versionNo = DecryptionECB( |
|
|
|
const versionNo = DecryptionECB( |
|
|
|
`${year}${year}${year}${year}`, |
|
|
|
`${year}${year}${year}${year}`, |
|
|
|
nextUserInfo.versionNo1, |
|
|
|
nextUserInfo.versionNo1, |
|
|
|
) |
|
|
|
) |
|
|
|
const decrypted = Decryption( |
|
|
|
const key = versionNo.substring(0, 16) |
|
|
|
versionNo.substring(0, 16), |
|
|
|
const iv = versionNo.substring(16, 32) |
|
|
|
versionNo.substring(16, 32), |
|
|
|
if (key.length === 16 && iv.length === 16) { |
|
|
|
data.elderlyData, |
|
|
|
const decrypted = Decryption(key, iv, elderlyData) |
|
|
|
) |
|
|
|
const deAsrConfig = decrypted.length >= 2 ? decrypted.slice(1, -1) : decrypted |
|
|
|
store.asrConfig = JSON.parse(decrypted.slice(1, -1)) |
|
|
|
console.log('deAsrConfig', deAsrConfig) |
|
|
|
|
|
|
|
if (deAsrConfig) { |
|
|
|
|
|
|
|
store.setAsrConfig(JSON.parse(deAsrConfig)) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} catch (error) { |
|
|
|
} catch (error) { |
|
|
|
console.warn('获取 ASR 配置失败:', error) |
|
|
|
console.warn('获取 ASR 配置失败:', error) |
|
|
|
@ -386,8 +394,7 @@ const getToken = async () => { |
|
|
|
bpErrorCode: urlParams.value.bErrorCode || urlParams.value.brErrorCode || '', |
|
|
|
bpErrorCode: urlParams.value.bErrorCode || urlParams.value.brErrorCode || '', |
|
|
|
bpErrorContent: |
|
|
|
bpErrorContent: |
|
|
|
urlParams.value.bErrorContent || |
|
|
|
urlParams.value.bErrorContent || |
|
|
|
`${urlParams.value.policyNo ? urlParams.value.policyNo + '#' : ''}${ |
|
|
|
`${urlParams.value.policyNo ? urlParams.value.policyNo + '#' : ''}${urlParams.value.errorMsg ? urlParams.value.errorMsg : '' |
|
|
|
urlParams.value.errorMsg ? urlParams.value.errorMsg : '' |
|
|
|
|
|
|
|
}` || |
|
|
|
}` || |
|
|
|
'', |
|
|
|
'', |
|
|
|
bpErrorModule: urlParams.value.bErrorModule || '', // 电子回访断点服务 |
|
|
|
bpErrorModule: urlParams.value.bErrorModule || '', // 电子回访断点服务 |
|
|
|
@ -592,7 +599,4 @@ const getHotUserData = () => { |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<style scoped> |
|
|
|
<style scoped></style> |
|
|
|
</style> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|