Ver Fonte

更新 首页提示

wzh há 3 anos atrás
pai
commit
7682f7556f
1 ficheiros alterados com 16 adições e 3 exclusões
  1. 16 3
      miniprogram/pages/index/index.js

+ 16 - 3
miniprogram/pages/index/index.js

@@ -13,9 +13,22 @@ Page({
     let res = await postApi('/index', {
       loginAccountId: wx.getStorageSync('loginAccountId'),
     })
-    this.setData({
-      indexInfo: res.data.result
-    })
+    if (res.data.status == 0) {
+      this.setData({
+        indexInfo: res.data.result
+      })
+    } else if (res.data.status == 1) {
+      wx.showToast({
+        title: '暂无数据',
+        icon: "error"
+      })
+    } else if (res.data.status == 2) {
+      wx.showToast({
+        title: '尚未登录',
+        icon: "error"
+      })
+    }
+
   },
   forbidTouchMove() {