Explorar el Código

修改标签店铺筛选

zs hace 1 año
padre
commit
5f92920f4b
Se han modificado 2 ficheros con 6 adiciones y 3 borrados
  1. 1 1
      src/store/module/system/goodsTags.js
  2. 5 2
      src/views/selfShop/goods/index.vue

+ 1 - 1
src/store/module/system/goodsTags.js

@@ -36,7 +36,7 @@ const actions = {
     return res;
   },
   async tree({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.url}/tree`);
+    const res = await this.$axios.$get(`${api.url}/tree`, payload);
     return res;
   },
 };

+ 5 - 2
src/views/selfShop/goods/index.vue

@@ -317,13 +317,16 @@ export default {
     // 查询其他信息
     async searchOthers() {
       // 商品分类
-      let res = await this.tree();
+      const data = {};
+      // 判断是否是个人店铺查询
+      if (this.user.role.code == 'shopAdmin') data.shop = this.user.shop._id || this.user.shop.id;
+      let res = await this.tree(data);
       if (this.$checkRes(res)) this.$set(this, `tagsList`, res.data);
       // 商品状态
       res = await this.getDict({ code: 'goods_status' });
       if (this.$checkRes(res)) this.$set(this, `goodsStatusList`, res.data);
       // 活动标签
-      res = await this.actQuery();
+      res = await this.actQuery(data);
       if (this.$checkRes(res)) this.$set(this, `act_tagsList`, res.data);
       // 是否返现
       res = await this.getDict({ code: 'use' });