Browse Source

人脸核身

master
unknown 1 year ago
parent
commit
a60dbaa437
  1. 11
      pages.json
  2. 30
      pages/indexEntry/enroll/enroll.vue
  3. 33
      pages/indexEntry/enroll/realName/realName.vue
  4. 4
      pages/indexEntry/enroll/registInfo/registInfo.vue
  5. 8
      store/modules/school.js

11
pages.json

@ -71,6 +71,16 @@
}
},
{
"path": "enroll/realName/realName",
"style": {
"navigationBarTitleText": "实名认证",
"navigationStyle": "custom",
"enablePullDownRefresh": true,
"backgroundTextStyle": "dark"
}
},
{
"path": "enroll/uploadAvatar/uploadAvatar",
"style": {
"navigationBarTitleText": "上传头像",
@ -176,6 +186,7 @@
"backgroundTextStyle": "dark"
}
},
{
"path": "findShcool/searchShcool/searchShcool",
"style": {

30
pages/indexEntry/enroll/enroll.vue

@ -2,7 +2,7 @@
<view class="pageBgImg">
<topNavbar title="学员报名"></topNavbar>
<view class="pad">
<view class="card">{{link}}
<view class="card">
<view class="row">
<view class="lab">证件类型</view>
<view class="rightCon">
@ -50,11 +50,12 @@
<u-picker :show="showType" :columns="typeArr" keyName="lab" @confirm="confirmType" @cancel="showType=false"></u-picker>
<!-- <web-view :src="link"></web-view> -->
<!-- <iframe :src="link" frameborder="0"></iframe> -->
</view>
</template>
<script>
import { getpersonface } from '@/config/api.js'
import { getpersonface, GetDetectInfoEnhanced } from '@/config/api.js'
export default {
data() {
return {
@ -70,11 +71,12 @@
{lab: '军官证',id: 3},
]
],
link: ''
link: 'https://www.baidu.com/?tn=62095104_29_oem_dg&ch=6'
}
},
onLoad() {
this.getpersonfaceFn()
this.GetDetectInfoEnhancedFn()
},
methods: {
confirmType(val) {
@ -84,14 +86,32 @@
this.showType = false
},
async getpersonfaceFn() {
const {data: res} = await getpersonface({ ruleId: 1})
const {data: res} = await getpersonface({ ruleId: 1, RedirectUrl: 'http://192.168.1.44:8002/h5/#/pages/indexEntry/enroll/realName/realName'})
let obj = JSON.parse(res)
this.link = obj.Url
this.$store.commit('updateBizToken', obj.BizToken)
alert(this.$store.state.school.BizToken)
// #ifdef H5
window.open(this.link)
window.open(this.link, '_blank')
// #endif
// var regex = /\[.*?\]/;
// alert(obj.BizToken)
// this.GetDetectInfoEnhancedFn(obj.BizToken)
console.log(obj)
},
async GetDetectInfoEnhancedFn(bizToken) {
let obj = {
ruleId: 1,
redirectUrl: 'http://192.168.1.44:8002/h5/#/pages/indexEntry/enroll/registInfo/registInfo',
bizToken: 'A39C2EF8-9FF7-415D-BA4B-51F9457395CE'
}
const {data: res} = await GetDetectInfoEnhanced(obj)
let obj2 = JSON.parse(res)
console.log(obj2)
console.log('请求结果来了')
console.log(obj2.Text)
// uni.setStorageSync(obj2)
},
goNext() {
// this.$goPage('/pages/indexEntry/enroll/uploadAvatar/uploadAvatar')
}

33
pages/indexEntry/enroll/realName/realName.vue

@ -1,10 +1,39 @@
<template>
<view class="main">
实名认证
<view class="pageBgImg">
<topNavbar title="实名认证"></topNavbar>
</view>
</template>
<script>
import { GetDetectInfoEnhanced } from '@/config/api.js'
export default {
onShow() {
// alert(1)
// alert(this.$store.state.school.BizToken)
this.GetDetectInfoEnhancedFn()
},
onPullDownRefresh() {
this.GetDetectInfoEnhancedFn()
},
methods: {
async GetDetectInfoEnhancedFn() {
// let BizToken = uni.getStorageSync('BizToken')
// alert(BizToken)
let obj = {
ruleId: 1,
redirectUrl: 'http://192.168.1.44:8002/h5/#/pages/indexEntry/enroll/registInfo/registInfo',
bizToken: this.$store.state.school.BizToken
}
const {data: res} = await GetDetectInfoEnhanced(obj)
let obj2 = JSON.parse(res)
console.log(obj2)
alert('请求结果来了')
alert(obj2.Text.name)
// uni.setStorageSync(obj2)
},
}
}
</script>
<style>

4
pages/indexEntry/enroll/registInfo/registInfo.vue

@ -274,7 +274,7 @@
import comfigPopup from './comp/comfigPopup'
import searchSchool from './comp/searchSchool'
import oldDrive from './comp/oldDrive'
import { areaTree, applyOnline, schoolClass } from '@/config/api.js'
import { areaTree, applyOnline, schoolClass, } from '@/config/api.js'
export default {
components: { comfigPopup, searchSchool, oldDrive },
data() {
@ -330,6 +330,7 @@
}
},
onLoad() {
this.GetDetectInfoEnhancedFn()
this.form.accountId = this.userId
this.form.userId = this.userId
uni.$on('upDateCoachItem',(item)=>{
@ -360,6 +361,7 @@
}
},
methods: {
async schoolClassFn() {
const {data: res} = await schoolClass({pageNo: 1,pageSize: 100, schoolId: this.form.schoolId})
this.columnsClassModel = [res.list]

8
store/modules/school.js

@ -4,7 +4,9 @@
const school = {
state: {
schoolCoach: {},
schoolClass: {}
schoolClass: {},
BizToken: uni.getStorageSync('BizToken') ? uni.getStorageSync('BizToken') : ''
},
mutations: {
// 更新选择的驾校与教练
@ -14,6 +16,10 @@ const school = {
upDateSchoolClass(state, obj) {
state.schoolClass = obj
},
updateBizToken(state, val) {
uni.setStorageSync('BizToken', val)
state.BizToken = val
},
},
actions: {

Loading…
Cancel
Save