guhongwei %!s(int64=5) %!d(string=hai) anos
pai
achega
fa35520997
Modificáronse 1 ficheiros con 7 adicións e 3 borrados
  1. 7 3
      store/market/productpact.js

+ 7 - 3
store/market/productpact.js

@@ -10,7 +10,11 @@ const mutations = {};
 
 const actions = {
   async query({ commit }, { skip = 0, limit, ...info } = {}) {
-    const res = await this.$axios.$get(api.productpactInfo, { skip, limit, ...info });
+    const res = await this.$axios.$get(api.productpactInfo, {
+      skip,
+      limit,
+      ...info,
+    });
     return res;
   },
   async create({ commit }, payload) {
@@ -21,8 +25,8 @@ const actions = {
     const res = await this.$axios.$get(`${api.productpactInfo}/${payload}`);
     return res;
   },
-  async update({ commit }, { id, ...info } = {}) {
-    const res = await this.$axios.$post(`${api.productpactInfo}/${id}`, { ...info });
+  async update({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.productpactInfo}/update/${id}`, data);
     return res;
   },
   async delete({ commit }, payload) {