Explorar el Código

修改下拉刷新

tangning hace 3 años
padre
commit
3b22957113
Se han modificado 1 ficheros con 7 adiciones y 2 borrados
  1. 7 2
      pages/roomManger/roomManger.js

+ 7 - 2
pages/roomManger/roomManger.js

@@ -277,11 +277,16 @@ Page({
    * 页面相关事件处理函数--监听用户下拉动作
    * 页面相关事件处理函数--监听用户下拉动作
    */
    */
   onPullDownRefresh: function () {
   onPullDownRefresh: function () {
+    const that = this
     this.setData({
     this.setData({
-      'fetcherData.page': 1,
+      hasData: true,
+      'fetcherData': {
+        ...that.data.fetcherData,
+        page:1,
+      },
       "roomList":[],
       "roomList":[],
     }, () => {
     }, () => {
-      this.getRoomList()
+      that.getRoomList()
       wx.stopPullDownRefresh()
       wx.stopPullDownRefresh()
     })
     })
   },
   },