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>
......
This diff is collapsed.
......@@ -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