闫增涛
2025-03-31 04c7b0163caeae4ab1c5da62e301fa993101cfad
pages/bibliographyList/index.js
@@ -70,6 +70,10 @@
        });
      },
    })
    const token = wx.getStorageSync(app.config.tokenKey)
    if (token) {
      this.getUserInfo()
    }
  },
  /**
@@ -84,17 +88,7 @@
   */
  onShow() {
    // console.log(this.data.value);
    // 检查登录状态
    const token = wx.getStorageSync(app.config.tokenKey)
    if (!token) {
      loginInfo(app, (data) => {
        if (data) {
          this.getUserInfo()
        }
      })
    } else {
      this.getUserInfo()
    }
  },
  /**
@@ -128,9 +122,8 @@
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {
  },
  onShareAppMessage() {},
  onShareTimeline() {},
  // 获取登录用户身份
  getUserInfo() {
    app.MG.identity.getCurrentAppUser().then(res => {
@@ -183,7 +176,7 @@
      queryType: '*',
      paging: {
        start: '0',
        size: this.data.start * 9
        size: this.data.start * 12
      },
      coverSize: {
        width: 260
@@ -231,7 +224,7 @@
      queryType: '*',
      paging: {
        start: '0',
        size: this.data.start * 9
        size: this.data.start * 12
      },
      coverSize: {
        width: 260
@@ -275,7 +268,7 @@
      queryType: '*',
      paging: {
        start: '0',
        size: this.data.start * 9
        size: this.data.start * 12
      },
      coverSize: {
        width: 260
@@ -455,10 +448,25 @@
  mailbox(e) {
    const key = e.currentTarget.dataset.key;
    const item = e.currentTarget.dataset.item;
    this.setData({
      Md5: item.datas.freeFile.FileList[0].Md5,
      dialogBox: true
    })
    // 检查登录状态
    const token = wx.getStorageSync(app.config.tokenKey)
    if (!token) {
      loginInfo(app, (data) => {
        if (data) {
          this.getUserInfo()
          this.setData({
            Md5: item.datas.freeFile.FileList[0].Md5,
            dialogBox: true
          })
        } else {}
      })
    } else {
      this.setData({
        Md5: item.datas.freeFile.FileList[0].Md5,
        dialogBox: true
      })
    }
    // wx.scanCode({
    //   success: res => {
    //     console.log(res);