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(() => { + // }) + }) + })(); } })