@@ -52,7 +52,9 @@ Page({
async onLoad(options) {
this.fetchLunboList()
await this.fetchProductCategoryList()
- this.fetchOrderList()
+ if (this.data.searchForm.category_id) {
+ this.fetchOrderList()
+ }
},
/**
@@ -148,7 +150,7 @@ Page({
this.setData({
categoryList: temp,
- 'searchForm.category_id': temp[0].id
+ 'searchForm.category_id': temp.length > 0 ? temp[0].id : ''
})
} else {
wx.showToast({