Browse Source

添加微信支付

master
unknown 1 year ago
parent
commit
935fb7d81e
  1. 24
      api/index.js
  2. 209
      common/js/utils.js
  3. 17
      pages.json
  4. 31
      pages/application/entry.vue
  5. 174
      pages/application/fillRegistInfo.vue
  6. 818
      pages/application/payment.vue
  7. 15
      pages/application/registrationPhone.vue
  8. 7
      pages/application/success.vue
  9. 0
      pages/application/webView.vue
  10. 61
      pages/index/index.vue
  11. 99
      pages/learnDriveStep/chooseCoach/chooseCoach.vue
  12. 138
      pages/learnDriveStep/confirmClassHour/confirmClassHour.vue
  13. 228
      pages/learnDriveStep/confirmClassHour/signature.vue
  14. 135
      pages/learnDriveStep/learnDriveStep.scss
  15. 253
      pages/learnDriveStep/learnDriveStep.vue
  16. 625
      pages/learnDriveStep/payMoney/payMoney.vue
  17. 97
      pages/learnDriveStep/payMoney/payMoneySuccess.vue
  18. 142
      pages/learnDriveStep/realName/realName.vue
  19. 147
      pages/learnDriveStep/step/step0.vue
  20. 225
      pages/learnDriveStep/step/step1.vue
  21. 63
      pages/learnDriveStep/step/step2.vue
  22. 524
      pages/learnDriveStep/step/step3.vue
  23. 121
      pages/learnDriveStep/step/step3formValidation.vue
  24. 174
      pages/learnDriveStep/step/step4.vue
  25. 148
      pages/learnDriveStep/webView/webView - 副本 (2).vue
  26. 2
      pages/schoolDetails/details.vue
  27. BIN
      static/images/avatar.png
  28. BIN
      static/images/jiaofei_wxIphone@2x.png
  29. BIN
      static/images/third_icon_gengduoIphone@2x.png
  30. BIN
      static/images/third_img_tuijianIphone@2x.png

24
api/index.js

@ -67,5 +67,29 @@ class indexApi {
async queryRegionByParentCode(data) {
return await Ajax1('/util/manage/queryRegionByParentCode.do?regionCode=330100', data,'post');
}
// 提交表单
async createTrainingApplyDetails(data) {
return await Ajax1('/apply/manage/createTrainingApplyDetails.do', data,'post');
}
// 获取签约链接
async signContract(data) {
return await Ajax1('/apply/manage/signContract.do', data,'post');
}
// 查询订单详情-1
async getOrderDetails(data) {
return await Ajax1('/order/manage/getOrderDetails.do', data,'post');
}
// 创建订单
async createOrder(data) {
return await Ajax1('/order/manage/createOrder.do', data,'post');
}
// 创建变更车型银行预支付订单-4
async createChangeModelPrepaid(data) {
return await http('/order/manage/createChangeModelPrepaid.do', data,'post');
}
// 创建银行预支付订单
async createPrepaid(data) {
return await Ajax1('/order/manage/createPrepaid.do', data,'post');
}
}
export default new indexApi();

209
common/js/utils.js

@ -3,55 +3,31 @@ import learnDriveApi from '@/api/learnDrive.js'; // 引入
import store from '@/store';
const install = (Vue, vm) => {
const callPhone = (phone)=> {
phone = phone.trim()
if(!phone) {
uni.showToast({
title: '暂无联系方式',
icon: 'none'
});
return
}
uni.showModal({
content: '确定要拨打:'+phone+'?' ,
success: function (res) {
if (res.confirm) {
uni.makePhoneCall({
phoneNumber: phone //仅为示例
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
// 打开地图
const openMap = (lat,lng)=>{
const openMap = (lat, lng) => {
uni.openLocation({
latitude: lat,
longitude: lng
})
}
// 距离换算
const distanceFn = (val)=> {
if(val*1<1000) {
const distanceFn = (val) => {
if (val * 1 < 1000) {
return val + '米'
}else {
} else {
return (val / 1000).toFixed(2) + '公里'
}
}
// 价格计算
const priceTo = (price = 0)=> {
const priceTo = (price = 0) => {
// return (price / 100).toFixed(2)
return ( parseInt( price * 100 ) / 100 / 100 ).toFixed(2)
return (parseInt(price * 100) / 100 / 100).toFixed(2)
}
const distanceLatLng = (lat1, lng1)=> {
const distanceLatLng = (lat1, lng1) => {
var that = this;
let lat2 = store.state.latLng.lat;
let lng2 = store.state.latLng.lng;
@ -68,29 +44,29 @@ const install = (Vue, vm) => {
s = s.toString();
s = s.substring(0, s.indexOf('.') + 2);
return s
}
const getLocation = ()=> {
return new Promise((resolve,reject)=>{
}
const getLocation = () => {
return new Promise((resolve, reject) => {
uni.getLocation({
type: 'wgs84',
success: function (res) {
success: function(res) {
console.log('当前位置的经度:' + res.longitude);
console.log('当前位置的纬度:' + res.latitude);
let obj = {
lat: res.latitude,
lng: res.longitude
}
store.commit('updateLatLng',obj)
store.commit('updateLatLng', obj)
resolve(obj)
}
});
}).catch((e) => {})
}
// 查询用户信息
let getOwnerAccountBase = async ()=> {
let getOwnerAccountBase = async () => {
const [err, data] = await loginApi.getOwnerAccountBase();
if (data.code != 0) {
uni.removeStorageSync('Authorization')
@ -100,46 +76,50 @@ const install = (Vue, vm) => {
uni.setStorageSync('userInfo', data.data);
return data.data;
}
// 查看是否有未支付订单
let checkOrderPay = async ()=>{
let checkOrderPay = async () => {
// 这一步判断是否有实名,避免接口报错
let userInfo = await getOwnerAccountBase()
uni.setStorageSync('userInfo', userInfo);
if(!userInfo||!userInfo.idcard) return false
if (!userInfo || !userInfo.idcard) return false
// 1查询报名驾校
const [nulls, res] = await learnDriveApi.queryTrainingApplyByOwner()
if(!res.data) return false
let trainingApplyId = res.data[0].trainingApplyId
let transfer = res.data[0].transfer
if(!trainingApplyId) {
if (!res.data) return false
let trainingApplyId = res.data[0].trainingApplyId
let transfer = res.data[0].transfer
if (!trainingApplyId) {
return {}
}
// 2查询订单id
let [err, res2] = await learnDriveApi.getTrainingApplyDetails({trainingApplyId: trainingApplyId})
let [err, res2] = await learnDriveApi.getTrainingApplyDetails({
trainingApplyId: trainingApplyId
})
let detail = res2.data
if(!detail.trainingOrderId) {
if (!detail.trainingOrderId) {
return {}
}
// 查询订单详情
let [err3, res3] = await learnDriveApi.getOwnerStudentStatus({trainingOrderId: detail.trainingOrderId})
let [err3, res3] = await learnDriveApi.getOwnerStudentStatus({
trainingOrderId: detail.trainingOrderId
})
console.log('详情')
console.log(res3.data)
res3.data.trainingOrderId = detail.trainingOrderId
// 有同城转样没有完成 用这个?transferStatus 还是用transfer
if(res3.haveTransfer==2) {
if (res3.haveTransfer == 2) {
uni.showModal({
content: '您有转校入学申请等完成',
confirmText: '去完成',
success: function (res) {
success: function(res) {
if (res.confirm) {
uni.navigateTo({
url: '/pages/user/businessHandling/transferAppliRecord/transferAppliRecord'
@ -149,43 +129,81 @@ const install = (Vue, vm) => {
});
}
return res3.data
}
function addZeroPrefix(number) {
return number < 10 ? `0${number}`:number
return number < 10 ? `0${number}` : number
}
let getDate = (date, splitor = '-')=> {
const year = date.getFullYear()
const month = date.getMonth() + 1
const day = date.getDate()
return `${year}${splitor}${addZeroPrefix(month)}${splitor}${addZeroPrefix(day)}`
let getDate = (date, splitor = '-') => {
const year = date.getFullYear()
const month = date.getMonth() + 1
const day = date.getDate()
return `${year}${splitor}${addZeroPrefix(month)}${splitor}${addZeroPrefix(day)}`
}
var lastTime = 0
var audioContext = uni.createInnerAudioContext() // 播放音频的
let shakeFn = (res)=>{
if(!store.state.havePay) return false
let nowTimer = new Date().getTime()
if (nowTimer - lastTime < 1000) return
lastTime = nowTimer
// 自己根据自己的力度调节 变量大小 满足自己设定的值后触发自己的逻辑
if ((Math.abs(res.x) > 20 || Math.abs(res.y) > 20 || Math.abs(res.z) > 20) ) {
console.log('yayaoyaoya6666666666666666')
// 进入判断后 相当于摇一摇成功
audioContext.src = 'https://lg-fe2b58o2-1255788064.cos.ap-shanghai.myqcloud.com/shark.mp3' // 播放音频
audioContext.play() // 播放
uni.navigateTo({
url: '/pages/user/studentIdImg/studentIdImg'
})
const browser = {
versions: function() {
const u = navigator.userAgent;
return {
ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android终端或者uc浏览器
}
}()
};
//调⽤APP交互
//apiName:⽅法名称
//parameter:参数
function appPostMessage(apiName, parameter) {
// console.log(browser.versions)
if (browser.versions.ios) { //判读iOS或安卓
try {
//参数类型可以为对象类型
var par = {
"type": apiName,
"callBack": {
//回调函数⾃定义参数
"callBackName": 'arouseNativeMsg',
},
"postParameter": parameter
};
//iOS调⽤格式
window.webkit.messageHandlers.requestApp.postMessage(par);
return "ios"
} catch (err) {
// on catch
}
} else if (browser.versions.android) {
try {
//par参数格式为json字符串
var par = {
"type": apiName,
"callBack": {
//
"callBackName": "arouseNativeMsg", //固定参数arouseNativeMsg
"callBackParms": parameter
}
};
//转jsonString
var parString = JSON.stringify(par);
//Android调⽤格式window.forJs.requestApp(par);
window.forJs.requestApp(parString);
return "android"
} catch (err) {
// on catch
}
} else {
alert("不是安卓或者IOS")
}
}
vm.$u.utils={
callPhone,
vm.$u.utils = {
openMap,
getLocation,
getOwnerAccountBase,
@ -194,8 +212,7 @@ const install = (Vue, vm) => {
distanceLatLng,
distanceFn,
getDate,
shakeFn
appPostMessage
}
}

17
pages.json

@ -103,15 +103,18 @@
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black" //
}
},
{
"path": "pages/application/webView",
"style": {
"navigationBarTitleText": "报名成功",
"enablePullDownRefresh": false,
"bounce": "none",
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black" //
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",

31
pages/application/entry.vue

@ -9,7 +9,7 @@
<view class="h1">请选择</view>
<view class="h1Tps">以下两种报名方式均享受会员价</view>
<view class="card">
<view class="card" @click="goPage(1)">
<view class="leftIcon">
<image src="@/static/images/third_icon_ziji@3x.png" mode=""></image>
</view>
@ -22,7 +22,7 @@
</view>
</view>
<view class="card" @click="$goPage('/pages/application/registrationPhone')">
<view class="card" @click="goPage(2)">
<view class="leftIcon">
<image src="@/static/images/third_icon_jiaren@3x.png" mode=""></image>
</view>
@ -40,16 +40,37 @@
</template>
<script>
import indexApi from '@/api/index.js'
export default {
data() {
return {}
return {
trainingApplyId: ''
}
},
onLoad() {
},
methods: {
async goPage(num) {
if(num==1) {
await this.createTrainingApplySimpleFn()
this.$goPage('/pages/application/fillRegistInfo?trainingApplyId='+ this.trainingApplyId)
}else {
this.$goPage('/pages/application/registrationPhone')
}
},
//
async createTrainingApplySimpleFn() {
let trainingSchoolId = this.$store.state.currentSchool.trainingSchoolId
let trainingClassId = this.$store.state.classChooseItem.trainingClassId
const [nulls, res] = await indexApi.createTrainingApplySimple({trainingSchoolId, trainingClassId})
if(res.code==0) {
this.trainingApplyId = res.data
}else if(res.code==502) {
//
this.$u.toast(res.message)
}
},
}
}
</script>

174
pages/application/fillRegistInfo.vue

@ -48,8 +48,8 @@
</u-form-item>
<view class="line"></view>
</view>
<view :class="{line: !form.businessType}"></view>
<u-form-item label="异地转入" required prop="businessTypeName" >
<!-- <view :class="{line: !form.businessType}"></view> -->
<!-- <u-form-item label="异地转入" required prop="businessTypeName" >
<view class="tag_row" @click="transfer=!transfer">
<view class="tag" :class="{active: transfer}"></view>
<view class="tag" :class="{active: !transfer}"></view>
@ -68,46 +68,54 @@
<u-icon name="arrow-right" size="28" color="#686B73" style="margin-left: 12rpx;" ></u-icon>
</view>
</u-form-item>
</view>
</view> -->
<view class="h2">
学员信息 <text>请准确填写学员真实信息</text>
</view>
<u-form-item label="头 像" >
<view @click="chooseImages" class="select_row" >
<view @click="chooseImages('avatar')" class="select_row" >
<view class="avatar">
<image :src="form.avatar" mode=""></image>
<image src="@/static/images/avatar.png" mode="" v-if="!form.avatar"></image>
<image :src="form.avatar" mode="" v-else></image>
</view>
<u-icon name="arrow-right" size="28" color="#686B73" style="margin-left: 12rpx;" ></u-icon>
</view>
</u-form-item>
<u-form-item label="姓 名" >
<u-input placeholder="请填写" input-align="right"></u-input>
<u-input placeholder="请填写" input-align="right" v-model="form.realName"></u-input>
</u-form-item>
<u-form-item label="性 别" >
<view @click="showDriveModels=true" class="select_row" >
<u-input v-model="form.classModel" input-align="right" placeholder="请选择" disabled @click="showDriveModels=true" />
<u-form-item label="性 别" >
<view @click="showSex=true" class="select_row" >
<u-input v-model="form.sexName" input-align="right" placeholder="请选择" disabled @click="showSex=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="coachName" >
<view class="tar">中国</view>
</u-form-item>
<u-form-item label="证件类型" prop="coachName" >
<u-form-item label="证件类型" >
<view class="tar">身份证</view>
</u-form-item>
<u-form-item label="证件号码" prop="coachName" >
<u-form-item label="证件号码">
<view class="tar">
<u-input placeholder="请输入证件号码" input-align="right"></u-input>
<u-input placeholder="请输入证件号码" input-align="right" v-model="form.certificateCode"></u-input>
</view>
</u-form-item>
<!-- <u-form-item label="地址">
<view class="tar">
<u-input placeholder="请输入证件号码" input-align="right" v-model="form.address"></u-input>
</view>
</u-form-item> -->
<view class="idcardBox">
<view class="idcard">
<image src="@/static/images/idcardA.png" mode="widthFix"></image>
<view class="idcard" @click="chooseImages('idcardA')" >
<image src="@/static/images/idcardA.png" mode="widthFix" v-if="!form.idcardA"></image>
<image :src="form.idcardA" mode="widthFix" v-else></image>
</view>
<view class="idcard">
<image src="@/static/images/idcardB.png" mode="widthFix"></image>
<view class="idcard" @click="chooseImages('idcardB')" >
<image src="@/static/images/idcardB.png" mode="widthFix" v-if="!form.idcardB"></image>
<image :src="form.idcardB" mode="widthFix" v-else></image>
</view>
</view>
<view class="line"></view>
@ -124,19 +132,21 @@
<view class="row1">
<view class="lab">总额</view>
<view class="redPrice">
<text></text>266.00
<text></text>{{ $u.utils.priceTo(newPrice)}}
</view>
<view class="oldPrice">300.00</view>
<view class="oldPrice">{{$u.utils.priceTo(totalPrice)}}</view>
</view>
<view class="redTxt">享9.5已减271</view>
<view class="redTxt">享9.5已减{{$u.utils.priceTo(totalPrice - newPrice)}}</view>
</view>
<view class="rightBtn" @click="$goPage('/pages/application/payment')">下一步</view>
<view class="rightBtn" @click="oneBtnConfirm">下一步</view>
</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="showSex" :range="sexArr" range-key="lab" @confirm="confirmSex"></u-picker>
<!-- 原驾驶证初领日期 -->
<u-picker mode="time" v-model="showFirstLicenceTime" @confirm="confirmFirstLicenceTime" :params="paramsPicker"></u-picker>
@ -180,11 +190,27 @@
showOldDriveModel: false,
form: {
classModel: '',
businessType: 0,//
firstLicenceTime: '',//
avatar: '',//
certificateType: 1,//
trainingClassId: '',//
realName: '',
certificateCode: '',
sex: '',
nationality: '中国',
oldDriveModel: '',//
address: '',
adaptability: 0,
businessTypeName: '',
sexName: '',
trainingClassLable: '',
businessType: 0,
firstLicenceTime: '',
avatar: [],//
idcardA: '',
idcardB: ''
},
showSex: false,
info: {},
selectorTrainingClasss: [],//
selectorDriveModels: [],//
@ -192,6 +218,10 @@
{name: '初领', id: 0},
{name: '增领', id: 1}
],
sexArr: [
{id: 1, lab: '男'},
{id: 2, lab: '女'},
],
carTypeArr: [
{lab: '小车',arr: ['C1','C2','C3']},
{lab: '货车',arr: ['A2','B2',]},
@ -205,15 +235,88 @@
month: true,
day: true,
},
trainingApplyId: '',
totalPrice: '',
newPrice: 0
}
},
onLoad() {
onLoad(options) {
this.trainingApplyId = options.trainingApplyId
// totalPrice trainingClassId
this.createTrainingApplySimpleFn()
this.form.classModel = this.classChooseItem.className
this.totalPrice = this.classChooseItem.totalPrice
this.newPrice = this.totalPrice * 0.95
this.form.trainingClassId = this.classChooseItem.trainingClassId
this.form.trainingClassLable = this.classChooseItem.classModel
this.InitFn()
},
methods: {
async InitFn() {
await this.getTrainingApplyDetailsFn()
this.queryTrainingClasssFn()
this.queryDriveModelsFn()
},
//
async oneBtnConfirm() {
this.form.trainingSchoolId = this.info.trainingSchoolId
this.form.trainingApplyId = this.trainingApplyId
let obj = {}
for(let key in this.form) {
if(this.form[key]!=='') {
obj[key] = this.form[key]
}
}
if(this.form.businessType) {
// ==
obj.driveLicence = obj.certificateCode
}
delete obj.businessTypeName
delete obj.sexName
delete obj.trainingClassLable
console.log(obj)
const [nulls, res] = await indexApi.createTrainingApplyDetails(obj)
setTimeout(()=>{
uni.navigateTo({
url: '/pages/application/payment'
})
},2000)
this.$store.commit('upDateCoachItem', {})
console.log('表单已提交')
console.log(res)
if(res.code==0) {
this.signContractFn()
}
},
//
async signContractFn() {
uni.showLoading({
title: '请稍后',
mask: true
})
const [nulls, res] = await indexApi.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/application/webView?id='+ this.trainingApplyId
})
},
//
confirmSex(i) {
let index = i[0]
let item = this.sexArr[index]
this.form.sex = item.id
this.form.sexName = item.lab
},
//
pickerCarClick(item) {
let index = this.pickerCarArr.indexOf(item)
@ -298,18 +401,7 @@
}
}
},
//
async createTrainingApplySimpleFn() {
let trainingSchoolId = this.$store.state.currentSchool.trainingSchoolId
let trainingClassId = this.$store.state.classChooseItem.trainingClassId
const [nulls, res] = await indexApi.createTrainingApplySimple({trainingSchoolId, trainingClassId})
if(res.code==0) {
this.trainingOrderId = res.data
}else if(res.code==502) {
//
this.$u.toast(res.message)
}
},
//
chooseImages(type) {
uni.chooseImage({
@ -322,11 +414,11 @@
title: '图片上传中...'
});
this.uploadImgApi(res.tempFilePaths[0])
this.uploadImgApi(res.tempFilePaths[0],type)
}
})
},
uploadImgApi(filePath) {
uploadImgApi(filePath,type) {
console.log(filePath)
let _this = this
//
@ -348,7 +440,7 @@
let res2 = JSON.parse(res.data)
console.log(res2)
if(res2.code==0) {
_this.form.avatar = res2.data
_this.form[type] = res2.data
}
uni.hideLoading();
},

818
pages/application/payment.vue

@ -1,363 +1,457 @@
<template>
<view class="payMoney pageBg">
<view class="topCon">
<view class="price">
<text></text> {{ $u.utils.priceTo(info.balance) }}
</view>
<view class="schoolName">
{{ info.schoolName}}
</view>
</view>
<view class="cardInfoPadding">
<view class="cardInfo">
<view class="flex-box-s">
<text>学车类型</text>
<text>{{ info.trainingModel}}</text>
</view>
<view class="flex-box-s">
<text>学车班型</text>
<text>{{info.trainingClassName}}</text>
</view>
</view>
</view>
<view class="payWay">
<view class="zfb" @click="changePayWay(2)">
<view class="leftCon">
<view class="icon">
<image src="@/static/images/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/jiaofei_zhifu_selectIphone@2x.png" mode="" v-if="payWay==2">
</image>
<image src="@/static/images/jiaofei_zhifu_unselectIphone@2x.png" mode="" v-else></image>
</view>
</view>
</view>
<view class="payBtnBox">
<view class="payBtn bgLinear" @click="goPay">确认支付</view>
<!-- <oneBtn text="确认支付" @oneBtnClick="goPay"></oneBtn> -->
</view>
</view>
</template>
<script>
import indexApi from '@/api/index.js'
let polling = null
let timerNum = 0
export default {
data() {
return {
info: {
schoolName: '翔力驾校',
balance: 120,
},
payInfo: {},
isPoll: false
}
},
onLoad(options) {
this.getChangeModelDetailsFn()
},
onShow() {
//
if(this.isPoll) this.isPoll()
},
methods: {
//
async getPrepaidResultFn() {
const [err, res] = await learnDriveApi.getChangeModelPrepaidResult({outTradeNo: this.payInfo.outTradeNo})
if(res.code==0) {
uni.switchTab({
url: '/pages/tabbar/userCenter/userCenter'
})
}
console.log(res)
},
//
changePayWay(num) {
this.payWay = num
},
// car://paymoney/carstep:8888
// zlxcpay://
//
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',
trainingOrderId: this.info.trainingOrderId,
}
console.log(obj)
const [err, res] = await businessHanldApi.createChangeModelPrepaid(obj)
if(res.code==0) {
this.payInfo = res.data
}else {
uni.hideLoading()
this.$u.toast(res.message)
return false
}
console.log('this.payInfo支付信息')
console.log(res)
},
//
async goPay() {
this.$goPage('/pages/application/success')
uni.showLoading({
title: '创建订单...'
})
await this.createPrepaidFn()
this.zfbPay()
// if(this.payInfo.appURL) {
// if (this.payWay == 1) {
// this.wxPay()
// } else {
// }
// }
},
//
pollFn() {
polling = setInterval(async ()=>{
timerNum ++
if(timerNum>30) {
clearInterval(polling)
polling = null
}
await this.getPrepaidResultFn()
},1000)
},
zfbPay() {
uni.hideLoading()
let url = encodeURIComponent(this.payInfo.appURL)
this.isPoll = true
let urls = `alipays://platformapi/startapp?appId=10000007&qrcode=${url}`
console.log('支付宝路径')
console.log(this.payInfo.appURL)
console.log(urls)
// #ifdef APP-PLUS
plus.runtime.openURL(urls)
// #endif
// #ifdef H5
window.open(urls)
// #endif
},
wxPay() {
this.isPoll = true
// #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()
},
}
}
</script>
<style lang="scss" scoped>
.payMoney {
min-height: 100vh;
.topCon {
text-align: center;
padding: 116rpx 0 72rpx 0;
.price {
font-size: 56rpx;
color: #E63633;
text {
font-size: 24rpx;
}
}
.schoolName {
font-size: 28rpx;
color: #666;
}
}
.cardInfoPadding {
padding: 20rpx 32rpx;
}
.cardInfo {
background-color: #fff;
border-radius: 16rpx;
padding: 0 16px;
.flex-box-s {
height: 120rpx;
line-height: 120rpx;
display: flex;
justify-content: space-between;
&:last-child {
border-top: 1px solid #f7f7f7;
}
text {
font-size: 28rpx;
color: #333;
}
}
}
.payWay {
padding: 0 32rpx;
.otherWay {
display: flex;
background-color: #fff;
border-radius: 16rpx;
padding: 0 16px;
height: 120rpx;
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: 120rpx;
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;
display: flex;
align-items: center;
width: 100vw;
height: 128rpx;
background: #FFFFFF;
box-shadow: 0px -1px 0px 0px #E8E9EC;
.payBtn {
width: 100%;
height: 96rpx;
background: linear-gradient(180deg, #3593FB 0%, #53D3E5 100%);
border-radius: 50rpx;
line-height: 96rpx;
text-align: center;
font-size: 36rpx;
color: #fff;
}
}
.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;
}
}
}
<template>
<view class="payMoney pageBg">
<view class="topCon">
<view class="price">
<text></text> {{ $u.utils.priceTo(info.price) }}
</view>
<view class="schoolName">
{{ info.schoolName}}
</view>
</view>
<view class="cardInfoPadding">
<view class="cardInfo">
<view class="flex-box-s">
<text>学车类型</text>
<text>{{ info.trainingModel}}</text>
</view>
<view class="flex-box-s">
<text>学车班型</text>
<text>{{info.className}}</text>
</view>
</view>
</view>
<view class="payWay">
<view class="zfb" @click="changePayWay(2)">
<view class="leftCon">
<view class="icon">
<image src="@/static/images/jiaofei_zfbIphone@2x.png" mode=""></image>
</view>
<view class="text">
支付宝支付
</view>
<view class="recommendIcon">
<image src="@/static/images/third_img_tuijianIphone@2x.png" mode=""></image>
</view>
</view>
<view class="rightStatusIcon">
<image src="@/static/images/jiaofei_zhifu_selectIphone@2x.png" mode="" v-if="payWay==2">
</image>
<image src="@/static/images/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/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/jiaofei_wxIphone@2x.png" mode=""></image>
</view>
<view class="text">
微信支付
</view>
</view>
<view class="rightStatusIcon">
<image src="@/static/images/jiaofei_zhifu_selectIphone@2x.png" mode="" v-if="payWay==1">
</image>
<image src="@/static/images/jiaofei_zhifu_unselectIphone@2x.png" mode="" v-else></image>
</view>
</view>
</view>
<view class="payBtnBox">
<view class="payBtn bgLinear" @click="goPay">确认支付</view>
</view>
</view>
</template>
<script>
import indexApi from '@/api/index.js'
let polling = null
let timerNum = 0
export default {
data() {
return {
info: {
schoolName: '翔力驾校',
balance: 120,
},
payInfo: {},
payWay: 2,
isPoll: false,
trainingApplyId: 'dddc910e7eac47ba8b6452f0629ff5f2',
showOtherWay: false
}
},
onLoad(options) {
// trainingOrderId=832df06eff634376816c00e812a413c7&trainingApplyId=dddc910e7eac47ba8b6452f0629ff5f2
this.getTrainingApplyDetailsFn()
},
onShow() {
//
if(this.isPoll) this.isPoll()
},
methods: {
//
async getPrepaidResultFn() {
const [err, res] = await learnDriveApi.getChangeModelPrepaidResult({outTradeNo: this.payInfo.outTradeNo})
if(res.code==0) {
uni.switchTab({
url: '/pages/tabbar/userCenter/userCenter'
})
}
console.log(res)
},
//
changePayWay(num) {
this.payWay = num
},
// car://paymoney/carstep:8888
// zlxcpay://
//
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',
trainingOrderId: this.info.trainingOrderId,
}
console.log(obj)
setTimeout(()=>{
uni.navigateTo({
url: '/pages/application/success'
})
},2000)
const [err, res] = await indexApi.createPrepaid(obj)
if(res.code==0) {
this.payInfo = res.data
if (this.payWay == 1) {
this.wxPay()
} else {
this.zfbPay()
}
}else {
this.$u.toast(res.message)
return false
}
uni.hideLoading()
console.log('this.payInfo支付信息')
console.log(res)
},
//
async goPay() {
uni.showLoading({
title: '创建订单...'
})
await this.createPrepaidFn()
},
//
pollFn() {
polling = setInterval(async ()=>{
timerNum ++
if(timerNum>30) {
clearInterval(polling)
polling = null
}
await this.getPrepaidResultFn()
},1000)
},
zfbPay() {
uni.hideLoading()
let url = encodeURIComponent(this.payInfo.appURL)
this.isPoll = true
let urls = `alipays://platformapi/startapp?appId=10000007&qrcode=${url}`
console.log('支付宝路径')
console.log(this.payInfo.appURL)
console.log(urls)
// #ifdef APP-PLUS
plus.runtime.openURL(urls)
// #endif
// #ifdef H5
window.location.href = 'paymoney://car:8898/carstep'
window.open(urls)
// #endif
},
wxPay() {
this.isPoll = true
// #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
//APP
var par = {username:"gh_012fd4bda1c2",path:'/pages/payment/payment?tokenCode=' + this.payInfo.tokenCode,miniProgramType:"0"}
this.$u.utils.appPostMessage("jumpWXMiniProgram",par);
uni.hideLoading()
},
// -
async getTrainingApplyDetailsFn() {
if(!this.trainingApplyId) return
const [err, res] = await indexApi.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 indexApi.createOrder(obj)
console.log('****创建的订单***')
console.log(res2)
this.trainingOrderId = res2.data
setTimeout(()=>{
this.getOrderDetailsFn()
},1000)
}
await this.getOrderDetailsFn()
},
//
async getOrderDetailsFn(poll) {
if(!this.trainingOrderId) return
const [err, res] = await indexApi.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)
},
}
}
</script>
<style lang="scss" scoped>
.payMoney {
min-height: 100vh;
.topCon {
text-align: center;
padding: 116rpx 0 72rpx 0;
.price {
font-size: 56rpx;
color: #E63633;
text {
font-size: 24rpx;
}
}
.schoolName {
font-size: 28rpx;
color: #666;
}
}
.cardInfoPadding {
padding: 20rpx 32rpx;
}
.cardInfo {
background-color: #fff;
border-radius: 16rpx;
padding: 0 16px;
.flex-box-s {
height: 120rpx;
line-height: 120rpx;
display: flex;
justify-content: space-between;
&:last-child {
border-top: 1px solid #f7f7f7;
}
text {
font-size: 28rpx;
color: #333;
}
}
}
.payWay {
padding: 0 32rpx;
.otherWay {
display: flex;
background-color: #fff;
border-radius: 16rpx;
padding: 0 16px;
height: 120rpx;
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: 120rpx;
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;
display: flex;
align-items: center;
width: 100vw;
height: 128rpx;
background: #FFFFFF;
box-shadow: 0px -1px 0px 0px #E8E9EC;
.payBtn {
width: 100%;
height: 96rpx;
background: linear-gradient(180deg, #3593FB 0%, #53D3E5 100%);
border-radius: 50rpx;
line-height: 96rpx;
text-align: center;
font-size: 36rpx;
color: #fff;
}
}
.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>

15
pages/application/registrationPhone.vue

@ -102,7 +102,7 @@
uni.setStorageSync('Authorization', data.data.token);
uni.setStorageSync('studentId', data.data.studentId);
await this.getOwnerAccountBase()
this.$goPage('/pages/application/fillRegistInfo')
this.createTrainingApplySimpleFn()
},
//
@ -111,6 +111,19 @@
if (data.code != 0) return uni.$u.toast(data.message);
uni.setStorageSync('userInfo', data.data);
},
//
async createTrainingApplySimpleFn() {
let trainingSchoolId = this.$store.state.currentSchool.trainingSchoolId
let trainingClassId = this.$store.state.classChooseItem.trainingClassId
const [nulls, res] = await indexApi.createTrainingApplySimple({trainingSchoolId, trainingClassId})
if(res.code==0) {
this.$goPage('/pages/application/fillRegistInfo?trainingApplyId='+ res.data)
}else if(res.code==502) {
//
this.$u.toast(res.message)
this.$goPage('/pages/application/fillRegistInfo?trainingApplyId='+ res.data)
}
}
}
}
</script>

7
pages/application/success.vue

@ -5,7 +5,7 @@
<image src="@/static/images/logo.png" mode=""></image>
</view>
<view class="text">浙里学车APP</view>
<view class="btnSmall">立即下载</view>
<view class="btnSmall" @click="download">立即下载</view>
</view>
<view class="slog">
<view class="iconImg">
@ -27,7 +27,7 @@
<view class="payBtnBox">
<view class="payBtn bgLinear" @click="goPay">确认支付</view>
<view class="payBtn bgLinear" @click="download">立即下载</view>
<!-- <oneBtn text="确认支付" @oneBtnClick="goPay"></oneBtn> -->
</view>
</view>
@ -51,6 +51,9 @@
console.log(platform)
const [err, res] = await indexApi.getLastVersion({appType, version:'1.0.0'})
console.log(res)
},
download() {
this.$u.toast('需要下载接口')
}
}
}

0
pages/learnDriveStep/webView/webView.vue → pages/application/webView.vue

61
pages/index/index.vue

@ -1,6 +1,6 @@
<template>
<view class="content">
<u-navbar title="优享驾培"></u-navbar>
<u-navbar title="优享驾培" :custom-back="goApp"></u-navbar>
<view class="content">
<view class="topCon">
<view class="tag" @click="$goPage('/pages/payRecords/payRecords')">
@ -49,13 +49,14 @@
</view>
</view>
</view>
<list :listData="listData"/>
<list :listData="listData" />
<view class="" style="padding: 40rpx 0 0 0; ">
<u-loadmore :status="status" icon-type="circle" />
</view>
</view>
</view>
<u-picker mode="selector" v-model="show" :range="region" @confirm="confirmRegion" range-key="regionName"></u-picker>
<u-picker mode="selector" v-model="show" :range="region" @confirm="confirmRegion"
range-key="regionName"></u-picker>
</view>
</template>
@ -88,22 +89,34 @@
this.listInit()
this.queryRegionByParentCodeFn()
const latLng = this.$u.utils.getLocation()
console.log(latLng)
this.queryParams.lat = latLng.lat
this.queryParams.lng = latLng.lng
this.$u.utils.appPostMessage("encryption_user_msg_type");
//AndroidiOS
window.arouseNativeMsg = function(data) {
if(data) {
}
}
},
onReachBottom() {
if(this.status=='nomore') return
if (this.status == 'nomore') return
this.queryTrainingSchoolListFromAppFn()
},
onPullDownRefresh() {
this.listInit()
setTimeout(()=>{
setTimeout(() => {
uni.stopPullDownRefresh()
},1500)
}, 1500)
},
methods: {
goApp() {
this.$u.utils.appPostMessage("backToApp");
},
listInit() {
this.status=='loadmore'
this.status == 'loadmore'
this.queryParams.pageIndex = 1
this.listData = []
this.queryTrainingSchoolListFromAppFn()
@ -119,22 +132,22 @@
//
async queryRegionByParentCodeFn() {
const [nulls, res] = await indexApi.queryRegionByParentCode()
this.region = res.data
this.region = res.data
},
//
async queryTrainingSchoolListFromAppFn() {
let obj = {}
for(let key in this.queryParams) {
if(this.queryParams[key]) {
for (let key in this.queryParams) {
if (this.queryParams[key]) {
obj[key] = this.queryParams[key]
}
}
const [nulls,res] = await indexApi.queryTrainingSchoolListFromApp(obj)
this.queryParams.pageIndex ++
const [nulls, res] = await indexApi.queryTrainingSchoolListFromApp(obj)
this.queryParams.pageIndex++
this.listData.push(...res.data)
console.log('驾校列表')
console.log(res.data)
if(res.data.length<this.queryParams.pageSize) this.status = 'nomore'
if (res.data.length < this.queryParams.pageSize) this.status = 'nomore'
},
}
}
@ -147,17 +160,19 @@
justify-content: center;
height: 96rpx;
align-items: center;
.h1Icon {
width: 36rpx;
height: 20rpx;
}
.txt {
font-size: 32rpx;
color: #333;
padding: 0 12rpx;
}
}
.topCon {
width: 100%;
height: 792rpx;
@ -181,11 +196,12 @@
width: 100%;
height: 504rpx;
padding: 0 32rpx;
.card {
background: #FFFFFF;
border-radius: 16rpx;
padding: 0 24rpx 24rpx 24rpx;
.item_Box {
width: 100%;
@ -195,11 +211,13 @@
padding: 24rpx 0 0 0;
color: #333;
margin-bottom: 16rpx;
.h2 {
font-size: 32rpx;
position: relative;
padding: 0 0 8rpx 26rpx;
font-weight: 600;
&::before {
position: absolute;
content: '';
@ -209,7 +227,7 @@
height: 28rpx;
background: #1989FA;
border-radius: 0px 6rpx 6rpx 0px;
}
}
@ -230,17 +248,20 @@
border-radius: 32rpx 32rpx 0px 0px;
padding: 0 32rpx 32rpx 32rpx;
margin-top: 32rpx;
.area {
display: flex;
align-items: center;
font-size: 28rpx;
color: #686B73;
margin-bottom: 40rpx;
.areaLab {
font-size: 28rpx;
color: #686B73;
margin-right: 16rpx;
}
.areaChoose {
height: 56rpx;
background: #F6F7F8;
@ -248,10 +269,12 @@
padding: 8rpx 16rpx;
display: flex;
align-items: center;
.txt {
font-size: 28rpx;
color: #686B73;
}
.iconImg {
width: 24rpx;
height: 24rpx;
@ -259,6 +282,6 @@
}
}
}
}
</style>

99
pages/learnDriveStep/chooseCoach/chooseCoach.vue

@ -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>

138
pages/learnDriveStep/confirmClassHour/confirmClassHour.vue

@ -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 => {
// jsonjson
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>

228
pages/learnDriveStep/confirmClassHour/signature.vue

@ -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);
// //canvasbase64
// 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>

135
pages/learnDriveStep/learnDriveStep.scss

@ -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;
}
}
}

253
pages/learnDriveStep/learnDriveStep.vue

@ -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&&currentIndex>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 //10-
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>

625
pages/learnDriveStep/payMoney/payMoney.vue

@ -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://"; // hbuildermanifest.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>

97
pages/learnDriveStep/payMoney/payMoneySuccess.vue

@ -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>

142
pages/learnDriveStep/realName/realName.vue

@ -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>

147
pages/learnDriveStep/step/step0.vue

@ -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>

225
pages/learnDriveStep/step/step1.vue

@ -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&&params.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>

63
pages/learnDriveStep/step/step2.vue

@ -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>

524
pages/learnDriveStep/step/step3.vue

@ -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>

121
pages/learnDriveStep/step/step3formValidation.vue

@ -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>

174
pages/learnDriveStep/step/step4.vue

@ -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>

148
pages/learnDriveStep/webView/webView - 副本 (2).vue

@ -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];
// webviewtitle
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() //html5plusplus.webview.currentWebview()uni-appvue使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>

2
pages/schoolDetails/details.vue

@ -240,7 +240,7 @@
}
.rightCon {
width: 96rpx;
min-width: 96rpx;
text-align: center;
margin-right: 32rpx;

BIN
static/images/avatar.png

After

Width: 200  |  Height: 200  |  Size: 5.4 KiB

BIN
static/images/jiaofei_wxIphone@2x.png

After

Width: 48  |  Height: 48  |  Size: 1.9 KiB

BIN
static/images/third_icon_gengduoIphone@2x.png

After

Width: 20  |  Height: 12  |  Size: 3.7 KiB

BIN
static/images/third_img_tuijianIphone@2x.png

After

Width: 64  |  Height: 34  |  Size: 2.7 KiB

Loading…
Cancel
Save