guhongwei 3 лет назад
Родитель
Сommit
995e3d9cb2
2 измененных файлов с 50 добавлено и 1 удалено
  1. 49 0
      src/store/patent/patentsafeg.js
  2. 1 1
      src/store/patent/patenttrans.js

+ 49 - 0
src/store/patent/patentsafeg.js

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

+ 1 - 1
src/store/patent/patenttrans.js

@@ -9,7 +9,7 @@ const state = () => ({});
 const mutations = {};
 
 const actions = {
-  async query({ commit }, { skip = 0, limit = 10, ...info } = {}) {
+  async query({ commit }, { skip = 0, limit = null, ...info } = {}) {
     const res = await this.$axios.$get(api.patenttrans, {
       skip,
       limit,