litian
2024-04-03 b70e26c7be40ad4ccb971f3bbc0fbcb32fe82df1
学习
1个文件已修改
30 ■■■■ 已修改文件
pages/study/index.js 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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);
    }
  },
@@ -71,6 +56,21 @@
        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);
    }
  },
  getUserInfo() {