zs hace 1 año
padre
commit
0e6a609284
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      src/views/platActivi/act/parts/goods/goodsDetail.vue

+ 2 - 0
src/views/platActivi/act/parts/goods/goodsDetail.vue

@@ -67,6 +67,8 @@ export default {
     ...mapActions(['query', 'fetch', 'create', 'update', 'delete']),
     // 查询
     async search({ skip = 0, limit = this.$limit, ...info } = {}) {
+      // 判断是否是个人店铺查询
+      if (this.user.role.code == 'shopAdmin') info.shop = this.user.shop._id || this.user.shop.id;
       if (this.goods) info.name = this.goods;
       let res = await this.gQuery({ skip, limit, ...info });
       if (this.$checkRes(res)) {