Ver Fonte

修改会员管理

zs há 1 ano atrás
pai
commit
eeaf6bc27a
1 ficheiros alterados com 2 adições e 1 exclusões
  1. 2 1
      src/views/platmanag/leader/index.vue

+ 2 - 1
src/views/platmanag/leader/index.vue

@@ -111,6 +111,8 @@ export default {
     async search({ skip = 0, limit = this.$limit, ...others } = {}) {
       let query = { skip, limit, ...others };
       if (Object.keys(this.searchInfo).length > 0) query = { ...query, ...this.searchInfo };
+      // 判断是否是个人店铺查询
+      if (this.user.role.code == 'shopAdmin') query.shop = this.user.shop._id || this.user.shop.id;
       const res = await this.query(query);
       if (this.$checkRes(res)) {
         this.$set(this, `list`, res.data);
@@ -129,7 +131,6 @@ export default {
       if (this.$checkRes(res)) this.$set(this, `form`, res.data);
       this.dialog = { title: '信息管理', show: true, type: '1' };
     },
-
     // 保存
     async toSave({ data }) {
       let res = await this.update(data);