tanyanfei 4 年之前
父節點
當前提交
460bb1957d
共有 1 個文件被更改,包括 2 次插入2 次删除
  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