Commit 1544be44 authored by mengwenhao's avatar mengwenhao

feature:商品编辑完成

parent 16fadde5
...@@ -95,9 +95,9 @@ exports.auditReject = async ctx => { ...@@ -95,9 +95,9 @@ exports.auditReject = async ctx => {
json: true, json: true,
body: ctx.request.body body: ctx.request.body
}; };
console.log("审核驳回操作", ctx.request.body);
ctx.body = await req(ctx, opts); ctx.body = await req(ctx, opts);
}; };
// 获取门店列表
exports.getShopsList = async ctx => { exports.getShopsList = async ctx => {
const opts = { const opts = {
url: `${GOODS_URI}/shop/background/shop_list`, url: `${GOODS_URI}/shop/background/shop_list`,
...@@ -106,3 +106,23 @@ exports.getShopsList = async ctx => { ...@@ -106,3 +106,23 @@ exports.getShopsList = async ctx => {
}; };
ctx.body = await req(ctx, opts); ctx.body = await req(ctx, opts);
}; };
// 添加门店
exports.addShop = async ctx => {
const opts = {
url: `${GOODS_URI}/shop/background/add_shop`,
method: "POST",
json: true,
body: ctx.request.body
};
ctx.body = await req(ctx, opts);
};
// 修改商品
exports.editGoods = async ctx => {
const opts = {
url: `${GOODS_URI}/goods/background/edit_goods`,
method: "POST",
json: true,
body: ctx.request.body
};
ctx.body = await req(ctx, opts);
}
\ No newline at end of file
...@@ -46,7 +46,9 @@ router.get(`${API_VERSION}/goods/background/get_goods_info`, goods.getGoodsInfo) ...@@ -46,7 +46,9 @@ router.get(`${API_VERSION}/goods/background/get_goods_info`, goods.getGoodsInfo)
router.post(`${API_VERSION}/goods/background/audit_pass`, goods.postSuccess); router.post(`${API_VERSION}/goods/background/audit_pass`, goods.postSuccess);
router.post(`${API_VERSION}/goods/background/check_goods_name`, goods.checkGoodsName); router.post(`${API_VERSION}/goods/background/check_goods_name`, goods.checkGoodsName);
router.post(`${API_VERSION}/goods/background/audit_reject`, goods.auditReject); router.post(`${API_VERSION}/goods/background/audit_reject`, goods.auditReject);
router.get(`${API_VERSION}/shop/background/shop_list`, goods.getShopsList) router.get(`${API_VERSION}/shop/background/shop_list`, goods.getShopsList);
router.post(`${API_VERSION}/shop/background/add_shop`, goods.addShop);
router.post(`${API_VERSION}/goods/background/edit_goods`, goods.editGoods)
//生活号 //生活号
......
This diff is collapsed.
...@@ -55,6 +55,16 @@ export async function checkGoodsName (params) { ...@@ -55,6 +55,16 @@ export async function checkGoodsName (params) {
} }
// 获取门店表单 // 获取门店表单
export async function getShopsList (params) { export async function getShopsList (params) {
const res = await axios.get("api/v1/shop/background/shop_list", { params }); const res = await axios.get("/api/v1/shop/background/shop_list", { params });
return res;
}
// 添加门店信息
export async function postAddShop (query) {
const res = await axios.post("/api/v1/shop/background/add_shop", query);
return res;
}
export async function editGoods (query) {
const res = await axios.post("/api/v1/goods/background/edit_goods", query);
return res; return res;
} }
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