From 1e9c2bd06ab6851ed85b883c62cb7d74e012e2b2 Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期五, 29 三月 2024 15:10:20 +0800 Subject: [PATCH] 答题器bug修改,安装my-html插件 --- packageBookService/pages/bookServices/list/index.js | 34 ++++++++++++++++++++++++++-------- 1 files changed, 26 insertions(+), 8 deletions(-) diff --git a/packageBookService/pages/bookServices/list/index.js b/packageBookService/pages/bookServices/list/index.js index 5cd1be5..a2bf820 100644 --- a/packageBookService/pages/bookServices/list/index.js +++ b/packageBookService/pages/bookServices/list/index.js @@ -53,6 +53,7 @@ loading: false, noData: false, showDropdown: false, + isRequesting: false, }, /** * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 @@ -143,11 +144,13 @@ onReachBottom(e) { const flag = this.data.bookList.length < this.data.pageCount.total if (flag) { - this.setData({ - isMore: true, - "pageCount.page": this.data.pageCount.page + 1 - }) - this.getBookList(this.data.path) + if (!this.data.isRequesting) { + this.setData({ + isMore: true, + "pageCount.page": this.data.pageCount.page + 1 + }) + this.getBookList(this.data.path) + } } else { this.setData({ isMore: true, @@ -243,7 +246,7 @@ refCodes: [type], }; app.MG.store.getProductTypeField(query).then((res) => { - array = JSON.parse(res[0].config).option; + array = JSON.parse(res[0].config).option.filter(item => item.value == this.data.assortCheck.code); for (let index = 0; index < array.length; index++) { const element = array[index]; if (element.child) { @@ -281,9 +284,13 @@ }, // 鑾峰彇鍥句功鍒楄〃 getBookList(path) { + if (this.data.isRequesting) { + return false; + } this.setData({ loading: true, - noData: false + noData: false, + isRequesting: true }) let sort; let pathObj = {}; @@ -342,12 +349,23 @@ bookList: res.datas, enable: false, "pageCount.total": res.total, - loading: false + loading: false, + isRequesting: false }); if (!res.datas.length) { this.setData({ noData: true, }) + if (!this.data.pathList.length) { + // 鏈�夋嫨浜岀骇鍒嗙被锛屼笖鏃犲浘涔� + this.setData({ + disabledSecondList: true + }) + } else { + this.setData({ + disabledSecondList: false + }) + } } }); }, -- Gitblit v1.9.1