|
|
@@ -363,7 +363,7 @@ const initEditData = () => {
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+/** 检测保险公司账号登录是否有效,校验必填字段后调用登录检测接口,根据结果提示用户或触发验证码登录流程 */
|
|
|
const loginDetection = () => {
|
|
|
if (!insuranceAccountForm.value.insCompanyId) {
|
|
|
ElMessage.warning('请选择保险公司')
|
|
|
@@ -384,7 +384,7 @@ const loginDetection = () => {
|
|
|
api.insuranceApi.detectLogin(params).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
if (res.data) {
|
|
|
- ElMessage.success('登录信息有效')
|
|
|
+ ElMessage.success(res.msg || '登录信息有效')
|
|
|
} else {
|
|
|
ElMessage.warning('登录信息无效,请重新登录')
|
|
|
setTimeout(() => {
|
|
|
@@ -395,16 +395,22 @@ const loginDetection = () => {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+/** 重新登录按钮加载状态 */
|
|
|
const againLoginLoading = ref(false)
|
|
|
+/** 重新登录对话框的显示状态 */
|
|
|
const againLoginDialog = ref(false)
|
|
|
+/** 验证码输入值 */
|
|
|
const captcha = ref('')
|
|
|
-const agreementId = ref('')
|
|
|
+/** 验证码标识,用于关联验证码图片与用户输入的验证码值 */
|
|
|
const captchaId = ref('')
|
|
|
|
|
|
+
|
|
|
+/** 重新登录保险公司账号,通过验证码进行二次验证登录 */
|
|
|
const againLogin = async () => {
|
|
|
const params = {
|
|
|
captcha: captcha.value,
|
|
|
- agreementId: agreementId.value,
|
|
|
+ username: insuranceAccountForm.value.username,
|
|
|
+ password: insuranceAccountForm.value.password,
|
|
|
}
|
|
|
againLoginLoading.value = true
|
|
|
api.insurancePolicyApi.againLogin({
|
|
|
@@ -414,12 +420,12 @@ const againLogin = async () => {
|
|
|
if (res.code == 200) {
|
|
|
againLoginDialog.value = false
|
|
|
captcha.value = ''
|
|
|
- agreementId.value = ''
|
|
|
ElMessage.success('登录成功')
|
|
|
}
|
|
|
}).finally(() => againLoginLoading.value = false)
|
|
|
}
|
|
|
|
|
|
+/** 获取保验证码,打开重新登录对话框 */
|
|
|
const getGuoRenCaptcha = () => {
|
|
|
const params = {
|
|
|
username: insuranceAccountForm.value.username,
|