xiaojincai 4 anni fa
parent
commit
a03b106de3
2 ha cambiato i file con 14 aggiunte e 10 eliminazioni
  1. 11 9
      pages/post/post.js
  2. 3 1
      pages/post/post.wxml

+ 11 - 9
pages/post/post.js

@@ -69,7 +69,7 @@ Page({
         if (options.type == 1){
           //班级列表
           wx.request({
-            url: host + '/api/wx/class/list?subject_item0=' + options.s_name,
+            url: host + '/api/wx/class/list?signup=1&subject_item0=' + options.s_name,
             method: 'GET',
             success: res => {
               // 过滤分类
@@ -274,14 +274,16 @@ Page({
         })
         return false
       }
-      // if (this.data.class_ == -1) {
-      //   wx.showToast({
-      //     title: '请选择班级',
-      //     icon: 'none',
-      //     duration: 2000
-      //   })
-      //   return false
-      // }
+      console.log(this.data.class_)
+      console.log(this.data.z_type)
+      if (this.data.class_ == -1&&this.data.z_type != '特种作业人员') {
+        wx.showToast({
+          title: '请选择班级',
+          icon: 'none',
+          duration: 2000
+        })
+        return false
+      }
       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){

+ 3 - 1
pages/post/post.wxml

@@ -86,6 +86,7 @@
         </view>
       </picker>
       <image src="../../images/arrow-bottom.png" mode="widthFix"></image>
+      <view wx:if="{{class_>=0}}" class="intro">{{classList[class_].remark}}</view>
   </view>
 
   <!-- <view class="item">
@@ -217,7 +218,7 @@
   </view>
 
   <view class="item" wx:if="{{!class_id&&z_type!='特种作业人员'}}">
-      <label>班级</label>
+      <label>班级111</label>
       <picker  data-name='class_'  bindchange="pickerChange" value="{{class_}}" range="{{classList}}" range-key="name">
         <view class="picker">
         <text wx:if="{{class_<0}}">请选择</text>
@@ -225,6 +226,7 @@
         </view>
       </picker>
       <image src="../../images/arrow-bottom.png" mode="widthFix"></image>
+      <view wx:if="{{class_>=0}}" class="intro">{{classList[class_].remark}}</view>
   </view>
 
   <!-- <view class="item">