xuxy
2024-08-12 3ae92c6fa55922af770ebc8e9355c5c0255e69cd
sub_pages/customer/shop/shop-trade.vue
@@ -104,47 +104,7 @@
               this.currentCategory = this.list[0] || {}
            }
         },
         async updateParamsAndSearch() {
            //todo 设置参数并查询
            await this.refreshList()
            this.$refs.popup_param.close()
         },
         openParamPop() {
            //todo 同时设置查询参数为空吧
            this.$refs.popup_param.open()
         },
         closeParamPop() {
            this.$refs.popup_param.close()
         },
         buttonSearchFlow() {
            if (this.type == 'category') {
               //根据分类名称查询
               this.$message.showLoading()
               this.$http.request('get', '/api/customer/flower/category/tree', {
                  params: {
                     name: this.query.name || ''
                  }
               }).then(res => {
                  var data = res.data
                  this.list = data || []
                  if (this.list.length > 0) {
                     this.query.categoryId = this.list[0].id || ''
                     this.currentCategory = this.list[0] || {}
                  } else {
                     this.query.categoryId = ''
                     this.currentCategory = {}
                  }
               }).finally(() => {
                  this.$message.hideLoading()
               })
            } else {
               uni.navigateTo({
                  url: '/sub_pages/customer/trade/list?' + 'supplierName=' + this.query.name
               })
            }
         },
         toDetailList(item) {
            //去商品列表页面
            console.log('toDetailList', this.supplierId)
@@ -155,6 +115,7 @@
         changeType(item) {
            this.query.categoryId = item.id || ''
            this.currentCategory = item
            //拼接二级分类,然后查询商品列表
         },