yanym 5 years ago
parent
commit
60023d9b96

+ 8 - 1
dorm-manager-wx/pages/teacher/suggestion/detail.js

@@ -44,7 +44,14 @@ Page({
         id: that.data.id,
         answer: that.data.responseVal
       }, 'post').then(res => {
-
+        wx.showToast({
+          title: '提交成功',
+        })
+        setTimeout(function() {
+          wx.navigateBack({
+
+          })
+        }, 500)
       })
     }
   },

+ 2 - 2
dorm-manager-wx/pages/teacher/suggestion/detail.wxml

@@ -14,7 +14,7 @@
   </view>
   <view class="reponse-item">
     <view class="title">回复:</view>
-    <textarea bindinput="response"></textarea>
+    <textarea bindinput="response" value="{{info.answer}}"></textarea>
   </view>
-  <view class="apply-btn" bindtap="apply" hover-class="myhover" hover-start-time="50" hover-stay-time="50">提交</view>
+  <view class="apply-btn" bindtap="apply" hover-class="myhover" hover-start-time="50" hover-stay-time="50" wx:if='{{info.newreply==false}}'>提交</view>
 </view>

+ 10 - 2
dorm-manager-wx/pages/teacher/suggestion/list.js

@@ -59,7 +59,6 @@ Page({
     that.setData({
       userInfo: userInfo
     })
-    that.getList(0);
   },
 
   /**
@@ -73,7 +72,16 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow: function() {
-
+    const that = this;
+    let type = that.data.tab;
+    if (type == 1) {
+      that.getList(0);
+    } else if (type == 3) {
+      that.getList(1);
+    } else {
+      that.getList('');
+    }
+    that.getList(0);
   },
 
   /**