|
@@ -31,7 +31,9 @@ Page({
|
|
|
type:0,
|
|
|
device_cats:[],
|
|
|
dev:[],
|
|
|
- show_dev:false
|
|
|
+ show_dev:false,
|
|
|
+ subject_item0:"",
|
|
|
+ selectClass:false
|
|
|
},
|
|
|
|
|
|
/**
|
|
@@ -39,7 +41,9 @@ Page({
|
|
|
*/
|
|
|
onLoad: function (options) {
|
|
|
this.setData({
|
|
|
- type: options.type
|
|
|
+ type: options.type,
|
|
|
+ subject_item0:options.s_name,
|
|
|
+ selectClass:options.s_name.indexOf("特种")!=-1?false:true
|
|
|
})
|
|
|
var sub_list=[],user={}
|
|
|
//获取用户信息
|
|
@@ -347,7 +351,7 @@ Page({
|
|
|
}
|
|
|
// console.log(this.data.class_)
|
|
|
// console.log(this.data.z_type)
|
|
|
- if (this.data.classList.length > 0 && this.data.class_<0) {
|
|
|
+ if (this.data.classList.length > 0 && this.data.class_<0 && this.selectClass) {
|
|
|
wx.showToast({
|
|
|
title: '请选择班级',
|
|
|
icon: 'none',
|
|
@@ -357,7 +361,7 @@ Page({
|
|
|
}
|
|
|
formData.subject_item = data.z_type + "|" + data.categoryArray[data.category].name + "|" + data.subjectArray[data.subject].name
|
|
|
formData.subject_id = data.subjectArray[data.subject].id
|
|
|
- if (this.data.classList.length > 0){
|
|
|
+ if (this.data.classList.length > 0 && this.selectClass){
|
|
|
formData.class_id = data.classList[data.class_].id
|
|
|
}else{
|
|
|
formData.class_id = 0
|