guhongwei 3 lat temu
rodzic
commit
7efb465af1
3 zmienionych plików z 103 dodań i 3 usunięć
  1. 17 3
      src/layout/deploy/menu.js
  2. 43 0
      src/store/apply.js
  3. 43 0
      src/store/type.js

+ 17 - 3
src/layout/deploy/menu.js

@@ -1,6 +1,20 @@
 export const system = [{ icon: 'icon-shouye', index: '/adminCenter/homeIndex', title: '系统首页' }];
 export const userMenu = [
-  { icon: 'icon-yonghu', index: '/adminCenter/user/index', title: '用户管理' },
-  { icon: 'icon-ceshi', index: '/adminCenter/user/index', title: '审核管理' },
-  { icon: 'icon-ceshi', index: '/adminCenter/user/index', title: '库存管理' },
+  {
+    icon: 'icon-yonghu',
+    index: '/adminCenter/user/index',
+    title: '用户管理',
+  },
+  {
+    icon: 'icon-yonghu',
+    index: '/adminCenter/declare/index',
+    title: '申报审核',
+  },
+  {
+    icon: 'icon-yonghu',
+    index: '/adminCenter/type/index',
+    title: '商品类型',
+  },
+  // { icon: 'icon-ceshi', index: '/adminCenter/user/index', title: '审核管理' },
+  // { icon: 'icon-ceshi', index: '/adminCenter/user/index', title: '库存管理' },
 ];

+ 43 - 0
src/store/apply.js

@@ -0,0 +1,43 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+Vue.use(Vuex);
+const api = {
+  info: `/api/hc/apply`,
+};
+const state = () => ({});
+const mutations = {};
+
+const actions = {
+  async query({ commit }, { skip = 0, limit, ...info } = {}) {
+    const res = await this.$axios.$get(`${api.info}`, {
+      skip,
+      limit,
+      ...info,
+    });
+    return res;
+  },
+  async create({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.info}`, payload);
+    return res;
+  },
+  async fetch({ commit }, payload) {
+    const res = await this.$axios.$get(`${api.info}/${payload}`);
+    return res;
+  },
+  async update({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.info}/update/${id}`, data);
+    return res;
+  },
+
+  async delete({ commit }, payload) {
+    const res = await this.$axios.$delete(`${api.info}/${payload}`);
+    return res;
+  },
+};
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions,
+};

+ 43 - 0
src/store/type.js

@@ -0,0 +1,43 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+Vue.use(Vuex);
+const api = {
+  info: `/api/hc/type`,
+};
+const state = () => ({});
+const mutations = {};
+
+const actions = {
+  async query({ commit }, { skip = 0, limit, ...info } = {}) {
+    const res = await this.$axios.$get(`${api.info}`, {
+      skip,
+      limit,
+      ...info,
+    });
+    return res;
+  },
+  async create({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.info}`, payload);
+    return res;
+  },
+  async fetch({ commit }, payload) {
+    const res = await this.$axios.$get(`${api.info}/${payload}`);
+    return res;
+  },
+  async update({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.info}/update/${id}`, data);
+    return res;
+  },
+
+  async delete({ commit }, payload) {
+    const res = await this.$axios.$delete(`${api.info}/${payload}`);
+    return res;
+  },
+};
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions,
+};