#
whycq
2022-12-16 a9dc80440c97b2415affef79e80a6c54b8d03150
pages/business/cstmr/csmtr.vue
@@ -25,14 +25,18 @@
         }
      },
      onReady() {
         this.baseUrl = uni.getStorageSync('baseUrl')
         this.getCsmtr()
         // this.getCsmtr()
      },
      // 新建按钮事件
      onNavigationBarButtonTap(e) {
         uni.navigateTo({
            url:'/pages/business/cstmr/addCsmtr',
         })
      },
      onShow() {
         this.baseUrl = uni.getStorageSync('baseUrl')
         this.getCsmtr()
      },
      methods: {
         getCsmtr() {
@@ -48,8 +52,16 @@
                  var res = result.data
                  if (res.code === 200) {
                     that.csmtrList = res.data.records
                  } else if (res.code === 403) {
                     uni.showToast({title: res.msg, icon: "none", position: 'top'})
                     setTimeout(() => {
                        uni.reLaunch({
                           url: '../../login/login'
                        });
                     }, 1000);
                  } else {
                     uni.showToast({title: res.msg, icon: "none",position: 'top'})
                  }
                  console.log(that.csmtrList);
               }
            })
         }