tanyanfei %!s(int64=4) %!d(string=hai) anos
pai
achega
460bb1957d
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      pages/post/post.js

+ 2 - 2
pages/post/post.js

@@ -357,10 +357,10 @@ 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 (formData.subject_item.indexOf("特种作业人员")==-1){
+      if (this.data.classList.length > 0){
         formData.class_id = data.classList[data.class_].id
       }else{
-        formData.class_id = data.classList[data.class_].id
+        formData.class_id = 0
       }
     }else{
       formData.class_id = data.class_id