litian
2024-07-10 81c23f9c2f5bdfbe962d0b19a5a80ea7c12f043d
pages/study/index.js
@@ -36,22 +36,7 @@
   */
  onLoad() {
    // 检查登录状态
    const token = wx.getStorageSync(app.config.tokenKey)
    if (!token) {
      loginInfo(app, (data) => {
        if (data) {
          this.getUserInfo()
          this.getStaticsSum();
          this.getDataList(false);
        }
      })
    } else {
      this.getUserInfo()
      this.getStaticsSum();
      this.getDataList(false);
    }
  },
@@ -70,6 +55,21 @@
      this.getTabBar().setData({
        active: 2
      })
    }
    const token = wx.getStorageSync(app.config.tokenKey)
    if (!token) {
      loginInfo(app, (data) => {
        if (data) {
          this.getUserInfo()
          this.getStaticsSum();
          this.getDataList(false);
        }
      })
    } else {
      this.getUserInfo()
      this.getStaticsSum();
      this.getDataList(false);
    }
  },
@@ -171,6 +171,7 @@
          })
        } else {
          this.setData({
            list: [],
            skeletonLoding: false,
            loading: false
          })