Browse Source

人脸识别

master
unknown 11 months ago
parent
commit
17e17d012a
  1. 1
      common/js/utils.js
  2. 6
      config/api.js
  3. 0
      config/new_file.js
  4. 2
      manifest.json
  5. 23
      pages/indexEntry/enroll/enroll.vue
  6. 11
      pages/indexEntry/enroll/realName/realName.vue
  7. 14
      pages/indexEntry/enroll/registInfo/comp/comfigPopup.vue
  8. 187
      pages/indexEntry/enroll/registInfo/registInfo.vue

1
common/js/utils.js

@ -21,6 +21,7 @@ const install = (Vue, vm) => {
} }
// 价格计算 // 价格计算
const priceTo = (price = 0) => { const priceTo = (price = 0) => {
if(!price) return 0
// return (price / 100).toFixed(2) // return (price / 100).toFixed(2)
return (parseInt(price * 100) / 100 / 100).toFixed(2) return (parseInt(price * 100) / 100 / 100).toFixed(2)

6
config/api.js

@ -34,6 +34,8 @@ export const getSchoolListComment = (params) => http.get('business/school/getLis
export const getListCoachComment = (params) => http.get('business/school/getListCoach', {params: params}) export const getListCoachComment = (params) => http.get('business/school/getListCoach', {params: params})
// 驾校详情 // 驾校详情
export const getSchoolDetail = (params) => http.get('business/school/getSchool', {params: params}) export const getSchoolDetail = (params) => http.get('business/school/getSchool', {params: params})
// 驾校班型
export const schoolClass = (params) => http.get('business/school-class/page', {params: params})
// 教练列表分页 // 教练列表分页
export const coachPage = (params) => http.get('business/coach/page', {params: params}) export const coachPage = (params) => http.get('business/coach/page', {params: params})
// 公益视频 // 公益视频
@ -78,6 +80,10 @@ export const areaTree = () => http.get('system/area/tree', )
export const licenseType = () => http.get('system/dict/licenseType', ) export const licenseType = () => http.get('system/dict/licenseType', )
// 区域 // 区域
export const nachangList = () => http.get('system/area/nachangList', ) export const nachangList = () => http.get('system/area/nachangList', )
// 线上提交学员报名信息
export const applyOnline = (data) => http.post('app/student-record/applyOnline', data)
// 人脸核身---获取BizToken
export const getpersonface = (params) => http.get('app/student-record/getpersonface', {params})

0
config/new_file.js

2
manifest.json

@ -59,7 +59,7 @@
"quickapp" : {}, "quickapp" : {},
/* */ /* */
"mp-weixin" : { "mp-weixin" : {
"appid" : "wx2d71605af3b620e6",
"appid" : "wx1f7125112b74db52",
"setting" : { "setting" : {
"urlCheck" : true, "urlCheck" : true,
"es6" : true, "es6" : true,

23
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">
<view class="card">{{link}}
<view class="row"> <view class="row">
<view class="lab">证件类型</view> <view class="lab">证件类型</view>
<view class="rightCon"> <view class="rightCon">
@ -44,14 +44,17 @@
</view> </view>
</view> </view>
<view class="btnBg" @click="$goPage('/pages/indexEntry/enroll/uploadAvatar/uploadAvatar')">下一步</view>
<view class="btnBg" @click="goNext">下一步</view>
</view> </view>
<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> -->
</view> </view>
</template> </template>
<script> <script>
import { getpersonface } from '@/config/api.js'
export default { export default {
data() { data() {
return { return {
@ -67,14 +70,30 @@
{lab: '军官证',id: 3}, {lab: '军官证',id: 3},
] ]
], ],
link: ''
} }
}, },
onLoad() {
this.getpersonfaceFn()
},
methods: { methods: {
confirmType(val) { confirmType(val) {
let item = val.value[0] let item = val.value[0]
this.form.type = item.id this.form.type = item.id
this.form.typeName = item.lab this.form.typeName = item.lab
this.showType = false this.showType = false
},
async getpersonfaceFn() {
const {data: res} = await getpersonface({ ruleId: 1})
let obj = JSON.parse(res)
// this.link = obj.Url
// #ifdef H5
window.open(this.link)
// #endif
console.log(obj)
},
goNext() {
// this.$goPage('/pages/indexEntry/enroll/uploadAvatar/uploadAvatar')
} }
} }
} }

11
pages/indexEntry/enroll/realName/realName.vue

@ -0,0 +1,11 @@
<template>
<view class="main">
实名认证
</view>
</template>
<script>
</script>
<style>
</style>

14
pages/indexEntry/enroll/registInfo/comp/comfigPopup.vue

@ -3,31 +3,31 @@
<view class="h3">再次确认报名信息</view> <view class="h3">再次确认报名信息</view>
<view class="li"> <view class="li">
<view class="lab">选择驾校</view> <view class="lab">选择驾校</view>
<view class="val">xxx</view>
<view class="val">{{ info.school}}</view>
</view> </view>
<view class="li"> <view class="li">
<view class="lab">选择车型</view> <view class="lab">选择车型</view>
<view class="val">xxx</view>
<view class="val">{{info.trainType}}</view>
</view> </view>
<view class="li"> <view class="li">
<view class="lab">选择班型</view> <view class="lab">选择班型</view>
<view class="val">xxx</view>
<view class="val">{{info.classModel}}</view>
</view> </view>
<view class="li"> <view class="li">
<view class="lab">选择教练</view> <view class="lab">选择教练</view>
<view class="val">xxx</view>
<view class="val">{{info.coach}}</view>
</view> </view>
<view class="li"> <view class="li">
<view class="lab">业务类型</view> <view class="lab">业务类型</view>
<view class="val">xxx</view>
<view class="val">{{ info.businessType?'增领':'初领'}}</view>
</view> </view>
<view class="li"> <view class="li">
<view class="lab">是否异地转入</view> <view class="lab">是否异地转入</view>
<view class="val">xxx</view>
<view class="val">暂时没对接</view>
</view> </view>
<view class="li"> <view class="li">
<view class="lab">合计</view> <view class="lab">合计</view>
<view class="val">xxx</view>
<view class="val">{{ $u.utils.priceTo(form.totalAmount) }}</view>
</view> </view>
<view class="li"> <view class="li">
<view class="lab">支付形式</view> <view class="lab">支付形式</view>

187
pages/indexEntry/enroll/registInfo/registInfo.vue

@ -73,7 +73,7 @@
<view class="lab">业务类型</view> <view class="lab">业务类型</view>
<view class="rightCon"> <view class="rightCon">
<u-radio-group <u-radio-group
v-model="form.radiovalue1"
v-model="form.businessType"
> >
<u-radio <u-radio
:customStyle="{marginRight: '24rpx'}" :customStyle="{marginRight: '24rpx'}"
@ -88,28 +88,7 @@
</view> </view>
</view> </view>
<view class="card">
<view class="row">
<view class="lab">是否异地转入</view>
<view class="rightCon" style="margin-left: 40rpx;">
<u-radio-group
v-model="form.radiovalue2"
@change="changeVal"
>
<u-radio
:customStyle="{marginRight: '24rpx'}"
v-for="(item, index) in radiolist2"
:key="item.id"
:label="item.name"
:name="item.id"
>
</u-radio>
</u-radio-group>
</view>
</view>
</view>
<view class="card" v-if="form.radiovalue1==2">
<view class="card" v-if="form.businessType==1">
<view class="row"> <view class="row">
<view class="lab long">原驾驶证号</view> <view class="lab long">原驾驶证号</view>
<view class="rightCon"> <view class="rightCon">
@ -123,7 +102,7 @@
<view class="rightCon"> <view class="rightCon">
<view class="row" @click="showFirstLicenceTime=true" > <view class="row" @click="showFirstLicenceTime=true" >
<view class="val"> <view class="val">
<mySelect :value="form.firstLicenceTime"/>
<mySelect :value="form.firstDriveDate"/>
</view> </view>
<view class="arrow"> <view class="arrow">
<u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;" ></u-icon> <u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;" ></u-icon>
@ -146,6 +125,27 @@
</view> </view>
</view> </view>
<view class="card">
<view class="row">
<view class="lab">是否异地转入</view>
<view class="rightCon" style="margin-left: 40rpx;">
<u-radio-group
v-model="form.radiovalue2"
@change="changeVal"
>
<u-radio
:customStyle="{marginRight: '24rpx'}"
v-for="(item, index) in radiolist2"
:key="item.id"
:label="item.name"
:name="item.id"
>
</u-radio>
</u-radio-group>
</view>
</view>
</view>
<view class="card" v-if="form.radiovalue2==1"> <view class="card" v-if="form.radiovalue2==1">
<view class="row" @click="cityShowFn"> <view class="row" @click="cityShowFn">
<view class="lab">来源城市</view> <view class="lab">来源城市</view>
@ -165,7 +165,7 @@
<view class="rightCon"> <view class="rightCon">
<view class="row" @click="showSubjectPass=true"> <view class="row" @click="showSubjectPass=true">
<view class="val"> <view class="val">
<mySelect :value="form.subjectPass"/>
<mySelect :value="form.finishSubject"/>
</view> </view>
<view class="arrow"> <view class="arrow">
<u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;" ></u-icon> <u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;" ></u-icon>
@ -193,15 +193,7 @@
<view class="lab">学费</view> <view class="lab">学费</view>
<view class="rightCon"> <view class="rightCon">
<view class="row"> <view class="row">
<view class="val">100</view>
</view>
</view>
</view>
<view class="row">
<view class="lab">合计</view>
<view class="rightCon">
<view class="row">
<view class="val blue">100</view>
<view class="val">{{ $u.utils.priceTo(form.totalAmount) }}</view>
</view> </view>
</view> </view>
</view> </view>
@ -251,7 +243,7 @@
<view class="btnBg" @click="confirmClick">确认</view> <view class="btnBg" @click="confirmClick">确认</view>
</view> </view>
<u-popup :show="showPopup" mode="center" :round="8" > <u-popup :show="showPopup" mode="center" :round="8" >
<comfigPopup @comfigClick="comfigClick"/>
<comfigPopup @comfigClick="comfigClick" :info="form"/>
</u-popup> </u-popup>
<u-popup :show="showSchool" mode="bottom" :round="8" @close="showSchool=false"> <u-popup :show="showSchool" mode="bottom" :round="8" @close="showSchool=false">
@ -259,7 +251,7 @@
</u-popup> </u-popup>
<!-- 选择班型 --> <!-- 选择班型 -->
<u-picker :show="showClassModel" :columns="columnsClassModel" keyName="label" @confirm="confirmClassModel" @cancel="showClassModel=false"></u-picker>
<u-picker :show="showClassModel" :columns="columnsClassModel" keyName="name" @confirm="confirmClassModel" @cancel="showClassModel=false"></u-picker>
<!-- 选择车型 --> <!-- 选择车型 -->
<u-picker :show="showCar" :columns="columnsCar" keyName="label" @confirm="confirmCar" :closeOnClickOverlay="true" @cancel="showCar=false"></u-picker> <u-picker :show="showCar" :columns="columnsCar" keyName="label" @confirm="confirmCar" :closeOnClickOverlay="true" @cancel="showCar=false"></u-picker>
<!-- 原驾驶证初领日期 --> <!-- 原驾驶证初领日期 -->
@ -270,7 +262,7 @@
</u-popup> </u-popup>
<!-- 已过科目 --> <!-- 已过科目 -->
<u-picker :show="showSubjectPass" :columns="columnsSubject" keyName="label" @confirm="confirmSubjectPass" @cancel="showSubjectPass=false"></u-picker> <u-picker :show="showSubjectPass" :columns="columnsSubject" keyName="label" @confirm="confirmSubjectPass" @cancel="showSubjectPass=false"></u-picker>
<!-- 待科目 -->
<!-- 科目 -->
<u-picker :show="showSubjectTreat" :columns="columnsSubject" keyName="label" @confirm="confirmTreat" @cancel="showSubjectTreat=false"></u-picker> <u-picker :show="showSubjectTreat" :columns="columnsSubject" keyName="label" @confirm="confirmTreat" @cancel="showSubjectTreat=false"></u-picker>
<!-- 城市 --> <!-- 城市 -->
<u-picker :show="showCity" ref="uPicker" :columns="[cityArr]" @confirm="confirmCity" @change="changeHandler" keyName="name"></u-picker> <u-picker :show="showCity" ref="uPicker" :columns="[cityArr]" @confirm="confirmCity" @change="changeHandler" keyName="name"></u-picker>
@ -282,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 } 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() {
@ -295,18 +287,7 @@
showOldDriveModel: false, showOldDriveModel: false,
showSubjectPass: false, showSubjectPass: false,
showSubjectTreat: false, showSubjectTreat: false,
columnsClassModel: [
[
{
label: '普通班型',
id: 1
},
{
label: 'vip班型',
id: 2
}
]
],
columnsClassModel: [],//
columnsSubject: [ columnsSubject: [
[ [
{label: '科目一', id: 1}, {label: '科目一', id: 1},
@ -320,26 +301,41 @@
classModel: '', classModel: '',
car: '', car: '',
coach: '', coach: '',
cardType: 1,
idcard: '431027199009012316',
nationality: '中国',
businessType: '',//
certificateCodeShow: '原驾驶证号xxx', certificateCodeShow: '原驾驶证号xxx',
firstLicenceTime: '',
oldDriveModel: '',
driveLicence: '',//
firstDriveDate: '',//
sex: 2,
phone: '18267412456',
applyType: 1,
name: '大乔',
oldTrainType: '',//
subjectPass: '', subjectPass: '',
subjectTreat: '', subjectTreat: '',
radiovalue2: 1,
radiovalue1: 1,
photoPath: '123.png',
address: '湖南省,郴州市',
totalAmount: 0
}, },
showSchool: false, showSchool: false,
radiolist1: [ {name: '初领', id: 1}, {name: '增驾', id: 2}],
radiolist1: [ {name: '初领', id: 0}, {name: '增驾', id: 1}],//01
radiolist2: [ {name: '是', id: 1}, {name: '否', id: 2}], radiolist2: [ {name: '是', id: 1}, {name: '否', id: 2}],
radiolist3: [ {name: '全款', id: 1}, {name: '预付款', id: 2}], radiolist3: [ {name: '全款', id: 1}, {name: '预付款', id: 2}],
cityArr: [], cityArr: [],
cityArr2: [[]]
cityArr2: [],
cityArr3: []
} }
}, },
onLoad() { onLoad() {
this.form.accountId = this.userId
this.form.userId = this.userId
uni.$on('upDateCoachItem',(item)=>{ uni.$on('upDateCoachItem',(item)=>{
console.log(item) console.log(item)
this.form.coach = item.name this.form.coach = item.name
this.form.coachId = item.id
}) })
this.areaTreeFn() this.areaTreeFn()
let schoolClass = this.$store.state.school.schoolClass let schoolClass = this.$store.state.school.schoolClass
@ -359,14 +355,29 @@
this.form.schoolId = schoolCoach.schoolId this.form.schoolId = schoolCoach.schoolId
// this.form.car = schoolClass.carType // this.form.car = schoolClass.carType
} }
if(this.form.schoolId) {
this.schoolClassFn()
}
}, },
methods: { methods: {
async schoolClassFn() {
const {data: res} = await schoolClass({pageNo: 1,pageSize: 100, schoolId: this.form.schoolId})
this.columnsClassModel = [res.list]
console.log(this.columnsClassModel)
},
cityShowFn() { cityShowFn() {
this.showCity = true this.showCity = true
this.$nextTick(()=>{
let picker = this.$refs.uPicker
picker.setColumnValues(1, this.cityArr2[0])
picker.setColumnValues(2, this.cityArr3[0][0])
})
// picker = this.$refs.uPicker // picker = this.$refs.uPicker
}, },
changeHandler(e) { changeHandler(e) {
const { const {
indexs,
columnIndex, columnIndex,
value, value,
values, // values values, // values
@ -378,7 +389,18 @@
if (columnIndex === 0) { if (columnIndex === 0) {
// pickerthis // pickerthis
picker.setColumnValues(1, this.cityArr2[index]) picker.setColumnValues(1, this.cityArr2[index])
picker.setColumnValues(2, this.cityArr3[index][0])
}
if (columnIndex === 1) {
let index3 = indexs[0]
// pickerthis
picker.setColumnValues(2, (this.cityArr3[index3])[index])
} }
console.log(indexs[0])
// console.log(this.cityArr3[index3])
// console.log(value)
// console.log(values)
// console.log(columnIndex)
}, },
// columnIndexvaluevalues // columnIndexvaluevalues
confirmCity(e) { confirmCity(e) {
@ -387,17 +409,49 @@
}, },
// //
async areaTreeFn() { async areaTreeFn() {
// this.cityArr2.push(this.traverse(item.children))
const {data: res} = await areaTree() const {data: res} = await areaTree()
this.cityArr = res.map(item=>{ this.cityArr = res.map(item=>{
let obj = { let obj = {
id: item.id, id: item.id,
name: item.name name: item.name
} }
this.cityArr2[0].push(this.traverse(item.children))
return obj return obj
}) })
console.log(this.cityArr)
console.log(this.cityArr2)
this.cityArr2 = res.map(item2=>{
let arr2 = item2.children
return arr2.map(val=>{
let obj = {
id: val.id,
name: val.name
}
return obj
})
})
this.cityArr3 = res.map(item2=>{
let arr2 = item2.children
return arr2.map(val=>{
return val.children.map(val3=>{
let obj = {
id: val3.id,
name: val3.name
}
return obj
})
})
})
// for(let i=0; i<res.length; i++) {
// let obj = {
// id: res[i].id,
// name: res[i].name
// }
// this.cityArr.push(obj)
// console.log(this.cityArr)
// console.log(this.cityArr2)
console.log(this.cityArr3)
// this.showCity = res // this.showCity = res
}, },
traverse(arr, result=[]) { traverse(arr, result=[]) {
@ -421,13 +475,16 @@
this.columnsCar = [item.businessScope.split(',')] this.columnsCar = [item.businessScope.split(',')]
console.log(this.columnsCar) console.log(this.columnsCar)
this.showSchool = false this.showSchool = false
this.schoolClassFn()
}, },
// //
confirmClassModel(val) { confirmClassModel(val) {
let item = val.value[0] let item = val.value[0]
console.log(item) console.log(item)
this.showClassModel = false this.showClassModel = false
this.form.classModel = item.label
this.form.classModel = item.name
this.form.schoolClassId = item.id
this.form.totalAmount = item.totalAmount
}, },
// //
confirmCar(val) { confirmCar(val) {
@ -435,6 +492,7 @@
console.log(item) console.log(item)
this.showCar = false this.showCar = false
this.form.car = item this.form.car = item
this.form.trainType = item
}, },
showCarClick() { showCarClick() {
if(!this.form.school) return this.$u.toast('请先选择驾校') if(!this.form.school) return this.$u.toast('请先选择驾校')
@ -448,19 +506,19 @@
// //
confirmFirstLicenceTime(val) { confirmFirstLicenceTime(val) {
console.log(val) console.log(val)
this.form.firstLicenceTime = uni.$u.timeFormat(val.value, 'yyyy-mm-dd');
this.form.firstDriveDate = uni.$u.timeFormat(val.value, 'yyyy-mm-dd');
this.showFirstLicenceTime = false this.showFirstLicenceTime = false
}, },
// //
pickerOldDrive(val) { pickerOldDrive(val) {
this.form.oldDriveModel = val
this.form.oldTrainType = val
this.showOldDriveModel = false this.showOldDriveModel = false
console.log(val) console.log(val)
}, },
// //
confirmSubjectPass(val) { confirmSubjectPass(val) {
let item = val.value[0] let item = val.value[0]
this.form.subjectPass = item.label
this.form.finishSubject = item.label
this.showSubjectPass = false this.showSubjectPass = false
}, },
// //
@ -488,9 +546,10 @@
this.showPopup = true this.showPopup = true
}, },
comfigClick(val) {
async comfigClick(val) {
console.log(val) console.log(val)
this.showPopup = false this.showPopup = false
const {data: res} = await applyOnline(this.form)
if(val) { if(val) {
this.$goPage('/pages/indexEntry/enroll/signContract/signContract') this.$goPage('/pages/indexEntry/enroll/signContract/signContract')
} }

Loading…
Cancel
Save