|
|
@ -32,7 +32,7 @@ |
|
|
|
<view class="rightCon"> |
|
|
|
<view class="row" @click="showCarClick"> |
|
|
|
<view class="val"> |
|
|
|
<mySelect :value="form.car"/> |
|
|
|
<mySelect :value="form.trainType"/> |
|
|
|
</view> |
|
|
|
<view class="arrow"> |
|
|
|
<u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;" ></u-icon> |
|
|
@ -274,7 +274,7 @@ |
|
|
|
import comfigPopup from './comp/comfigPopup' |
|
|
|
import searchSchool from './comp/searchSchool' |
|
|
|
import oldDrive from './comp/oldDrive' |
|
|
|
import { areaTree, applyOnline, schoolClass, } from '@/config/api.js' |
|
|
|
import { areaTree, applyOnline, schoolClass, getSchoolDetail } from '@/config/api.js' |
|
|
|
export default { |
|
|
|
components: { comfigPopup, searchSchool, oldDrive }, |
|
|
|
data() { |
|
|
@ -336,6 +336,7 @@ |
|
|
|
} |
|
|
|
this.initUserInfo() |
|
|
|
|
|
|
|
// 监听上一个页面的选择教练 |
|
|
|
uni.$on('upDateCoachItem',(item)=>{ |
|
|
|
console.log(item) |
|
|
|
this.form.coach = item.name |
|
|
@ -343,27 +344,28 @@ |
|
|
|
}) |
|
|
|
this.areaTreeFn() |
|
|
|
|
|
|
|
// 如果是选择了驾校班型来报名的 |
|
|
|
let schoolClass = this.$store.state.school.schoolClass |
|
|
|
console.log(schoolClass) |
|
|
|
if(schoolClass.id) { |
|
|
|
console.log(schoolClass) |
|
|
|
this.form.classModel = schoolClass.name |
|
|
|
this.form.school = schoolClass.schoolName |
|
|
|
this.form.schoolId = schoolClass.schoolId |
|
|
|
this.form.car = schoolClass.carType |
|
|
|
this.form.trainType = schoolClass.carType |
|
|
|
this.form.schoolClassId = schoolClass.id |
|
|
|
} |
|
|
|
|
|
|
|
// 如果是选择了驾校教练来报名的/扫二维码 |
|
|
|
let schoolCoach = this.$store.state.school.schoolCoach |
|
|
|
console.log('schoolCoach') |
|
|
|
console.log(schoolCoach) |
|
|
|
if(schoolCoach.id) { |
|
|
|
console.log('schoolCoach') |
|
|
|
console.log(schoolCoach) |
|
|
|
this.form.coach = schoolCoach.name |
|
|
|
this.form.coachId = schoolCoach.id |
|
|
|
this.form.school = schoolCoach.schoolName |
|
|
|
this.form.schoolId = schoolCoach.schoolId |
|
|
|
// this.form.car = schoolClass.carType |
|
|
|
} |
|
|
|
if(this.form.schoolId) { |
|
|
|
this.schoolClassFn() |
|
|
|
this.getSchoolDetailFn() |
|
|
|
} |
|
|
|
}, |
|
|
|
onPullDownRefresh() { |
|
|
@ -372,9 +374,10 @@ |
|
|
|
methods: { |
|
|
|
async initUserInfo() { |
|
|
|
// 如果不是实名 |
|
|
|
if(!this.realNameNo) { |
|
|
|
await this.$store.dispatch('getUserInfo') |
|
|
|
} |
|
|
|
// if(!this.realNameNo) { |
|
|
|
// await this.$store.dispatch('getUserInfo') |
|
|
|
// } |
|
|
|
console.log(this.vuex_userInfo) |
|
|
|
this.form.userId = this.userId |
|
|
|
this.form.accountId = this.vuex_userInfo.accountId |
|
|
|
this.form.address = this.vuex_userInfo.address |
|
|
@ -384,6 +387,7 @@ |
|
|
|
this.form.nationality = this.vuex_userInfo.nationality || '中国' |
|
|
|
this.form.cardType = this.vuex_userInfo.cardType || '1' |
|
|
|
}, |
|
|
|
// 查班型 |
|
|
|
async schoolClassFn() { |
|
|
|
const {data: res} = await schoolClass({pageNo: 1,pageSize: 100, schoolId: this.form.schoolId}) |
|
|
|
this.columnsClassModel = [res.list] |
|
|
@ -466,17 +470,6 @@ |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
// for(let i=0; i<res.length; i++) { |
|
|
|
// let obj = { |
|
|
|
// id: res[i].id, |
|
|
|
// name: res[i].name |
|
|
|
// } |
|
|
|
// this.cityArr.push(obj) |
|
|
|
|
|
|
|
// console.log(this.cityArr) |
|
|
|
// console.log(this.cityArr2) |
|
|
|
console.log(this.cityArr3) |
|
|
|
// this.showCity = res |
|
|
|
}, |
|
|
|
traverse(arr, result=[]) { |
|
|
|
for (var i = 0; i < arr.length; i++) { |
|
|
@ -516,7 +509,6 @@ |
|
|
|
let item = val.value[0] |
|
|
|
console.log(item) |
|
|
|
this.showCar = false |
|
|
|
this.form.car = item |
|
|
|
this.form.trainType = item |
|
|
|
}, |
|
|
|
showCarClick() { |
|
|
@ -570,6 +562,13 @@ |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
async getSchoolDetailFn() { |
|
|
|
const {data: res} = await getSchoolDetail({id: this.form.schoolId}) |
|
|
|
this.columnsCar = [res.businessScope.split(',')] |
|
|
|
console.log('驾校id') |
|
|
|
console.log(res.id) |
|
|
|
this.schoolClassFn() |
|
|
|
}, |
|
|
|
changeVal(val) { |
|
|
|
console.log(val) |
|
|
|
}, |
|
|
|