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", "path": "enroll/uploadAvatar/uploadAvatar",
"style": { "style": {
"navigationBarTitleText": "上传头像", "navigationBarTitleText": "上传头像",
@ -176,6 +186,7 @@
"backgroundTextStyle": "dark" "backgroundTextStyle": "dark"
} }
}, },
{ {
"path": "findShcool/searchShcool/searchShcool", "path": "findShcool/searchShcool/searchShcool",
"style": { "style": {

30
pages/indexEntry/enroll/enroll.vue

@ -2,7 +2,7 @@
<view class="pageBgImg"> <view class="pageBgImg">
<topNavbar title="学员报名"></topNavbar> <topNavbar title="学员报名"></topNavbar>
<view class="pad"> <view class="pad">
<view class="card">{{link}}
<view class="card">
<view class="row"> <view class="row">
<view class="lab">证件类型</view> <view class="lab">证件类型</view>
<view class="rightCon"> <view class="rightCon">
@ -50,11 +50,12 @@
<u-picker :show="showType" :columns="typeArr" keyName="lab" @confirm="confirmType" @cancel="showType=false"></u-picker> <u-picker :show="showType" :columns="typeArr" keyName="lab" @confirm="confirmType" @cancel="showType=false"></u-picker>
<!-- <web-view :src="link"></web-view> --> <!-- <web-view :src="link"></web-view> -->
<!-- <iframe :src="link" frameborder="0"></iframe> -->
</view> </view>
</template> </template>
<script> <script>
import { getpersonface } from '@/config/api.js'
import { getpersonface, GetDetectInfoEnhanced } from '@/config/api.js'
export default { export default {
data() { data() {
return { return {
@ -70,11 +71,12 @@
{lab: '军官证',id: 3}, {lab: '军官证',id: 3},
] ]
], ],
link: ''
link: 'https://www.baidu.com/?tn=62095104_29_oem_dg&ch=6'
} }
}, },
onLoad() { onLoad() {
this.getpersonfaceFn() this.getpersonfaceFn()
this.GetDetectInfoEnhancedFn()
}, },
methods: { methods: {
confirmType(val) { confirmType(val) {
@ -84,14 +86,32 @@
this.showType = false this.showType = false
}, },
async getpersonfaceFn() { 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) let obj = JSON.parse(res)
this.link = obj.Url this.link = obj.Url
this.$store.commit('updateBizToken', obj.BizToken)
alert(this.$store.state.school.BizToken)
// #ifdef H5 // #ifdef H5
window.open(this.link)
window.open(this.link, '_blank')
// #endif // #endif
// var regex = /\[.*?\]/;
// alert(obj.BizToken)
// this.GetDetectInfoEnhancedFn(obj.BizToken)
console.log(obj) 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() { goNext() {
// this.$goPage('/pages/indexEntry/enroll/uploadAvatar/uploadAvatar') // this.$goPage('/pages/indexEntry/enroll/uploadAvatar/uploadAvatar')
} }

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

@ -1,10 +1,39 @@
<template> <template>
<view class="main">
实名认证
<view class="pageBgImg">
<topNavbar title="实名认证"></topNavbar>
</view> </view>
</template> </template>
<script> <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> </script>
<style> <style>

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

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

8
store/modules/school.js

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

Loading…
Cancel
Save