فهرست منبع

修改商品查询

YY 2 سال پیش
والد
کامیت
926f84338a
1فایلهای تغییر یافته به همراه2 افزوده شده و 8 حذف شده
  1. 2 8
      src/views/selfShop/goods/index.vue

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

@@ -52,7 +52,6 @@
 const _ = require('lodash');
 import methodsUtil from '@/util/opera';
 import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: selfShop } = createNamespacedHelpers('selfShop');
 const { mapActions: goods } = createNamespacedHelpers('goods');
 const { mapActions: goodsTags } = createNamespacedHelpers('goodsTags');
 const { mapActions: dictData } = createNamespacedHelpers('dictData');
@@ -109,9 +108,7 @@ export default {
       props: { multiple: true, label: 'label', value: 'code' },
       // 活动标签
       act_tagsList: [],
-
       goodsStatusList: [],
-      shop: {},
     };
   },
   created() {
@@ -122,13 +119,12 @@ export default {
     ...dictData({ getDict: 'query' }),
     ...actTags({ actQuery: 'query' }),
     ...goodsTags(['tree']),
-    ...selfShop(['getInfo', 'getGoods', 'goodsCreate']),
-    ...goods(['delete', 'fetch', 'update', 'create']),
+    ...goods(['query', 'delete', 'fetch', 'update', 'create']),
     ...methodsUtil,
     async search({ skip = 0, limit = this.limit, ...others } = {}) {
       let query = { skip, limit, ...others, shop: this.user.shop.id };
       if (Object.keys(this.searchInfo).length > 0) query = { ...query, ...this.searchInfo };
-      const res = await this.getGoods(query);
+      const res = await this.query(query);
       if (this.$checkRes(res)) {
         this.$set(this, `list`, res.data);
         this.$set(this, `total`, res.total);
@@ -146,8 +142,6 @@ export default {
       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.getInfo();
-      if (this.$checkRes(res)) this.$set(this, `shop`, res.data);
       res = await this.actQuery();
       if (this.$checkRes(res)) this.$set(this, `act_tagsList`, res.data);
     },