Browse Source

添加已过科目几的金额计算

master
unknown 8 months ago
parent
commit
8924f0d87c
  1. 3
      common/js/mixins.js
  2. 2
      common/js/utils.js
  3. 5
      config/api.js
  4. 3
      config/request.js
  5. 5
      config/site.config.js
  6. 6
      config/utils.js
  7. 6
      manifest.json
  8. 2
      pages.json
  9. 20
      pages/indexEntry/enroll/payment/payment.vue
  10. 52
      pages/indexEntry/enroll/registInfo/registInfo.vue
  11. 1
      pages/indexEntry/signIn/signAndOut/signAndOut.vue
  12. 4
      pages/mineEntry/myAppointment/comp/opera.vue
  13. 4
      pages/mineEntry/myAppointment/detail/opera.vue
  14. 4
      pages/mineEntry/myOrder/voucher/voucher.vue
  15. 2
      pages/tabbar/learnCar/comp/topInfo.vue
  16. 28
      pages/tabbar/learnCar/index.vue
  17. 8
      pages/userCenter/login/login.vue
  18. 10
      store/modules/user.js

3
common/js/mixins.js

@ -16,6 +16,9 @@ export default {
return {
}
},
onload() {
uni.hideLoading()
},
onPullDownRefresh() {
setTimeout(()=>{
uni.stopPullDownRefresh()

2
common/js/utils.js

@ -124,7 +124,7 @@ const install = (Vue, vm) => {
store.commit('goLogin')
return
}
// return vm.$goPage('/pages/indexEntry/enroll/registInfo/registInfo')
return vm.$goPage('/pages/indexEntry/enroll/registInfo/registInfo')
// store.commit('updateNonPlatformStudent', false)
if( vm.vuex_userInfo.applyStep<2) {
vm.$goPage('/pages/indexEntry/enroll/enroll')

5
config/api.js

@ -79,7 +79,7 @@ export const areaTree = () => http.get('system/area/tree', )
// 驾照类型
export const licenseType = () => http.get('system/dict/licenseType', )
// 区域
export const nachangList = () => http.get('system/area/nachangList', )
export const nachangList = () => http.get('system/area/luoyangList', )
// 线上提交学员报名信息
export const applyOnline = (data) => http.post('app/student-record/applyOnline', data)
// 人脸核身---获取BizToken
@ -216,6 +216,9 @@ export const signDetail = (data) => http.post('business/student/sign/signDetail'
export const periodConfirm = (data) => http.post('app/student-process/periodConfirm', data)
// 获得学员动态
export const getStudentDynamics = (data) => http.post('app/student-dynamic/getStudentDynamics', data)
// 根据已过科目计算价格
export const paymentPrice = (data) => http.post('app/student-record/paymentPrice', data)

3
config/request.js

@ -29,7 +29,6 @@ module.exports = (vm) => {
// console.log('--------------')
// console.log(config)
let token = vm.$store.state.user.vuex_loginInfo.accessToken
console.log(token)
if(token) {
config.header.Authorization = 'Bearer ' + token
}
@ -60,7 +59,7 @@ module.exports = (vm) => {
if(data.code==401) {
console.log('报401的接口')
console.log(response.config.url)
vm.$store.commit('goLogin', true)
return vm.$store.commit('goLogin')
}
// 自定义参数

5
config/site.config.js

@ -2,9 +2,8 @@ const VUE_APP_PLATFORM = process.env.VUE_APP_PLATFORM;
// localIp = false
module.exports = {
H5_API: VUE_APP_PLATFORM === 'h5' ? '/api' : '',//h5代理
// WX_API: VUE_APP_PLATFORM === 'h5' ? '/' : 'http://192.168.1.38:8318/',//非代理地址
WX_API: VUE_APP_PLATFORM === 'h5' ? '/' : 'http://work.lyjppt.com:8099/',//非代理地址
WX_API: VUE_APP_PLATFORM === 'h5' ? '/' : 'http://192.168.1.43:8318/',//非代理地址
// WX_API: VUE_APP_PLATFORM === 'h5' ? '/' : 'http://work.lyjppt.com:8099/',//非代理地址
website: 'http://192.168.1.37',
httpPrefix: 'app-api/',
imgUrl: 'https://jiangxijiakao-1.oss-cn-hangzhou.aliyuncs.com/defaultImages/app/bigImg/'

6
config/utils.js

@ -185,13 +185,14 @@ export function uploadImgApi(filePath, imgName, imgLink='image') {
key: obj.key,
QrType: obj.QrType
}
console.log('***********')
console.log(item)
_this.$store.commit('upDateSchoolClass', {})
if(obj.QrType==1) {
// 判断是扫教练码来的还是驾校码来的
if(item.id) {
_this.$store.commit('updateSchool', {})
console.log('扫码结果***********')
console.log(item)
_this.$store.commit('upDateSchoolCoach', item)
}else {
obj.schoolName = decodeURIComponent(obj.schoolName)
@ -201,6 +202,7 @@ export function uploadImgApi(filePath, imgName, imgLink='image') {
_this.$u.utils.clickSignUp()
}else {
// 签到的
_this.$store.commit('upDateSchoolCoach', item)
_this.$goPage('/pages/indexEntry/signIn/signAndOut/signAndOut')
}
}else {

6
manifest.json

@ -2,8 +2,8 @@
"name" : "洛阳学车",
"appid" : "__UNI__3347C6E",
"description" : "",
"versionName" : "1.1.4",
"versionCode" : 114,
"versionName" : "1.1.5",
"versionCode" : 115,
"transformPx" : false,
/* 5+App */
"app-plus" : {
@ -69,7 +69,7 @@
"sdkConfigs" : {
"share" : {
"weixin" : {
"appid" : "",
"appid" : "wxdfeef42d2a053912",
"UniversalLinks" : ""
}
},

2
pages.json

@ -422,7 +422,7 @@
{
"path": "myOrder/voucher/voucher",
"style": {
"navigationBarTitleText": "培训缴费电子凭证",
"navigationBarTitleText": "培训缴费电子凭证666",
// "navigationStyle": "custom",
"enablePullDownRefresh": true,
"backgroundTextStyle": "dark"

20
pages/indexEntry/enroll/payment/payment.vue

@ -5,17 +5,17 @@
<view class="orderInfo">
<view class="schoolName">翔力驾校</view>
<view class="price">
<text class="uint"></text>1000.13
<text class="uint"></text>{{ info.a }}
</view>
<!-- <view class="num">交易单号65465879312</view> -->
</view>
<view class="li border">
<view class="lab">订单金额</view>
<view class="val"> 2000</view>
<view class="val"> {{info.a}}</view>
</view>
<view class="li">
<view class="lab">订单编号</view>
<view class="val">646545645646458</view>
<view class="val">{{info.a}}</view>
</view>
</view>
<view class="card">
@ -44,7 +44,7 @@
</view>
</view>
<view class="footerBtn pad">
<view class="btnBg" @click="$goPage('/pages/indexEntry/enroll/paymentSuccess/paymentSuccess')">确认支付</view>
<view class="btnBg" @click="paySubmit">确认支付</view>
</view>
</view>
</view>
@ -56,6 +56,9 @@
data() {
return {
trainingApplyId: '',
info: {
a: '待对接'
}
}
},
onLoad(options) {
@ -85,7 +88,8 @@
wxPay() {
// #ifdef APP-PLUS
this.sweixin ? this.sweixin.launchMiniProgram({
path: '/pages/payment/payment?tokenCode=' + this.payInfo.tokenCode, // pages/index/index
// path: '/pages/payment/payment?tokenCode=' + this.payInfo.tokenCode, // pages/index/index
path: '/' , // pages/index/index
type: 0, // 0- 1- 2- 0
id: 'gh_012fd4bda1c2' //id
}) : plus.nativeUI.alert('当前环境不支持微信操作!');
@ -94,6 +98,12 @@
async getStudentByPayment() {
const {data: res} = await getStudentByPayment({trainingApplyId: this.trainingApplyId})
this.$store.dispatch('getUserInfo')
},
paySubmit() {
console.log('这是什么')
console.log(this.sweixin)
this.wxPay()
// this.$goPage('/pages/indexEntry/enroll/paymentSuccess/paymentSuccess')
}
}
}

52
pages/indexEntry/enroll/registInfo/registInfo.vue

@ -165,7 +165,7 @@
<view class="row">
<view class="lab ">已过科目</view>
<view class="rightCon">
<view class="row" @click="showSubjectPass=true">
<view class="row" @click="subjectClick">
<view class="val">
<mySelect :value="form.finishSubjectName"/>
</view>
@ -190,12 +190,12 @@
</view>
</view>
<view class="card">
<view class="card" v-if="form.totalAmount">
<view class="row">
<view class="lab">学费</view>
<view class="rightCon">
<view class="row">
<view class="val blue">{{ $u.utils.priceTo(form.totalAmount) }}</view>
<view class="val blue" >{{ $u.utils.priceTo(form.totalAmount) }}</view>
</view>
</view>
</view>
@ -226,7 +226,7 @@
<!-- 待学科目 -->
<u-picker :show="showSubjectTreat" :columns="columnsSubject" keyName="label" @confirm="confirmTreat" @cancel="showSubjectTreat=false"></u-picker>
<!-- 城市 -->
<u-picker :show="showCity" ref="uPicker" :columns="[cityArr]" @confirm="confirmCity" @change="changeHandler" keyName="name"></u-picker>
<u-picker :show="showCity" ref="uPicker" :columns="[cityArr]" @confirm="confirmCity" @change="changeHandler" keyName="name" @cancel="showCity=false"></u-picker>
</view>
</template>
@ -235,7 +235,7 @@
import comfigPopup from './comp/comfigPopup'
import searchSchool from './comp/searchSchool'
import oldDrive from './comp/oldDrive'
import { areaTree, applyOnline, schoolClass, getSchoolDetail } from '@/config/api.js'
import { areaTree, applyOnline, schoolClass, getSchoolDetail, paymentPrice } from '@/config/api.js'
import { scanCodeFn } from '@/config/utils.js'
export default {
components: { comfigPopup, searchSchool, oldDrive },
@ -289,7 +289,7 @@
},
showSchool: false,
radiolist1: [ {name: '初领', id: 0}, {name: '增驾', id: 1}],//01
radiolist2: [ {name: '是', id: 1}, {name: '否', id: 2}],
radiolist2: [{name: '否', id: 2}, {name: '是', id: 1}, ],
radiolist3: [ {name: '全款', id: 1}, {name: '预付款', id: 2}],
cityArr: [],
cityArr2: [],
@ -368,7 +368,7 @@
},
//
async schoolClassFn() {
const {data: res} = await schoolClass({pageNo: 1,pageSize: 100, schoolId: this.form.schoolId})
const {data: res} = await schoolClass({pageNo: 1,pageSize: 100, schoolId: this.form.schoolId, carType: this.form.trainType})
this.columnsClassModel = [res.list]
console.log(this.columnsClassModel)
},
@ -488,16 +488,25 @@
this.showClassModel = false
this.form.classModel = item.name
this.form.schoolClassId = item.id
this.form.totalAmount = item.totalAmount
if(this.form.finishSubject&&this.form.transfer==1) {
this.paymentPriceFn()
}else {
this.form.totalAmount = item.totalAmount
}
},
//
confirmCar(val) {
let item = val.value[0]
console.log(item)
this.showCar = false
if(this.form.trainType == item) return
this.form.trainType = item
this.form.coach = ''
this.form.coachId = ''
this.form.classModel = ''
this.form.schoolClassId = ''
this.form.totalAmount = ''
this.schoolClassFn()
},
showCarClick() {
if(!this.form.school) return this.$u.toast('请先选择驾校')
@ -521,13 +530,30 @@
this.showOldDriveModel = false
console.log(val)
},
//
subjectClick() {
if(!this.form.schoolClassId) return this.$u.toast('请先选择报名班型,方便计算价格')
this.showSubjectPass=true
},
//
confirmSubjectPass(val) {
this.showSubjectPass = false
let item = val.value[0]
if(this.form.finishSubject == item.id) return
this.form.finishSubject = item.id
this.form.finishSubjectName = item.label
this.showSubjectPass = false
this.paymentPriceFn()
},
//
async paymentPriceFn() {
let obj = {
schoolClassId: this.form.schoolClassId,
finishSubject: this.form.finishSubject
}
const res = await paymentPrice(obj)
if(res.code==0) {
this.form.totalAmount = res.data
}
},
//
confirmTreat(val) {
@ -577,6 +603,7 @@
},
changeVal(val) {
console.log(val)
console.log(this.form.transfer)
},
//
confirmClick() {
@ -590,7 +617,10 @@
console.log(val)
this.showPopup = false
if(!val) return false
const {data: res} = await applyOnline(this.form)
let obj = Object.assign({},this.form)
obj.name = obj.name.replace(/\s+/g, '')
obj.idcard = obj.idcard.replace(/\s+/g, '')
const {data: res} = await applyOnline(obj)
//
console.log(res)
await this.$store.dispatch('getUserInfo')

1
pages/indexEntry/signIn/signAndOut/signAndOut.vue

@ -107,6 +107,7 @@
if(this.params.type==3) {
fn = signOutAuth
}
console.log('扫码传的参数')
console.log(this.params)
const res = await fn(this.params)
console.log('第一步校验信息')

4
pages/mineEntry/myAppointment/comp/opera.vue

@ -7,8 +7,8 @@
<view class="schoolName oneRowText">{{item.siteName}}</view>
</view>
<view class="status">
<view class="text" v-if="item.loginStatus==9">已取消</view>
<view class="text" v-else>{{statusTxt[item.loginStatus]}}</view>
<!-- <view class="text" v-if="item.loginStatus==9">已取消</view>
<view class="text" v-else>{{statusTxt[item.loginStatus]}}</view> -->
<view class="icon">
<u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;" ></u-icon>
</view>

4
pages/mineEntry/myAppointment/detail/opera.vue

@ -6,8 +6,8 @@
<view class="tag">{{info.subject==2?'科目二实操':info.subject==3?'科目三实操':'不限科目'}}</view>
<view class="schoolName oneRowText">{{info.siteName}}</view>
</view>
<view class="text" v-if="info.loginStatus==9">已取消</view>
<view class="text" v-else>{{statusTxt[info.loginStatus]}}</view>
<!-- <view class="text" v-if="info.loginStatus==9">已取消</view>
<view class="text" v-else>{{statusTxt[info.loginStatus]}}</view> -->
</view>
<view class="target">
<view class="row">

4
pages/mineEntry/myOrder/voucher/voucher.vue

@ -1,6 +1,6 @@
<template>
<view class="pageBgImg">
<topNavbar title="培训缴费电子凭证"></topNavbar>
<view class="pagebg">
<!-- <topNavbar title="培训缴费电子凭证"></topNavbar> -->
<view class="imgBox" style="width: 100%;">
<image :src="imgLink" mode="widthFix"></image>
</view>

2
pages/tabbar/learnCar/comp/topInfo.vue

@ -2,7 +2,7 @@
<view class="topInfo card">
<view class="user_row">
<view class="avatar">
<image :src="vuex_userInfo.photoPath" mode="widthFix" v-if="vuex_userInfo.photoPath"></image>
<image :src="vuex_userInfo.photoPath" mode="aspectFill" v-if="vuex_userInfo.photoPath"></image>
</view>
<view class="rightTxt">
<view style="display: flex;align-items: center;" @click="topClick">

28
pages/tabbar/learnCar/index.vue

@ -42,13 +42,39 @@
this.init()
},
onLoad() {
this.trainProcess()
},
onShow() {
this.init()
// this.getStudentProcessFn()
},
methods: {
async trainProcess() {
await this.$store.dispatch('getUserInfo')
// 01357
let trainProcess = {}
switch(this.vuex_userInfo.trainProcess) {
case 1:
trainProcess = {name: '科目二', id: 2}
break;
case 3:
trainProcess = {name: '科目三', id: 3}
break;
case 5:
trainProcess = {name: '科目四', id: 4}
break;
case 7:
trainProcess = {name: '科目四', id: 4}
break;
default:
trainProcess = {name: '科目一', id: 1}
}
console.log('trainProcess是几啊')
console.log(trainProcess)
console.log(this.vuex_userInfo.trainProcess)
this.changeSubject(trainProcess)
},
init() {
this.token = this.$store.state.user.vuex_loginInfo.accessToken
if(!this.token) return this.$u.toast('请先登录')

8
pages/userCenter/login/login.vue

@ -65,7 +65,7 @@
return uni.$u.test.mobile(this.FormData.phone)
},
btnHighlight() {
return this.isPhone&&uni.$u.test.code(this.FormData.code, 4)
return this.isPhone&&this.FormData.code*1>999
}
},
methods: {
@ -124,11 +124,15 @@
})
}else {
const pages = getCurrentPages();
if(pages.length==1) {
console.log('有几个pages')
console.log(pages)
if(pages.length<1) {
console.log('走首页')
uni.switchTab({
url: '/pages/tabbar/index/index'
})
}
console.log('走返回')
uni.navigateBack()
}
}else {

10
store/modules/user.js

@ -31,7 +31,7 @@ const user = {
update_apiOk(state, payload) {
state.apiOk = payload
},
goLogin(state, type) {
goLogin(state) {
uni.clearStorageSync()
state.vuex_loginInfo = {}
state.vuex_userInfo = {}
@ -42,10 +42,12 @@ const user = {
console.log('当前页面')
console.log(page)
if(page) uni.setStorageSync('login_front', page)
setTimeout(()=>{
uni.navigateTo({
url
})
},500)
uni.navigateTo({
url
})
}
},

Loading…
Cancel
Save