|
@@ -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);
|