tanyanfei 4 anni fa
parent
commit
460bb1957d
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  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