Commit 730e7787 authored by 李晓兵's avatar 李晓兵

'电子签'

parent b9b3e8f0
......@@ -59,8 +59,8 @@ import Jpush from './scripts/jpushService'
import Jmessage from './scripts/jmessageService'
// if (process.env.CONFIG_ENV === 'uat') {
// const VConsole = require('vconsole')
// new VConsole() // eslint-disable-line
const VConsole = require('vconsole')
new VConsole() // eslint-disable-line
// }
Vue.use(componentInstall)
......
<template>
<h-view id="certification">
<h-header :proportion="[5,1,1]" class="bar-custom">
<div slot="left" class="h-header-btn">
<img src="@/assets/userBind/arrow.png" @click="exitCertification" >
<span>电子签认证</span>
</div>
</h-header>
<h-content>
<iframe
:src="url" frameborder="0" scrolling="no" width="100%"
height="100%"/>
</h-content>
</h-view>
</template>
<script>
export default {
data () {
return {
url: this.$route.params.authUrl,
}
},
created () {
console.log(this)
},
activated () {
},
methods: {
exitCertification () {
this.$router.replace({
name: 'MyInfo',
})
},
},
}
</script>
<style lang="less" scoped>
</style>
<template>
<h-view id="iframTest">
<h-header class="header">
<div slot="center" class="top-word">iframTest</div>
</h-header>
<h-content>
<iframe :src="url" frameborder="0" scrolling="no" width="100%" height="100%"></iframe>
</h-content>
</h-view>
</template>
<script>
export default {
data() {
return {
url:'http://221.6.10.202:10404/app/auth/h5/index?token=5BFD2AC183F446DA881B816C2E2C8AAB'
}
},
created() {
},
activated() {
},
methods: {},
}
</script>
<style lang="less" scoped>
</style>
......@@ -10,7 +10,7 @@
<span>{{ user_phone }}</span>
<div>
电子签
<p :class="[elecStatus?'across':'un-across']">{{ elecStatus?'已通过':'待认证' }}</p>
<p :class="[elecStatus?'across':'un-across']" @click="certification">{{ elecStatus?'已通过':'待认证' }}</p>
</div>
</div>
</div>
......@@ -96,8 +96,6 @@
<img slot="left-icon" src="@/assets/myInfo/exit.png" class="left-icon" >
<div slot="name">退出登录</div>
</item>
<!-- <button v-if="flag" @click="changePageHead">用户绑定</button>
<button v-if="!flag" @click="unBind">解除绑定</button>-->
</list-item>
<button @click="approveBtn ? unBind() : changePageHead()">{{ description }}</button>
</div>
......@@ -127,26 +125,6 @@ export default {
}
},
watch: {
/* 'user_bp_status' (newVal, oldVal) {
console.log('@@@@@@@@@@@@@@@@@')
if (!this.bp_id && newVal === 'NEW') {
this.description = '用户绑定'
} else if (this.bp_id && newVal === 'NEW') {
this.description = '待提交'
} else if (this.bp_id && newVal === 'APPROVED') {
this.description = '解除绑定'
this.approveBtn = true
} else if ((this.bp_id && newVal === 'RETURN') || (this.bp_id && newVal === 'REJECT')) {
this.description = '审核未通过'
} else {
this.description = '审批中'
}
/!* if (newVal === 'APPROVED') {
this.flag = false
} else {
this.flag = true
} *!/
}, */
user_bp_type (newVal, oldVal) {
if (newVal === 'AGENT') {
this.isAGENT = true
......@@ -155,7 +133,7 @@ export default {
}
},
bp_identity (newVal, oldVal) {
if (newVal === 'NP_NO' || newVal === 'ORG_NO' || newVal === 'ORG_L_NO' || newVal === 'ORG_AUTH_NO ') {
if (newVal === 'NP_NO' || newVal === 'ORG_NO' || newVal === 'ORG_L_NO' || newVal === 'ORG_AUTH_NO ' || !newVal) {
this.elecStatus = false
} else {
this.elecStatus = true
......@@ -459,6 +437,74 @@ export default {
}
})
},
// 认证入口
async certification () {
let vm = this
if (vm.bp_identity === 'NP_NO' || vm.bp_identity === 'ORG_L_NO' || vm.bp_identity === 'ORG_AUTH_NO') {
let authUrl = await vm.getNpCertificationUrl()
if (authUrl) {
vm.$router.push({
name: 'Certification',
params: {
authUrl: authUrl,
},
})
} else {
hlsPopup.showLongCenter('获取认证url失败')
}
} else if (vm.bp_identity === 'ORG_NO') {
let authUrl = await vm.getOrgCertificationUrl()
if (authUrl) {
vm.$router.push({
name: 'Certification',
params: {
authUrl: authUrl,
},
})
} else {
hlsPopup.showLongCenter('获取认证url失败')
}
} else {
hlsPopup.showLongCenter('您已认证通过')
}
},
// 获取个人认证url
async getNpCertificationUrl () {
let vm = this
let url = $config.basePath + 'auth_user_sign'
let param = {
phone: vm.user_phone,
}
hlsPopup.showLoading('请稍候')
let res = await vm.$post(url, param)
hlsPopup.hideLoading()
debugger
if (res.info.code === 0) {
return res.info.data.authUrl
} else {
hlsPopup.showLongCenter(res.info.msg)
return null
}
},
// 获取企业认证url
async getOrgCertificationUrl () {
debugger
let vm = this
let url = $config.basePath + 'auth_company_sign'
let param = {
phone: vm.user_phone,
}
hlsPopup.showLoading('请稍候')
let res = await vm.$post(url, param)
hlsPopup.hideLoading()
if (res.info.code === 0) {
return res.info.data.authUrl
} else {
hlsPopup.showLongCenter(res.info.msg)
return null
}
},
},
}
</script>
......
......@@ -269,8 +269,8 @@
<img v-if="!flag" src="@/assets/userBind/org/checklist.png" alt >
</div>
</div>
<div class="userInfo types" v-if="!flag">授权人信息</div>
<div class="upload-id-cards" v-if="!flag">
<div v-if="!flag" class="userInfo types">授权人信息</div>
<div v-if="!flag" class="upload-id-cards">
<span>身份证照片上传</span>
<div class="upload-box">
<div v-if="!authidCardFront" @click="ocrShow('authidCard', 'front')">
......@@ -631,7 +631,7 @@ export default {
} else {
this.text = '授权信息'
}
},*/
}, */
typeName () {
if (this.typeName === '业务经办人') {
this.bpClass = this.baseInfo.agent_username
......@@ -653,20 +653,32 @@ export default {
this.getProvince()
if (this.$route.params.status === 'APPROVED') {
this.isApproved = true
}*/
} */
// this.getBankInfo()
},
beforeRouteEnter (to, from, next) {
next(vm => {
vm.getBpType()
vm.getProvince()
if (vm.$route.params.status === 'APPROVED') {
vm.isApproved = true
}
if (from.fullPath === '/tab/my-info') { /*|| from.fullPath === '/margin-first-pay'*/
vm.upload_list= [] // 上传图片列表
vm.dowload_list= [] // 下载图片列表
if (from.fullPath === '/tab/my-info') { /* || from.fullPath === '/margin-first-pay' */
vm.tabNum = 0
vm.legal_personMsg = {}
vm.baseInfo = {}
vm.bank_lists = {}
vm.authMsg = {}
vm.invoiceInfo = {}
vm.idCardFront = '' // 身份证正面图片
vm.idCardBack = '' // 身份证反面图片
vm.authidCardFront = '' // 授权人身份证正面图片
vm.authidCardBack = '' // 授权人身份证反面图片
vm.licenseImg = '' // 营业执照照片
vm.bankImg = '' // 银行卡图片
vm.laImg = '' // 授权书图片
vm.upload_list = [] // 上传图片列表
vm.dowload_list = [] // 下载图片列表
vm.from = true
vm.getbaseInfo()
vm.getBankInfo()
......@@ -817,16 +829,15 @@ export default {
})
},
// 校验手机号
phoneCheck(phone){
if(!hlsUtil.phoneNumber(phone) && !hlsUtil.phoneNumber86(phone)) {
phoneCheck (phone) {
if (!hlsUtil.phoneNumber(phone) && !hlsUtil.phoneNumber86(phone)) {
hlsPopup.showLongCenter('请输入正确的手机号')
}
},
verified () {
this.dowload_list = [] // 保存之前将图片下载列表清空,防止出现重复的图片
this.upload_list = [] // 保存之前将待上传列表清空,防止出现重复的图片
/*if (this.flag) { // 未授权
debugger
/* if (this.flag) { // 未授权
// this.flag = false
for (let i in this.authMsg) {
this.authMsg[i] = ''
......@@ -841,11 +852,11 @@ export default {
}
//this.saveInfo.auth_flag = 'N'
} */
if(!this.flag) { // 已授权
if (!this.flag) { // 已授权
// this.flag = false
/* for (let i in this.legal_personMsg) {
this.legal_personMsg[i] = ''
}*/
} */
this.baseInfo.auth_flag = 'Y'
this.lastInfo = { ...this.baseInfo, ...this.legal_personMsg, ...this.authMsg }
......@@ -853,8 +864,7 @@ export default {
...this.lastInfo,
...this.invoiceInfo,
}
}
else{ // 未授权
} else { // 未授权
this.lastInfo = { ...this.baseInfo, ...this.legal_personMsg }
this.saveInfo = {
...this.lastInfo,
......@@ -1034,13 +1044,14 @@ export default {
if (!re && this.baseInfo.auth_flag === 'N') {
vm.msg_flag = false
vm.hlsPopup.showLongCenter('请输入正确手机号')
}*/
} */
// 校验身份证号vm.hlsUtil.isCardID(vm.baseInfo.id_card_no)
if (vm.hlsUtil.isCardID(vm.saveInfo.id_card_no)) {
vm.msg_flag = false
vm.hlsPopup.showLongCenter('身份证不正确')
}
debugger
if (!vm.flag) {
if (vm.hlsUtil.isCardID(vm.saveInfo.auth_person_id_card)) {
vm.msg_flag = false
......@@ -1049,6 +1060,8 @@ export default {
}
if (vm.msg_flag) {
vm.dowload_list = [] // 保存之前将图片下载列表清空,防止出现重复的图片
vm.upload_list = [] // 保存之前将待上传列表清空,防止出现重复的图片
vm.hlsPopup.showLoading('请稍后')
let url = $config.basePath + 'bp_org_bind_save'
let param = {
......@@ -1280,11 +1293,16 @@ export default {
vm.authMsg.auth_person_matter = res.info.auth_person_matter
vm.authMsg.auth_person_id_card = res.info.auth_person_id_card
vm.authMsg.auth_person_position = res.info.auth_person_position
vm.authMsg.auth_id_card_date_from = res.info.auth_id_card_date_from
vm.authMsg.auth_id_card_date_to = res.info.auth_id_card_date_to
vm.authMsg.auth_cell_phone = res.info.auth_cell_phone
// delete res.info.agent_username
vm.legal_personMsg.id_card_no = res.info.id_card_no
// vm.legal_personMsg.legal_person = res.info.legal_person
vm.legal_personMsg.cell_phone = res.info.cell_phone
vm.legal_personMsg.living_address = res.info.living_address
vm.legal_personMsg.id_card_date_from = res.info.id_card_date_from
vm.legal_personMsg.id_card_date_to = res.info.id_card_date_to
Object.assign(vm.saveInfo, res.info)
if (vm.baseInfo.auth_flag === '是') {
vm.flag = false
......@@ -1325,9 +1343,9 @@ export default {
hlsPopup.showLongCenter('请拍照')
} else {
if (ocrType === 'idCard') {
type === 'front' ? (vm.idCardFront = imgdata, vm.idCardIdentify(imgdata,'idCard'), vm.idCardFrontEditFlag = true) : (vm.idCardBack = imgdata, vm.idCardBackIdentify(imgdata,'idCard'), vm.idCardBackEditFlag = true)
type === 'front' ? (vm.idCardFront = imgdata, vm.idCardIdentify(imgdata, 'idCard'), vm.idCardFrontEditFlag = true) : (vm.idCardBack = imgdata, vm.idCardBackIdentify(imgdata, 'idCard'), vm.idCardBackEditFlag = true)
} else if (ocrType === 'authidCard') {
type === 'front' ? (vm.authidCardFront = imgdata, vm.idCardIdentify(imgdata,'authidCard'), vm.authidCardFrontEditFlag = true) : (vm.authidCardBack = imgdata, vm.idCardBackIdentify(imgdata,'authidCard'), vm.authidCardBackEditFlag = true)
type === 'front' ? (vm.authidCardFront = imgdata, vm.idCardIdentify(imgdata, 'authidCard'), vm.authidCardFrontEditFlag = true) : (vm.authidCardBack = imgdata, vm.idCardBackIdentify(imgdata, 'authidCard'), vm.authidCardBackEditFlag = true)
} else if (ocrType === 'bankCard') {
vm.bankImg = imgdata
vm.bankCardIdentify(imgdata)
......@@ -1356,9 +1374,9 @@ export default {
hlsPopup.showLongCenter('请选择一张图片')
} else {
if (ocrType === 'idCard') {
type === 'front' ? (vm.idCardFront = imgUrl[0], vm.idCardIdentify(imgUrl[0],'idCard'), vm.idCardFrontEditFlag = true) : (vm.idCardBack = imgUrl[0], vm.idCardBackIdentify(imgUrl[0],'idCard'), vm.idCardBackEditFlag = true)
type === 'front' ? (vm.idCardFront = imgUrl[0], vm.idCardIdentify(imgUrl[0], 'idCard'), vm.idCardFrontEditFlag = true) : (vm.idCardBack = imgUrl[0], vm.idCardBackIdentify(imgUrl[0], 'idCard'), vm.idCardBackEditFlag = true)
} else if (ocrType === 'authidCard') {
type === 'front' ? (vm.authidCardFront = imgUrl[0], vm.idCardIdentify(imgUrl[0],'authidCard'), vm.authidCardFrontEditFlag = true) : (vm.authidCardBack = imgUrl[0], vm.idCardBackIdentify(imgUrl[0],'authidCard'), vm.authidCardBackEditFlag = true)
type === 'front' ? (vm.authidCardFront = imgUrl[0], vm.idCardIdentify(imgUrl[0], 'authidCard'), vm.authidCardFrontEditFlag = true) : (vm.authidCardBack = imgUrl[0], vm.idCardBackIdentify(imgUrl[0], 'authidCard'), vm.authidCardBackEditFlag = true)
} else if (ocrType === 'bankCard') {
vm.bankImg = imgUrl[0]
vm.bankCardIdentify(imgUrl[0])
......@@ -1375,7 +1393,7 @@ export default {
vm.hlsUtil.takePicture(cameraoptions, success, error)
},
// 身份证识别
idCardIdentify (fileUrl,cardType) {
idCardIdentify (fileUrl, cardType) {
let vm = this
hlsPopup.showLoading('正在识别')
let url = process.env.ocrPath + '/baidu/ocr/idCard'
......@@ -1394,7 +1412,7 @@ export default {
})
},
// 身份证背面识别
idCardBackIdentify (fileUrl,cardType) {
idCardBackIdentify (fileUrl, cardType) {
let vm = this
hlsPopup.showLoading('正在识别')
let url = process.env.ocrPath + '/baidu/ocr/idCardBack'
......@@ -1569,7 +1587,7 @@ export default {
'filePath': vm.authidCardFront,
'attachment_id': '',
'user_id': 1,
'fileName': 'back',
'fileName': 'front',
}
list.push(obj)
vm.save_picture(list)
......@@ -1813,7 +1831,7 @@ export default {
if (alreadyUploadNum === attLength) {
clearInterval(recordUploadInterval)
/* hlsPopup.hideLoading()
hlsPopup.showLongCenter('图片上传成功')*/
hlsPopup.showLongCenter('图片上传成功') */
}
}, 500)
for (var i = 0; i < list.length; i++) {
......
......@@ -21,7 +21,7 @@ import Location from '@/pages/home/location'
// 我的
import MyInfo from '@/pages/myInfo/my-info'
import IframTest from '@/pages/myInfo/iframTest'
import Certification from '@/pages/myInfo/certification'
// 我的收藏
import MyProductList from '@/pages/myProductCollection/my-product-list'
......@@ -242,7 +242,7 @@ export default new Router({
{path: '/contract-records', component: ContractRecords, name: 'ContractRecords', meta: {keepAlive: true}},
{path: '/repay-detail', component: RepayDetail, name: 'RepayDetail', meta: {keepAlive: true}},
{path: '/repay-plans', component: RepayPlans, name: 'RepayPlans', meta: {keepAlive: true}},
{path: '/ifram-test', component: IframTest, name: 'IframTest', meta: {keepAlive: false}},
{path: '/certification', component: Certification, name: 'Certification', meta: {keepAlive: false}},
// 业务退款
{path: '/drawback-list', component: DrawbackList, name: 'DrawbackList', meta: {keepAlive: false}},
{path: '/drawback-detail', component: DrawbackDetail, name: 'DrawbackDetail', meta: {keepAlive: false}},
......
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no,width=device-width,viewport-fit=cover"><meta name=format-detection content="telephone=no"><meta name=format-detection content="email=no"><meta name=apple-mobile-web-app-capable content=yes><meta name=apple-mobile-web-app-status-bar-style content=black><script type=text/javascript src=./static/vuePlatform.js></script><script type=text/javascript src=./static/prototype.js></script><script type=text/javascript src=cordova.js></script><script type=text/javascript src="http://api.map.baidu.com/api?v=2.0&ak=CyOWd7pmPurvZ0PERgxEOlAlifG0y7Sp"></script><title>xcmg</title><link href=./static/css/app.5e622b61f5a574d63fbb9b7924042e28.css rel=stylesheet></head><body><div id=app-box></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.e547499500fbe65e7169.js></script><script type=text/javascript src=./static/js/app.e6d55e6a76b6dae1db92.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no,width=device-width,viewport-fit=cover"><meta name=format-detection content="telephone=no"><meta name=format-detection content="email=no"><meta name=apple-mobile-web-app-capable content=yes><meta name=apple-mobile-web-app-status-bar-style content=black><script type=text/javascript src=./static/vuePlatform.js></script><script type=text/javascript src=./static/prototype.js></script><script type=text/javascript src=cordova.js></script><script type=text/javascript src="http://api.map.baidu.com/api?v=2.0&ak=CyOWd7pmPurvZ0PERgxEOlAlifG0y7Sp"></script><title>xcmg</title><link href=./static/css/app.84881c6cb7d5be64864b11323ab85fa6.css rel=stylesheet></head><body><div id=app-box></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.efd596b798e6119ce4a4.js></script><script type=text/javascript src=./static/js/app.972addcd4e5bd52ea724.js></script></body></html>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment