unknown
2 years ago
31 changed files with 984 additions and 3813 deletions
-
24api/index.js
-
161common/js/utils.js
-
17pages.json
-
31pages/application/entry.vue
-
170pages/application/fillRegistInfo.vue
-
132pages/application/payment.vue
-
15pages/application/registrationPhone.vue
-
7pages/application/success.vue
-
0pages/application/webView.vue
-
51pages/index/index.vue
-
99pages/learnDriveStep/chooseCoach/chooseCoach.vue
-
138pages/learnDriveStep/confirmClassHour/confirmClassHour.vue
-
228pages/learnDriveStep/confirmClassHour/signature.vue
-
135pages/learnDriveStep/learnDriveStep.scss
-
253pages/learnDriveStep/learnDriveStep.vue
-
625pages/learnDriveStep/payMoney/payMoney.vue
-
97pages/learnDriveStep/payMoney/payMoneySuccess.vue
-
142pages/learnDriveStep/realName/realName.vue
-
147pages/learnDriveStep/step/step0.vue
-
225pages/learnDriveStep/step/step1.vue
-
63pages/learnDriveStep/step/step2.vue
-
524pages/learnDriveStep/step/step3.vue
-
121pages/learnDriveStep/step/step3formValidation.vue
-
174pages/learnDriveStep/step/step4.vue
-
148pages/learnDriveStep/webView/webView - 副本 (2).vue
-
2pages/schoolDetails/details.vue
-
BINstatic/images/avatar.png
-
BINstatic/images/jiaofei_wxIphone@2x.png
-
BINstatic/images/third_icon_gengduoIphone@2x.png
-
BINstatic/images/third_img_tuijianIphone@2x.png
@ -1,99 +0,0 @@ |
|||
<template> |
|||
<view class="main"> |
|||
<u-sticky> |
|||
<view class="searchBox"> |
|||
<u-search placeholder="请输入教练姓名" v-model="params.coachName" :show-action="false" @search="searchFn"> </u-search> |
|||
</view> |
|||
</u-sticky> |
|||
|
|||
<view class="ul"> |
|||
<view class="li" v-for="(item,index) in list" :key="index" @click="chooseClick(item)"> |
|||
<view class="leftT">{{item.coachName}}</view> |
|||
<view class="rigthT">{{item.mobilePhone}}</view> |
|||
</view> |
|||
</view> |
|||
<u-loadmore :status="status" v-if="list.length>30" :icon-type="'flower'" /> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import learnDrive from '@/api/learnDrive.js' |
|||
export default { |
|||
data() { |
|||
return { |
|||
keyword: '', |
|||
trainingSchoolId: '', |
|||
list: [], |
|||
params: { |
|||
pageIndex: 1, |
|||
pageSize: 30, |
|||
trainingSchoolId: '' |
|||
}, |
|||
status: 'loadmore', |
|||
|
|||
} |
|||
}, |
|||
onLoad(options) { |
|||
this.params.trainingSchoolId = options.trainingSchoolId |
|||
this.querySchoolCoachFn() |
|||
}, |
|||
|
|||
onReachBottom() { |
|||
if(status=='nomore') return |
|||
this.querySchoolCoachFn() |
|||
|
|||
}, |
|||
methods: { |
|||
chooseClick(item) { |
|||
// getApp().globalData.realAuthsuccee = item |
|||
this.$store.commit('upDateCoachItem', item) |
|||
uni.navigateBack() |
|||
}, |
|||
searchFn() { |
|||
this.list = [] |
|||
this.params.pageIndex = 1 |
|||
this.status = 'loadmore' |
|||
this.querySchoolCoachFn() |
|||
}, |
|||
// 获取教练 |
|||
async querySchoolCoachFn() { |
|||
const [nulls, res] = await learnDrive.querySchoolCoach(this.params) |
|||
this.list.push(...res.data) |
|||
this.params.pageIndex ++ |
|||
if(res.data.length<this.params.pageSize) { |
|||
this.status = 'nomore' |
|||
} |
|||
console.log('获取教练') |
|||
console.log(res) |
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.main { |
|||
background-color: #f8f8f8; |
|||
.searchBox { |
|||
background-color: #fff; |
|||
padding: 16rpx 32rpx; |
|||
} |
|||
} |
|||
.ul { |
|||
width: 100%; |
|||
border-bottom: 10rpx solid #f8f8f8; |
|||
font-size: 30rpx; |
|||
padding: 0 32rpx; |
|||
color: #333333; |
|||
background-color: #fff; |
|||
.li { |
|||
width: 100%; |
|||
height: 98rpx; |
|||
line-height: 98rpx; |
|||
display: flex; |
|||
font-size: 30rpx; |
|||
justify-content: space-between; |
|||
align-center: center; |
|||
border-bottom: 1px solid #F5F7FA; |
|||
} |
|||
} |
|||
</style> |
@ -1,138 +0,0 @@ |
|||
<template> |
|||
<view class="box"> |
|||
<view class="main"> |
|||
<signature :showCanvas="showCanvas" @closeCanvas="closeCanvas" @getCanvasImg="getCanvasImg"></signature> |
|||
</view> |
|||
</view> |
|||
|
|||
</template> |
|||
<script> |
|||
import signature from './signature.vue'; |
|||
import carLearn from '@/api/carLearn.js' |
|||
import { APP_API, APP_HOST } from '@/site.config.js'; |
|||
export default { |
|||
components: { |
|||
signature |
|||
}, |
|||
data() { |
|||
return { |
|||
//打开canvas绘制签名 |
|||
showCanvas: true, |
|||
//是否展示操作菜单 |
|||
completionSignPath: '' ,//签名路径 |
|||
completionSignImg:'', //签名图片base64 |
|||
signImg:"", //原有签名图片 |
|||
params: { |
|||
studentId: uni.getStorageSync('studentId')||'', |
|||
part: '', |
|||
signUrl: '' |
|||
} |
|||
} |
|||
}, |
|||
onLoad(option) { |
|||
this.params.part = option.part |
|||
}, |
|||
|
|||
methods: { |
|||
|
|||
//隐藏canvas签名组件 |
|||
closeCanvas(e) { |
|||
// this.showCanvas = false; |
|||
if (e) { |
|||
this.completionSignPath = e |
|||
this.ossUpload(); |
|||
} |
|||
}, |
|||
//获取图片内容 |
|||
getCanvasImg(e) { |
|||
if (e) { |
|||
this.completionSignImg = e |
|||
// this.ossUpload() |
|||
} |
|||
}, |
|||
sign() { |
|||
this.showCanvas = true; |
|||
}, |
|||
//上传签名 |
|||
ossUpload() { |
|||
let _this = this |
|||
if(!this.completionSignPath){ |
|||
uni.showToast({ |
|||
title: '签名为空不能上传', |
|||
icon: 'none', |
|||
duration: 2000 |
|||
}) |
|||
return; |
|||
} |
|||
const _url = APP_HOST + APP_API + '/util/manage/uploadFile.do'; |
|||
console.log('来到这里了吗?') |
|||
console.log(this.completionSignPath) |
|||
uni.uploadFile({ |
|||
url: _url, |
|||
filePath: this.completionSignPath, |
|||
name: 'file', |
|||
formData: { |
|||
fileType: 1, |
|||
fileSuffix: "png", |
|||
}, |
|||
header: { |
|||
'token' : uni.getStorageSync("Authorization") || '', |
|||
}, |
|||
success: res => { |
|||
// 判断是否json字符串,将其转为json格式 |
|||
let data = typeof(res.data) == 'string' ? JSON.parse(res.data) : res.data; |
|||
if (data.code==0) { |
|||
console.log(data.data) |
|||
_this.params.signUrl = data.data |
|||
_this.saveStudentPeriodSign() |
|||
} |
|||
console.log(res) |
|||
}, |
|||
fail: err =>{ |
|||
console.log('err',err); |
|||
uni.$u.toast(err.errMsg); |
|||
} |
|||
}); |
|||
}, |
|||
// 确认认签名 |
|||
async saveStudentPeriodSign() { |
|||
const [err, res] = await carLearn.saveStudentPeriodSign(this.params) |
|||
console.log('签名成功') |
|||
console.log(res) |
|||
if(res.data.code!=0) return this.$u.toast(res.message) |
|||
// 锁定竖屏 |
|||
// #ifdef APP-PLUS |
|||
plus.screen.lockOrientation("portrait-primary"); |
|||
// #endif |
|||
this.$refs.uToast.show({ |
|||
title: '上传成功', |
|||
type: 'success', |
|||
url: '/pages/learnDriveStep/confirmClassHour/back' |
|||
}) |
|||
|
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped lang="scss"> |
|||
.box { |
|||
overflow: hidden; |
|||
height: 100vh; |
|||
} |
|||
.main { |
|||
width: 100%; |
|||
height: 100%; |
|||
background: #fff; |
|||
overflow-y: scroll; |
|||
/* 使用滚动区域代替Webview滚动 */ |
|||
-webkit-overflow-scrolling: touch; |
|||
/* IOS弹性 */ |
|||
position: relative; |
|||
/* 相对位置 */ |
|||
overflow-x: hidden; |
|||
/* X轴滚动 */ |
|||
-webkit-transform: translateZ(0); |
|||
/* 3D加速 */ |
|||
-webkit-overflow-scrolling: touch; |
|||
} |
|||
</style> |
@ -1,228 +0,0 @@ |
|||
<template> |
|||
<view class="signature-box"> |
|||
<view class="topTps">需要您签名确认学时</view> |
|||
<!-- 签名 --> |
|||
<view class="signature"> |
|||
<canvas ref="mycanvas" class="mycanvas" canvas-id="mycanvas" @touchstart="touchstart" @touchmove="touchmove" |
|||
@touchend="touchend"></canvas> |
|||
</view> |
|||
<view class="footBox"> |
|||
<view class="checkCon"> |
|||
<u-checkbox-group> |
|||
<u-checkbox v-model="checked">本人【 {{realName}} 】承诺以上签名真实有效</u-checkbox> |
|||
</u-checkbox-group> |
|||
|
|||
</view> |
|||
<view class="footBtn"> |
|||
<view class="btn border" @click="clear">重签</view> |
|||
<view class="btn" @click="finish">提交</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
<script> |
|||
// import { pathToBase64 } from '@/common/js/jssdk_image_tools.js' |
|||
var x = 20; |
|||
var y = 20; |
|||
export default { |
|||
data() { |
|||
return { |
|||
//绘图图像 |
|||
ctx: '', |
|||
//路径点集合 |
|||
points: [], |
|||
//签名图片 |
|||
SignatureImg: '', |
|||
hasSign: false, |
|||
realName: '', |
|||
checked: false, |
|||
}; |
|||
}, |
|||
props: ['showCanvas'], |
|||
|
|||
mounted() { |
|||
this.createCanvas(); |
|||
this.realName = uni.getStorageSync('userInfo').realName |
|||
}, |
|||
methods: { |
|||
//清除签名的图片 |
|||
obliterate() { |
|||
if (this.SignatureImg) { |
|||
this.SignatureImg = ''; |
|||
} |
|||
this.close(); |
|||
}, |
|||
//关闭并清空画布 |
|||
close() { |
|||
this.$emit('closeCanvas'); |
|||
this.clear(); |
|||
}, |
|||
//创建并显示画布 |
|||
createCanvas() { |
|||
this.ctx = uni.createCanvasContext('mycanvas', this); //创建绘图对象 |
|||
this.ctx.setFillStyle('#000000') |
|||
this.ctx.fillStyle = '#000000' |
|||
//设置画笔样式 |
|||
this.ctx.lineWidth = 6; |
|||
this.ctx.lineCap = 'round'; |
|||
this.ctx.lineJoin = 'round'; |
|||
}, |
|||
//触摸开始,获取到起点 |
|||
touchstart(e) { |
|||
let startX = e.changedTouches[0].x; |
|||
let startY = e.changedTouches[0].y; |
|||
let startPoint = { |
|||
X: startX, |
|||
Y: startY |
|||
}; |
|||
this.points.push(startPoint); |
|||
//每次触摸开始,开启新的路径 |
|||
this.ctx.beginPath(); |
|||
}, |
|||
//触摸移动,获取到路径点 |
|||
touchmove(e) { |
|||
let moveX = e.changedTouches[0].x; |
|||
let moveY = e.changedTouches[0].y; |
|||
let movePoint = { |
|||
X: moveX, |
|||
Y: moveY |
|||
}; |
|||
this.points.push(movePoint); //存点 |
|||
let len = this.points.length; |
|||
if (len >= 2) { |
|||
this.draw(); //绘制路径 |
|||
} |
|||
}, |
|||
// 触摸结束,将未绘制的点清空防止对后续路径产生干扰 |
|||
touchend() { |
|||
this.points = []; |
|||
}, |
|||
//绘制笔迹 |
|||
draw() { |
|||
let point1 = this.points[0]; |
|||
let point2 = this.points[1]; |
|||
this.points.shift(); |
|||
this.ctx.moveTo(point1.X, point1.Y); |
|||
this.ctx.lineTo(point2.X, point2.Y); |
|||
this.ctx.stroke(); |
|||
this.ctx.draw(true); |
|||
this.hasSign = true |
|||
}, |
|||
//清空画布 |
|||
clear() { |
|||
this.hasSign = false |
|||
let that = this; |
|||
this.createCanvas(); |
|||
uni.getSystemInfo({ |
|||
success: function(res) { |
|||
let canvasw = res.windowWidth; |
|||
let canvash = res.windowHeight; |
|||
that.ctx.clearRect(0, 0, canvasw, canvash); |
|||
that.ctx.draw(true); |
|||
} |
|||
}); |
|||
}, |
|||
//完成绘画并保存到本地 |
|||
finish() { |
|||
if(!this.checked) { |
|||
return this.$u.toast('请勾选承诺') |
|||
} |
|||
if (!this.hasSign) { |
|||
uni.showToast({ |
|||
title: '签名为空不能保存', |
|||
icon: 'none', |
|||
duration: 2000 |
|||
}) |
|||
return |
|||
} |
|||
let that = this; |
|||
uni.canvasToTempFilePath({ |
|||
canvasId: 'mycanvas', |
|||
destWidth:160, |
|||
success: function(res) { |
|||
console.log('图片上传结果') |
|||
console.log(res) |
|||
if(!res || !res.tempFilePath) { |
|||
that.SignatureImg = res.tempFilePath; |
|||
console.log(that.SignatureImg) |
|||
that.$emit('closeCanvas', that.SignatureImg); |
|||
}else{ |
|||
that.$emit('closeCanvas', res.tempFilePath); |
|||
// //用来解决安卓真机获取到的是canvas图片的临时路径,转成base64格式 |
|||
// pathToBase64(res.tempFilePath).then(re => { |
|||
// that.SignatureImg = re; |
|||
// that.$emit('getCanvasImg', that.SignatureImg); |
|||
// }) |
|||
} |
|||
}, |
|||
|
|||
}); |
|||
} |
|||
} |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
.signature-box { |
|||
padding: 0 32rpx; |
|||
display: flex; |
|||
flex-direction: column; |
|||
width: 100%; |
|||
height: 98%; |
|||
// height: calc(100vh - 100rpx); |
|||
background: #fff; |
|||
.topTps { |
|||
width: 100%; |
|||
border-radius: 8rpx; |
|||
background-color: #f1f1f1; |
|||
height: 110rpx; |
|||
line-height: 110rpx; |
|||
text-align: center; |
|||
font-size: 34rpx; |
|||
color: #333; |
|||
} |
|||
.footBox { |
|||
|
|||
.checkCon { |
|||
width: 100%; |
|||
height: 100rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
} |
|||
.footBtn { |
|||
display: flex; |
|||
justify-content: space-between; |
|||
.btn { |
|||
width: 49%; |
|||
font-size: 32rpx; |
|||
line-height: 90rpx; |
|||
height: 90rpx; |
|||
color: #fff; |
|||
border-radius: 14rpx; |
|||
background: linear-gradient(180deg, #3593FB 0%, #53D3E5 100%);; |
|||
text-align: center; |
|||
&.border { |
|||
border: 1rpx solid #218dff ; |
|||
color: #218dff; |
|||
background: #fff; |
|||
} |
|||
} |
|||
|
|||
} |
|||
} |
|||
//签名模块 |
|||
.signature { |
|||
flex: 1; |
|||
// height: 0; |
|||
// width: 0; |
|||
//canvas |
|||
.mycanvas { |
|||
width:100%; |
|||
height:100%; |
|||
background-color: #fff; |
|||
border-radius: 10px 10px 0 0; |
|||
} |
|||
|
|||
} |
|||
} |
|||
</style> |
|||
|
@ -1,135 +0,0 @@ |
|||
.main { |
|||
width: 100vw; |
|||
display: flex; |
|||
flex-direction: column; |
|||
min-height: 100vh; |
|||
padding-bottom: 160rpx; |
|||
.card { |
|||
background: #fff; |
|||
z-index: 99; |
|||
} |
|||
.step-row { |
|||
display: flex; |
|||
width: 100vw; |
|||
padding: 30rpx; |
|||
background: #fff; |
|||
z-index: 99; |
|||
.step { |
|||
flex-direction: column; |
|||
flex: 1; |
|||
display: flex; |
|||
align-items: center; |
|||
position: relative; |
|||
padding: 4rpx; |
|||
|
|||
.okIcon { |
|||
position: absolute; |
|||
left: 60%; |
|||
top: 0; |
|||
z-index: 9; |
|||
image { |
|||
display: block; |
|||
width: 38rpx; |
|||
height: 38rpx; |
|||
} |
|||
} |
|||
.arrow { |
|||
position: absolute; |
|||
left: 90%; |
|||
top: 40%; |
|||
transform: translateY(-50%); |
|||
image { |
|||
display: block; |
|||
width: 24rpx; |
|||
height: 22rpx; |
|||
} |
|||
} |
|||
.icon { |
|||
padding: 6rpx; |
|||
border-radius: 50%; |
|||
&.active { |
|||
border: 1px solid #1989FA; |
|||
} |
|||
image { |
|||
display: block; |
|||
width: 80rpx; |
|||
height: 80rpx; |
|||
} |
|||
} |
|||
|
|||
.text { |
|||
margin-top: 12rpx; |
|||
font-size: 24rpx; |
|||
color: #333; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
.checkCon { |
|||
padding: 96rpx 30rpx 24rpx 30rpx; |
|||
} |
|||
.btnBg { |
|||
width: 100%; |
|||
height: 128rpx; |
|||
padding: 16rpx 30rpx; |
|||
background: #fff; |
|||
.btn { |
|||
width: 100%; |
|||
height: 96rpx; |
|||
background: linear-gradient(180deg, #3593FB 0%, #53D3E5 100%); |
|||
border-radius: 48rpx; |
|||
font-size: 36rpx; |
|||
color: #fff; |
|||
text-align: center; |
|||
line-height: 96rpx; |
|||
} |
|||
} |
|||
.select_row { |
|||
display: flex;justify-content: flex-end;width: 100%; |
|||
} |
|||
|
|||
.line { |
|||
position: relative; |
|||
&::before { |
|||
content: ''; |
|||
height: 20rpx; |
|||
width: 100vw; |
|||
background-color: #f7f7f7; |
|||
position: absolute; |
|||
left: -30rpx; |
|||
bottom: -20rpx; |
|||
} |
|||
} |
|||
.flex1 { |
|||
flex: 1 |
|||
} |
|||
.stepBtn_row { |
|||
display: flex; |
|||
padding: 30rpx; |
|||
position: fixed; |
|||
width: 100%; |
|||
bottom: 0; |
|||
left: 0; |
|||
justify-content: space-between; |
|||
background-color: #fff; |
|||
z-index: 9; |
|||
.stepBtn { |
|||
width: 48%; |
|||
height: 96rpx; |
|||
border: 2rpx solid rgba(53, 147, 251, 1); |
|||
color: #1989FA; |
|||
border-radius: 50rpx; |
|||
text-align: center; |
|||
line-height: 96rpx; |
|||
font-size: 36rpx; |
|||
text-align: center; |
|||
&.bg { |
|||
color: #fff; |
|||
border:none; |
|||
} |
|||
&.opacity { |
|||
opacity: 0.5; |
|||
} |
|||
} |
|||
} |
|||
|
@ -1,253 +0,0 @@ |
|||
<template> |
|||
<view class="main"> |
|||
<u-sticky> |
|||
<view class="card"> |
|||
<view class="step-row"> |
|||
<view class="step" v-for="(item,index) in stepArr" :key="index" @click="item.callBack" > |
|||
<view class="okIcon" v-if="stepIcon>=index"> |
|||
<image src="@/static/images/icon/ok.png" mode=""></image> |
|||
</view> |
|||
<view class="arrow" v-if="index!=4"> |
|||
<image src="@/static/images/icon/arrow.png" mode=""></image> |
|||
</view> |
|||
<view class="icon" :class="{active: currentIndex==index}"> |
|||
<image :src="item.icon" mode=""></image> |
|||
</view> |
|||
<view class="text"> |
|||
{{item.text}} |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</u-sticky> |
|||
|
|||
|
|||
<step0 v-if="currentIndex==0" class="flex1" :info="info" :fromClass="fromClass"/> |
|||
<step1 v-if="currentIndex==1" class="flex1"/> |
|||
<step2 v-if="currentIndex==2" class="flex1"/> |
|||
<step3 v-if="currentIndex==3&&!showSignPopup" :info="info" :userInfo="userInfo" :trainingApplyId="trainingApplyId" @showSignPopupFn="showSignPopup=true;getTrainingApplyDetailsFn()" :fromClass="fromClass"/> |
|||
<step4 :trainingApplyId="trainingApplyId" :info="info" v-if="showSignPopup&¤tIndex>2" @signSuccess="getTrainingApplyDetailsFn"></step4> |
|||
|
|||
<view class="stepBtn_row" v-if="currentIndex<3"> |
|||
<view class="stepBtn" :class="{opacity: currentIndex==0}" @click="changeStepBtn(-1)">上一步</view> |
|||
<view class="stepBtn bg bgLinear" :class="{opacity: currentIndex==4}" @click="changeStepBtn(1)">下一步</view> |
|||
</view> |
|||
|
|||
|
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import step3 from './step/step3.vue' |
|||
import step0 from './step/step0.vue' |
|||
import step1 from './step/step1.vue' |
|||
import step2 from './step/step2.vue' |
|||
import step4 from './step/step4.vue' |
|||
|
|||
import learnDriveApi from '@/api/learnDrive.js' |
|||
import utilsApi from '@/api/utils.js' |
|||
export default { |
|||
components: { |
|||
step0, |
|||
step1, |
|||
step2, |
|||
step3, |
|||
step4 |
|||
}, |
|||
data() { |
|||
return { |
|||
fromClass: 0,//是不是从选择班型来的 |
|||
checked: true, |
|||
currentIndex: 0, |
|||
form: { |
|||
name: '', |
|||
type: '' |
|||
}, |
|||
stepArr: [ |
|||
{icon: require('../../static/images/icon/liucheng1.png'),text: '驾校预报名', callBack:(()=>{ |
|||
this.currentIndex = 0 |
|||
})}, |
|||
{icon: require('../../static/images/icon/liucheng2.png'),text: '体检', callBack:(()=>{ |
|||
this.currentIndex = 1 |
|||
})}, |
|||
{icon: require('../../static/images/icon/liucheng3.png'),text: '面签', callBack:(()=>{ |
|||
this.currentIndex = 2 |
|||
})}, |
|||
{icon: require('../../static/images/icon/liucheng4.png'),text: '填报名表', callBack:(()=>{ |
|||
// 没有实名 |
|||
if(!this.$store.state.realAuthsuccee) { |
|||
this.$goPage('/pages/learnDriveStep/realName/realName?trainingApplyId='+this.trainingApplyId) |
|||
return false |
|||
} |
|||
this.currentIndex = 3 |
|||
})}, |
|||
{icon: require('../../static/images/icon/liucheng5.png'),text: '付学费', callBack:(()=>{ |
|||
if(this.stepIcon<3) { |
|||
return this.$u.toast('请填写并提交报名表') |
|||
} |
|||
if(this.info.applyStatus==1&& this.info.contractStatus!=2) { |
|||
this.showSignPopup = true |
|||
return false |
|||
} |
|||
this.currentIndex = 4 |
|||
})}, |
|||
], |
|||
rules: { |
|||
name: [ |
|||
{ |
|||
required: true, |
|||
message: '请输入姓名', |
|||
// 可以单个或者同时写两个触发验证方式 |
|||
trigger: ['change','blur'], |
|||
} |
|||
], |
|||
}, |
|||
trainingApplyId: '', |
|||
info: {}, |
|||
userInfo: {}, |
|||
stepIcon: 0, |
|||
|
|||
showSignPopup: false |
|||
} |
|||
}, |
|||
onLoad(options) { |
|||
this.trainingApplyId = options.id |
|||
if(options.fromClass) { |
|||
this.fromClass = 1 |
|||
} |
|||
}, |
|||
onShow() { |
|||
if(!this.trainingApplyId) return false |
|||
this.getVerifyResultFn() |
|||
|
|||
this.getTrainingApplyDetailsFn() |
|||
|
|||
uni.$on('isRealAuthsucceeFn',()=>{ |
|||
this.currentIndex = 3 |
|||
this.showSignPopup = false |
|||
}) |
|||
// this.queryFlowStatusFn() |
|||
// this.signContractFn() |
|||
|
|||
|
|||
// let webVeiwUrl = 'https://h5.esign.cn/mesign/success-sign?context=IO2hQiWEKkTc&approve=false&approvalIds=&preSign=false&fastModel=false&redirectUrlBack=signatureCallBack%3A%2F%2F%3FtsignType%3DSIGN%26tsignCode%3D0%26tsignDes%3D%25E7%25AD%25BE%25E7%25BD%25B2%25E6%2588%2590%25E5%258A%259F&client=H5_SIMPLE&flowId=3971f8fb63194712b110174cde99caa2&version=v4' |
|||
// var reg = RegExp(/signaturecallback/i); |
|||
// alert(reg.test(webVeiwUrl)) |
|||
|
|||
}, |
|||
onPullDownRefresh() { |
|||
if(this.currentIndex==1) { |
|||
uni.$emit('onPullDownRefreshFn') |
|||
} |
|||
setTimeout(()=>{ |
|||
uni.stopPullDownRefresh() |
|||
},1000) |
|||
}, |
|||
onReachBottom() { |
|||
if(this.currentIndex==1) { |
|||
uni.$emit('onReachBottomFn') |
|||
} |
|||
}, |
|||
methods: { |
|||
|
|||
// 查看签约状态 |
|||
async queryFlowStatusFn() { |
|||
const [nulls, res] = await learnDriveApi.queryFlowStatus({trainingApplyId: this.trainingApplyId}) |
|||
console.log('查看签约状态') |
|||
console.log(res) |
|||
}, |
|||
// 检查实名认证结果 |
|||
async getVerifyResultFn() { |
|||
const [nulls, res] = await utilsApi.getVerifyResult({trainingApplyId: this.trainingApplyId}) |
|||
console.log('检查实名认证结果') |
|||
console.log(res) |
|||
if(res.data&&res.data.verifyStatus==1) { |
|||
if(this.currentIndex>3) { |
|||
this.currentIndex = 3 |
|||
} |
|||
this.$store.commit('upDateRealAuthsuccee', true) |
|||
// getApp().globalData.realAuthsuccee = true |
|||
} |
|||
await this.$u.utils.getOwnerAccountBase() |
|||
this.userInfo = uni.getStorageSync('userInfo'); |
|||
console.log('用户信息') |
|||
console.log(this.userInfo) |
|||
}, |
|||
// 查询状态 |
|||
async getTrainingApplyDetailsFn() { |
|||
console.log(this.trainingApplyId) |
|||
const [nulls, res] = await learnDriveApi.getTrainingApplyDetails({trainingApplyId: this.trainingApplyId}) |
|||
this.info = res.data |
|||
console.log('整体状态控制***************') |
|||
console.log(res) |
|||
console.log(nulls) |
|||
if(this.info.checkStatus==1) this.stepIcon = 1 //按顺序:体检,面签,1为完成,0-未完成 |
|||
if(this.info.applyStatus==1) this.currentIndex = this.stepIcon = 3//0-预报名,1-已报名,2-已支付,3-已学完 |
|||
if(this.info.applyStatus==1&&this.info.contractStatus<2) this.showSignPopup = true |
|||
if(this.info.contractStatus==2) this.currentIndex = 5 |
|||
if(this.info.contractStatus==2&&this.info.applyStatus==1) { |
|||
if(!this.info.trainingOrderId) { |
|||
this.createOrder() |
|||
}else { |
|||
uni.redirectTo({ |
|||
url: '/pages/learnDriveStep/payMoney/payMoney?trainingOrderId='+ this.info.trainingOrderId + '&trainingApplyId='+ this.trainingApplyId |
|||
}) |
|||
} |
|||
} |
|||
}, |
|||
// 创建订单 |
|||
async createOrder() { |
|||
let obj = { |
|||
trainingApplyId: this.info.trainingApplyId, |
|||
trainingClassId: this.info.trainingClassId, |
|||
trainingSchoolId: this.info.trainingSchoolId, |
|||
} |
|||
const [err, res] = await learnDriveApi.createOrder(obj) |
|||
console.log(res) |
|||
}, |
|||
popSwitch(val) { |
|||
console.log(val) |
|||
}, |
|||
|
|||
// 点击按扭切换步骤 |
|||
changeStepBtn(num) { |
|||
if(!this.currentIndex&&num==-1) return |
|||
if(this.currentIndex==4&&num==1) return |
|||
let currentIndex = this.currentIndex*1 + num |
|||
if(currentIndex==3&&this.stepIcon<3) { |
|||
// 没有实名 |
|||
if(!this.$store.state.realAuthsuccee) { |
|||
this.$goPage('/pages/learnDriveStep/realName/realName?trainingApplyId='+this.trainingApplyId) |
|||
return false |
|||
} |
|||
} |
|||
if(currentIndex==4&&this.stepIcon<3) { |
|||
return this.$u.toast('请填写并提交报名表') |
|||
} |
|||
if(currentIndex==4) { |
|||
// 签合同 |
|||
if(this.info.applyStatus==1&& this.info.contractStatus!=2) { |
|||
this.showSignPopup = true |
|||
return false |
|||
} |
|||
} |
|||
this.currentIndex = currentIndex |
|||
}, |
|||
oneBtnClick() { |
|||
console.log('66666666') |
|||
this.$refs.uForm.validate(valid => { |
|||
console.log('0000000000') |
|||
if (valid) { |
|||
console.log('验证通过'); |
|||
} else { |
|||
console.log('验证失败'); |
|||
} |
|||
}); |
|||
} |
|||
}, |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
@import './learnDriveStep.scss'; |
|||
</style> |
@ -1,625 +0,0 @@ |
|||
<template> |
|||
<view class="payMoney"> |
|||
<view class="step_row"> |
|||
<!-- orderStatus1>0表示已支付 --> |
|||
<view class="step" :class="{hui: info.orderStatus>0}"><text>驾校<br>培训费支付</text></view> |
|||
<!-- examinationStatus 0-未支付,1-已支付 2、已开票 --> |
|||
<view class="step step2" :class="{active: info.orderStatus>0&&info.examinationStatus==0}" v-if="info.examinationPrice"><text>场地<br>培训费支付</text></view> |
|||
</view> |
|||
<view class="ul"> |
|||
<view class="li"> |
|||
<view class="lab">驾校名称</view> |
|||
<view class="txt">{{ info.schoolName}}</view> |
|||
</view> |
|||
<view class="li"> |
|||
<view class="lab">班型</view> |
|||
<view class="txt">{{ info.className }}</view> |
|||
</view> |
|||
<view class="li" v-if="info.orderStatus<1||!info.examinationPrice"> |
|||
<view class="lab">学费</view> |
|||
<view class="txt" v-if="schoolPayInfo.price">{{ $u.utils.priceTo(schoolPayInfo.price) }}</view> |
|||
</view> |
|||
<view class="li" v-if="info.orderStatus>0&&info.examinationPrice"> |
|||
<view class="lab">训练费</view> |
|||
<view class="txt">{{ $u.utils.priceTo(info.examinationPrice) }}</view> |
|||
</view> |
|||
|
|||
|
|||
</view> |
|||
<!-- <uni-link href="alipays://platformapi/startapp?qrcode=https://pay.hzbank.com.cn/ifsp-payweb/appPayReceive/F67A35324B6C4C2A9591642FD40B46F8" text="https://uniapp.dcloud.io/">666669999</uni-link> --> |
|||
<!-- <a href="alipays://platformapi/startapp?qrcode=https://pay.hzbank.com.cn/ifsp-payweb/appPayReceive/F67A35324B6C4C2A9591642FD40B46F8">搜索720834239</a> --> |
|||
|
|||
<view class="payWay"> |
|||
<view class="h1">请选择支付方式</view> |
|||
<view class="zfb" @click="changePayWay(2)"> |
|||
<view class="leftCon"> |
|||
<view class="icon"> |
|||
<image src="../../../static/images/icon/jiaofei_zfbIphone@2x.png" mode=""></image> |
|||
</view> |
|||
<view class="text"> |
|||
支付宝支付 |
|||
</view> |
|||
<view class="recommendIcon"> |
|||
<image src="../../../static/images/icon/third_img_tuijianIphone@2x.png" mode=""></image> |
|||
</view> |
|||
</view> |
|||
<view class="rightStatusIcon"> |
|||
<image src="../../../static/images/icon/jiaofei_zhifu_selectIphone@2x.png" mode="" v-if="payWay==2"> |
|||
</image> |
|||
<image src="../../../static/images/icon/jiaofei_zhifu_unselectIphone@2x.png" mode="" v-else></image> |
|||
</view> |
|||
</view> |
|||
<view class="otherWay" @click="showOtherWay=true" v-if="!showOtherWay"> |
|||
<view class="txt">其它付款方式</view> |
|||
<view class="icon"> |
|||
<image src="@/static/images/icon/third_icon_gengduoIphone@2x.png" mode=""></image> |
|||
</view> |
|||
</view> |
|||
<view class="zfb" @click="changePayWay(1)" v-else> |
|||
<view class="leftCon"> |
|||
<view class="icon"> |
|||
<image src="../../../static/images/icon/jiaofei_wxIphone@2x.png" mode=""></image> |
|||
</view> |
|||
<view class="text"> |
|||
微信支付 |
|||
</view> |
|||
</view> |
|||
<view class="rightStatusIcon"> |
|||
<image src="../../../static/images/icon/jiaofei_zhifu_selectIphone@2x.png" mode="" v-if="payWay==1"> |
|||
</image> |
|||
<image src="../../../static/images/icon/jiaofei_zhifu_unselectIphone@2x.png" mode="" v-else></image> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
|
|||
|
|||
|
|||
|
|||
<view class="" v-if="info.examinationPrice&&info.orderStatus>0&&info.examinationStatus==0"> |
|||
<view class="infoTps" > |
|||
<view class="redbg"> |
|||
场训时间使用说明: <br> |
|||
一、您选择的场训时间可抵扣科目二培训学时,在考前学员驾驶有教练员随车施教的教练车,进入考场进行适应性训练: <br> |
|||
二、选择场训时间的学员可提前预约公安的科目二考试; <br> |
|||
三、享受优先安排进场考前训练 |
|||
</view> |
|||
</view> |
|||
<view class="footBox"> |
|||
<view class="btn border" @click="cancelPay" >取消本次支付</view> |
|||
<view class="btn" @click="buyAdaptabilityOrderFn">确认支付</view> |
|||
</view> |
|||
</view> |
|||
|
|||
<!-- <a href='alipays://platformapi/startapp?appId=20000067&url=支付宝收款码支付地址'> 跳转支付宝支付</a> --> |
|||
|
|||
<view class="payBtnBox" v-if="info.orderStatus==0"> |
|||
<!-- <view class="payBtn" @click="goPay">支付</view> --> |
|||
<oneBtn text="支付" @oneBtnClick="goPay"></oneBtn> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import learnDriveApi from '@/api/learnDrive.js' |
|||
import businessHanldApi from '@/api/businessHandling' |
|||
var UPPay = uni.requireNativePlugin('UP-Pay'); |
|||
let polling = null |
|||
let timerNum = 0 |
|||
export default { |
|||
data() { |
|||
return { |
|||
trainingOrderId: '', |
|||
trainingApplyId: '', |
|||
info: {}, |
|||
schoolPayInfo: {}, |
|||
payWay: 2, |
|||
payInfo: {}, |
|||
sweixin: null, |
|||
currenPoll: 1,//1轮询培训费, 2轮询场地 |
|||
showOtherWay: false, |
|||
} |
|||
}, |
|||
computed: { |
|||
showStep2() { |
|||
if(this.info.examinationPrice) return true |
|||
return false |
|||
} |
|||
}, |
|||
onLoad(options) { |
|||
// this.trainingOrderId = options.trainingOrderId |
|||
this.trainingApplyId = options.trainingApplyId |
|||
this.getTrainingApplyDetailsFn() |
|||
this.initWx() |
|||
}, |
|||
onBackPress() { |
|||
|
|||
}, |
|||
onShow() { |
|||
|
|||
}, |
|||
beforeDestroy() { |
|||
clearInterval(polling) |
|||
polling = null |
|||
console.log('stop停stop停stop停stop停stop停stop停stop停') |
|||
}, |
|||
onPullDownRefresh() { |
|||
this.getTrainingApplyDetailsFn() |
|||
setTimeout(()=>{ |
|||
uni.stopPullDownRefresh() |
|||
},1200) |
|||
}, |
|||
methods: { |
|||
// 轮询 |
|||
async getPrepaidResultFn() { |
|||
if(this.currenPoll==1) { |
|||
await learnDriveApi.getPrepaidResult({trainingOrderId: this.trainingOrderId}) |
|||
}else { |
|||
await learnDriveApi.getKwzxPrepaidResult({trainingOrderId: this.trainingOrderId}) |
|||
} |
|||
await this.getOrderDetailsFn('poll') |
|||
}, |
|||
initWx() { |
|||
// #ifdef APP-PLUS |
|||
console.log("..........."); |
|||
plus.share.getServices((s) => { |
|||
var shares = {}; |
|||
for (var i = 0; i < s.length; i++) { |
|||
var t = s[i]; |
|||
console.log("...........", t); |
|||
shares[t.id] = t; |
|||
} |
|||
var sweixin = shares['weixin']; |
|||
this.sweixin = sweixin |
|||
}, function(e) { |
|||
console.log("获取分享服务列表失败:" + e.message); |
|||
}); |
|||
|
|||
//初始化场地支付插件 |
|||
UPPay.initialize({ |
|||
appId:"wx4689f34e374ae2e",//开放平台appid |
|||
universalLink:"https://payconfig.jaxc.cn/",//微信通用连接(ios端), |
|||
aliMiniPayScheme: 'kwZxProject',//支付宝小程序AppScheme(ios端), |
|||
}); |
|||
// #endif |
|||
}, |
|||
// 获取订单信息 |
|||
async getOrderDetailsFn(poll) { |
|||
if(!this.trainingOrderId) return |
|||
const [err, res] = await learnDriveApi.getOrderDetails({ |
|||
trainingOrderId: this.trainingOrderId |
|||
}) |
|||
console.log('******') |
|||
console.log(res.data) |
|||
this.info = res.data |
|||
if(!poll) return |
|||
if(this.info.orderStatus !=0&&this.currenPoll==1) { |
|||
console.log('停止订单轮询') |
|||
clearInterval(polling) |
|||
polling = null |
|||
timerNum = 1 |
|||
if(!info.examinationPrice) { |
|||
uni.navigateTo({ |
|||
url: 'pages/learnDriveStep/payMoney/payMoneySuccess' |
|||
}) |
|||
}else { |
|||
} |
|||
} |
|||
if(this.info.examinationStatus !=0&&this.currenPoll==2) { |
|||
console.log('停止考务轮询') |
|||
console.log(polling) |
|||
clearInterval(polling) |
|||
polling = null |
|||
uni.navigateTo({ |
|||
url: 'pages/learnDriveStep/payMoney/payMoneySuccess' |
|||
}) |
|||
} |
|||
console.log('订单详情') |
|||
console.log(res) |
|||
}, |
|||
// 切换支付方式 |
|||
changePayWay(num) { |
|||
this.payWay = num |
|||
}, |
|||
// 创建培训费支付 |
|||
async createPrepaidFn() { |
|||
const latLng = await this.$u.utils.getLocation() |
|||
let obj = { |
|||
clientIp: '127.0.0.1', |
|||
deviceId: 'IMEI', |
|||
deviceType: '1', |
|||
ipType: '04', |
|||
riskType: '01', |
|||
verifyRt: '01', |
|||
verifyTp: '01', |
|||
latitude: latLng.lat, |
|||
longitude: latLng.lng, |
|||
payType: this.payWay, |
|||
fromAppurl: 'paymoney://car:8898/carstep', |
|||
rechargeAmount: this.schoolPayInfo.price, |
|||
trainingOrderId: this.trainingOrderId, |
|||
// adaptability: this.info.adaptability, |
|||
// adaptabilityGround: this.info.adaptabilityGround, |
|||
} |
|||
console.log(obj) |
|||
const [err, res] = await learnDriveApi.createPrepaid(obj) |
|||
this.payInfo = res.data |
|||
console.log('this.payInfo支付信息') |
|||
console.log(this.payInfo) |
|||
}, |
|||
// 点击去支付培训费 |
|||
async goPay() { |
|||
|
|||
// window.location.href = oehurl |
|||
// this.$store.commit('updateWebVeiwUrl', url) |
|||
// uni.navigateTo({ |
|||
// url: '/pages/commeWebView/indexBusWebView' |
|||
// }) |
|||
|
|||
console.log('点击了支付') |
|||
uni.showLoading({ |
|||
title: '创建订单...' |
|||
}) |
|||
await this.createPrepaidFn() |
|||
if (this.payWay == 1) { |
|||
this.wxPay() |
|||
} else { |
|||
this.zfbPay() |
|||
} |
|||
}, |
|||
// 轮询定时 |
|||
pollFn() { |
|||
polling = setInterval(async ()=>{ |
|||
timerNum ++ |
|||
if(timerNum>30) { |
|||
clearInterval(polling) |
|||
polling = null |
|||
} |
|||
await this.getPrepaidResultFn() |
|||
},1000) |
|||
|
|||
}, |
|||
zfbPay() { |
|||
uni.hideLoading() |
|||
this.currenPoll = 1 |
|||
let url = encodeURIComponent(this.payInfo.appURL) |
|||
this.pollFn() |
|||
// this.pollFn() &scope=auth_base&redirect_uri=回调网址(用于跳转返回app)&state=init' |
|||
// let urls = `alipays://platformapi/startapp?appId=10000007&redirect_uri=com.junan.zhelixueche&scope=auth_base&state=init&qrcode=${url}` |
|||
let urls = `alipays://platformapi/startapp?appId=10000007&qrcode=${url}` |
|||
// let url = encodeURIComponent(this.payInfo.appURL) |
|||
console.log('支付宝路径') |
|||
console.log(this.payInfo.appURL) |
|||
console.log(urls) |
|||
|
|||
// #ifdef APP-PLUS |
|||
plus.runtime.openURL(urls) |
|||
// #endif |
|||
|
|||
// let qrcode = 'https://pay.hzbank.com.cn/ifsp-payweb/appPayReceive/8904853EF97242D09DC1D7F6EE8F3B9D' |
|||
// let urlencodeUrls = encodeURIComponent(qrcode) |
|||
// let url = `alipays://platformapi/startapp?appId=10000007&qrcode=${urlencodeUrls}` |
|||
// #ifdef H5 |
|||
window.open(urls) |
|||
// #endif |
|||
|
|||
|
|||
}, |
|||
wxPay() { |
|||
this.currenPoll = 1 |
|||
this.pollFn() |
|||
// #ifdef APP-PLUS |
|||
this.sweixin ? this.sweixin.launchMiniProgram({ |
|||
// path: '/pages/payment/payment?paymoney='+this.info.price+'&ordersn='+this.payInfo.outTradeNo+'&tokenCode='+ this.payInfo.tokenCode, //跳转小程序页面路径 pages/index/index |
|||
path: '/pages/payment/payment?tokenCode=' + this.payInfo.tokenCode, //跳转小程序页面路径 pages/index/index |
|||
type: 0, //可取值: 0-正式版; 1-测试版; 2-体验版。 默认值为0。 |
|||
id: 'gh_012fd4bda1c2' //小程序的原始id |
|||
}) : plus.nativeUI.alert('当前环境不支持微信操作!'); |
|||
// #endif |
|||
|
|||
|
|||
uni.hideLoading() |
|||
}, |
|||
openApp() { |
|||
this.isIos = uni.getSystemInfoSync().platform //判断是否安卓、ios |
|||
if (this.isIos == 'android') { |
|||
let ifr = document.createElement("iframe"); |
|||
ifr.src = |
|||
"hbuilder://"; // 这里的hbuilder在manifest.json中配置->“App常用其它设置” -> “Android设置” -> “UrlSchemes” 项中进行设置 |
|||
ifr.style.display = "none"; |
|||
document.body.appendChild(ifr); |
|||
} else { |
|||
// window.location = "https://apps.apple.com/cn/app/idxxxxxxx" //你的苹果应用app链接 |
|||
} |
|||
}, |
|||
// 查询报名详情- |
|||
async getTrainingApplyDetailsFn() { |
|||
if(!this.trainingApplyId) return |
|||
const [err, res] = await learnDriveApi.getTrainingApplyDetails({ trainingApplyId: this.trainingApplyId }) |
|||
console.log('查询报名详情') |
|||
console.log(res) |
|||
this.schoolPayInfo = res.data |
|||
this.trainingOrderId = res.data.trainingOrderId |
|||
|
|||
if(!this.trainingOrderId) { |
|||
// // 创建订单 |
|||
let obj = { |
|||
trainingApplyId: res.data.trainingApplyId, |
|||
trainingClassId: res.data.trainingClassId, |
|||
trainingSchoolId: res.data.trainingSchoolId, |
|||
} |
|||
const [err2, res2] = await learnDriveApi.createOrder(obj) |
|||
console.log('****创建的订单***') |
|||
console.log(res2) |
|||
this.trainingOrderId = res2.data |
|||
setTimeout(()=>{ |
|||
this.getOrderDetailsFn() |
|||
},1000) |
|||
} |
|||
|
|||
await this.getOrderDetailsFn() |
|||
|
|||
}, |
|||
// 取消本次训场支付 |
|||
cancelPay() { |
|||
uni.showModal({ |
|||
content: '确认要取消适应性训练订单吗?', |
|||
success: async function (res) { |
|||
if (res.confirm) { |
|||
const [err, res] = await learnDriveApi.cancelAdaptabilityOrder({trainingApplyId: this.trainingApplyId}) |
|||
console.log('用户点击了取消训场订单'); |
|||
console.log(res) |
|||
if(res.code==0) { |
|||
uni.navigateTo({ |
|||
url: 'pages/learnDriveStep/payMoney/payMoneySuccess' |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
}); |
|||
}, |
|||
// 点击训场支付 创建订单 |
|||
async buyAdaptabilityOrderFn() { |
|||
const latLng = await this.$u.utils.getLocation() |
|||
let obj = { |
|||
deviceId: 'IMEI', |
|||
clientIp: '127.0.0.1', |
|||
deviceType: '1', |
|||
ipType: '04', |
|||
riskType: '01', |
|||
verifyRt: '01', |
|||
verifyTp: '01', |
|||
latitude: latLng.lat+'', |
|||
longitude: latLng.lng+'', |
|||
payType: this.payWay, |
|||
fromAppurl: 'com.junan.zhelixueche', |
|||
rechargeAmount: this.info.examinationPrice, |
|||
trainingOrderId: this.info.trainingOrderId, |
|||
|
|||
} |
|||
const [err, res] = await learnDriveApi.createKwzxPrepaid(obj) |
|||
console.log('创建厂地订单信息') |
|||
console.log(res) |
|||
if(res.code!=0) return |
|||
let resInfo = res.data.appPayRequest |
|||
var payChannel = this.payWay==1?'01':'04' |
|||
this.currenPoll = 2 |
|||
this.pollFn() |
|||
//支付渠道 01微信 04支付宝小程序 |
|||
var payData = JSON.stringify(resInfo);//服务端下单获取 |
|||
UPPay.upPay(payChannel, payData, function(res){ |
|||
// 这是支付成功的回调吗? |
|||
console.log('这是训场支付成功的回调吗?') |
|||
console.log(res); |
|||
if(res.resultCode=='0000') { |
|||
_this.$u.toast(res.resultInfo) |
|||
setTimeout(()=>{ |
|||
uni.navigateTo({ |
|||
url: 'pages/learnDriveStep/payMoney/payMoneySuccess' |
|||
}) |
|||
},1500) |
|||
} |
|||
|
|||
}); |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.payMoney { |
|||
min-height: 100vh; |
|||
|
|||
.step_row { |
|||
display: flex; |
|||
align-items: center; |
|||
padding: 0 30rpx; |
|||
background-color: #fff; |
|||
|
|||
.step { |
|||
width: 188rpx; |
|||
height: 86rpx; |
|||
background: url('../../../static/images/icon/leimuyiIphone@2x.png'); |
|||
background-size: 100% 100%; |
|||
text-align: center; |
|||
font-size: 24rpx; |
|||
color: #fff; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
&.hui { |
|||
background: url('../../../static/images/icon/third_bg_huizhi@2x.png'); |
|||
background-size: 100% 100%; |
|||
color: #333; |
|||
} |
|||
|
|||
&.step2 { |
|||
background: url('../../../static/images/icon/leimuyi2Iphone@2x.png'); |
|||
background-size: 100% 100%; |
|||
color: #333; |
|||
|
|||
&.active { |
|||
background: url('../../../static/images/icon/jinxingzhongiphone@2x.png'); |
|||
background-size: 100% 100%; |
|||
color: #fff; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
.ul { |
|||
width: 100%; |
|||
padding: 0 30rpx; |
|||
background-color: #fff; |
|||
|
|||
.li { |
|||
width: 100%; |
|||
font-size: 26rpx; |
|||
height: 78rpx; |
|||
line-height: 78rpx; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
|
|||
.lab {} |
|||
|
|||
.txt {} |
|||
} |
|||
} |
|||
|
|||
.payWay { |
|||
padding: 0 32rpx; |
|||
|
|||
.h1 { |
|||
padding: 40rpx 0 20rpx 0; |
|||
} |
|||
.otherWay { |
|||
display: flex; |
|||
background-color: #fff; |
|||
border-radius: 16rpx; |
|||
padding: 0 16px; |
|||
height: 100rpx; |
|||
justify-content: center; |
|||
align-items: center; |
|||
.txt { |
|||
font-size: 28rpx; |
|||
color: #999; |
|||
} |
|||
.icon { |
|||
width: 20rpx; |
|||
height: 12rpx; |
|||
image { |
|||
width: 100%; |
|||
height: 100%; |
|||
display: block; |
|||
} |
|||
margin-left: 16rpx; |
|||
} |
|||
} |
|||
.zfb { |
|||
background-color: #fff; |
|||
border-radius: 16rpx; |
|||
padding: 0 16px; |
|||
height: 110rpx; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
margin-bottom: 20rpx; |
|||
|
|||
.leftCon { |
|||
display: flex; |
|||
align-items: center; |
|||
|
|||
.icon { |
|||
width: 48rpx; |
|||
height: 48rpx; |
|||
|
|||
image { |
|||
display: block; |
|||
width: 100%; |
|||
height: 100%; |
|||
} |
|||
} |
|||
|
|||
.text { |
|||
font-size: 32rpx; |
|||
color: #333; |
|||
margin: 0 10rpx 0 20rpx; |
|||
} |
|||
|
|||
.recommendIcon { |
|||
width: 64rpx; |
|||
height: 34rpx; |
|||
|
|||
image { |
|||
width: 100%; |
|||
height: 100%; |
|||
display: block; |
|||
} |
|||
} |
|||
} |
|||
|
|||
.rightStatusIcon { |
|||
width: 42rpx; |
|||
height: 42rpx; |
|||
|
|||
image { |
|||
display: block; |
|||
width: 100%; |
|||
height: 100%; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
.payBtnBox { |
|||
position: fixed; |
|||
bottom: 0; |
|||
left: 0; |
|||
padding: 32rpx; |
|||
width: 100vw; |
|||
|
|||
// .payBtn { |
|||
// width: 100%; |
|||
// height: 110rpx; |
|||
// border-radius: 8rpx; |
|||
// background-color: #5d47ff; |
|||
// line-height: 110rpx; |
|||
// text-align: center; |
|||
// font-size: 32rpx; |
|||
// color: #fff; |
|||
// } |
|||
} |
|||
|
|||
.infoTps { |
|||
padding: 32rpx ; |
|||
.redbg { |
|||
background: #FFEFEF; |
|||
font-size: 26rpx; |
|||
color: #FE5859; |
|||
padding: 16rpx; |
|||
border-radius: 8rpx; |
|||
line-height: 1.5em; |
|||
} |
|||
|
|||
} |
|||
.footBox { |
|||
display: flex; |
|||
padding: 0 32rpx; |
|||
justify-content: space-between; |
|||
.btn { |
|||
width: 48%; |
|||
height: 98rpx; |
|||
background: #2168FC; |
|||
border-radius: 16rpx; |
|||
color: #fff; |
|||
text-align: center; |
|||
line-height: 98rpx; |
|||
&.border { |
|||
background: none; |
|||
border: 1px solid #2168FC; |
|||
color: #2168FC; |
|||
|
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -1,97 +0,0 @@ |
|||
<template> |
|||
<view class="main"> |
|||
|
|||
<view class="iconImg"> |
|||
<image src="../../../static/images/icon/third_img_completedIphone@2x.png" mode=""></image> |
|||
</view> |
|||
<view class="h1">缴费完成</view> |
|||
<view class="tps">恭喜您成为我校正式学员</view> |
|||
<view class="addBox" v-if="addItem.adBannerDO" @click="$store.dispatch('addClick', addItem)"> |
|||
<view class="tag">推广</view> |
|||
<image :src="addItem.adBannerDO.imgSource" mode="widthFix" @click="$store.dispatch('addClick', addItem)"></image> |
|||
</view> |
|||
<view class="footBtn" @click="goSwitchTab"> |
|||
<view class="btn">前往学习</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import addConfig from '@/common/js/addConfig.js' |
|||
export default { |
|||
data() { |
|||
return { |
|||
addItem: {} |
|||
} |
|||
}, |
|||
onLoad() { |
|||
this.addItemFn() |
|||
}, |
|||
methods: { |
|||
async addItemFn() { |
|||
await this.$store.dispatch('addPageFn') |
|||
this.addItem = await this.$store.dispatch('getCurrentAdd', addConfig.payMoneySuccess) |
|||
console.log('广告呢') |
|||
console.log(this.addItem) |
|||
}, |
|||
goSwitchTab() { |
|||
uni.switchTab({ |
|||
url: '/pages/tabbar/learnDrive/learnDrive' |
|||
}) |
|||
} |
|||
} |
|||
|
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.main { |
|||
width: 100%; |
|||
height: 100vh; |
|||
background: #fff; |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; |
|||
position: relative; |
|||
padding: 0 32rpx; |
|||
.iconImg { |
|||
margin: 100rpx 0 20rpx 0; |
|||
image { |
|||
display: block; |
|||
width: 180rpx; |
|||
height: 180rpx; |
|||
} |
|||
} |
|||
|
|||
.h1 { |
|||
font-size: 36rpx; |
|||
color: #222222; |
|||
font-weight: 600; |
|||
} |
|||
|
|||
.tps { |
|||
font-size: 30rpx; |
|||
color: #222222; |
|||
margin: 12rpx 0 64rpx 0; |
|||
} |
|||
|
|||
|
|||
.footBtn { |
|||
position: absolute; |
|||
left: 0; |
|||
bottom: 56rpx; |
|||
padding: 0 32rpx; |
|||
width: 100vw; |
|||
.btn { |
|||
height: 92rpx; |
|||
background: linear-gradient(180deg, #3593FB 0%, #53D3E5 100%); |
|||
border-radius: 20rpx; |
|||
font-size: 30rpx; |
|||
color: #fff; |
|||
line-height: 92rpx; |
|||
text-align: center; |
|||
} |
|||
} |
|||
} |
|||
|
|||
</style> |
@ -1,142 +0,0 @@ |
|||
<template> |
|||
<view class="main"> |
|||
<view class="h1"> |
|||
报名驾校前 |
|||
</view> |
|||
<view class="tit"> |
|||
请按提示完成实名认证 |
|||
</view> |
|||
<view class="iconImg"> |
|||
<image src="../../../static/images/icon/weishiming@2x.png" mode="widthFix"></image> |
|||
</view> |
|||
<view class="blueTxt"> |
|||
手持身份证准备拍摄,并保持光线充足和网络良好 |
|||
</view> |
|||
<view class="btn" @click="start"> |
|||
点击开始实名认证 |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import utilsApi from '@/api/utils.js' |
|||
// #ifdef APP-PLUS |
|||
const plug=uni.requireNativePlugin("Html5app-AliyunFaceVerify"); |
|||
// #endif |
|||
export default { |
|||
data() { |
|||
return { |
|||
checked: true, |
|||
verifyToken: '', |
|||
timer: null |
|||
} |
|||
}, |
|||
onLoad(options) { |
|||
this.trainingApplyId = options.trainingApplyId |
|||
|
|||
// this.timer = setInterval(()=>{ |
|||
// this.getVerifyResultFn() |
|||
// },3000) |
|||
}, |
|||
|
|||
onHide() { |
|||
clearInterval(this.timer) |
|||
}, |
|||
onUnload() { |
|||
clearInterval(this.timer) |
|||
}, |
|||
methods: { |
|||
async getVerifyTokenFn(trainingApplyId) { |
|||
let _this = this |
|||
const [nulls, res] = await utilsApi.getVerifyToken({trainingApplyId: this.trainingApplyId}) |
|||
console.log('实名token') |
|||
console.log(res.data) |
|||
// #ifdef APP-PLUS |
|||
console.log('****************') |
|||
try{ |
|||
plug.RPManual({"verifyToken":res.data},ret=>{ |
|||
if(ret.code==1) { |
|||
// 实名认证成功 |
|||
// getApp().globalData.realAuthsuccee = true |
|||
uni.$emit('isRealAuthsucceeFn') |
|||
_this.$store.commit('upDateRealAuthsuccee', true) |
|||
clearInterval(_this.timer) |
|||
uni.navigateBack() |
|||
} |
|||
console.log(ret) |
|||
}); |
|||
}catch(e){ |
|||
console.log(e) |
|||
} |
|||
|
|||
// #endif |
|||
|
|||
}, |
|||
// 检查实名认证结果 |
|||
async getVerifyResultFn() { |
|||
const [nulls, res] = await utilsApi.getVerifyResult({trainingApplyId: this.trainingApplyId}) |
|||
if(res.data&&res.data.verifyStatus==1) { |
|||
uni.showToast({ |
|||
title: '实名认证成功' |
|||
}) |
|||
|
|||
|
|||
uni.navigateBack() |
|||
} |
|||
console.log(res) |
|||
}, |
|||
start() { |
|||
this.getVerifyTokenFn() |
|||
|
|||
}, |
|||
}, |
|||
|
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.main { |
|||
width: 100%; |
|||
display: flex; |
|||
flex-direction: column; |
|||
justify-content: center; |
|||
text-align: center; |
|||
padding: 0 60rpx; |
|||
background-color: #fff; |
|||
.h1 { |
|||
font-size: 26rpx; |
|||
line-height: 100rpx; |
|||
color: #333; |
|||
text-align: center; |
|||
} |
|||
|
|||
.tit { |
|||
font-size: 36rpx; |
|||
font-weight: 700; |
|||
} |
|||
|
|||
.iconImg { |
|||
width: 90%; |
|||
margin-top: 30rpx; |
|||
image { |
|||
|
|||
} |
|||
} |
|||
|
|||
.blueTxt { |
|||
font-size: 28rpx; |
|||
color: $themC; |
|||
padding: 30rpx 0 60rpx 0; |
|||
} |
|||
|
|||
.btn { |
|||
width: 100%; |
|||
text-align: center; |
|||
line-height: 96rpx; |
|||
background-color: $themC; |
|||
color: #fff; |
|||
height: 96rpx; |
|||
border-radius: 8rpx; |
|||
} |
|||
} |
|||
</style> |
@ -1,147 +0,0 @@ |
|||
<template> |
|||
<view class="step1"> |
|||
<view class="h1"> |
|||
预报名信息 |
|||
</view> |
|||
<view class="schBox"> |
|||
<view class="schoolName_row"> |
|||
<view class="lab"> |
|||
驾校名称 |
|||
</view> |
|||
<view class="name" v-if="info&&info.schoolName"> |
|||
{{info.schoolName}} |
|||
</view> |
|||
</view> |
|||
|
|||
<view class="schoolName_row" v-if="fromClass"> |
|||
<view class="lab"> |
|||
班型 |
|||
</view> |
|||
<view class="name"> |
|||
{{$store.state.classChooseItem.className}} |
|||
</view> |
|||
</view> |
|||
</view> |
|||
|
|||
|
|||
<view class="btn_row"> |
|||
<view class="btn" @click="btnClick(1)"> |
|||
<view class="icon"> |
|||
<image src="../../../static/images/icon/ditu@2x.png" mode=""></image> |
|||
</view> |
|||
<view class="text"> |
|||
查看地图 |
|||
</view> |
|||
</view> |
|||
|
|||
<view class="btn" @click="btnClick(2)"> |
|||
<view class="icon"> |
|||
<image src="../../../static/images/icon/lianxi@2x.png" mode=""></image> |
|||
</view> |
|||
<view class="text"> |
|||
联系我们 |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
props: ['info', 'fromClass'], |
|||
methods: { |
|||
btnClick(num) { |
|||
if(num==2) { |
|||
this.callPhone() |
|||
}else { |
|||
this.openMap() |
|||
} |
|||
}, |
|||
// 打电话 |
|||
callPhone() { |
|||
let phone = this.info.phone |
|||
this.$u.utils.callPhone(phone) |
|||
}, |
|||
// 打开地图 |
|||
openMap() { |
|||
let _this = this |
|||
uni.openLocation({ |
|||
latitude: _this.info.lat, |
|||
longitude: _this.info.lng |
|||
}) |
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.step1 { |
|||
margin-top: 10rpx; |
|||
padding: 0 30rpx; |
|||
background-color: #fff; |
|||
height: 100%; |
|||
.h1 { |
|||
font-size: 28rpx; |
|||
font-weight: 700; |
|||
border-bottom: 1px solid #ededed; |
|||
padding-bottom: 20rpx; |
|||
position: relative; |
|||
padding: 40rpx 0 20rpx 20rpx; |
|||
&::before { |
|||
content: ''; |
|||
width: 6rpx; |
|||
height: 30rpx; |
|||
background-color: $themC; |
|||
position: absolute; |
|||
left: 0; |
|||
top: 48rpx; |
|||
} |
|||
} |
|||
.schBox { |
|||
padding: 32rpx 0 40rpx 0; |
|||
} |
|||
.schoolName_row { |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
padding: 10rpx 0; |
|||
.lab { |
|||
font-size: 24rpx; |
|||
} |
|||
|
|||
.name { |
|||
font-size: 28rpx; |
|||
font-weight: 700; |
|||
} |
|||
} |
|||
|
|||
.btn_row { |
|||
display: flex; |
|||
justify-content: space-between; |
|||
.btn { |
|||
width: 48%; |
|||
height: 80rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
border-radius: 8rpx; |
|||
border: 1px solid #ededed; |
|||
.icon { |
|||
width: 52rpx; |
|||
height: 52rpx; |
|||
margin: 0 10rpx 0 0rpx; |
|||
image { |
|||
display: block; |
|||
width: 100%; |
|||
height: 100%; |
|||
} |
|||
} |
|||
|
|||
.text { |
|||
font-size: 26rpx; |
|||
color: #333; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -1,225 +0,0 @@ |
|||
<template> |
|||
<view class="stepCon"> |
|||
<!-- <scroll-view class="scroll-view_H" scroll-y="true" @scrolltolower="lower" refresher-enabled="false" :refresher-triggered="triggered" |
|||
:refresher-threshold="100" refresher-background="#ffffff" @refresherrefresh="onRefresh" @refresherrestore="onRestore" > --> |
|||
<view class="ul" v-if="list.length"> |
|||
<view class="li" v-for="(item,index) in list" :key="index" @click="openMapClick(item)"> |
|||
<view class="cover"> |
|||
<image src="../../../static/images/icon/hospital@2x.png" mode="widthFix"></image> |
|||
</view> |
|||
<view class="text-box"> |
|||
<view class="address"> |
|||
<view class="adr"> |
|||
{{item.hospitalName}} |
|||
</view> |
|||
<view class="distance"> |
|||
距离{{item.distance||0}}km |
|||
</view> |
|||
</view> |
|||
<view class="flex-box"> |
|||
<view class="adrUnit"> |
|||
{{item.address}} |
|||
</view> |
|||
<view class="callPhone" @click.stop="callPhoneClick(item.phone)"> |
|||
拨打电话 |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<nodata v-if="!list.length&¶ms.pageIndex==2"></nodata> |
|||
<u-loadmore :status="status" style="margin-top: 32rpx;" v-if="list.length" icon-type="circle" /> |
|||
<!-- </scroll-view> --> |
|||
|
|||
|
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import utilsApi from '@/api/utils.js' |
|||
export default { |
|||
data() { |
|||
return { |
|||
params: { |
|||
pageIndex: 1, |
|||
pageSize: 20, |
|||
lat: '', |
|||
lng: '', |
|||
}, |
|||
list: [], |
|||
status: 'loadmore', |
|||
triggered: true, |
|||
count: 20 |
|||
} |
|||
}, |
|||
|
|||
mounted() { |
|||
|
|||
this.initList() |
|||
|
|||
uni.$on('onPullDownRefreshFn', () => { |
|||
this.listInit() |
|||
}) |
|||
uni.$on('onReachBottomFn', () => { |
|||
if (this.status == 'loadmore') { |
|||
this.queryHospitalsFn() |
|||
} |
|||
}) |
|||
}, |
|||
methods: { |
|||
async initList() { |
|||
if (!this.params.lat) { |
|||
uni.showLoading({ |
|||
title: '请稍后...' |
|||
}) |
|||
await this.$u.utils.getLocation().then((res) => { |
|||
this.params.lat = res.lat |
|||
this.params.lng = res.lng |
|||
}) |
|||
} |
|||
await this.queryHospitalsFn() |
|||
}, |
|||
lower() { |
|||
console.log('lower') |
|||
if (this.status == 'nomore') return |
|||
this.queryHospitalsFn() |
|||
}, |
|||
listInit() { |
|||
this.list = [] |
|||
this.params.pageIndex = 1 |
|||
this.status = 'loadmore' |
|||
this.queryHospitalsFn() |
|||
}, |
|||
// 打电话 |
|||
callPhoneClick(phone) { |
|||
let phoneNum = phone.split(',')[0] |
|||
console.log(phoneNum) |
|||
this.$u.utils.callPhone(phoneNum) |
|||
}, |
|||
// 打开地图 |
|||
openMapClick(item) { |
|||
this.$u.utils.openMap(item.lat, item.lng) |
|||
}, |
|||
async queryHospitalsFn() { |
|||
if(!this.params.lng) return |
|||
const [nulls, res] = await utilsApi.queryHospitals(this.params) |
|||
uni.hideLoading() |
|||
let arr = res.data.map((item)=>{ |
|||
item.distance = this.distanceFn(item.lat, item.lng) |
|||
return item |
|||
}) |
|||
console.log(arr) |
|||
this.list.push(...arr) |
|||
this.params.pageIndex++ |
|||
this.count = res.count |
|||
if (this.list.length >= this.count) { |
|||
this.status = 'nomore' |
|||
} |
|||
}, |
|||
distanceFn(lat1, lng1) { |
|||
var that = this; |
|||
let lat2 = that.params.lat; |
|||
let lng2 = that.params.lng; |
|||
let rad1 = lat1 * Math.PI / 180.0; |
|||
let rad2 = lat2 * Math.PI / 180.0; |
|||
let a = rad1 - rad2; |
|||
let b = lng1 * Math.PI / 180.0 - lng2 * Math.PI / 180.0; |
|||
let s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(rad1) * |
|||
Math.cos( |
|||
rad2) * Math.pow( |
|||
Math.sin(b / 2), 2))); |
|||
s = s * 6378.137; |
|||
s = Math.round(s * 10000) / 10000; |
|||
s = s.toString(); |
|||
s = s.substring(0, s.indexOf('.') + 2); |
|||
return s |
|||
|
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.stepCon { |
|||
width: 100%; |
|||
background-color: #fff; |
|||
height: 100%; |
|||
|
|||
// padding-top: 90rpx; |
|||
.scroll-view_H { |
|||
height: calc(100vh - (88rpx + 184rpx)); |
|||
} |
|||
|
|||
.ul { |
|||
width: 100%; |
|||
padding: 0 30rpx; |
|||
|
|||
.li { |
|||
width: 100%; |
|||
display: flex; |
|||
padding: 12rpx 0; |
|||
border-bottom: 1px solid #ededed; |
|||
|
|||
.cover { |
|||
width: 172rpx; |
|||
height: 158rpx; |
|||
flex-shrink: 0; |
|||
border-radius: 8rpx; |
|||
overflow: hidden; |
|||
|
|||
image { |
|||
display: block; |
|||
width: 100%; |
|||
height: 100%; |
|||
} |
|||
} |
|||
|
|||
.text-box { |
|||
width: 0; |
|||
flex: 1; |
|||
display: flex; |
|||
flex-direction: column; |
|||
justify-content: space-around; |
|||
padding: 0 0 0 20rpx; |
|||
} |
|||
|
|||
.address { |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: flex-end; |
|||
|
|||
.adr { |
|||
font-size: 28rpx; |
|||
color: #333; |
|||
font-weight: 700; |
|||
} |
|||
|
|||
.distance { |
|||
font-size: 24rpx; |
|||
color: #999; |
|||
padding: 0 0rpx 0 20rpx; |
|||
white-space: nowrap; |
|||
} |
|||
} |
|||
|
|||
.flex-box { |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: flex-start; |
|||
font-size: 26rpx; |
|||
margin-top: 12rpx; |
|||
|
|||
.adrUnit { |
|||
color: #999; |
|||
} |
|||
|
|||
.callPhone { |
|||
color: $themC; |
|||
padding: 0 0rpx 0 20rpx; |
|||
white-space: nowrap; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -1,63 +0,0 @@ |
|||
<template> |
|||
<view class="step2"> |
|||
<view class="h1_row"> |
|||
<view class="h1"> |
|||
关于面签 |
|||
</view> |
|||
<view class="tag"> |
|||
未面签 |
|||
</view> |
|||
</view> |
|||
|
|||
<view class="tps"> |
|||
请等待驾校联系您进行面签 |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.step2 { |
|||
background: #fff; |
|||
padding: 0 30rpx; |
|||
.tps { |
|||
font-size: 26rpx; |
|||
padding: 40rpx 0; |
|||
color: #333; |
|||
} |
|||
} |
|||
.h1_row { |
|||
font-size: 28rpx; |
|||
padding-bottom: 20rpx; |
|||
position: relative; |
|||
border-bottom: 1px solid #ededed; |
|||
padding: 40rpx 0 20rpx 0rpx; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
.h1 { |
|||
font-weight: 700; |
|||
padding: 0 0 0 20rpx; |
|||
} |
|||
&::before { |
|||
content: ''; |
|||
width: 6rpx; |
|||
height: 30rpx; |
|||
background-color: $themC; |
|||
position: absolute; |
|||
left: 0; |
|||
top: 48rpx; |
|||
} |
|||
.tag { |
|||
font-size: 24rpx; |
|||
color: orangered; |
|||
border: 1px solid orangered; |
|||
line-height: 36rpx; |
|||
text-align: center; |
|||
border-radius: 18rpx; |
|||
width: 120rpx; |
|||
text-align: center; |
|||
} |
|||
} |
|||
</style> |
@ -1,524 +0,0 @@ |
|||
<template> |
|||
<view class="main"> |
|||
<view class="card"> |
|||
<u-form :model="form" ref="uForm" :label-width="'auto'"> |
|||
<u-form-item label="驾校名称" > |
|||
<view class="tar"> |
|||
{{info.schoolName}} |
|||
</view> |
|||
</u-form-item> |
|||
<u-form-item label="学驾车型" prop="classModel" required > |
|||
<view @click="showDriveModels=true" class="select_row" > |
|||
<u-input v-model="form.classModel" input-align="right" placeholder="请选择" disabled @click="showDriveModels=true" /> |
|||
<u-icon name="arrow-right" size="28" color="#686B73" style="margin-left: 12rpx;" ></u-icon> |
|||
</view> |
|||
</u-form-item> |
|||
<u-form-item label="班型" prop="trainingClassLable" required > |
|||
<view @click="clickTrainingClasss" class="select_row"> |
|||
<u-input v-model="form.trainingClassLable" disabled input-align="right" placeholder="请选择" @click="clickTrainingClasss"/> |
|||
<u-icon name="arrow-right" size="28" color="#686B73" style="margin-left: 12rpx;"></u-icon> |
|||
</view> |
|||
</u-form-item> |
|||
<!-- @click="showSchoolCoach=true" --> |
|||
<u-form-item label="教练" prop="coachName" > |
|||
<view class="select_row"> |
|||
<u-input v-model="$store.state.chooseCoachItem.coachName" disabled input-align="right" placeholder="请选择" @click="$goPage('/pages/learnDriveStep/chooseCoach/chooseCoach?trainingSchoolId='+ info.trainingSchoolId)" /> |
|||
<u-icon name="arrow-right" size="28" color="#686B73" style="margin-left: 12rpx;" @click="$goPage('/pages/learnDriveStep/chooseCoach/chooseCoach?trainingSchoolId='+ info.trainingSchoolId)"></u-icon> |
|||
</view> |
|||
</u-form-item> |
|||
<u-form-item label="考场适应训练时长" prop="timeName"> |
|||
<view @click="showEnums=true" class="select_row"> |
|||
<view class="timePrice">85元/小时</view> |
|||
<u-input v-model="form.timeName" disabled input-align="right" placeholder="请选择" @click="showEnums=true"/> |
|||
<u-icon name="arrow-right" size="28" color="#686B73" style="margin-left: 12rpx;"></u-icon> |
|||
</view> |
|||
</u-form-item> |
|||
<u-form-item label="考场适应训练场地" prop="adaptabilityGround" required v-if="form.timeName!='不选择'"> |
|||
<view @click="showAdaptability=true" class="select_row"> |
|||
<u-input v-model="form.adaptabilityGround" disabled input-align="right" placeholder="请选择" @click="showAdaptability=true"/> |
|||
<u-icon name="arrow-right" size="28" color="#686B73" style="margin-left: 12rpx;"></u-icon> |
|||
</view> |
|||
</u-form-item> |
|||
<u-form-item label="学车费用" class="line" :border-bottom="false"> |
|||
<view class="tar red"> |
|||
¥{{ $u.utils.priceTo(totalPrice) }} |
|||
</view> |
|||
<!-- <u-input v-model="form.name" disabled input-align="right" placeholder="" /> --> |
|||
</u-form-item> |
|||
<u-form-item label="姓名"> |
|||
<view class="tar">{{form.realName}}</view> |
|||
<!-- <u-input v-model="form.realName" disabled input-align="right" placeholder="" /> --> |
|||
</u-form-item> |
|||
<u-form-item label="性别"> |
|||
<view class="tar">{{form.sex==2?'女':'男'}}</view> |
|||
</u-form-item> |
|||
<u-form-item label="国籍" > |
|||
<view class="tar">中国</view> |
|||
</u-form-item> |
|||
<u-form-item label="证件类型" > |
|||
<view class="tar">身份证</view> |
|||
</u-form-item> |
|||
<u-form-item label="证件号码" class="line" :border-bottom="false"> |
|||
<u-input v-model="form.certificateCodeShow" disabled input-align="right" placeholder="" /> |
|||
</u-form-item> |
|||
<u-form-item label="业务类型" required prop="businessTypeName" > |
|||
<view @click="showBusinessType=true" class="select_row"> |
|||
<u-input v-model="form.businessTypeName" disabled input-align="right" placeholder="请选择" @click="showBusinessType=true"/> |
|||
<u-icon name="arrow-right" size="28" color="#686B73" style="margin-left: 12rpx;"></u-icon> |
|||
</view> |
|||
<u-input v-model="form.name" disabled input-align="right" placeholder="" /> |
|||
</u-form-item> |
|||
<u-form-item label="原驾驶证号" required v-if="form.businessTypeName=='增领'"> |
|||
<u-input v-model="form.certificateCodeShow" disabled input-align="right" placeholder="" disabled/> |
|||
</u-form-item> |
|||
<u-form-item label="驾驶证初领日期" required v-if="form.businessTypeName=='增领'"> |
|||
<view @click="showFirstLicenceTime=true" class="select_row"> |
|||
<u-input v-model="form.firstLicenceTime" disabled input-align="right" placeholder="请选择" @click="showFirstLicenceTime=true"/> |
|||
<u-icon name="arrow-right" size="28" color="#686B73" style="margin-left: 12rpx;"></u-icon> |
|||
</view> |
|||
</u-form-item> |
|||
<u-form-item label="原准驾车型" required v-if="form.businessTypeName=='增领'"> |
|||
<view @click="showOldDriveModel=true" class="select_row"> |
|||
<u-input v-model="form.oldDriveModel" disabled input-align="right" placeholder="请选择" @click="showOldDriveModel=true"/> |
|||
<u-icon name="arrow-right" size="28" color="#686B73" style="margin-left: 12rpx;"></u-icon> |
|||
</view> |
|||
</u-form-item> |
|||
|
|||
</u-form> |
|||
</view> |
|||
|
|||
<view class="checkCon"> |
|||
<u-checkbox-group> |
|||
<u-checkbox v-model="checked" active-color="#1989FA" shape="circle">我承诺已完成且通过报考驾驶培训所需体检流程</u-checkbox> |
|||
</u-checkbox-group> |
|||
</view> |
|||
<view class="btnBg"> |
|||
<oneBtn text="提交" @oneBtnClick="oneBtnClickFn"/> |
|||
</view> |
|||
|
|||
|
|||
<!-- 选择框 --> |
|||
<!-- 车型 --> |
|||
<u-picker mode="selector" v-model="showDriveModels" :range="selectorDriveModels" @confirm="confirmDriveModels"></u-picker> |
|||
<!-- 班型 --> |
|||
<u-picker mode="selector" v-model="showTrainingClasss" :range="selectorTrainingClasss" range-key="className" @confirm="confirmTrainingClasss"></u-picker> |
|||
<!-- 教练 --> |
|||
<u-picker mode="selector" v-model="showSchoolCoach" :range="selectorSchoolCoach" range-key="coachName" @confirm="confirmSchoolCoach"></u-picker> |
|||
<!-- 适应训练时长 --> |
|||
<u-picker mode="selector" v-model="showEnums" :range="selectorEnums" range-key="name" @confirm="confirmEnums"></u-picker> |
|||
<!-- 适应训练考场 --> |
|||
<u-picker mode="selector" v-model="showAdaptability" :range="selectorAdaptability" range-key="name" @confirm="confirmAdaptability"></u-picker> |
|||
<!-- 业务类型 --> |
|||
<u-picker mode="selector" v-model="showBusinessType" :range="businessTypeArr" range-key="name" @confirm="confirmBusinessType"></u-picker> |
|||
<!-- 原驾驶证初领日期 --> |
|||
<u-picker mode="time" v-model="showFirstLicenceTime" @confirm="confirmFirstLicenceTime" :params="paramsPicker"></u-picker> |
|||
<!-- 原驾驶证学驾车型 --> |
|||
<u-popup v-model="showOldDriveModel" mode="bottom"> |
|||
<view class="carBox"> |
|||
<view class="carh1">学驾车型</view> |
|||
<view v-for="(item,index) in carTypeArr" :key="index" class="carLi"> |
|||
<view class="carType">{{item.lab}}</view> |
|||
<view class="carName_row"> |
|||
<view class="carName" v-for="(item2,index2) in item.arr" :key="index2" @click="pickerCarClick(item2)" :class="{active: pickerCarArr.indexOf(item2) > -1}">{{item2}}</view> |
|||
</view> |
|||
</view> |
|||
<view class="payBtn_row"> |
|||
<view class="payBtn border" @click="pickerCar()">重置</view> |
|||
<view class="payBtn" @click="pickerCar(1)">完成</view> |
|||
</view> |
|||
</view> |
|||
</u-popup> |
|||
<!-- 确认订单弹出框 --> |
|||
<u-popup v-model="showFormValidation" mode="bottom"> |
|||
<step3formValidation :info="form" :schoolName="info.schoolName" @oneBtnClick="oneBtnConfirm"/> |
|||
</u-popup> |
|||
|
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { watch } from "vue"; |
|||
import learnDrive from '@/api/learnDrive.js' |
|||
import step3formValidation from './step3formValidation.vue' |
|||
export default { |
|||
props: ['info', 'userInfo', 'trainingApplyId', 'fromClass'], |
|||
components: { |
|||
step3formValidation |
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
checked: true, |
|||
showFormValidation: false, |
|||
form: { |
|||
address: '', |
|||
classModel: '',//学驾车型 |
|||
businessType: '', |
|||
certificateType: 1, |
|||
businessTypeName: '', |
|||
trainingClassId: '', |
|||
trainingClassName: '', |
|||
realName: '', |
|||
certificateCode: '', |
|||
sex: '', |
|||
nationality: '中国', |
|||
firstLicenceTime: '', |
|||
oldDriveModel: '' |
|||
}, |
|||
businessTypeArr: [ |
|||
{name: '初领', id: 0}, |
|||
{name: '增领', id: 1} |
|||
], |
|||
showBusinessType: false, |
|||
totalPrice: '', |
|||
showDriveModels: false, |
|||
selectorDriveModels: [], |
|||
showTrainingClasss: false, |
|||
selectorTrainingClasss: [], |
|||
showSchoolCoach: false, |
|||
selectorSchoolCoach: [], |
|||
showEnums: false, |
|||
selectorEnums: [], |
|||
showAdaptability: false, |
|||
selectorAdaptability: [], |
|||
showFirstLicenceTime: false, |
|||
showOldDriveModel:false, |
|||
paramsPicker: { |
|||
year: true, |
|||
month: true, |
|||
day: true, |
|||
}, |
|||
carTypeArr: [ |
|||
{lab: '小车',arr: ['C1','C2','C3']}, |
|||
{lab: '货车',arr: ['A2','B2',]}, |
|||
{lab: '客车',arr: ['A1','B3','B1']}, |
|||
{lab: '摩托车',arr: ['D','E','F']}, |
|||
{lab: '其它',arr: ['C4','C5','C6']}, |
|||
], |
|||
pickerCarArr: [], |
|||
|
|||
} |
|||
}, |
|||
watch: { |
|||
"info.trainingSchoolId": { |
|||
deep:true,// 开启深度监听 |
|||
immediate:true, |
|||
handler(){ |
|||
console.log('info') |
|||
console.log(this.info) |
|||
this.queryDriveModelsFn() |
|||
this.queryTrainingClasssFn() |
|||
this.queryAdaptabilityGroundsFn() |
|||
this.queryAdaptabilityEnumsFn() |
|||
|
|||
// 默认选择初领 |
|||
this.form.businessType = this.businessTypeArr[0].id |
|||
this.form.businessTypeName = this.businessTypeArr[0].name |
|||
|
|||
// 如果是报名班型跳转过来的 classModel className trainingClassId totalPrice |
|||
if(this.fromClass) { |
|||
this.form.classModel = this.$store.state.classChooseItem.classModel |
|||
this.form.trainingClassLable = this.$store.state.classChooseItem.className |
|||
this.form.trainingClassId = this.$store.state.classChooseItem.trainingClassId |
|||
this.totalPrice = this.$store.state.classChooseItem.totalPrice |
|||
} |
|||
|
|||
} |
|||
}, |
|||
userInfo: { |
|||
deep:true,// 开启深度监听 |
|||
immediate:true, |
|||
handler(val){ |
|||
if(!Object.keys(val).length) return |
|||
this.form.realName = val.realName |
|||
console.log('监听到的用户信息') |
|||
console.log(val) |
|||
let sexIdCard = val.idcard |
|||
let sex = sexIdCard.substr(16,1) % 2 == 0 ? 2: 1 |
|||
this.form.sex = sex |
|||
this.form.certificateCode = val.idcard |
|||
this.form.driveLicence = val.idcard |
|||
let certificateCode = val.idcard |
|||
this.form.certificateCodeShow = certificateCode.substr(0,4) + '**********' + certificateCode.substr(14,certificateCode.split('').length) |
|||
} |
|||
} |
|||
}, |
|||
|
|||
methods: { |
|||
// 确认提交表单还是继续修改 |
|||
async oneBtnConfirm(num) { |
|||
if(num) { |
|||
this.form.trainingSchoolId = this.info.trainingSchoolId |
|||
this.form.trainingApplyId = this.trainingApplyId |
|||
let CoachItem = this.$store.state.chooseCoachItem.coachId |
|||
if(CoachItem.coachId) { |
|||
this.form.coachId = CoachItem.coachId |
|||
this.form.coachName = CoachItem.coachName |
|||
} |
|||
let obj = Object.assign({},this.form) |
|||
if(!this.form.businessType) { |
|||
// 如果是初领删除原驾驶证号,也就是身份证 |
|||
delete obj.driveLicence |
|||
} |
|||
delete obj.businessTypeName |
|||
delete obj.certificateCodeShow |
|||
console.log(obj) |
|||
const [nulls, res] = await learnDrive.createTrainingApplyDetails(obj) |
|||
this.$store.commit('upDateCoachItem', {}) |
|||
console.log('表单已提交') |
|||
console.log(res) |
|||
if(res.code==0) { |
|||
this.showFormValidation = false |
|||
this.$emit('showSignPopupFn') |
|||
} |
|||
}else { |
|||
this.showFormValidation = false |
|||
} |
|||
}, |
|||
// 选择车型 |
|||
async confirmDriveModels(i) { |
|||
let index = i[0] |
|||
this.form.classModel = this.selectorDriveModels[index] |
|||
this.form.trainingClassLable = '' |
|||
await this.queryTrainingClasssFn() |
|||
this.showTrainingClasss = true |
|||
|
|||
}, |
|||
// 选择班型 |
|||
confirmTrainingClasss(i) { |
|||
let index = i[0] |
|||
let item = this.selectorTrainingClasss[index] |
|||
this.form.trainingClassId = item.trainingClassId |
|||
this.form.trainingClassLable = item.className |
|||
this.totalPrice = item.totalPrice |
|||
|
|||
}, |
|||
// 选择教练 |
|||
confirmSchoolCoach(i) { |
|||
let index = i[0] |
|||
let item = this.selectorSchoolCoach[index] |
|||
this.form.coachId = item.coachId |
|||
this.form.coachName = item.coachName |
|||
}, |
|||
// 选择时长 |
|||
confirmEnums(i) { |
|||
let index = i[0] |
|||
let item = this.selectorEnums[index] |
|||
console.log(item) |
|||
this.form.timeName = item.name |
|||
this.form.adaptability = item.code |
|||
}, |
|||
// 选择考场 |
|||
confirmAdaptability(i) { |
|||
let index = i[0] |
|||
let item = this.selectorAdaptability[index] |
|||
this.form.adaptabilityGround = item.name |
|||
|
|||
}, |
|||
// 选择业务类型 |
|||
confirmBusinessType(i) { |
|||
let index = i[0] |
|||
let item = this.businessTypeArr[index] |
|||
this.form.businessType = item.id |
|||
this.form.businessTypeName = item.name |
|||
|
|||
}, |
|||
// 选择原驾驶证初领日期 |
|||
confirmFirstLicenceTime(val) { |
|||
let str = val.year+'-'+val.month+'-'+val.day |
|||
this.form.firstLicenceTime = str |
|||
console.log(val) |
|||
}, |
|||
pickerCar(num) { |
|||
if(num==1) { |
|||
if(!this.pickerCarArr.length) return this.$u.toast('请选择学驾车型') |
|||
this.form.oldDriveModel = this.pickerCarArr.join('') |
|||
this.showOldDriveModel = false |
|||
}else { |
|||
this.pickerCarArr = [] |
|||
this.form.oldDriveModel = '' |
|||
} |
|||
}, |
|||
pickerCarClick(item) { |
|||
let index = this.pickerCarArr.indexOf(item) |
|||
if(index>-1) { |
|||
this.pickerCarArr.splice(index, 1); |
|||
}else { |
|||
this.pickerCarArr.push(item) |
|||
} |
|||
}, |
|||
// 获取学驾车型 |
|||
async queryDriveModelsFn() { |
|||
if(!this.info.trainingSchoolId) return |
|||
const [nulls, res] = await learnDrive.queryDriveModels({trainingSchoolId: this.info.trainingSchoolId}) |
|||
this.selectorDriveModels = res.data |
|||
console.log('学驾车型') |
|||
console.log(res) |
|||
}, |
|||
// 获取班型 |
|||
async queryTrainingClasssFn() { |
|||
if(!this.info.trainingSchoolId) return |
|||
let obj = {pageSize: 20,pageIndex: 1,trainingSchoolId: this.info.trainingSchoolId,} |
|||
if(this.form.classModel) obj.classModel = this.form.classModel |
|||
const [nulls, res] = await learnDrive.querySimpleTrainingClasssByModel(obj) |
|||
this.selectorTrainingClasss = res.data |
|||
console.log('获取班型') |
|||
console.log(res) |
|||
}, |
|||
|
|||
// 获取适应性训练考场 |
|||
async queryAdaptabilityGroundsFn() { |
|||
const [nulls, res] = await learnDrive.queryAdaptabilityGrounds({trainingSchoolId: this.info.trainingSchoolId}) |
|||
this.selectorAdaptability = res.data |
|||
console.log('适应性训练考场') |
|||
console.log(res) |
|||
}, |
|||
// 获取学时 |
|||
async queryAdaptabilityEnumsFn() { |
|||
const [nulls, res] = await learnDrive.queryAdaptabilityEnums() |
|||
this.selectorEnums = res.data |
|||
let item = res.data[3] |
|||
this.form.timeName = item.name |
|||
this.form.adaptability = item.code |
|||
console.log('训练学时') |
|||
console.log(res) |
|||
}, |
|||
// 点击选择班型 |
|||
clickTrainingClasss() { |
|||
// this.showDriveModels = true |
|||
if(!this.form.classModel) return this.$u.toast('请先选择车型') |
|||
this.showTrainingClasss = true |
|||
this.queryTrainingClasssFn() |
|||
}, |
|||
// 提交表单之前验证 |
|||
oneBtnClickFn() { |
|||
if(!this.form.classModel) return this.$u.toast('请选择学驾车型') |
|||
if(!this.form.trainingClassLable) return this.$u.toast('请选择学驾班型') |
|||
if(!this.form.adaptabilityGround&&this.form.adaptability) return this.$u.toast('请选择考场适应训练时长场地') |
|||
if(!this.form.businessTypeName) return this.$u.toast('请选择业务类型') |
|||
if(!this.checked) return this.$u.toast('请勾选我同意承诺') |
|||
|
|||
this.showFormValidation = true |
|||
} |
|||
}, |
|||
|
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.main { |
|||
width: 100%; |
|||
.card { |
|||
background: #fff; |
|||
padding: 0 30rpx; |
|||
} |
|||
|
|||
} |
|||
.checkCon { |
|||
padding: 96rpx 30rpx 24rpx 30rpx; |
|||
} |
|||
.btnBg { |
|||
width: 100%; |
|||
height: 128rpx; |
|||
padding: 16rpx 30rpx; |
|||
background: #fff; |
|||
.btn { |
|||
width: 100%; |
|||
height: 96rpx; |
|||
background: linear-gradient(180deg, #3593FB 0%, #53D3E5 100%); |
|||
border-radius: 48rpx; |
|||
font-size: 36rpx; |
|||
color: #fff; |
|||
text-align: center; |
|||
line-height: 96rpx; |
|||
} |
|||
} |
|||
.select_row { |
|||
display: flex;justify-content: flex-end;width: 100%; |
|||
} |
|||
|
|||
.line { |
|||
position: relative; |
|||
&::before { |
|||
content: ''; |
|||
height: 20rpx; |
|||
width: 100vw; |
|||
background-color: #f7f7f7; |
|||
position: absolute; |
|||
left: -30rpx; |
|||
bottom: -20rpx; |
|||
} |
|||
} |
|||
.tar { |
|||
width: 100%; |
|||
text-align: right; |
|||
&.red { |
|||
color: red; |
|||
} |
|||
} |
|||
.timePrice { |
|||
margin: 0 0 0 20rpx; |
|||
color: red; |
|||
} |
|||
|
|||
.payBtn_row { |
|||
width: 100%; |
|||
padding: 20rpx 46rpx; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
border-top: 1px solid #ededed; |
|||
.payBtn { |
|||
width: 48%; |
|||
line-height: 96rpx; |
|||
color: #fff; |
|||
height: 96rpx; |
|||
background: linear-gradient(180deg, #3593FB 0%, #53D3E5 100%); |
|||
border-radius: 49rpx; |
|||
text-align: center; |
|||
&.border { |
|||
border: 2rpx solid rgba(53, 147, 251, 1); |
|||
color: #1989FA; |
|||
background: #fff; |
|||
} |
|||
} |
|||
} |
|||
.carBox { |
|||
width: 100%; |
|||
.carh1 { |
|||
font-size: 26rpx; |
|||
font-weight: 700; |
|||
text-align: center; |
|||
padding: 30rpx 0 0 0; |
|||
} |
|||
.carLi { |
|||
width: 100%; |
|||
margin-bottom: 30rpx; |
|||
padding: 0 32rpx; |
|||
} |
|||
.carType { |
|||
font-size: 26rpx; |
|||
font-weight: 500; |
|||
line-height: 40rpx; |
|||
padding: 28rpx 12rpx 12rpx 0; |
|||
} |
|||
.carName_row { |
|||
display: flex; |
|||
.carName { |
|||
margin-right: 40rpx; |
|||
width: 88rpx; |
|||
height: 56rpx; |
|||
background: #F6F7F8; |
|||
border-radius: 28rpx; |
|||
line-height: 56rpx; |
|||
text-align: center; |
|||
color: #686B73; |
|||
&.active { |
|||
background: #ECF7FE; |
|||
border: 1px solid #3593FB; |
|||
color: #1989FA; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</style> |
|||
|
@ -1,121 +0,0 @@ |
|||
<template> |
|||
<view class="formValidation"> |
|||
<view class="blueTxt"> |
|||
您的报名信息如下:请确定无误后提交 |
|||
</view> |
|||
<view class="ul"> |
|||
<view class="li"> |
|||
<view class="lab">真实姓名</view> |
|||
<view class="val">{{info.realName}}</view> |
|||
</view> |
|||
<view class="li"> |
|||
<view class="lab">报名驾校</view> |
|||
<view class="val">{{schoolName}}</view> |
|||
</view> |
|||
<view class="li"> |
|||
<view class="lab">班型</view> |
|||
<view class="val">{{info.trainingClassLable}}</view> |
|||
</view> |
|||
<view class="li"> |
|||
<view class="lab">考场训练时长</view> |
|||
<view class="val">{{info.timeName}}</view> |
|||
</view> |
|||
<view class="li"> |
|||
<view class="lab">性别</view> |
|||
<view class="val">{{info.sex==2?'女':'男'}}</view> |
|||
</view> |
|||
<view class="li"> |
|||
<view class="lab">证件类型</view> |
|||
<view class="val">身份证</view> |
|||
</view> |
|||
<view class="li"> |
|||
<view class="lab">证件号码</view> |
|||
<view class="val">{{info.certificateCodeShow}}</view> |
|||
</view> |
|||
<view class="li"> |
|||
<view class="lab">业务类型</view> |
|||
<view class="val">{{info.businessTypeName}}</view> |
|||
</view> |
|||
</view> |
|||
<view class="btn"> |
|||
<view :class="{hui: countdown}"> |
|||
<oneBtn :text="text" style="margin-bottom: 20rpx;" @oneBtnClick="oneBtnClick(1)"></oneBtn> |
|||
</view> |
|||
<oneBtn text="返回修改" :border="true" @oneBtnClick="oneBtnClick(0)"></oneBtn> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
props: ['info','schoolName'], |
|||
data () { |
|||
return { |
|||
countdown: 10, |
|||
text: '倒计时10秒' |
|||
} |
|||
}, |
|||
created() { |
|||
let timer = setInterval(()=>{ |
|||
this.countdown-- |
|||
this.text = '倒计时' + this.countdown + '秒' |
|||
if(this.countdown==0) { |
|||
clearInterval(timer) |
|||
this.countdown = 0 |
|||
this.text = '继续提交' |
|||
} |
|||
},1000) |
|||
}, |
|||
methods: { |
|||
oneBtnClick(num) { |
|||
this.$emit('oneBtnClick',num) |
|||
} |
|||
}, |
|||
|
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.hui { |
|||
opacity: 0.5; |
|||
} |
|||
.formValidation { |
|||
width: 100%; |
|||
padding: 0 32rpx; |
|||
.blueTxt { |
|||
width: 100%; |
|||
font-size: 28rpx; |
|||
padding: 30rpx 0; |
|||
color: #3593FB; |
|||
text-align: center; |
|||
} |
|||
|
|||
.ul { |
|||
width: 100%; |
|||
.li { |
|||
width: 100%; |
|||
height: 72rpx; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
font-size: 28rpx; |
|||
.lab { |
|||
color: #666; |
|||
} |
|||
|
|||
.val { |
|||
color: #333; |
|||
font-weight: 700; |
|||
} |
|||
} |
|||
} |
|||
|
|||
.btn { |
|||
padding: 30rpx 0; |
|||
width: 100%; |
|||
onebtn { |
|||
margin-bottom: 20rpx; |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -1,174 +0,0 @@ |
|||
<template> |
|||
<view class="step4"> |
|||
<view class="txt"> |
|||
您的学费将由第三方银行资金监管账户进行资金监管,学车过程中提供详细的扣费明细记录,请放心学车。 |
|||
请认谁正规渠道报名学车,谨慎在其它网络平台报名缴费,以免造成损失! |
|||
</view> |
|||
|
|||
<view class="flexB"> |
|||
<view class="lab"> |
|||
班型名称 |
|||
</view> |
|||
<view class="text"> |
|||
{{info.schoolName}} |
|||
</view> |
|||
</view> |
|||
|
|||
<view class="flexB"> |
|||
<view class="lab"> |
|||
班型学费 |
|||
</view> |
|||
<view class="text"> |
|||
¥{{$u.utils.priceTo(info.price)}} |
|||
</view> |
|||
</view> |
|||
|
|||
<view class="btnBox"> |
|||
<oneBtn text="签约" @oneBtnClick="showSignConfirmPopup = true"></oneBtn> |
|||
</view> |
|||
|
|||
<u-popup v-model="showSignConfirmPopup" border-radius="14" mode="center" > |
|||
<view class="popupCon" style="width: 580rpx"> |
|||
<view class="h1">温馨提示</view> |
|||
<view class="p">1. 已了解并知晓学车培训及考试、领证过程中相关需支出费用的明细组成。</view> |
|||
<view class="p">2. 已知晓解除合同,因单方面个人原因需承担的服务费或违约金等支付标准。</view> |
|||
<view class="p">3. 本人身份证在学车培训期间不得交给教练员(或其它无关人员)违规用于记录培训学时,否则由此产生的后果(包括且不限于本人违规记录的学时被不予认可并清零)自行承担。</view> |
|||
<view class="popBtn" @click="signContractFn">知道了,签署合同</view> |
|||
</view> |
|||
</u-popup> |
|||
|
|||
<!-- <web-view :src="webVeiwUrl" v-if="showWebView"></web-view> --> |
|||
|
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import learnDriveApi from '@/api/learnDrive.js' |
|||
// import signWebView from '../webView/webView.vue' |
|||
export default { |
|||
props: ['trainingApplyId', 'info'], |
|||
|
|||
data() { |
|||
return { |
|||
showSignConfirmPopup: false, |
|||
showWebView: false, |
|||
webVeiwUrl: '' |
|||
} |
|||
}, |
|||
mounted() { |
|||
if(this.showWebView) { |
|||
this.$nextTick(()=>{ |
|||
this.shang() |
|||
}) |
|||
} |
|||
}, |
|||
methods: { |
|||
// 获取签约链接 |
|||
async signContractFn() { |
|||
uni.showLoading({ |
|||
title: '请稍后', |
|||
mask: true |
|||
}) |
|||
const [nulls, res] = await learnDriveApi.signContract({trainingApplyId: this.trainingApplyId}) |
|||
console.log('获取签约链接') |
|||
console.log(res) |
|||
if(res.code!=0) return this.$u.toast(res.message) |
|||
// this.showWebView = true |
|||
// this.webVeiwUrl = res.data.url |
|||
// console.log(this.webVeiwUrl) |
|||
uni.hideLoading() |
|||
this.$store.commit('updateWebVeiwUrl',res.data.url) |
|||
this.showSignConfirmPopup = false |
|||
uni.navigateTo({ |
|||
url: '/pages/learnDriveStep/webView/webView?id='+ this.trainingApplyId |
|||
}) |
|||
}, |
|||
shang() { |
|||
let _this = this |
|||
var currentWebview = this.$scope.$getAppWebview(); |
|||
setTimeout(()=>{ |
|||
console.log('currentWebview') |
|||
console.log(currentWebview) |
|||
let wv = currentWebview.children()[0] |
|||
wv.addEventListener('loaded',function() { |
|||
let webVeiwUrl = wv.getURL() |
|||
console.log(webVeiwUrl) |
|||
var reg = RegExp(/wait/i); |
|||
if(reg.test(webVeiwUrl)){ |
|||
console.log('匹配成功了') |
|||
// uni.navigateTo({ |
|||
// url: '/pages/learnDriveStep/payMoney/payMoney?trainingOrderId='+_this.trainingApplyId |
|||
// }) |
|||
this.$emit('signSuccess') |
|||
} |
|||
|
|||
console.log('监听到了————————————————————') |
|||
console.log(wv.getURL()) //获取url |
|||
console.log(wv.getTitle()) //获取标题 |
|||
}, false); |
|||
},500) |
|||
|
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.step4 { |
|||
width: 100%; |
|||
padding: 32rpx; |
|||
color: #666; |
|||
background: #fff; |
|||
font-size: 32rpx; |
|||
.txt { |
|||
padding-bottom: 32rpx; |
|||
border-bottom: 2rpx solid #ededed; |
|||
} |
|||
|
|||
.flexB { |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
height: 100rpx; |
|||
.lab { |
|||
color: #666; |
|||
} |
|||
|
|||
.text { |
|||
color: #333; |
|||
} |
|||
} |
|||
|
|||
.btnBox { |
|||
width: 100%; |
|||
padding-top: 42rpx; |
|||
onebtn { |
|||
|
|||
} |
|||
} |
|||
} |
|||
|
|||
.popupCon { |
|||
color: #333; |
|||
.h1 { |
|||
font-size: 32rpx; |
|||
text-align: center; |
|||
line-height: 100rpx; |
|||
} |
|||
.p { |
|||
font-size: 26rpx; |
|||
color: #666; |
|||
margin-bottom: 36rpx; |
|||
padding: 10rpx 42rpx; |
|||
} |
|||
.popBtn { |
|||
border-top: 1px solid #ededed; |
|||
font-size: 36rpx; |
|||
text-align: center; |
|||
color: #1989FA; |
|||
text-align: center; |
|||
height: 110rpx; |
|||
line-height: 110rpx; |
|||
} |
|||
} |
|||
</style> |
@ -1,148 +0,0 @@ |
|||
<template> |
|||
<view class="page-web"> |
|||
|
|||
<!-- <uni-nav-bar left-icon="back" title="签署" left-text="返回" @clickLeft="navigateBack" statusBar="true"></uni-nav-bar> --> |
|||
|
|||
<view class="page-inner"> |
|||
<web-view :src="$store.state.webViewUrl" @message="message" @onPostMessage="handlePostMessage"></web-view> |
|||
</view> |
|||
|
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
data() { |
|||
return { |
|||
title: '加载中...', |
|||
trainingApplyId: '' |
|||
} |
|||
}, |
|||
onLoad(options) { |
|||
this.trainingApplyId = options.id |
|||
let _this = this |
|||
|
|||
// const currentWebview = _this.$mp.page.$getAppWebview(); |
|||
|
|||
this.shang() |
|||
}, |
|||
mounted() { |
|||
|
|||
}, |
|||
methods: { |
|||
shang() { |
|||
let _this = this |
|||
var currentWebview = this.$scope.$getAppWebview(); |
|||
setTimeout(()=>{ |
|||
console.log('currentWebview') |
|||
console.log(currentWebview) |
|||
let wv = currentWebview.children()[0] |
|||
wv.addEventListener('loaded',function() { |
|||
let webVeiwUrl = wv.getURL() |
|||
console.log(webVeiwUrl) |
|||
var reg = RegExp(/wait/i); |
|||
if(reg.test(webVeiwUrl)){ |
|||
console.log('匹配成功了') |
|||
uni.navigateTo({ |
|||
url: '/pages/learnDriveStep/payMoney/payMoney?trainingOrderId='+_this.trainingApplyId |
|||
}) |
|||
} |
|||
|
|||
console.log('监听到了————————————————————') |
|||
console.log(wv.getURL()) //获取url |
|||
console.log(wv.getTitle()) //获取标题 |
|||
}, false); |
|||
},500) |
|||
|
|||
}, |
|||
// 监听title是安卓原生事件 |
|||
shang1() { // 上传 |
|||
let _this = this |
|||
// 获取所有的webview对象 |
|||
const currentWebview = _this.$mp.page.$getAppWebview(); |
|||
setTimeout(function() { |
|||
// 获取当前页面的webview对象 |
|||
var web = currentWebview.children()[0]; |
|||
// 监听当前页面webview对象的title |
|||
web.addEventListener('titleUpdate', (e) => { |
|||
console.log('titleUpdate监听的什么呀', ) |
|||
let webVeiwUrl = web.getURL() |
|||
console.log(webVeiwUrl) |
|||
var reg = RegExp(/signaturecallback/i); |
|||
if(reg.test(webVeiwUrl)){ |
|||
uni.redirectTo({ |
|||
url: '/pages/learnDriveStep/learnDriveStep?id='+_this.trainingApplyId |
|||
}) |
|||
} |
|||
}, false) |
|||
|
|||
web.addEventListener('loaded', (e) => { |
|||
console.log('loaded监听的什么呀', ) |
|||
let webVeiwUrl = web.getURL() |
|||
console.log(webVeiwUrl) |
|||
var reg = RegExp(/signaturecallback/i); |
|||
if(reg.test(webVeiwUrl)){ |
|||
uni.redirectTo({ |
|||
url: '/pages/learnDriveStep/learnDriveStep?id='+_this.trainingApplyId |
|||
}) |
|||
} |
|||
}, false) |
|||
|
|||
}, 200) |
|||
}, |
|||
|
|||
navigateBack() { |
|||
uni.navigateBack() |
|||
}, |
|||
onPullStateChange(e) { |
|||
console.log('onPullStateChange 事件' + e) |
|||
}, |
|||
onOverride() { |
|||
console.log('onOverride 事件' + e) |
|||
}, |
|||
message(e) { |
|||
console.log('消息' + e) |
|||
}, |
|||
handlePostMessage(e) { |
|||
console.log('好消息' + e) |
|||
} |
|||
}, |
|||
onReady() { |
|||
// #ifdef APP-PLUS |
|||
var wv; |
|||
var height = 0; |
|||
|
|||
uni.getSystemInfo({ |
|||
//成功获取的回调函数,返回值为系统信息 |
|||
success: (sysinfo) => { |
|||
|
|||
height = sysinfo.windowHeight; //自行修改,自己需要的高度 此处如底部有其他内容,可以直接---(-50)这种 |
|||
}, |
|||
complete: () => {} |
|||
}); |
|||
var currentWebview = this.$scope |
|||
.$getAppWebview() //此对象相当于html5plus里的plus.webview.currentWebview()。在uni-app里vue页面直接使用plus.webview.currentWebview()无效 |
|||
console.log(height) |
|||
setTimeout(function() { |
|||
wv = currentWebview.children()[0] |
|||
wv.setStyle({ |
|||
top: 70, |
|||
height: height |
|||
}) |
|||
}, 1000); //如果是页面初始化调用时,需要延时一下 |
|||
// #endif |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style> |
|||
.page-web { |
|||
flex: 1; |
|||
width: 100%; |
|||
flex-direction: column; |
|||
} |
|||
|
|||
.page-inner { |
|||
flex: 1; |
|||
} |
|||
</style> |
After Width: 200 | Height: 200 | Size: 5.4 KiB |
After Width: 48 | Height: 48 | Size: 1.9 KiB |
After Width: 20 | Height: 12 | Size: 3.7 KiB |
After Width: 64 | Height: 34 | Size: 2.7 KiB |
Write
Preview
Loading…
Cancel
Save
Reference in new issue