mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-18 14:26:44 +08:00
Merge branch 'feature/GFRS-2069【待确定】白名单管理' into dev
# Conflicts: # src/views/ebiz/preserve/common/HandleResult.vue
This commit is contained in:
@@ -369,10 +369,9 @@ export default {
|
|||||||
})
|
})
|
||||||
// const authRes = await this.fakeFaceAuth(true)
|
// const authRes = await this.fakeFaceAuth(true)
|
||||||
console.log(authRes)
|
console.log(authRes)
|
||||||
if (authRes.state == '1') {
|
if (JSON.parse(authRes).state == '1') {
|
||||||
this.goUrl(code)
|
this.goUrl(code)
|
||||||
} else {
|
} else {
|
||||||
this.$toast('人脸识别失败')
|
|
||||||
// 人脸验证失败更新faceAuthCount
|
// 人脸验证失败更新faceAuthCount
|
||||||
this.faceAuthCount++
|
this.faceAuthCount++
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -406,6 +406,20 @@
|
|||||||
<div class="bottom-btn bg-white">
|
<div class="bottom-btn bg-white">
|
||||||
<van-button type="danger" size="large" @click="nextStep" v-no-more-click="1000">下一步</van-button>
|
<van-button type="danger" size="large" @click="nextStep" v-no-more-click="1000">下一步</van-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- 短信验证弹窗 -->
|
||||||
|
<van-dialog v-model="isCaptchaModalShow" title="提示" show-cancel-button :before-close="onCaptchaConfirm" @cancel="onCaptchaCancel">
|
||||||
|
<van-cell>
|
||||||
|
<p class="fs14">为确保是您本人操作,短信验证码将发送至您手机号{{ encryptMobile }},请您输入验证码以完成后续操作。</p>
|
||||||
|
</van-cell>
|
||||||
|
<van-field v-model="code" type="number" :maxlength="6" center clearable label="短信验证码" placeholder="请输入短信验证码">
|
||||||
|
<template #button>
|
||||||
|
<van-button size="small" type="danger" :disabled="countDownNum !== 0" @click="getCaptcha">{{
|
||||||
|
countDownNum === 0 ? '获取验证码' : countDownNum | countDownText
|
||||||
|
}}</van-button>
|
||||||
|
</template>
|
||||||
|
</van-field>
|
||||||
|
</van-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -423,7 +437,7 @@ import idNoCheck from '@/assets/js/utils/idNoCheck'
|
|||||||
import { apply, query } from '@/api/ebiz/claims/claims'
|
import { apply, query } from '@/api/ebiz/claims/claims'
|
||||||
import { idToData } from '@/views/ebiz/customer/js/verification'
|
import { idToData } from '@/views/ebiz/customer/js/verification'
|
||||||
import BankCardScan from '@/components/ebiz/sale/BankCardScan'
|
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 { getIdentityInfo, onDateConfirm, effectiveDataTypeChange } from '../sale/js/methods'
|
||||||
import occupationList from '@/components/ebiz/occipation/data/occupation'
|
import occupationList from '@/components/ebiz/occipation/data/occupation'
|
||||||
import getAreaName from '@/assets/js/utils/get-area-name'
|
import getAreaName from '@/assets/js/utils/get-area-name'
|
||||||
@@ -452,12 +466,15 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// change: '', //待修改!!
|
cardAuthCount: 0,
|
||||||
// OtherFeesList: [], //暂定其他费用的数组
|
isCaptchaModalShow: false,
|
||||||
|
code: '',
|
||||||
|
sid: '',
|
||||||
|
countDownNum: 0,
|
||||||
|
countDownTimer: null,
|
||||||
|
isPassedCardCheck: false,
|
||||||
customerNo: '', //客户编号
|
customerNo: '', //客户编号
|
||||||
DataIndex: '', //点击客户的index,用来获取对应客户信息
|
DataIndex: '', //点击客户的index,用来获取对应客户信息
|
||||||
// CustomerDetails:[],//客户详情数据
|
|
||||||
|
|
||||||
currentDate: new Date(), //当前时间
|
currentDate: new Date(), //当前时间
|
||||||
customerShowPicker: false,
|
customerShowPicker: false,
|
||||||
currentPopupIndex: '',
|
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() {
|
created() {
|
||||||
this.getBankList()
|
this.getBankList()
|
||||||
this.init()
|
this.init()
|
||||||
@@ -562,6 +587,75 @@ export default {
|
|||||||
next()
|
next()
|
||||||
},
|
},
|
||||||
methods: {
|
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() {
|
init() {
|
||||||
let data = {
|
let data = {
|
||||||
slaveStatus: this.slaveStatus,
|
slaveStatus: this.slaveStatus,
|
||||||
@@ -1142,9 +1236,21 @@ export default {
|
|||||||
}
|
}
|
||||||
// 用户不再白名单内做银行卡鉴权
|
// 用户不再白名单内做银行卡鉴权
|
||||||
else {
|
else {
|
||||||
let res = await checkCard(params)
|
// 没通过鉴权进行银行卡鉴权
|
||||||
if (res.result != '0') {
|
if (!this.isPassedCardCheck) {
|
||||||
return this.$toast(res.resultMessage)
|
// 鉴权失败未达到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 {
|
} else {
|
||||||
@@ -1187,6 +1293,15 @@ export default {
|
|||||||
// }
|
// }
|
||||||
// console.log(this.OtherFeesList)
|
// console.log(this.OtherFeesList)
|
||||||
// }
|
// }
|
||||||
|
},
|
||||||
|
filters: {
|
||||||
|
countDownText(val) {
|
||||||
|
if (isNaN(parseFloat(val))) {
|
||||||
|
return val
|
||||||
|
} else {
|
||||||
|
return `${val} s`
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ export default {
|
|||||||
})
|
})
|
||||||
console.log(this.sid, this.code)
|
console.log(this.sid, this.code)
|
||||||
if (res.result === '0') {
|
if (res.result === '0') {
|
||||||
this.goUrl(this.authCode)
|
this.showRead()
|
||||||
} else {
|
} else {
|
||||||
this.$toast(res.resultMessage)
|
this.$toast(res.resultMessage)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,17 +9,36 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="bg-white bottom-btn"><van-button type="danger" size="large" @click="nextStep" v-no-more-click="2000">客户确认</van-button></div>
|
<div class="bg-white bottom-btn"><van-button type="danger" size="large" @click="nextStep" v-no-more-click="2000">客户确认</van-button></div>
|
||||||
|
|
||||||
|
<!-- 短信验证弹窗 -->
|
||||||
|
<van-dialog v-model="isCaptchaModalShow" title="提示" show-cancel-button :before-close="onCaptchaConfirm" @cancel="onCaptchaCancel">
|
||||||
|
<van-field v-model="code" type="number" :maxlength="6" center clearable label="短信验证码" placeholder="请输入短信验证码">
|
||||||
|
<template #button>
|
||||||
|
<van-button size="small" type="danger" :disabled="countDownNum !== 0" @click="getCaptcha">{{
|
||||||
|
countDownNum === 0 ? '获取验证码' : countDownNum | countDownText
|
||||||
|
}}</van-button>
|
||||||
|
</template>
|
||||||
|
</van-field>
|
||||||
|
</van-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import utilsAge from '@/assets/js/utils/age'
|
import utilsAge from '@/assets/js/utils/age'
|
||||||
// import { getWhitelist } from '@/api/ebiz/whitelist'
|
import { getAuthCode, autchCodeCheck } from '@/api/ebiz/sale/sale'
|
||||||
|
import { getWhitelist } from '@/api/ebiz/whitelist'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'HandleResult',
|
name: 'HandleResult',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
// 人脸验证次数
|
||||||
|
faceAuthCount: 0,
|
||||||
|
isCaptchaModalShow: false,
|
||||||
|
code: '',
|
||||||
|
sid: '',
|
||||||
|
countDownNum: 0,
|
||||||
|
countDownTimer: null,
|
||||||
path: '', //页面跳转路径
|
path: '', //页面跳转路径
|
||||||
srcSuccess: this.$assetsUrl + 'images/success.png',
|
srcSuccess: this.$assetsUrl + 'images/success.png',
|
||||||
entry: '',
|
entry: '',
|
||||||
@@ -66,6 +85,72 @@ export default {
|
|||||||
document.getElementsByTagName('body')[0].classList.remove('bg-white')
|
document.getElementsByTagName('body')[0].classList.remove('bg-white')
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
async onCaptchaConfirm(action, done) {
|
||||||
|
if (!this.sid) {
|
||||||
|
done(false)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!this.code.trim()) {
|
||||||
|
done(false)
|
||||||
|
return this.$toast('请输入验证码')
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
let res = await autchCodeCheck({
|
||||||
|
smsId: this.sid,
|
||||||
|
code: this.code
|
||||||
|
})
|
||||||
|
console.log(this.sid, this.code)
|
||||||
|
if (res.result === '0') {
|
||||||
|
this.jumpNextPage(this.path)
|
||||||
|
} else {
|
||||||
|
this.$toast(res.resultMessage)
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
this.$toast('网络异常')
|
||||||
|
console.log(error)
|
||||||
|
}
|
||||||
|
this.onCaptchaCancel()
|
||||||
|
done()
|
||||||
|
},
|
||||||
|
onCaptchaCancel() {
|
||||||
|
this.isCaptchaModalShow = false
|
||||||
|
clearInterval(this.countDownTimer)
|
||||||
|
this.countDownTimer = null
|
||||||
|
this.countDownNum = 0
|
||||||
|
this.sid = ''
|
||||||
|
this.code = ''
|
||||||
|
},
|
||||||
|
async getCaptcha() {
|
||||||
|
let data = {
|
||||||
|
operateType: 'appntInfoEntry',
|
||||||
|
type: 'H5',
|
||||||
|
operateCode: this.agentInfo.mobile,
|
||||||
|
system: 'agentApp',
|
||||||
|
operateCodeType: '0'
|
||||||
|
}
|
||||||
|
//获取验证码
|
||||||
|
try {
|
||||||
|
let res = await getAuthCode(data)
|
||||||
|
console.log(res)
|
||||||
|
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('网络异常')
|
||||||
|
}
|
||||||
|
},
|
||||||
nextStep() {
|
nextStep() {
|
||||||
if (this.entry != 'BC') {
|
if (this.entry != 'BC') {
|
||||||
// 如果 保全项不是 受益人变更、则 在证件类型为身份证时 直接接入人脸识别
|
// 如果 保全项不是 受益人变更、则 在证件类型为身份证时 直接接入人脸识别
|
||||||
@@ -122,34 +207,33 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
async toFace(config) {
|
async toFace(config) {
|
||||||
// const res = await getWhitelist({
|
const res = await getWhitelist({
|
||||||
// idNo: this.customerInfo.idNo,
|
idNo: this.customerInfo.idNo,
|
||||||
// name: this.customerInfo.customerName,
|
name: this.customerInfo.customerName,
|
||||||
// whiteType: 'edor_face_show'
|
whiteType: 'edor_face_show'
|
||||||
// })
|
})
|
||||||
// if (res.result === '0') {
|
if (res.result === '0') {
|
||||||
// // 用户在白名单内
|
// 用户在白名单内
|
||||||
// if (res.content && res.content.length) {
|
if (res.content && res.content.length) {
|
||||||
// this.jumpNextPage(this.path)
|
this.jumpNextPage(this.path)
|
||||||
// return
|
return
|
||||||
// }
|
}
|
||||||
// } else {
|
} else {
|
||||||
// this.$toast(res.resultMessage)
|
this.$toast(res.resultMessage)
|
||||||
// }
|
}
|
||||||
// eslint-disable-next-line no-undef
|
if (this.faceAuthCount < 3) {
|
||||||
// EWebBridge.webCallAppInJs('face_auth', config) //启用人脸识别
|
// eslint-disable-next-line no-undef
|
||||||
// 跳过人脸识别
|
const authRes = await EWebBridge.webCallAppInJs('face_auth', config)
|
||||||
new Promise(resolve => {
|
if (JSON.parse(authRes).state == '1') {
|
||||||
console.log('--跳过人脸识别--返回识别成功')
|
|
||||||
resolve(JSON.stringify({ state: '1' }))
|
|
||||||
}).then(data => {
|
|
||||||
if (JSON.parse(data).state == '1') {
|
|
||||||
this.jumpNextPage(this.path)
|
this.jumpNextPage(this.path)
|
||||||
} else {
|
} else {
|
||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
EWebBridge.webCallAppInJs('webview_toast', '人脸检测失败')
|
EWebBridge.webCallAppInJs('webview_toast', '人脸检测失败')
|
||||||
|
this.faceAuthCount++
|
||||||
}
|
}
|
||||||
})
|
} else {
|
||||||
|
this.isCaptchaModalShow = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -120,6 +120,20 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 银行卡扫描 -->
|
<!-- 银行卡扫描 -->
|
||||||
<BankCardScan :scanShow="isScan" :clear="false" @getScanInfo="getBankCardInfo"></BankCardScan>
|
<BankCardScan :scanShow="isScan" :clear="false" @getScanInfo="getBankCardInfo"></BankCardScan>
|
||||||
|
|
||||||
|
<!-- 短信验证弹窗 -->
|
||||||
|
<van-dialog v-model="isCaptchaModalShow" title="提示" show-cancel-button :before-close="onCaptchaConfirm" @cancel="onCaptchaCancel">
|
||||||
|
<van-cell>
|
||||||
|
<p class="fs14">为确保是您本人操作,短信验证码将发送至您手机号{{ encryptMobile }},请您输入验证码以完成后续操作。</p>
|
||||||
|
</van-cell>
|
||||||
|
<van-field v-model="code" type="number" :maxlength="6" center clearable label="短信验证码" placeholder="请输入短信验证码">
|
||||||
|
<template #button>
|
||||||
|
<van-button size="small" type="danger" :disabled="countDownNum !== 0" @click="getCaptcha">{{
|
||||||
|
countDownNum === 0 ? '获取验证码' : countDownNum | countDownText
|
||||||
|
}}</van-button>
|
||||||
|
</template>
|
||||||
|
</van-field>
|
||||||
|
</van-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -127,7 +141,7 @@
|
|||||||
import { Field, Cell, CellGroup, Popup, Row, Col, Picker, Area } from 'vant'
|
import { Field, Cell, CellGroup, Popup, Row, Col, Picker, Area } from 'vant'
|
||||||
import BankCardScan from '@/components/ebiz/sale/BankCardScan'
|
import BankCardScan from '@/components/ebiz/sale/BankCardScan'
|
||||||
import { policyInfo, trial, changeEdor } from '@/api/ebiz/preserve/preserve'
|
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 dataDic from '../js/data-dictionary.js'
|
||||||
import filters from '@/views/ebiz/preserve/filters'
|
import filters from '@/views/ebiz/preserve/filters'
|
||||||
import getAreaName from '@/views/ebiz/preserve/js/utils/get-area-name'
|
import getAreaName from '@/views/ebiz/preserve/js/utils/get-area-name'
|
||||||
@@ -149,6 +163,13 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
cardAuthCount: 0,
|
||||||
|
isCaptchaModalShow: false,
|
||||||
|
code: '',
|
||||||
|
sid: '',
|
||||||
|
countDownNum: 0,
|
||||||
|
countDownTimer: null,
|
||||||
|
isPassedCardCheck: false,
|
||||||
valueKey: '',
|
valueKey: '',
|
||||||
popupShow: false,
|
popupShow: false,
|
||||||
pickerType: '',
|
pickerType: '',
|
||||||
@@ -200,6 +221,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() {
|
created() {
|
||||||
this.customerInfo = JSON.parse(localStorage['preserve-customerInfo']) //客户详情
|
this.customerInfo = JSON.parse(localStorage['preserve-customerInfo']) //客户详情
|
||||||
this.policy = JSON.parse(localStorage['preserve-policy'])
|
this.policy = JSON.parse(localStorage['preserve-policy'])
|
||||||
@@ -217,9 +246,85 @@ export default {
|
|||||||
},
|
},
|
||||||
filters: {
|
filters: {
|
||||||
idToText: filters.idToText,
|
idToText: filters.idToText,
|
||||||
amtFormat1: filters.amtFormat1
|
amtFormat1: filters.amtFormat1,
|
||||||
|
countDownText(val) {
|
||||||
|
if (isNaN(parseFloat(val))) {
|
||||||
|
return val
|
||||||
|
} else {
|
||||||
|
return `${val} s`
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
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) {
|
getTrial(data) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
@@ -452,10 +557,22 @@ export default {
|
|||||||
}
|
}
|
||||||
// 用户不再白名单内做银行卡鉴权
|
// 用户不再白名单内做银行卡鉴权
|
||||||
else {
|
else {
|
||||||
let res = await checkCard(params)
|
// 没通过鉴权进行银行卡鉴权
|
||||||
this.$toast.clear()
|
if (!this.isPassedCardCheck) {
|
||||||
if (res.result != '0') {
|
// 鉴权失败未达到3次调接口鉴权
|
||||||
return this.$toast(res.resultMessage)
|
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 {
|
} else {
|
||||||
|
|||||||
@@ -86,6 +86,20 @@
|
|||||||
<p class="p15 pb20 fs14 text-center">该客户涉及到的所有保单相应信息将变更</p>
|
<p class="p15 pb20 fs14 text-center">该客户涉及到的所有保单相应信息将变更</p>
|
||||||
</van-dialog>
|
</van-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- 短信验证弹窗 -->
|
||||||
|
<van-dialog v-model="isCaptchaModalShow" title="提示" show-cancel-button :before-close="onCaptchaConfirm" @cancel="onCaptchaCancel">
|
||||||
|
<van-cell>
|
||||||
|
<p class="fs14">为确保是您本人操作,短信验证码将发送至您手机号{{ encryptMobile }},请您输入验证码以完成后续操作。</p>
|
||||||
|
</van-cell>
|
||||||
|
<van-field v-model="code" type="number" :maxlength="6" center clearable label="短信验证码" placeholder="请输入短信验证码">
|
||||||
|
<template #button>
|
||||||
|
<van-button size="small" type="danger" :disabled="countDownNum !== 0" @click="getCaptcha">{{
|
||||||
|
countDownNum === 0 ? '获取验证码' : countDownNum | countDownText
|
||||||
|
}}</van-button>
|
||||||
|
</template>
|
||||||
|
</van-field>
|
||||||
|
</van-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -93,7 +107,7 @@
|
|||||||
import { Field, Collapse, CollapseItem, Area, Picker, Cell, CellGroup, Dialog, Popup, List } from 'vant'
|
import { Field, Collapse, CollapseItem, Area, Picker, Cell, CellGroup, Dialog, Popup, List } from 'vant'
|
||||||
import BankCardScan from '@/components/ebiz/sale/BankCardScan'
|
import BankCardScan from '@/components/ebiz/sale/BankCardScan'
|
||||||
import { changeEdor } from '@/api/ebiz/preserve/preserve'
|
import { 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 filters from '@/views/ebiz/preserve/filters'
|
import filters from '@/views/ebiz/preserve/filters'
|
||||||
import getAreaName from '@/views/ebiz/preserve/js/utils/get-area-name'
|
import getAreaName from '@/views/ebiz/preserve/js/utils/get-area-name'
|
||||||
import areaList from '@/views/ebiz/preserve/js/utils/area'
|
import areaList from '@/views/ebiz/preserve/js/utils/area'
|
||||||
@@ -117,6 +131,13 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
cardAuthCount: 0,
|
||||||
|
isCaptchaModalShow: false,
|
||||||
|
code: '',
|
||||||
|
sid: '',
|
||||||
|
countDownNum: 0,
|
||||||
|
countDownTimer: null,
|
||||||
|
isPassedCardCheck: false,
|
||||||
dialogShow: true, //信息变更弹窗是否显示
|
dialogShow: true, //信息变更弹窗是否显示
|
||||||
valueKey: '',
|
valueKey: '',
|
||||||
pickerType: '',
|
pickerType: '',
|
||||||
@@ -139,17 +160,15 @@ export default {
|
|||||||
customerInfo: JSON.parse(localStorage.getItem('preserve-customerInfo'))
|
customerInfo: JSON.parse(localStorage.getItem('preserve-customerInfo'))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
encryptMobile() {
|
||||||
|
if (this.customerInfo && this.customerInfo.customerMobile) {
|
||||||
|
return this.customerInfo.customerMobile.replace(/^(\d{3})\d{4}(\d{4})$/, '$1****$2')
|
||||||
|
}
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
},
|
||||||
created() {
|
created() {
|
||||||
/*
|
|
||||||
this.getPolicyList({
|
|
||||||
customerNo: this.customerInfo.customerNo,
|
|
||||||
edorType: 'PC', //续期账号变更
|
|
||||||
idno: this.customerInfo.idNo,
|
|
||||||
mobile: this.customerInfo.customerMobile,
|
|
||||||
name: this.customerInfo.customerName
|
|
||||||
})
|
|
||||||
*/
|
|
||||||
// this.list = this.$store.getters.getPcPolicyInfo
|
|
||||||
this.getBank()
|
this.getBank()
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -157,6 +176,75 @@ export default {
|
|||||||
window.appCallBack = this.appCallBack
|
window.appCallBack = this.appCallBack
|
||||||
},
|
},
|
||||||
methods: {
|
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.change()
|
||||||
|
} 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 = ''
|
||||||
|
},
|
||||||
//弹框选择
|
//弹框选择
|
||||||
toSelect(valueKey) {
|
toSelect(valueKey) {
|
||||||
this.bankPopup = true
|
this.bankPopup = true
|
||||||
@@ -340,10 +428,22 @@ export default {
|
|||||||
}
|
}
|
||||||
// 用户不再白名单内做银行卡鉴权
|
// 用户不再白名单内做银行卡鉴权
|
||||||
else {
|
else {
|
||||||
let res = await checkCard(params)
|
// 没通过鉴权进行银行卡鉴权
|
||||||
this.$toast.clear()
|
if (!this.isPassedCardCheck) {
|
||||||
if (res.result != '0') {
|
// 鉴权失败未达到3次调接口鉴权
|
||||||
return this.$toast(res.resultMessage)
|
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 {
|
} else {
|
||||||
@@ -417,7 +517,14 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
filters: {
|
filters: {
|
||||||
idToText: filters.idToText
|
idToText: filters.idToText,
|
||||||
|
countDownText(val) {
|
||||||
|
if (isNaN(parseFloat(val))) {
|
||||||
|
return val
|
||||||
|
} else {
|
||||||
|
return `${val} s`
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -120,6 +120,20 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 银行卡扫描 -->
|
<!-- 银行卡扫描 -->
|
||||||
<BankCardScan :scanShow="isScan" :clear="false" @getScanInfo="getBankCardInfo"></BankCardScan>
|
<BankCardScan :scanShow="isScan" :clear="false" @getScanInfo="getBankCardInfo"></BankCardScan>
|
||||||
|
|
||||||
|
<!-- 短信验证弹窗 -->
|
||||||
|
<van-dialog v-model="isCaptchaModalShow" title="提示" show-cancel-button :before-close="onCaptchaConfirm" @cancel="onCaptchaCancel">
|
||||||
|
<van-cell>
|
||||||
|
<p class="fs14">为确保是您本人操作,短信验证码将发送至您手机号{{ encryptMobile }},请您输入验证码以完成后续操作。</p>
|
||||||
|
</van-cell>
|
||||||
|
<van-field v-model="code" type="number" :maxlength="6" center clearable label="短信验证码" placeholder="请输入短信验证码">
|
||||||
|
<template #button>
|
||||||
|
<van-button size="small" type="danger" :disabled="countDownNum !== 0" @click="getCaptcha">{{
|
||||||
|
countDownNum === 0 ? '获取验证码' : countDownNum | countDownText
|
||||||
|
}}</van-button>
|
||||||
|
</template>
|
||||||
|
</van-field>
|
||||||
|
</van-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -127,7 +141,7 @@
|
|||||||
import { Field, Cell, CellGroup, Popup, Row, Col, Picker, Area } from 'vant'
|
import { Field, Cell, CellGroup, Popup, Row, Col, Picker, Area } from 'vant'
|
||||||
import BankCardScan from '@/components/ebiz/sale/BankCardScan'
|
import BankCardScan from '@/components/ebiz/sale/BankCardScan'
|
||||||
import { policyInfo, trial, changeEdor } from '@/api/ebiz/preserve/preserve'
|
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 dataDic from '../js/data-dictionary.js'
|
||||||
import filters from '@/views/ebiz/preserve/filters'
|
import filters from '@/views/ebiz/preserve/filters'
|
||||||
import getAreaName from '@/views/ebiz/preserve/js/utils/get-area-name'
|
import getAreaName from '@/views/ebiz/preserve/js/utils/get-area-name'
|
||||||
@@ -149,6 +163,13 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
cardAuthCount: 0,
|
||||||
|
isCaptchaModalShow: false,
|
||||||
|
code: '',
|
||||||
|
sid: '',
|
||||||
|
countDownNum: 0,
|
||||||
|
countDownTimer: null,
|
||||||
|
isPassedCardCheck: false,
|
||||||
valueKey: '',
|
valueKey: '',
|
||||||
popupShow: false,
|
popupShow: false,
|
||||||
pickerType: '',
|
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() {
|
created() {
|
||||||
this.customerInfo = JSON.parse(localStorage['preserve-customerInfo']) //客户详情
|
this.customerInfo = JSON.parse(localStorage['preserve-customerInfo']) //客户详情
|
||||||
this.policy = JSON.parse(localStorage['preserve-policy'])
|
this.policy = JSON.parse(localStorage['preserve-policy'])
|
||||||
@@ -217,6 +246,75 @@ export default {
|
|||||||
amtFormat1: filters.amtFormat1
|
amtFormat1: filters.amtFormat1
|
||||||
},
|
},
|
||||||
methods: {
|
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) {
|
getTrial(data) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
@@ -447,10 +545,22 @@ export default {
|
|||||||
}
|
}
|
||||||
// 用户不再白名单内做银行卡鉴权
|
// 用户不再白名单内做银行卡鉴权
|
||||||
else {
|
else {
|
||||||
let res = await checkCard(params)
|
// 没通过鉴权进行银行卡鉴权
|
||||||
this.$toast.clear()
|
if (!this.isPassedCardCheck) {
|
||||||
if (res.result != '0') {
|
// 鉴权失败未达到3次调接口鉴权
|
||||||
return this.$toast(res.resultMessage)
|
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 {
|
} else {
|
||||||
|
|||||||
@@ -135,12 +135,26 @@
|
|||||||
@cancel="isAreaListShow = false"
|
@cancel="isAreaListShow = false"
|
||||||
/>
|
/>
|
||||||
</van-popup>
|
</van-popup>
|
||||||
|
|
||||||
|
<!-- 短信验证弹窗 -->
|
||||||
|
<van-dialog v-model="isCaptchaModalShow" title="提示" show-cancel-button :before-close="onCaptchaConfirm" @cancel="onCaptchaCancel">
|
||||||
|
<van-cell>
|
||||||
|
<p class="fs14">为确保是您本人操作,短信验证码将发送至您手机号{{ encryptMobile }},请您输入验证码以完成后续操作。</p>
|
||||||
|
</van-cell>
|
||||||
|
<van-field v-model="code" type="number" :maxlength="6" center clearable label="短信验证码" placeholder="请输入短信验证码">
|
||||||
|
<template #button>
|
||||||
|
<van-button size="small" type="danger" :disabled="countDownNum !== 0" @click="getCaptcha">{{
|
||||||
|
countDownNum === 0 ? '获取验证码' : countDownNum | countDownText
|
||||||
|
}}</van-button>
|
||||||
|
</template>
|
||||||
|
</van-field>
|
||||||
|
</van-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { Cell, CellGroup, Field, RadioGroup, Radio, Popup, List, Switch, Toast, SwitchCell, Icon, Area } from 'vant'
|
import { Cell, CellGroup, Field, RadioGroup, Radio, Popup, List, Switch, Toast, SwitchCell, Icon, Area } from 'vant'
|
||||||
import { saveInformation, getOrderDetail, checkCard } from '@/api/ebiz/sale/sale'
|
import { saveInformation, getOrderDetail, checkCard, getAuthCode, autchCodeCheck } from '@/api/ebiz/sale/sale'
|
||||||
import utilsAge from '@/assets/js/utils/age'
|
import utilsAge from '@/assets/js/utils/age'
|
||||||
import BankCardScan from '@/components/ebiz/sale/BankCardScan'
|
import BankCardScan from '@/components/ebiz/sale/BankCardScan'
|
||||||
import IndexBar from '@/components/ebiz/sale/IndexBar'
|
import IndexBar from '@/components/ebiz/sale/IndexBar'
|
||||||
@@ -150,6 +164,14 @@ import { getWhitelist } from '@/api/ebiz/whitelist'
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
cardAuthCount: 0,
|
||||||
|
isCaptchaModalShow: false,
|
||||||
|
code: '',
|
||||||
|
sid: '',
|
||||||
|
countDownNum: 0,
|
||||||
|
countDownTimer: null,
|
||||||
|
isPassedCardCheck: false,
|
||||||
|
isCancel: false,
|
||||||
inputShow: true, //模糊查询功能
|
inputShow: true, //模糊查询功能
|
||||||
islistShow: false, //选择银行弹窗
|
islistShow: false, //选择银行弹窗
|
||||||
// 选中后传给后端的投保人或者被保险人名字
|
// 选中后传给后端的投保人或者被保险人名字
|
||||||
@@ -202,6 +224,75 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
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.next()
|
||||||
|
} 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 = ''
|
||||||
|
},
|
||||||
areaSelect() {
|
areaSelect() {
|
||||||
this.isAreaListShow = true
|
this.isAreaListShow = true
|
||||||
this.$refs['areaSelect'].reset('450000')
|
this.$refs['areaSelect'].reset('450000')
|
||||||
@@ -348,7 +439,7 @@ export default {
|
|||||||
bankNo: this.bankId,
|
bankNo: this.bankId,
|
||||||
whiteType: 'sale_bank_check'
|
whiteType: 'sale_bank_check'
|
||||||
})
|
})
|
||||||
console.log(whiteRes)
|
console.log('白名单查询结果: ', whiteRes)
|
||||||
|
|
||||||
if (whiteRes.result === '0') {
|
if (whiteRes.result === '0') {
|
||||||
// 用户在白名单内
|
// 用户在白名单内
|
||||||
@@ -357,17 +448,28 @@ export default {
|
|||||||
}
|
}
|
||||||
// 用户不再白名单内做银行卡鉴权
|
// 用户不再白名单内做银行卡鉴权
|
||||||
else {
|
else {
|
||||||
this.$toast.loading({
|
if (!this.isPassedCardCheck) {
|
||||||
duration: 0, // 持续展示 toast
|
// 鉴权次数未达到3次
|
||||||
forbidClick: true, // 禁用背景点击
|
if (this.cardAuthCount < 3) {
|
||||||
loadingType: 'spinner',
|
this.$toast.loading({
|
||||||
message: '加载中……'
|
duration: 0, // 持续展示 toast
|
||||||
})
|
forbidClick: true, // 禁用背景点击
|
||||||
let res = await checkCard(cardData)
|
loadingType: 'spinner',
|
||||||
console.log(res)
|
message: '加载中……'
|
||||||
this.$toast.clear()
|
})
|
||||||
if (res.result !== '0') {
|
let res = await checkCard(cardData)
|
||||||
return this.$toast(res.resultMessage)
|
this.$toast.clear()
|
||||||
|
if (res.result !== '0') {
|
||||||
|
this.cardAuthCount++
|
||||||
|
return this.$toast(res.resultMessage)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 鉴权次数达到3次
|
||||||
|
else {
|
||||||
|
this.isCaptchaModalShow = true
|
||||||
|
this.isCancel = false
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -608,6 +710,12 @@ export default {
|
|||||||
listenChange() {
|
listenChange() {
|
||||||
const { bankId, bank } = this
|
const { bankId, bank } = this
|
||||||
return { bankId, bank }
|
return { bankId, bank }
|
||||||
|
},
|
||||||
|
encryptMobile() {
|
||||||
|
if (this.appntDTO && this.appntDTO.mobile) {
|
||||||
|
return this.appntDTO.mobile.replace(/^(\d{3})\d{4}(\d{4})$/, '$1****$2')
|
||||||
|
}
|
||||||
|
return ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -625,6 +733,15 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
filters: {
|
||||||
|
countDownText(val) {
|
||||||
|
if (isNaN(parseFloat(val))) {
|
||||||
|
return val
|
||||||
|
} else {
|
||||||
|
return `${val} s`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
components: {
|
components: {
|
||||||
[Cell.name]: Cell,
|
[Cell.name]: Cell,
|
||||||
[CellGroup.name]: CellGroup,
|
[CellGroup.name]: CellGroup,
|
||||||
|
|||||||
Reference in New Issue
Block a user