|
@@ -34,9 +34,11 @@
|
|
|
<!-- 性别 -->
|
|
|
<!-- <u-action-sheet :list="sexList" v-model="sexShow" @click="setSex"></u-action-sheet> -->
|
|
|
<!-- 班级 -->
|
|
|
- <u-action-sheet :list="classList" v-model="classShow" @click="HandleChooseClassClick"></u-action-sheet>
|
|
|
+ <!-- <u-action-sheet :list="classList" v-model="classShow" @click="HandleChooseClassClick"></u-action-sheet> -->
|
|
|
+ <u-picker v-model="classShow" mode="selector" :range="classList" range-key="text" @confirm="HandleChooseClassClick"></u-picker>
|
|
|
<!-- 教练 -->
|
|
|
- <u-action-sheet :list="coachList" v-model="coachShow" @click="HandleChooseCoachClick"></u-action-sheet>
|
|
|
+ <!-- <u-action-sheet :list="coachList" v-model="coachShow" @click="HandleChooseCoachClick"></u-action-sheet> -->
|
|
|
+ <u-picker v-model="coachShow" mode="selector" :range="coachList" range-key="text" @confirm="HandleChooseCoachClick"></u-picker>
|
|
|
<!-- 学生生日 -->
|
|
|
<u-picker v-model="birthdayShow" mode="time" :params="params" @confirm="setBirthday"></u-picker>
|
|
|
<!-- 体验日期 -->
|
|
@@ -105,8 +107,8 @@
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
const item = JSON.parse(decodeURIComponent(options.item));
|
|
|
- this.venueId = options.venueId
|
|
|
- this.subscribelForm = { ...item, id: item.classId, sex:item.sex == 1 ? '男' : '女', coachName: item.coachId != -1 ? item.coachName : ''}
|
|
|
+ this.venueId = item.venueId
|
|
|
+ this.subscribelForm = { ...item, classId: item.classId, sex:item.sex == 1 ? '男' : '女', coachName: item.coachId != -1 ? item.coachName : ''}
|
|
|
},
|
|
|
onReady() {
|
|
|
this.$refs.subscribelForm.setRules(this.rules);
|
|
@@ -115,11 +117,12 @@
|
|
|
// 显示班级列表
|
|
|
handleClassInfoShow() {
|
|
|
this.classShow = true
|
|
|
- this.getClassFromVenue(this.venueId)
|
|
|
+ this.getClassFromVenue()
|
|
|
+ console.log(this.venueId);
|
|
|
},
|
|
|
// 获取班级列表
|
|
|
- getClassFromVenue(id) {
|
|
|
- NET.request(API.getClassListByVenueId, {id}, 'POST').then(res => {
|
|
|
+ getClassFromVenue() {
|
|
|
+ NET.request(API.getClassListByVenueId, { id:this.venueId }, 'POST').then(res => {
|
|
|
if(res.status === 10000) {
|
|
|
this.classList = res.data.map( item => { return { id: item.id, text: item.name } })
|
|
|
this.subscribelForm.coachId = ''
|
|
@@ -139,9 +142,10 @@
|
|
|
},
|
|
|
// 显示教练列表
|
|
|
handleCoachListShow() {
|
|
|
+ this.coachList = []
|
|
|
this.coachShow = true
|
|
|
// 教练列表
|
|
|
- NET.request(API.getCoachList, {venueId: this.venueId, classId: this.subscribelForm.id }, 'POST').then(res=> {
|
|
|
+ NET.request(API.getCoachList, {venueId: this.venueId, classId: this.subscribelForm.classId }, 'POST').then(res=> {
|
|
|
if(res.status == 10000) {
|
|
|
this.coachList = res.data.map( item => { return { id: item.coachId, text: item.nickname }})
|
|
|
} else {
|