From 09527301a5129aa8e99425e1c6560842a0fa46e9 Mon Sep 17 00:00:00 2001 From: yvan.ni Date: Wed, 11 Dec 2024 17:11:45 +0800 Subject: [PATCH] 自定义模板商品分组在加载更多时候的bug优化 --- pages/template/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pages/template/index.js b/pages/template/index.js index 28253c6..0a1d914 100644 --- a/pages/template/index.js +++ b/pages/template/index.js @@ -346,6 +346,7 @@ Page({ }, //---加载更多是靠这个函数---- onReachBottom: function () { + var th=this; if (getApp().globalData.func_list) { for (let i in getApp().globalData.func_list) { let item = getApp().globalData.func_list[i]; @@ -357,7 +358,8 @@ Page({ let goodsGroupArr = this.data.goodsGroupArr if (this.data.isTemplate && goodsGroupArr.length > 0) { goodsGroupArr.map(item => { - this[item].automore() + if(th[item]) + th[item].automore() }) } }, -- libgit2 0.21.4