mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-22 19:56:43 +08:00
Merge branch 'feature/GFRS-1989【待确定】客户核验流程优化' into dev
# Conflicts: # package.json # src/assets/js/utils/cacheUtils.js # src/assets/js/utils/cryptoJsUtil.js # src/assets/js/utils/needCacheKey.js # src/config/index.js # src/main.js
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import AESTools from '@/assets/js/utils/cryptoJsUtil'
|
import AESTools from '@/assets/js/utils/cryptoJsUtil'
|
||||||
import configApp from '@/config'
|
import configApp from '@/config'
|
||||||
import cacheKeys from './needCacheKey'
|
import cacheKeys from '@/assets/js/utils/needCacheKey'
|
||||||
export default {
|
export default {
|
||||||
setLocItem: function(key, value) {
|
setLocItem: function(key, value) {
|
||||||
const exist = cacheKeys.encodeKeys.find(item => {
|
const exist = cacheKeys.encodeKeys.find(item => {
|
||||||
|
|||||||
@@ -1,47 +1,47 @@
|
|||||||
import CryptoJS from 'crypto-js'
|
import CryptoJS from 'crypto-js'
|
||||||
export default {
|
export default {
|
||||||
AESEncrypt: function (data, keys) {//加密
|
AESEncrypt: function(data, keys) {
|
||||||
var key = CryptoJS.enc.Hex.parse(keys)
|
//加密
|
||||||
var iv = CryptoJS.enc.Utf8.parse('0123456789ABCDEF');//偏移量
|
var key = CryptoJS.enc.Hex.parse(keys)
|
||||||
var encrypted = CryptoJS.AES.encrypt(data, key,
|
var iv = CryptoJS.enc.Utf8.parse('0123456789ABCDEF') //偏移量
|
||||||
{
|
var encrypted = CryptoJS.AES.encrypt(data, key, {
|
||||||
iv: iv,
|
iv: iv,
|
||||||
mode: CryptoJS.mode.CBC,
|
mode: CryptoJS.mode.CBC,
|
||||||
padding: CryptoJS.pad.Pkcs7
|
padding: CryptoJS.pad.Pkcs7
|
||||||
});
|
})
|
||||||
return encrypted.toString();
|
return encrypted.toString()
|
||||||
},
|
},
|
||||||
AESDecrypt: function (encrypted, keys) {//解密
|
AESDecrypt: function(encrypted, keys) {
|
||||||
var key = CryptoJS.enc.Hex.parse(keys)
|
//解密
|
||||||
var iv = CryptoJS.enc.Utf8.parse('0123456789ABCDEF');
|
var key = CryptoJS.enc.Hex.parse(keys)
|
||||||
var decrypted = CryptoJS.AES.decrypt( encrypted, key,
|
var iv = CryptoJS.enc.Utf8.parse('0123456789ABCDEF')
|
||||||
{
|
var decrypted = CryptoJS.AES.decrypt(encrypted, key, {
|
||||||
iv: iv,
|
iv: iv,
|
||||||
mode: CryptoJS.mode.CBC,
|
mode: CryptoJS.mode.CBC,
|
||||||
padding: CryptoJS.pad.Pkcs7
|
padding: CryptoJS.pad.Pkcs7
|
||||||
});
|
})
|
||||||
return CryptoJS.enc.Utf8.stringify(decrypted)
|
return CryptoJS.enc.Utf8.stringify(decrypted)
|
||||||
},
|
},
|
||||||
AESCacheEncrypt: function (data, keys) {//加密 緩存
|
AESCacheEncrypt: function(data, keys) {
|
||||||
var key = CryptoJS.enc.Hex.parse(keys)
|
//加密 緩存
|
||||||
var iv = CryptoJS.enc.Utf8.parse('0123456789ABCDEF');//偏移量
|
var key = CryptoJS.enc.Hex.parse(keys)
|
||||||
var encrypted = CryptoJS.AES.encrypt(data, key,
|
var iv = CryptoJS.enc.Utf8.parse('0123456789ABCDEF') //偏移量
|
||||||
{
|
var encrypted = CryptoJS.AES.encrypt(data, key, {
|
||||||
iv: iv,
|
iv: iv,
|
||||||
mode: CryptoJS.mode.CBC,
|
mode: CryptoJS.mode.CBC,
|
||||||
padding: CryptoJS.pad.Pkcs7
|
padding: CryptoJS.pad.Pkcs7
|
||||||
});
|
})
|
||||||
return encrypted.toString();
|
return encrypted.toString()
|
||||||
},
|
},
|
||||||
AESCacheDecrypt: function (encrypted, keys) {//解密 緩存
|
AESCacheDecrypt: function(encrypted, keys) {
|
||||||
var key = CryptoJS.enc.Hex.parse(keys)
|
//解密 緩存
|
||||||
var iv = CryptoJS.enc.Utf8.parse('0123456789ABCDEF');
|
var key = CryptoJS.enc.Hex.parse(keys)
|
||||||
var decrypted = CryptoJS.AES.decrypt( encrypted, key,
|
var iv = CryptoJS.enc.Utf8.parse('0123456789ABCDEF')
|
||||||
{
|
var decrypted = CryptoJS.AES.decrypt(encrypted, key, {
|
||||||
iv: iv,
|
iv: iv,
|
||||||
mode: CryptoJS.mode.CBC,
|
mode: CryptoJS.mode.CBC,
|
||||||
padding: CryptoJS.pad.Pkcs7
|
padding: CryptoJS.pad.Pkcs7
|
||||||
});
|
})
|
||||||
return CryptoJS.enc.Utf8.stringify(decrypted)
|
return CryptoJS.enc.Utf8.stringify(decrypted)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
let apiDomain, imgDomain, assetsUrl, mainUrl, payUrl, zssqUrl ,REQ_PWD, CACHE_ENCRYP, API_VERSION// 保融支付的收银台服务地址
|
let apiDomain, imgDomain, assetsUrl, mainUrl, payUrl, zssqUrl, REQ_PWD, CACHE_ENCRYP, API_VERSION // 保融支付的收银台服务地址
|
||||||
|
|
||||||
// 可以多个接口域名,按需添加
|
// 可以多个接口域名,按需添加
|
||||||
console.log('环境:', process.env.VUE_APP_FLAG)
|
console.log('环境:', process.env.VUE_APP_FLAG)
|
||||||
@@ -18,7 +18,7 @@ switch (process.env.VUE_APP_FLAG) {
|
|||||||
mainUrl = 'http://139.199.50.151'
|
mainUrl = 'http://139.199.50.151'
|
||||||
payUrl = 'https://funduat.e-guofu.com/s3-modules-gateway/embed/gateway.action'
|
payUrl = 'https://funduat.e-guofu.com/s3-modules-gateway/embed/gateway.action'
|
||||||
zssqUrl = 'http://139.199.50.151/html/test/index.html#/'
|
zssqUrl = 'http://139.199.50.151/html/test/index.html#/'
|
||||||
REQ_PWD = '41424344454631323334353637383930'
|
REQ_PWD = '41424344454631323334353637383930'
|
||||||
CACHE_ENCRYP = '41424344454631323334353637383930'
|
CACHE_ENCRYP = '41424344454631323334353637383930'
|
||||||
API_VERSION = 'v2'
|
API_VERSION = 'v2'
|
||||||
break
|
break
|
||||||
|
|||||||
@@ -11,11 +11,10 @@ import config from '@/config'
|
|||||||
import noMoreClick from '@/directive/noMoreClick'
|
import noMoreClick from '@/directive/noMoreClick'
|
||||||
import vueHashCalendar from 'vue-hash-calendar'
|
import vueHashCalendar from 'vue-hash-calendar'
|
||||||
import 'vue-hash-calendar/lib/vue-hash-calendar.css'
|
import 'vue-hash-calendar/lib/vue-hash-calendar.css'
|
||||||
import md5 from 'js-md5';
|
import md5 from 'js-md5'
|
||||||
import cryptoJs from 'crypto-js'
|
import cryptoJs from 'crypto-js'
|
||||||
import cacheUtils from '@/assets/js/utils/cacheUtils'
|
import cacheUtils from '@/assets/js/utils/cacheUtils'
|
||||||
|
|
||||||
|
|
||||||
import { Cell, CellGroup, DatetimePicker, Popup, Picker, Col, Row, Tab, Tabs, NavBar, Toast, Button, Dialog, Icon, Lazyload } from 'vant'
|
import { Cell, CellGroup, DatetimePicker, Popup, Picker, Col, Row, Tab, Tabs, NavBar, Toast, Button, Dialog, Icon, Lazyload } from 'vant'
|
||||||
Vue.use(Cell)
|
Vue.use(Cell)
|
||||||
Vue.use(CellGroup)
|
Vue.use(CellGroup)
|
||||||
|
|||||||
@@ -332,7 +332,11 @@ export default {
|
|||||||
changeCard: localStorage.changeCard,
|
changeCard: localStorage.changeCard,
|
||||||
salePageFlag: '-10',
|
salePageFlag: '-10',
|
||||||
recognizeResult: '', //微信端-人脸识别结果
|
recognizeResult: '', //微信端-人脸识别结果
|
||||||
recognizeMessage: '' //微信端-人脸识别失败原因
|
recognizeMessage: '', //微信端-人脸识别失败原因
|
||||||
|
realPeopleRidInfo: {
|
||||||
|
appntRidFlag: null,
|
||||||
|
insureRidFlag: null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -501,6 +505,37 @@ export default {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 手机号鉴权
|
||||||
|
async realPeopleCheckMobile(type) {
|
||||||
|
this.$toast.loading({
|
||||||
|
// 持续展示 toast
|
||||||
|
duration: 0,
|
||||||
|
// 禁用背景点击s
|
||||||
|
forbidClick: true,
|
||||||
|
loadingType: 'spinner',
|
||||||
|
message: '加载中……'
|
||||||
|
})
|
||||||
|
let data = {}
|
||||||
|
if ('appnt' == type) {
|
||||||
|
let appntData = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo'))
|
||||||
|
data = {
|
||||||
|
name: appntData.name,
|
||||||
|
idType: appntData.idType,
|
||||||
|
idNo: appntData.idNo,
|
||||||
|
mobile: appntData.mobile
|
||||||
|
}
|
||||||
|
} else if ('insured' == type) {
|
||||||
|
let insuredData = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo'))
|
||||||
|
data = {
|
||||||
|
name: insuredData.name,
|
||||||
|
idType: insuredData.idType,
|
||||||
|
idNo: insuredData.idNo,
|
||||||
|
mobile: insuredData.mobile
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let res = await checkPhone(data)
|
||||||
|
return res
|
||||||
|
},
|
||||||
// 验证码确认事件
|
// 验证码确认事件
|
||||||
async authConfirm() {
|
async authConfirm() {
|
||||||
//清理计时器
|
//清理计时器
|
||||||
@@ -581,6 +616,16 @@ export default {
|
|||||||
if (JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo')).idType != '1') {
|
if (JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo')).idType != '1') {
|
||||||
that.goUrl()
|
that.goUrl()
|
||||||
} else {
|
} else {
|
||||||
|
//RID 状态--有效
|
||||||
|
if (this.realPeopleRidInfo.appntRidFlag && this.realPeopleRidInfo.appntRidFlag == '0') {
|
||||||
|
// 手机号鉴权 --通过
|
||||||
|
let res = this.realPeopleCheckMobile('appnt')
|
||||||
|
if (res && res.result == '0') {
|
||||||
|
that.goUrl()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 人脸识别
|
||||||
if (this.faceAuthCount.appnt < this.smsAuthNum) {
|
if (this.faceAuthCount.appnt < this.smsAuthNum) {
|
||||||
// this.idcardData.typeface = !this.idcardData.typeface
|
// this.idcardData.typeface = !this.idcardData.typeface
|
||||||
// this.idcardData.idcardName = JSON.parse(this.$route.query.saleInsuredInfo).name
|
// this.idcardData.idcardName = JSON.parse(this.$route.query.saleInsuredInfo).name
|
||||||
@@ -600,6 +645,16 @@ export default {
|
|||||||
// if (JSON.parse(this.$route.query.saleInsuredPersonInfo).idType != '1') {
|
// if (JSON.parse(this.$route.query.saleInsuredPersonInfo).idType != '1') {
|
||||||
that.insuredUrl()
|
that.insuredUrl()
|
||||||
} else {
|
} else {
|
||||||
|
//RID 状态--有效
|
||||||
|
if (this.realPeopleRidInfo.insureRidFlag && this.realPeopleRidInfo.insureRidFlag == '0') {
|
||||||
|
// 手机号鉴权 --通过
|
||||||
|
let res = this.realPeopleCheckMobile('insured')
|
||||||
|
if (res && res.result == '0') {
|
||||||
|
that.insuredUrl()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 人脸识别
|
||||||
if (this.faceAuthCount.insured < this.smsAuthNum) {
|
if (this.faceAuthCount.insured < this.smsAuthNum) {
|
||||||
// this.idcardData.typeface = !this.idcardData.typeface
|
// this.idcardData.typeface = !this.idcardData.typeface
|
||||||
// this.idcardData.idcardName = JSON.parse(this.$route.query.saleInsuredPersonInfo).name
|
// this.idcardData.idcardName = JSON.parse(this.$route.query.saleInsuredPersonInfo).name
|
||||||
@@ -621,6 +676,15 @@ export default {
|
|||||||
// if (this.saleInsuredInfo.idType != '1' || this.saleInsuredInfo.age < '18') {
|
// if (this.saleInsuredInfo.idType != '1' || this.saleInsuredInfo.age < '18') {
|
||||||
that.goUrl()
|
that.goUrl()
|
||||||
} else {
|
} else {
|
||||||
|
//RID 状态--有效
|
||||||
|
if (this.realPeopleRidInfo.appntRidFlag && this.realPeopleRidInfo.appntRidFlag == '0') {
|
||||||
|
// 手机号鉴权 --通过
|
||||||
|
let res = this.realPeopleCheckMobile('appnt')
|
||||||
|
if (res && res.result == '0') {
|
||||||
|
that.goUrl()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
if (this.faceAuthCount.appnt < this.smsAuthNum) {
|
if (this.faceAuthCount.appnt < this.smsAuthNum) {
|
||||||
// 原人脸识别
|
// 原人脸识别
|
||||||
// EWebBridge.webCallAppInJs('face_auth', {
|
// EWebBridge.webCallAppInJs('face_auth', {
|
||||||
@@ -654,6 +718,16 @@ export default {
|
|||||||
if (this.saleInsuredPersonInfo.idType != '1' || this.saleInsuredPersonInfo.age < '18') {
|
if (this.saleInsuredPersonInfo.idType != '1' || this.saleInsuredPersonInfo.age < '18') {
|
||||||
that.insuredUrl()
|
that.insuredUrl()
|
||||||
} else {
|
} else {
|
||||||
|
//RID 状态--有效
|
||||||
|
if (this.realPeopleRidInfo.insureRidFlag && this.realPeopleRidInfo.insureRidFlag == '0') {
|
||||||
|
// 手机号鉴权 --通过
|
||||||
|
let res = this.realPeopleCheckMobile('insured')
|
||||||
|
if (res && res.result == '0') {
|
||||||
|
that.insuredUrl()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 人脸识别
|
||||||
if (this.faceAuthCount.insured < this.smsAuthNum) {
|
if (this.faceAuthCount.insured < this.smsAuthNum) {
|
||||||
// 调原生人脸识别
|
// 调原生人脸识别
|
||||||
// EWebBridge.webCallAppInJs('face_auth', {
|
// EWebBridge.webCallAppInJs('face_auth', {
|
||||||
@@ -965,7 +1039,8 @@ export default {
|
|||||||
message: '加载中……'
|
message: '加载中……'
|
||||||
})
|
})
|
||||||
let data = {
|
let data = {
|
||||||
orderNo: window.localStorage.getItem('orderNo')
|
orderNo: window.localStorage.getItem('orderNo'),
|
||||||
|
getOtherType: 'RID'
|
||||||
}
|
}
|
||||||
localStorage.setItem('riskName', '')
|
localStorage.setItem('riskName', '')
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
@@ -1058,6 +1133,9 @@ export default {
|
|||||||
that.recmd = res.orderDTO.recmdDTO
|
that.recmd = res.orderDTO.recmdDTO
|
||||||
that.orderInfo = res.orderDTO.orderInfoDTO
|
that.orderInfo = res.orderDTO.orderInfoDTO
|
||||||
that.insured = res.orderDTO.insuredDTOs
|
that.insured = res.orderDTO.insuredDTOs
|
||||||
|
// 初始化RID状态
|
||||||
|
this.realPeopleRidInfo.appntRidFlag = this.appnt.ridStatus
|
||||||
|
this.realPeopleRidInfo.insureRidFlag = this.insured[0].ridStatus
|
||||||
//存code区分万能型产品
|
//存code区分万能型产品
|
||||||
let productCode, riskName
|
let productCode, riskName
|
||||||
console.log('isDoubleMailRisk', that.orderInfo.isDoubleMailRisk)
|
console.log('isDoubleMailRisk', that.orderInfo.isDoubleMailRisk)
|
||||||
|
|||||||
Reference in New Issue
Block a user