Commit 7a0740ff authored by 靳野's avatar 靳野

feat:替换接口

parent f99aeef3
...@@ -16,7 +16,7 @@ const headers = { ...@@ -16,7 +16,7 @@ const headers = {
* yapi: http://yapi.quantgroups.com/project/389/interface/api/23814 * yapi: http://yapi.quantgroups.com/project/389/interface/api/23814
*/ */
export async function searchList(params) { export async function searchList(params) {
return request.post('/product/api/merchant/page', { return request.post('/api/merchants/products/page', {
prefix: goodsApi, prefix: goodsApi,
data: stringify(params), data: stringify(params),
headers, headers,
...@@ -69,7 +69,7 @@ export async function spuDetail(params) { ...@@ -69,7 +69,7 @@ export async function spuDetail(params) {
// 商品规格 // 商品规格
export async function getSpecList() { export async function getSpecList() {
return request.post('/product/spec/api/merchant/list', { return request.post('/api/merchants/specs/getAll', {
prefix: goodsApi, prefix: goodsApi,
}); });
} }
...@@ -85,7 +85,7 @@ export async function getImageInfo(spuNo) { ...@@ -85,7 +85,7 @@ export async function getImageInfo(spuNo) {
// 商品分类 // 商品分类
export async function categoryList() { export async function categoryList() {
return request.post('/product/category/api/merchant/getAll', { return request.post('/api/merchants/categories/getAllTree', {
prefix: goodsApi, prefix: goodsApi,
}); });
} }
...@@ -113,7 +113,7 @@ export async function uploadFile(file) { ...@@ -113,7 +113,7 @@ export async function uploadFile(file) {
// 商品修改日志 // 商品修改日志
export async function changeLog(params) { export async function changeLog(params) {
return request.post('/product/logs/api/merchant/page', { return request.post('/api/merchant/change/logs/page', {
data: stringify(params), data: stringify(params),
prefix: goodsApi, prefix: goodsApi,
headers, headers,
...@@ -122,7 +122,7 @@ export async function changeLog(params) { ...@@ -122,7 +122,7 @@ export async function changeLog(params) {
// 审核详情日志 // 审核详情日志
export async function productMerchantLog(productId) { export async function productMerchantLog(productId) {
return request.get('/product/api/merchant/auditLog', { return request.get('/api/merchants/audit/logs/list', {
params: { params: {
productId, productId,
}, },
...@@ -258,7 +258,7 @@ export const apiQueryLastChangeLog = skuId => ...@@ -258,7 +258,7 @@ export const apiQueryLastChangeLog = skuId =>
// 商品上下架 // 商品上下架
export const apiChangeStateGoods = async params => { export const apiChangeStateGoods = async params => {
const data = await request.post('/product/api/merchant/pushedOrOffline/batch', { const data = await request.post('/api/merchants/products/api/merchant/pushedOrOffline/batch', {
data: stringify(params), data: stringify(params),
prefix: goodsApi, prefix: goodsApi,
headers, headers,
...@@ -301,7 +301,7 @@ export async function apiGoodsActionBatch(data) { ...@@ -301,7 +301,7 @@ export async function apiGoodsActionBatch(data) {
} }
// 外卖商品列表 // 外卖商品列表
export async function apiTakeawayGoods(params) { export async function apiTakeawayGoods(params) {
return request.post('/product/api/merchant/page', { return request.post('/api/merchants/products/page', {
prefix: goodsApi, prefix: goodsApi,
data: stringify(params), data: stringify(params),
headers, headers,
......
...@@ -69,7 +69,7 @@ export async function spuDetail(params) { ...@@ -69,7 +69,7 @@ export async function spuDetail(params) {
// 商品规格 // 商品规格
export async function getSpecList() { export async function getSpecList() {
return request.post('/product/spec/api/merchant/list', { return request.post('/api/merchants/specs/getAll', {
prefix: goodsApi, prefix: goodsApi,
}); });
} }
...@@ -85,7 +85,7 @@ export async function getImageInfo(spuNo) { ...@@ -85,7 +85,7 @@ export async function getImageInfo(spuNo) {
// 商品分类 // 商品分类
export async function categoryList() { export async function categoryList() {
return request.post('/product/category/api/merchant/getAll', { return request.post('/api/merchants/categories/getAllTree', {
prefix: goodsApi, prefix: goodsApi,
}); });
} }
...@@ -113,7 +113,7 @@ export async function uploadFile(file) { ...@@ -113,7 +113,7 @@ export async function uploadFile(file) {
// 商品修改日志 // 商品修改日志
export async function changeLog(params) { export async function changeLog(params) {
return request.post('/product/logs/api/merchant/page', { return request.post('/api/merchant/change/logs/page', {
data: stringify(params), data: stringify(params),
prefix: goodsApi, prefix: goodsApi,
headers, headers,
...@@ -258,7 +258,7 @@ export const apiQueryLastChangeLog = skuId => ...@@ -258,7 +258,7 @@ export const apiQueryLastChangeLog = skuId =>
// 商品上下架 // 商品上下架
export const apiChangeStateGoods = async params => { export const apiChangeStateGoods = async params => {
const data = await request.post('/product/api/merchant/pushedOrOffline/batch', { const data = await request.post('/api/merchants/products/api/merchant/pushedOrOffline/batch', {
data: stringify(params), data: stringify(params),
prefix: goodsApi, prefix: goodsApi,
headers, headers,
......
...@@ -19,14 +19,14 @@ export const merchantUpload = async files => { ...@@ -19,14 +19,14 @@ export const merchantUpload = async files => {
}; };
export const getProductDetail = id => export const getProductDetail = id =>
request.post('/product/api/merchant/detail', { request.post('/api/merchants/products/detail', {
prefix: goodsApi, prefix: goodsApi,
params: { id }, params: { id },
headers, headers,
}); });
export const merchantCategoryGetAll = () => export const merchantCategoryGetAll = () =>
request.post('/product/category/api/merchant/getAll', { request.post('/api/merchants/categories/getAllTree', {
prefix: goodsApi, prefix: goodsApi,
}); });
...@@ -42,7 +42,7 @@ export const merchantBrandList = () => ...@@ -42,7 +42,7 @@ export const merchantBrandList = () =>
// 获取规格列表 // 获取规格列表
export const merchantSpecList = () => export const merchantSpecList = () =>
request.post('/product/spec/api/merchant/list', { request.post('/api/merchants/specs/getAll', {
prefix: goodsApi, prefix: goodsApi,
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment