Kaynağa Gözat

fix: bugFixed loading

wangyuan 2 yıl önce
ebeveyn
işleme
1443353ff3
2 değiştirilmiş dosya ile 9 ekleme ve 3 silme
  1. 7 1
      pages/index/index.js
  2. 2 2
      pages/myAppointment/myAppointment.js

+ 7 - 1
pages/index/index.js

@@ -295,10 +295,12 @@ Page({
         showCancel: false
       })
     })
+    wx.showNavigationBarLoading()
     appointmentList({
       status: 1,
       currentPage: 1
     }).then(res => {
+      wx.hideNavigationBarLoading()
       if (res.data.vos.length !== 0) {
         const response = res.data.vos || []
         response.map(item => {
@@ -315,15 +317,19 @@ Page({
           topBarObj: null
         })
       }
+    }).catch(e => {
+      wx.hideNavigationBarLoading()
     })
     // 获取图片资源
     appGetConfigImg({
       'imgType': '5'
     }).then(configRes => {
-      console.log(configRes.data[0].imgUrl, 'configRes')
+      wx.hideNavigationBarLoading()
       that.setData({
         homepageImg: configRes.data[0].imgUrl
       })
+    }).catch(e => {
+      wx.hideNavigationBarLoading()
     })
   },
 

+ 2 - 2
pages/myAppointment/myAppointment.js

@@ -27,7 +27,7 @@ Page({
 
   /**
    * 获取预约列表 
-   * 状态 空代表查询全部 ,1:申请(待服务) 2.取消(不做参数) 3.完成
+   * 状态 空代表查询全部 1 待服务,2,3 已取消  4: 已完成 5.超时
    */
   getAppointmentList() {
     var status = ''
@@ -36,7 +36,7 @@ Page({
     } else if (this.data.navItemActive == '1') {
       status = 1
     } else if (this.data.navItemActive == '2') {
-      status = 3
+      status = 4
     }
     var data = {
       status: status,