Jelajahi Sumber

修改user警告

YY 2 tahun lalu
induk
melakukan
3a3b017c59

+ 2 - 2
src/store/index.js

@@ -3,7 +3,7 @@ import Vuex from 'vuex';
 import * as ustate from './module/user/state';
 import * as umutations from './module/user/mutations';
 import admin from './module/user/action';
-import user from './module/user/user';
+import users from './module/user/users';
 
 import todo from './module/statistics/todo';
 import sellTotal from './module/statistics/sellTotal';
@@ -49,7 +49,7 @@ export default new Vuex.Store({
   mutations: { ...umutations },
   actions: {},
   modules: {
-    user,
+    users,
     admin,
     shop,
     goods,

src/store/module/user/user.js → src/store/module/user/users.js


+ 2 - 2
src/views/platmanag/user/index.vue

@@ -22,7 +22,7 @@
 <script>
 const _ = require('lodash');
 import { mapState, mapGetters, createNamespacedHelpers } from 'vuex';
-const { mapActions: user } = createNamespacedHelpers('user');
+const { mapActions } = createNamespacedHelpers('users');
 const { mapActions: admin } = createNamespacedHelpers('admins');
 const { mapActions: dictData } = createNamespacedHelpers('dictData');
 export default {
@@ -82,7 +82,7 @@ export default {
   methods: {
     ...dictData({ dictQuery: 'query' }),
     ...admin({ adminPass: 'pass' }),
-    ...user(['query', 'delete', 'fetch', 'update', 'create']),
+    ...mapActions(['query', 'delete', 'fetch', 'update', 'create']),
     async search({ skip = 0, limit = this.$limit, ...info } = {}) {
       let condition = _.cloneDeep(this.searchForm);
       let res = await this.query({ skip, limit, ...condition, ...info });

+ 1 - 1
src/views/selfShop/goodsRate/index.vue

@@ -61,7 +61,7 @@ export default {
     ...dictData({ getDict: 'query' }),
     ...goods(['query', 'delete', 'fetch', 'update', 'create']),
     // 查询
-    async search({ skip = 0,limit = this.$limit, ...info } = {}) {
+    async search({ skip = 0, limit = this.$limit, ...info } = {}) {
       let condition = _.cloneDeep(this.searchForm);
       let res = await this.query({ skip, limit, ...condition, ...info, shop: this.user.shop.id });
       if (this.$checkRes(res)) {