闫增涛
2024-03-21 c4e651ac030ef5fe8870f6974fcc4658d42986c6
packageBookService/pages/bookServices/detail/components/note/note.js
@@ -32,6 +32,7 @@
    noteList: [],
    activeValues: 0,
    loading: false,
    noList: false,
  },
  /**
   * 组件的方法列表
@@ -136,9 +137,10 @@
    },
    // 获取笔记列表
    async getNoteList() {
      // this.setData({
      //   loading: true
      // })
      this.setData({
        loading: true,
        noList: false
      })
      console.log(this.properties.bookInfo.id, 'this.properties.bookInfo.id');
      let topicId
      await app.MG.ugc
@@ -169,6 +171,13 @@
        topicIdOrRefCode: topicId + ''
      }
      await app.MG.ugc.getTopicMessageList(query).then((res) => {
        if (!res.datas.length) {
          return this.setData({
            noList: true,
            loading: false,
            noteList: res.datas,
          })
        }
        // notePage.value.total = res.totalSize
        res.datas.forEach((item) => {
          item.compliceHover = false
@@ -180,7 +189,6 @@
          noteList: res.datas,
          loading: false
        })
        console.log('笔记列表', res.datas);
      })
    },
    // 新建笔记接口