From 29cadb9a1198fdaee5529e1342138cc2698ec451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E5=91=98=E5=B0=8F=E5=A2=A8?= <2291200076@qq.com> Date: Fri, 14 Apr 2023 14:02:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=20=E7=94=9F?= =?UTF-8?q?=E6=B4=BB=E7=89=A9=E8=B5=84=E4=B8=8B=E6=8B=89=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E4=B9=9F=E5=88=B7=E6=96=B0=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- weixin-miniprogram/pages/shop/shop.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/weixin-miniprogram/pages/shop/shop.js b/weixin-miniprogram/pages/shop/shop.js index 55e7d31..ff0e11c 100644 --- a/weixin-miniprogram/pages/shop/shop.js +++ b/weixin-miniprogram/pages/shop/shop.js @@ -192,5 +192,27 @@ Page({ // }) }) })(); + + + (async () => { + let goodCategoryListPromise = goodService.getGoodCategoryList() + Promise.all([ + goodCategoryListPromise, + ]).then(data => { + let goodCategoryList = data[0] + console.log("goodCategoryList", goodCategoryList) + goodCategoryList.unshift({ + id: -1, + categoryName: "全部分类", + order: 0 + }) + console.log("goodCategoryList", goodCategoryList) + this.setData({ + sidebarList: goodCategoryList, + }) + // wx.nextTick(() => { + // }) + }) + })(); } })