|
@@ -28,7 +28,6 @@
|
|
|
<script>
|
|
|
const _ = require('lodash');
|
|
|
import { mapState, mapGetters, createNamespacedHelpers } from 'vuex';
|
|
|
-const { mapActions: selfShop } = createNamespacedHelpers('selfShop');
|
|
|
const { mapActions: goods } = createNamespacedHelpers('goods');
|
|
|
const { mapActions: dictData } = createNamespacedHelpers('dictData');
|
|
|
export default {
|
|
@@ -61,11 +60,10 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
...dictData({ getDict: 'query' }),
|
|
|
- ...selfShop(['getInfo', 'getGoods', 'goodsCreate']),
|
|
|
- ...goods(['delete', 'fetch', 'update', 'create']),
|
|
|
+ ...goods(['query', 'delete', 'fetch', 'update', 'create']),
|
|
|
async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
|
let condition = _.cloneDeep(this.searchForm);
|
|
|
- let res = await this.getGoods({ skip, limit, ...condition, ...info });
|
|
|
+ let res = await this.query({ skip, limit, ...condition, ...info });
|
|
|
if (this.$checkRes(res)) {
|
|
|
this.$set(this, 'list', res.data);
|
|
|
this.$set(this, 'total', res.total);
|