小程序 生活物资下拉刷新也刷新分类
This commit is contained in:
		@@ -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(() => {
 | 
			
		||||
        // })
 | 
			
		||||
      })
 | 
			
		||||
    })();
 | 
			
		||||
  }
 | 
			
		||||
})
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user