diff --git a/src/api/goodsTool.js b/src/api/goodsTool.js index 820bd68..faa460a 100644 --- a/src/api/goodsTool.js +++ b/src/api/goodsTool.js @@ -1,125 +1,134 @@ -import request from "@/utils/request"; -import { stringify } from "qs"; +import request from '@/utils/request' +import { stringify } from 'qs' export async function getProductMapperList(data) { - data = stringify(data); + data = stringify(data) return request({ url: `/admin/shop/shop-sync-productMapper/list?${data}`, - method: "get", - }); + method: 'get', + }) } export async function getShopList() { return request({ - url: "/admin/shop/shop-store-base/list?pageNum=1&pageSize=99999&store_type=1", - method: "get", - }); + url: '/admin/shop/shop-store-base/list?pageNum=1&pageSize=99999&store_type=1', + method: 'get', + }) } export async function updateGoods(data) { return request({ - url: "/admin/shop/shop-sync-productMapper/udpateProductMapping", - method: "put", + url: '/admin/shop/shop-sync-productMapper/udpateProductMapping', + method: 'put', headers: { 'Content-Type': 'application/json', - }, + }, data, - }); + }) } export async function deleteGoods(data) { return request({ - url: "/admin/shop/shop-sync-productMapper/delProductMapping", - method: "delete", + url: '/admin/shop/shop-sync-productMapper/delProductMapping', + method: 'delete', headers: { 'Content-Type': 'application/json', - }, + }, data, - }); + }) } export async function downloadTempGoods(data) { - data = stringify(data); + data = stringify(data) return request({ url: `/admin/shop/shop-sync-productMapper/template?${data}`, - method: "get", - }); + method: 'get', + }) } export async function batchCreateGoods(data) { return request({ - url: "/admin/shop/shop-sync-productMapper/saveProductMappingBatch", - method: "post", + url: '/admin/shop/shop-sync-productMapper/saveProductMappingBatch', + method: 'post', headers: { - 'Content-Type': 'application/json', + 'Content-Type': 'application/json', }, data, - }); + }) } export async function batchExportGoods(data) { return request({ - url: "/admin/shop/shop-sync-productMapper/exportSelected", - method: "post", + url: '/admin/shop/shop-sync-productMapper/exportSelected', + method: 'post', headers: { 'Content-Type': 'application/json', - }, + }, data, - }); + }) } export async function getProductMapping(data) { return request({ - url: "/admin/shop/shop-sync-productMapper/getProductMapping", - method: "get", + url: '/admin/shop/shop-sync-productMapper/getProductMapping', + method: 'get', data, - }); + }) } export async function getSyncBaseMapingProducts() { return request({ - url: "/admin/shop/shop-sync-productMapper/getSyncBaseMapingProducts", - method: "get", - }); + url: '/admin/shop/shop-sync-productMapper/getSyncBaseMapingProducts', + method: 'get', + }) } -export async function HandleDownloadErrorReport(data) { - data = stringify(data); +export async function downloadErrorReport(data) { + data = stringify(data) return request({ url: `/admin/shop/shop-sync-productMapper/download?${data}`, - method: "get", - }); + method: 'get', + }) } export async function syncProductMaping() { return request({ url: `/admin/shop/shop-sync-productMapper/syncProductMaping`, - method: "put", + method: 'put', headers: { 'Content-Type': 'application/json', - }, - }); + }, + }) } export async function importGoodsData(data) { return request({ url: `/admin/shop/shop-sync-productMapper/importData`, - method: "post", + method: 'post', data, - }); + }) +} + +export async function syncShopImages(data) { + data = stringify(data) + return request({ + url: `/admin/shop/shop-sync-productMapper/syncShopImages?${data}`, + method: 'get', + }) } export default { getProductMapperList, getShopList, updateGoods, - deleteGoods,/* */ + deleteGoods /* */, downloadTempGoods, batchCreateGoods, batchExportGoods, getProductMapping, getSyncBaseMapingProducts, - HandleDownloadErrorReport, + downloadErrorReport, syncProductMaping, importGoodsData, -}; + syncShopImages, +} diff --git a/src/views/product/goodsTool/index.vue b/src/views/product/goodsTool/index.vue index 7667db9..502dece 100644 --- a/src/views/product/goodsTool/index.vue +++ b/src/views/product/goodsTool/index.vue @@ -2,28 +2,27 @@