|
@ -11,15 +11,18 @@ |
|
|
<view>{{e.name || '-'}}</view> |
|
|
<view>{{e.name || '-'}}</view> |
|
|
<view>{{e.kind || '-'}}</view> |
|
|
<view>{{e.kind || '-'}}</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="ci-lines"> |
|
|
|
|
|
|
|
|
<view class="ci-lines" v-if="getCourseType(e.kind) === 0"> |
|
|
<text>班级数: </text>{{e.class_number || 0}} |
|
|
<text>班级数: </text>{{e.class_number || 0}} |
|
|
</view> |
|
|
</view> |
|
|
<view class="ci-lines"> |
|
|
<view class="ci-lines"> |
|
|
<text>学员人数: </text>{{e.join_person_number || 0}} |
|
|
<text>学员人数: </text>{{e.join_person_number || 0}} |
|
|
</view> |
|
|
</view> |
|
|
<view class="cl-btns"> |
|
|
<view class="cl-btns"> |
|
|
<view>预约上课</view> |
|
|
|
|
|
<view>班级</view> |
|
|
|
|
|
|
|
|
<block v-if="getCourseType(e.kind) === 0"> |
|
|
|
|
|
<view hover-class="hover-active" @click="orderCourseBtn">预约上课</view> |
|
|
|
|
|
<view hover-class="hover-active" @click="toClass(e)">班级</view> |
|
|
|
|
|
</block> |
|
|
|
|
|
<view hover-class="hover-active" v-if="getCourseType(e.kind) === 1">详情</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="cl-ex-item" v-if="curTabIdx == 1"> |
|
|
<view class="cl-ex-item" v-if="curTabIdx == 1"> |
|
@ -35,14 +38,14 @@ |
|
|
</block> |
|
|
</block> |
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
<view class="cl-mask" v-if="false"> |
|
|
|
|
|
|
|
|
<view class="cl-mask" v-if="isOrderCourseModal"> |
|
|
<view class="cl-modal"> |
|
|
<view class="cl-modal"> |
|
|
<view class="cm-line"> |
|
|
<view class="cm-line"> |
|
|
<view>选择班级</view> |
|
|
<view>选择班级</view> |
|
|
<picker> |
|
|
<picker> |
|
|
<view class="cl-frame"> |
|
|
<view class="cl-frame"> |
|
|
<input disabled placeholder="请选择班级" /> |
|
|
<input disabled placeholder="请选择班级" /> |
|
|
<image></image> |
|
|
|
|
|
|
|
|
<image mode="aspectFit" src="/static/images/arrow_cb2.png"></image> |
|
|
</view> |
|
|
</view> |
|
|
</picker> |
|
|
</picker> |
|
|
</view> |
|
|
</view> |
|
@ -51,7 +54,7 @@ |
|
|
<picker mode="date"> |
|
|
<picker mode="date"> |
|
|
<view class="cl-frame"> |
|
|
<view class="cl-frame"> |
|
|
<input disabled placeholder="请选择日期" /> |
|
|
<input disabled placeholder="请选择日期" /> |
|
|
<image></image> |
|
|
|
|
|
|
|
|
<image mode="aspectFit" src="/static/images/arrow_cb2.png"></image> |
|
|
</view> |
|
|
</view> |
|
|
</picker> |
|
|
</picker> |
|
|
</view> |
|
|
</view> |
|
@ -61,21 +64,21 @@ |
|
|
<picker mode="time"> |
|
|
<picker mode="time"> |
|
|
<view class="cc-frame"> |
|
|
<view class="cc-frame"> |
|
|
<input disabled placeholder="请选择时间"/> |
|
|
<input disabled placeholder="请选择时间"/> |
|
|
<image></image> |
|
|
|
|
|
|
|
|
<image mode="aspectFit" src="/static/images/arrow_cb2.png"></image> |
|
|
</view> |
|
|
</view> |
|
|
</picker> |
|
|
</picker> |
|
|
<view>-</view> |
|
|
<view>-</view> |
|
|
<picker mode="time"> |
|
|
<picker mode="time"> |
|
|
<view class="cc-frame"> |
|
|
<view class="cc-frame"> |
|
|
<input disabled placeholder="请选择时间"/> |
|
|
<input disabled placeholder="请选择时间"/> |
|
|
<image></image> |
|
|
|
|
|
|
|
|
<image mode="aspectFit" src="/static/images/arrow_cb2.png"></image> |
|
|
</view> |
|
|
</view> |
|
|
</picker> |
|
|
</picker> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="cm-btns"> |
|
|
<view class="cm-btns"> |
|
|
<view hover-class="hover-active">取消</view> |
|
|
|
|
|
<view hover-class="hover-active">确定</view> |
|
|
|
|
|
|
|
|
<view hover-class="hover-active" @click="isOrderCourseModal = false">取消</view> |
|
|
|
|
|
<view hover-class="hover-active" @click="isOrderCourseModal = false">确定</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
@ -87,17 +90,37 @@ |
|
|
import { API } from '../../../js/api' |
|
|
import { API } from '../../../js/api' |
|
|
import { servers } from '../../../js/server' |
|
|
import { servers } from '../../../js/server' |
|
|
import util from '../../../utils/util' |
|
|
import util from '../../../utils/util' |
|
|
|
|
|
import { mapState } from 'vuex'; |
|
|
export default { |
|
|
export default { |
|
|
|
|
|
computed: { |
|
|
|
|
|
...mapState([ 'storeInfo' ]), |
|
|
|
|
|
}, |
|
|
data(){ |
|
|
data(){ |
|
|
return { |
|
|
return { |
|
|
curTabIdx: 0, |
|
|
curTabIdx: 0, |
|
|
courseList: [], |
|
|
courseList: [], |
|
|
|
|
|
isOrderCourseModal: false, |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onLoad(){ |
|
|
onLoad(){ |
|
|
this.getCourseList({}); |
|
|
this.getCourseList({}); |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
toClass(e){ |
|
|
|
|
|
console.warn(e); |
|
|
|
|
|
let _query = { |
|
|
|
|
|
course_id: e.id, |
|
|
|
|
|
course_name: e.name, |
|
|
|
|
|
} |
|
|
|
|
|
util.routeTo(`/pages/course/class_list/class_list?query=${util.jsonStr(_query)}`, 'nT'); |
|
|
|
|
|
}, |
|
|
|
|
|
orderCourseBtn(){ |
|
|
|
|
|
this.isOrderCourseModal = true; |
|
|
|
|
|
}, |
|
|
|
|
|
// 课程类型映射 成班课(0)/私教课(1); |
|
|
|
|
|
getCourseType(type = ''){ |
|
|
|
|
|
return ['成班课', '私教课'].findIndex(e=>e===type); |
|
|
|
|
|
}, |
|
|
tabChange: util.debounce(function(i){ |
|
|
tabChange: util.debounce(function(i){ |
|
|
this.curTabIdx = i; |
|
|
this.curTabIdx = i; |
|
|
this.courseList = []; |
|
|
this.courseList = []; |
|
@ -109,10 +132,12 @@ export default { |
|
|
is_experience_class = 0, |
|
|
is_experience_class = 0, |
|
|
kind = '', |
|
|
kind = '', |
|
|
}){ |
|
|
}){ |
|
|
|
|
|
let { storeInfo } = this; |
|
|
util.showLoad(); |
|
|
util.showLoad(); |
|
|
servers.get({ |
|
|
servers.get({ |
|
|
url: API.course.courseList, |
|
|
url: API.course.courseList, |
|
|
data: { |
|
|
data: { |
|
|
|
|
|
stadium_id: storeInfo.id, |
|
|
is_experience_class, |
|
|
is_experience_class, |
|
|
kind, |
|
|
kind, |
|
|
}, |
|
|
}, |
|
@ -311,7 +336,6 @@ export default { |
|
|
flex-shrink: 0; |
|
|
flex-shrink: 0; |
|
|
width: 28upx; |
|
|
width: 28upx; |
|
|
height: 28upx; |
|
|
height: 28upx; |
|
|
background-color: skyblue; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
.cl-content{ |
|
|
.cl-content{ |
|
@ -340,7 +364,6 @@ export default { |
|
|
flex-shrink: 0; |
|
|
flex-shrink: 0; |
|
|
width: 28upx; |
|
|
width: 28upx; |
|
|
height: 28upx; |
|
|
height: 28upx; |
|
|
background-color: skyblue; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|