|
@@ -165,6 +165,26 @@ Page({
|
|
})
|
|
})
|
|
|
|
|
|
},
|
|
},
|
|
|
|
+ getClass(){
|
|
|
|
+ console.log()
|
|
|
|
+ let category = this.data.category>=0 ? this.data.categoryArray[this.data.category].name:'',
|
|
|
|
+ subject = this.data.subject >= 0 ? this.data.subjectArray[this.data.subject].name : ''
|
|
|
|
+ wx.request({
|
|
|
|
+ url: host + '/api/wx/class/list?signup=1',
|
|
|
|
+ method: 'GET',
|
|
|
|
+ data:{
|
|
|
|
+ subject_item0: this.data.z_type,
|
|
|
|
+ subject_item1: category,
|
|
|
|
+ subject_item2: subject
|
|
|
|
+ },
|
|
|
|
+ success: res => {
|
|
|
|
+ // 过滤分类
|
|
|
|
+ this.setData({
|
|
|
|
+ classList: res.data.data
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
sure:function(){
|
|
sure:function(){
|
|
if(this.data.dev==''){
|
|
if(this.data.dev==''){
|
|
wx.showToast({
|
|
wx.showToast({
|
|
@@ -221,12 +241,14 @@ Page({
|
|
dev: ''
|
|
dev: ''
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+ this.getClass()
|
|
};
|
|
};
|
|
if (e.target.dataset.name == 'subject') {
|
|
if (e.target.dataset.name == 'subject') {
|
|
this.setData({
|
|
this.setData({
|
|
subject: e.detail.value,
|
|
subject: e.detail.value,
|
|
train: -1
|
|
train: -1
|
|
})
|
|
})
|
|
|
|
+ this.getClass()
|
|
};
|
|
};
|
|
if (e.target.dataset.name == 'time') {
|
|
if (e.target.dataset.name == 'time') {
|
|
this.setData({
|
|
this.setData({
|
|
@@ -318,7 +340,7 @@ Page({
|
|
}
|
|
}
|
|
// console.log(this.data.class_)
|
|
// console.log(this.data.class_)
|
|
// console.log(this.data.z_type)
|
|
// console.log(this.data.z_type)
|
|
- if (this.data.classList.length>0) {
|
|
|
|
|
|
+ if (this.data.classList.length > 0 && this.data.class_<0) {
|
|
wx.showToast({
|
|
wx.showToast({
|
|
title: '请选择班级',
|
|
title: '请选择班级',
|
|
icon: 'none',
|
|
icon: 'none',
|