lrf402788946 преди 4 години
родител
ревизия
116e1fb323
променени са 2 файла, в които са добавени 49 реда и са изтрити 0 реда
  1. 2 0
      src/components/adminCommon/menu.js
  2. 47 0
      src/store/ticket.js

+ 2 - 0
src/components/adminCommon/menu.js

@@ -10,4 +10,6 @@ export const fwjg = [
   { name: '机构管理', index: '/adminCenter/mechanism' },
   { name: '机构管理', index: '/adminCenter/mechanism' },
   { name: '线上管理', index: '/adminCenter/online' },
   { name: '线上管理', index: '/adminCenter/online' },
   { name: '高企政策服务管理', index: '/adminCenter/policy' },
   { name: '高企政策服务管理', index: '/adminCenter/policy' },
+  { name: '创新劵服务初审管理', index: '/adminCenter/ticket/0' },
+  { name: '创新劵服务终审管理', index: '/adminCenter/ticket/2' },
 ];
 ];

+ 47 - 0
src/store/ticket.js

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