xiaojincai 4 years ago
parent
commit
0cb78313ab
2 changed files with 3 additions and 3 deletions
  1. 1 1
      pages/onlinePost/onlinePost.js
  2. 2 2
      pages/post/post.js

+ 1 - 1
pages/onlinePost/onlinePost.js

@@ -45,7 +45,7 @@ Page({
     console.log(e)
     let id = e.currentTarget.dataset.id, name = e.currentTarget.dataset.name
     wx.navigateTo({
-      url: '../post/post?type=1&&s_id='+id,
+      url: '../post/post?type=1&&s_id='+id+'&&s_name='+name,
     })
   },
   /**

+ 2 - 2
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_id,
+            url: host + '/api/wx/class/list?subject_item0=' + options.s_name,
             method: 'GET',
             success: res => {
               // 过滤分类
@@ -117,7 +117,7 @@ Page({
                 }
                 //获取班级列表
                 wx.request({
-                  url: host + '/api/wx/class/list?subject_item0=' + list[0].id,
+                  url: host + '/api/wx/class/list?subject_item0=' + list[0].name,
                   method: 'GET',
                   success: res => {
                     let classes = res.data.data, class_=0