Commit d3ab5806 authored by shida.liu's avatar shida.liu

feat: 更新 API 调用和命名

parent 32dd7d4a
...@@ -101,7 +101,7 @@ class goodsManage extends Component { ...@@ -101,7 +101,7 @@ class goodsManage extends Component {
const { dispatch } = this.props; const { dispatch } = this.props;
const { pageSize, pageNo } = this.state; const { pageSize, pageNo } = this.state;
dispatch({ dispatch({
type: 'goodsManage/getList', type: 'popGoodsManage/getList',
payload: { payload: {
pageNo, pageNo,
pageSize, pageSize,
......
...@@ -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('//api/merchants/pops/product/page', { return request.post('/api/merchants/pops/product/page', {
prefix: goodsApi, prefix: goodsApi,
data: stringify(params), data: stringify(params),
headers, headers,
...@@ -60,7 +60,7 @@ export async function apiGetAttribute(categoryId) { ...@@ -60,7 +60,7 @@ export async function apiGetAttribute(categoryId) {
} }
// 编辑--获取详情 // 编辑--获取详情
export async function spuDetail(params) { export async function spuDetail(params) {
return request.post('//api/merchants/pops/product/detail', { return request.post('/api/merchants/pops/product/detail', {
prefix: goodsApi, prefix: goodsApi,
params, params,
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('//api/merchants/pops/product/auditLog', { return request.get('/api/merchants/pops/product/auditLog', {
params: { params: {
productId, productId,
}, },
...@@ -234,7 +234,7 @@ export const apiEnableUpdataStock = skuIds => ...@@ -234,7 +234,7 @@ export const apiEnableUpdataStock = skuIds =>
// 商品明细导出 // 商品明细导出
export const apiGoodsInfosExport = params => export const apiGoodsInfosExport = params =>
request.post('//api/merchants/pops/product/sku/export', { request.post('/api/merchants/pops/product/sku/export', {
prefix: goodsApi, prefix: goodsApi,
data: params, data: params,
responseType: 'arrayBuffer', responseType: 'arrayBuffer',
...@@ -245,7 +245,7 @@ export const apiGoodsInfosExport = params => ...@@ -245,7 +245,7 @@ export const apiGoodsInfosExport = params =>
// 新建商品审核记录 // 新建商品审核记录
export const apiCreateGoodsLog = params => export const apiCreateGoodsLog = params =>
request.post('//api/merchants/pops/product/audit/create', { request.post('/api/merchants/pops/product/audit/create', {
data: params, data: params,
prefix: goodsApi, prefix: goodsApi,
}); });
...@@ -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('//api/merchants/pops/product/page', { return request.post('/api/merchants/pops/product/page', {
prefix: goodsApi, prefix: goodsApi,
data: stringify(params), data: stringify(params),
headers, headers,
......
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