diff --git a/src/views/ebiz/agentEenter/SignContract.vue b/src/views/ebiz/agentEenter/SignContract.vue
index 70779a21b..cd2aacd22 100644
--- a/src/views/ebiz/agentEenter/SignContract.vue
+++ b/src/views/ebiz/agentEenter/SignContract.vue
@@ -369,10 +369,9 @@ export default {
})
// const authRes = await this.fakeFaceAuth(true)
console.log(authRes)
- if (authRes.state == '1') {
+ if (JSON.parse(authRes).state == '1') {
this.goUrl(code)
} else {
- this.$toast('人脸识别失败')
// 人脸验证失败更新faceAuthCount
this.faceAuthCount++
}
diff --git a/src/views/ebiz/claims/ApplyInfo.vue b/src/views/ebiz/claims/ApplyInfo.vue
index 6a045d917..87cc86acc 100644
--- a/src/views/ebiz/claims/ApplyInfo.vue
+++ b/src/views/ebiz/claims/ApplyInfo.vue
@@ -406,6 +406,20 @@
下一步
+
+
+
+
+ 为确保是您本人操作,短信验证码将发送至您手机号{{ encryptMobile }},请您输入验证码以完成后续操作。
+
+
+
+ {{
+ countDownNum === 0 ? '获取验证码' : countDownNum | countDownText
+ }}
+
+
+
@@ -423,7 +437,7 @@ import idNoCheck from '@/assets/js/utils/idNoCheck'
import { apply, query } from '@/api/ebiz/claims/claims'
import { idToData } from '@/views/ebiz/customer/js/verification'
import BankCardScan from '@/components/ebiz/sale/BankCardScan'
-import { getBankList, checkCard } from '@/api/ebiz/sale/sale'
+import { getBankList, checkCard, getAuthCode, autchCodeCheck } from '@/api/ebiz/sale/sale'
import { getIdentityInfo, onDateConfirm, effectiveDataTypeChange } from '../sale/js/methods'
import occupationList from '@/components/ebiz/occipation/data/occupation'
import getAreaName from '@/assets/js/utils/get-area-name'
@@ -452,12 +466,15 @@ export default {
},
data() {
return {
- // change: '', //待修改!!
- // OtherFeesList: [], //暂定其他费用的数组
+ cardAuthCount: 0,
+ isCaptchaModalShow: false,
+ code: '',
+ sid: '',
+ countDownNum: 0,
+ countDownTimer: null,
+ isPassedCardCheck: false,
customerNo: '', //客户编号
DataIndex: '', //点击客户的index,用来获取对应客户信息
- // CustomerDetails:[],//客户详情数据
-
currentDate: new Date(), //当前时间
customerShowPicker: false,
currentPopupIndex: '',
@@ -545,6 +562,14 @@ export default {
]
}
},
+ computed: {
+ encryptMobile() {
+ if (this.userInfo && this.userInfo.applyerMobile) {
+ return this.userInfo.applyerMobile.replace(/^(\d{3})\d{4}(\d{4})$/, '$1****$2')
+ }
+ return ''
+ }
+ },
created() {
this.getBankList()
this.init()
@@ -562,6 +587,75 @@ export default {
next()
},
methods: {
+ async getCaptcha() {
+ let data = {
+ operateType: 'appntInfoEntry',
+ type: 'H5',
+ operateCode: this.appntDTO.mobile,
+ system: 'agentApp',
+ operateCodeType: '0'
+ }
+ //获取验证码
+ try {
+ let res = await getAuthCode(data)
+ if (res.result === '0') {
+ this.$toast(res.resultMessage)
+ this.sid = res.sessionId
+ this.countDownNum = 60
+ this.countDownTimer = setInterval(() => {
+ this.countDownNum--
+ if (this.countDownNum <= 0) {
+ clearInterval(this.countDownTimer)
+ this.countDownTimer = null
+ }
+ }, 1000)
+ } else {
+ this.$toast(res.resultMessage)
+ }
+ } catch (error) {
+ console.log(error)
+ this.$toast('网络异常')
+ }
+ },
+ async onCaptchaConfirm(action, done) {
+ if (!this.sid) {
+ if (!this.isCancel) {
+ this.$toast('请先获取验证码')
+ }
+ done(false)
+ return
+ }
+ if (!this.code.trim()) {
+ done(false)
+ return this.$toast('请输入验证码')
+ }
+ try {
+ let res = await autchCodeCheck({
+ smsId: this.sid,
+ code: this.code
+ })
+ if (res.result === '0') {
+ this.isPassedCardCheck = true
+ this.save()
+ } else {
+ this.$toast(res.resultMessage)
+ }
+ } catch (error) {
+ this.$toast('网络异常')
+ console.log(error)
+ }
+ this.onCaptchaCancel()
+ done()
+ },
+ onCaptchaCancel() {
+ this.isCancel = true
+ this.isCaptchaModalShow = false
+ clearInterval(this.countDownTimer)
+ this.countDownTimer = null
+ this.countDownNum = 0
+ this.sid = ''
+ this.code = ''
+ },
init() {
let data = {
slaveStatus: this.slaveStatus,
@@ -1142,9 +1236,21 @@ export default {
}
// 用户不再白名单内做银行卡鉴权
else {
- let res = await checkCard(params)
- if (res.result != '0') {
- return this.$toast(res.resultMessage)
+ // 没通过鉴权进行银行卡鉴权
+ if (!this.isPassedCardCheck) {
+ // 鉴权失败未达到3次调接口鉴权
+ if (this.cardAuthCount < 3) {
+ let res = await checkCard(params)
+ if (res.result != '0') {
+ this.cardAuthCount++
+ return this.$toast(res.resultMessage)
+ }
+ }
+ // 超过3次调用短信验证
+ else {
+ this.isCaptchaModalShow = true
+ return
+ }
}
}
} else {
@@ -1187,6 +1293,15 @@ export default {
// }
// console.log(this.OtherFeesList)
// }
+ },
+ filters: {
+ countDownText(val) {
+ if (isNaN(parseFloat(val))) {
+ return val
+ } else {
+ return `${val} s`
+ }
+ }
}
}
diff --git a/src/views/ebiz/claims/SignatureConfirmation.vue b/src/views/ebiz/claims/SignatureConfirmation.vue
index 497d6a6bb..97cab09ea 100644
--- a/src/views/ebiz/claims/SignatureConfirmation.vue
+++ b/src/views/ebiz/claims/SignatureConfirmation.vue
@@ -178,7 +178,7 @@ export default {
})
console.log(this.sid, this.code)
if (res.result === '0') {
- this.goUrl(this.authCode)
+ this.showRead()
} else {
this.$toast(res.resultMessage)
}
diff --git a/src/views/ebiz/preserve/common/HandleResult.vue b/src/views/ebiz/preserve/common/HandleResult.vue
index 643496813..77b4233be 100644
--- a/src/views/ebiz/preserve/common/HandleResult.vue
+++ b/src/views/ebiz/preserve/common/HandleResult.vue
@@ -9,17 +9,36 @@
客户确认
+
+
+
+
+
+ {{
+ countDownNum === 0 ? '获取验证码' : countDownNum | countDownText
+ }}
+
+
+
diff --git a/src/views/ebiz/preserve/wt/WSurrenderInfo.vue b/src/views/ebiz/preserve/wt/WSurrenderInfo.vue
index 51de2871d..c18a3e5eb 100644
--- a/src/views/ebiz/preserve/wt/WSurrenderInfo.vue
+++ b/src/views/ebiz/preserve/wt/WSurrenderInfo.vue
@@ -120,6 +120,20 @@
+
+
+
+
+ 为确保是您本人操作,短信验证码将发送至您手机号{{ encryptMobile }},请您输入验证码以完成后续操作。
+
+
+
+ {{
+ countDownNum === 0 ? '获取验证码' : countDownNum | countDownText
+ }}
+
+
+
@@ -127,7 +141,7 @@
import { Field, Cell, CellGroup, Popup, Row, Col, Picker, Area } from 'vant'
import BankCardScan from '@/components/ebiz/sale/BankCardScan'
import { policyInfo, trial, changeEdor } from '@/api/ebiz/preserve/preserve'
-import { getBankList, checkCard } from '@/api/ebiz/sale/sale'
+import { getBankList, checkCard, getAuthCode, autchCodeCheck } from '@/api/ebiz/sale/sale'
import dataDic from '../js/data-dictionary.js'
import filters from '@/views/ebiz/preserve/filters'
import getAreaName from '@/views/ebiz/preserve/js/utils/get-area-name'
@@ -149,6 +163,13 @@ export default {
},
data() {
return {
+ cardAuthCount: 0,
+ isCaptchaModalShow: false,
+ code: '',
+ sid: '',
+ countDownNum: 0,
+ countDownTimer: null,
+ isPassedCardCheck: false,
valueKey: '',
popupShow: false,
pickerType: '',
@@ -197,6 +218,14 @@ export default {
}
}
},
+ computed: {
+ encryptMobile() {
+ if (this.customerInfo && this.customerInfo.customerMobile) {
+ return this.customerInfo.customerMobile.replace(/^(\d{3})\d{4}(\d{4})$/, '$1****$2')
+ }
+ return ''
+ }
+ },
created() {
this.customerInfo = JSON.parse(localStorage['preserve-customerInfo']) //客户详情
this.policy = JSON.parse(localStorage['preserve-policy'])
@@ -217,6 +246,75 @@ export default {
amtFormat1: filters.amtFormat1
},
methods: {
+ async getCaptcha() {
+ let data = {
+ operateType: 'appntInfoEntry',
+ type: 'H5',
+ operateCode: this.customerInfo.customerMobile,
+ system: 'agentApp',
+ operateCodeType: '0'
+ }
+ //获取验证码
+ try {
+ let res = await getAuthCode(data)
+ if (res.result === '0') {
+ this.$toast(res.resultMessage)
+ this.sid = res.sessionId
+ this.countDownNum = 60
+ this.countDownTimer = setInterval(() => {
+ this.countDownNum--
+ if (this.countDownNum <= 0) {
+ clearInterval(this.countDownTimer)
+ this.countDownTimer = null
+ }
+ }, 1000)
+ } else {
+ this.$toast(res.resultMessage)
+ }
+ } catch (error) {
+ console.log(error)
+ this.$toast('网络异常')
+ }
+ },
+ async onCaptchaConfirm(action, done) {
+ if (!this.sid) {
+ if (!this.isCancel) {
+ this.$toast('请先获取验证码')
+ }
+ done(false)
+ return
+ }
+ if (!this.code.trim()) {
+ done(false)
+ return this.$toast('请输入验证码')
+ }
+ try {
+ let res = await autchCodeCheck({
+ smsId: this.sid,
+ code: this.code
+ })
+ if (res.result === '0') {
+ this.isPassedCardCheck = true
+ this.nextStep()
+ } else {
+ this.$toast(res.resultMessage)
+ }
+ } catch (error) {
+ this.$toast('网络异常')
+ console.log(error)
+ }
+ this.onCaptchaCancel()
+ done()
+ },
+ onCaptchaCancel() {
+ this.isCancel = true
+ this.isCaptchaModalShow = false
+ clearInterval(this.countDownTimer)
+ this.countDownTimer = null
+ this.countDownNum = 0
+ this.sid = ''
+ this.code = ''
+ },
//获取试算信息
getTrial(data) {
return new Promise((resolve, reject) => {
@@ -447,10 +545,22 @@ export default {
}
// 用户不再白名单内做银行卡鉴权
else {
- let res = await checkCard(params)
- this.$toast.clear()
- if (res.result != '0') {
- return this.$toast(res.resultMessage)
+ // 没通过鉴权进行银行卡鉴权
+ if (!this.isPassedCardCheck) {
+ // 鉴权失败未达到3次调接口鉴权
+ if (this.cardAuthCount < 3) {
+ let res = await checkCard(params)
+ this.$toast.clear()
+ if (res.result != '0') {
+ this.cardAuthCount++
+ return this.$toast(res.resultMessage)
+ }
+ }
+ // 超过3次调用短信验证
+ else {
+ this.isCaptchaModalShow = true
+ return
+ }
}
}
} else {
diff --git a/src/views/ebiz/sale/AccountInformation.vue b/src/views/ebiz/sale/AccountInformation.vue
index 19ad2cde5..464160472 100644
--- a/src/views/ebiz/sale/AccountInformation.vue
+++ b/src/views/ebiz/sale/AccountInformation.vue
@@ -135,12 +135,26 @@
@cancel="isAreaListShow = false"
/>
+
+
+
+
+ 为确保是您本人操作,短信验证码将发送至您手机号{{ encryptMobile }},请您输入验证码以完成后续操作。
+
+
+
+ {{
+ countDownNum === 0 ? '获取验证码' : countDownNum | countDownText
+ }}
+
+
+