Commit 4892e70b authored by your yuchenglong's avatar your yuchenglong

update:老订单管理接口名更改

parent bb560f93
const GROUPMEAL_URI = require("../config.js").GROUPMEAL_URI; const GROUPMEAL_URI = require("../config.js").GROUPMEAL_URI;
const req = require("../utils/request").httpReq; const req = require("../utils/request").httpReq;
// 获取订单管理列表
exports.getOrderList = async ctx => {
const url = `${GROUPMEAL_URI}/order/background/order_list`;
const opts = {
url,
method: "GET"
};
ctx.body = await req(ctx, opts);
};
// 获取主页配送列表 // 获取主页配送列表
exports.getList = async ctx => { exports.getList = async ctx => {
const opts = { const opts = {
...@@ -51,9 +41,20 @@ exports.getSaveDeliverer = async ctx => { ...@@ -51,9 +41,20 @@ exports.getSaveDeliverer = async ctx => {
}; };
ctx.body = await req(ctx, opts); ctx.body = await req(ctx, opts);
}; };
// 获取订单管理列表
exports.getOrderList = async ctx => {
const url = `${GROUPMEAL_URI}/order/oldbackground/order_list`;
const opts = {
url,
method: "GET"
};
ctx.body = await req(ctx, opts);
};
// 获取活动名称 // 获取活动名称
exports.getMarketingList = async ctx => { exports.getMarketingList = async ctx => {
const url = `${GROUPMEAL_URI}/order/background/marketing_list`; const url = `${GROUPMEAL_URI}/order/oldbackground/marketing_list`;
const opts = { const opts = {
url, url,
method: "GET" method: "GET"
...@@ -63,7 +64,7 @@ exports.getMarketingList = async ctx => { ...@@ -63,7 +64,7 @@ exports.getMarketingList = async ctx => {
// 获取商品名称 // 获取商品名称
exports.getGoodsList = async ctx => { exports.getGoodsList = async ctx => {
const url = `${GROUPMEAL_URI}/order/background/goods_list`; const url = `${GROUPMEAL_URI}/order/oldbackground/goods_list`;
const opts = { const opts = {
url, url,
method: "GET" method: "GET"
...@@ -73,7 +74,7 @@ exports.getGoodsList = async ctx => { ...@@ -73,7 +74,7 @@ exports.getGoodsList = async ctx => {
// 获取自提点 // 获取自提点
exports.getSubShopList = async ctx => { exports.getSubShopList = async ctx => {
const url = `${GROUPMEAL_URI}/order/background/sub_shop_list`; const url = `${GROUPMEAL_URI}/order/oldbackground/sub_shop_list`;
const opts = { const opts = {
url, url,
method: "GET" method: "GET"
...@@ -83,7 +84,7 @@ exports.getSubShopList = async ctx => { ...@@ -83,7 +84,7 @@ exports.getSubShopList = async ctx => {
// 导出订单 // 导出订单
exports.orderExport = async ctx => { exports.orderExport = async ctx => {
const url = `${GROUPMEAL_URI}/order/background/order_export`; const url = `${GROUPMEAL_URI}/order/oldbackground/order_export`;
const opts = { const opts = {
url, url,
method: "GET" method: "GET"
...@@ -93,7 +94,7 @@ exports.orderExport = async ctx => { ...@@ -93,7 +94,7 @@ exports.orderExport = async ctx => {
// 打印订单 // 打印订单
exports.orderPrint = async ctx => { exports.orderPrint = async ctx => {
const url = `${GROUPMEAL_URI}/order/background/order_print`; const url = `${GROUPMEAL_URI}/order/oldbackground/order_print`;
const opts = { const opts = {
url, url,
method: "GET" method: "GET"
...@@ -103,7 +104,7 @@ exports.orderPrint = async ctx => { ...@@ -103,7 +104,7 @@ exports.orderPrint = async ctx => {
// 订单退款列表 // 订单退款列表
exports.orderItemList = async ctx => { exports.orderItemList = async ctx => {
const url = `${GROUPMEAL_URI}/order/background/order_item_list`; const url = `${GROUPMEAL_URI}/order/oldbackground/order_item_list`;
const opts = { const opts = {
url, url,
method: "GET" method: "GET"
...@@ -113,7 +114,7 @@ exports.orderItemList = async ctx => { ...@@ -113,7 +114,7 @@ exports.orderItemList = async ctx => {
// 订单退款列表 // 订单退款列表
exports.orderRefund = async ctx => { exports.orderRefund = async ctx => {
const url = `${GROUPMEAL_URI}/order/background/order_refund`; const url = `${GROUPMEAL_URI}/order/oldbackground/order_refund`;
const opts = { const opts = {
url, url,
method: "POST", method: "POST",
...@@ -125,7 +126,7 @@ exports.orderRefund = async ctx => { ...@@ -125,7 +126,7 @@ exports.orderRefund = async ctx => {
// 订单驳回 // 订单驳回
exports.orderRefundReject = async ctx => { exports.orderRefundReject = async ctx => {
const url = `${GROUPMEAL_URI}/order/background/order_refund_reject`; const url = `${GROUPMEAL_URI}/order/oldbackground/order_refund_reject`;
const opts = { const opts = {
url, url,
method: "GET" method: "GET"
......
...@@ -69,15 +69,14 @@ router.post(`${API_VERSION}/order/deliverer/add_deliverer`, groupmeal.getAddDeli ...@@ -69,15 +69,14 @@ router.post(`${API_VERSION}/order/deliverer/add_deliverer`, groupmeal.getAddDeli
router.post(`${API_VERSION}/order/deliverer/save_day_deliverer`, groupmeal.getSaveDeliverer) router.post(`${API_VERSION}/order/deliverer/save_day_deliverer`, groupmeal.getSaveDeliverer)
// 订单管理 // 订单管理
router.get(`${API_VERSION}/order/background/order_list`, groupmeal.getOrderList); router.get(`${API_VERSION}/order/oldbackground/order_list`, groupmeal.getOrderList);
router.get(`${API_VERSION}/order/background/marketing_list`, groupmeal.getMarketingList); router.get(`${API_VERSION}/order/oldbackground/marketing_list`, groupmeal.getMarketingList);
router.get(`${API_VERSION}/order/background/goods_list`, groupmeal.getGoodsList); router.get(`${API_VERSION}/order/oldbackground/goods_list`, groupmeal.getGoodsList);
router.get(`${API_VERSION}/order/background/sub_shop_list`, groupmeal.getSubShopList); router.get(`${API_VERSION}/order/oldbackground/sub_shop_list`, groupmeal.getSubShopList);
router.get(`${API_VERSION}/order/background/order_export`, groupmeal.orderExport); router.get(`${API_VERSION}/order/oldbackground/order_export`, groupmeal.orderExport);
router.get(`${API_VERSION}/order/background/order_export`, groupmeal.orderExport); router.get(`${API_VERSION}/order/oldbackground/order_print`, groupmeal.orderPrint);
router.get(`${API_VERSION}/order/background/order_print`, groupmeal.orderPrint); router.get(`${API_VERSION}/order/oldbackground/order_item_list`, groupmeal.orderItemList);
router.get(`${API_VERSION}/order/background/order_item_list`, groupmeal.orderItemList); router.get(`${API_VERSION}/order/oldbackground/order_refund_reject`, groupmeal.orderRefundReject);
router.get(`${API_VERSION}/order/background/order_refund_reject`, groupmeal.orderRefundReject); router.post(`${API_VERSION}/order/oldbackground/order_refund`, groupmeal.orderRefund);
router.post(`${API_VERSION}/order/background/order_refund`, groupmeal.orderRefund);
module.exports = router; module.exports = router;
...@@ -29,7 +29,7 @@ export async function getSaveDeliverer(params) { ...@@ -29,7 +29,7 @@ export async function getSaveDeliverer(params) {
// 获取订单列表 // 获取订单列表
export async function getOrderList(params) { export async function getOrderList(params) {
const res = await axios.get("/api/v1/order/background/order_list", { const res = await axios.get("/api/v1/order/oldbackground/order_list", {
params params
}); });
return res; return res;
...@@ -37,13 +37,13 @@ export async function getOrderList(params) { ...@@ -37,13 +37,13 @@ export async function getOrderList(params) {
// 获取活动名称 // 获取活动名称
export async function getMarketingList() { export async function getMarketingList() {
const res = await axios.get("/api/v1/order/background/marketing_list"); const res = await axios.get("/api/v1/order/oldbackground/marketing_list");
return res; return res;
} }
// 获取商品名称 // 获取商品名称
export async function getGoodsList(params) { export async function getGoodsList(params) {
const res = await axios.get("/api/v1/order/background/goods_list", { const res = await axios.get("/api/v1/order/oldbackground/goods_list", {
params params
}); });
return res; return res;
...@@ -51,15 +51,7 @@ export async function getGoodsList(params) { ...@@ -51,15 +51,7 @@ export async function getGoodsList(params) {
// 获取自提点 // 获取自提点
export async function getSubShopList(params) { export async function getSubShopList(params) {
const res = await axios.get("/api/v1/order/background/sub_shop_list",{ const res = await axios.get("/api/v1/order/oldbackground/sub_shop_list",{
params
});
return res;
}
// 导出订单
export async function orderExport(params) {
const res = await axios.get("/api/v1/order/background/order_export", {
params params
}); });
return res; return res;
...@@ -67,7 +59,7 @@ export async function orderExport(params) { ...@@ -67,7 +59,7 @@ export async function orderExport(params) {
// 打印订单 // 打印订单
export async function orderPrint(params) { export async function orderPrint(params) {
const res = await axios.get("/api/v1/order/background/order_print", { const res = await axios.get("/api/v1/order/oldbackground/order_print", {
params params
}); });
return res; return res;
...@@ -75,7 +67,7 @@ export async function orderPrint(params) { ...@@ -75,7 +67,7 @@ export async function orderPrint(params) {
// 订单退款列表 // 订单退款列表
export async function orderItemList(params) { export async function orderItemList(params) {
const res = await axios.get("/api/v1/order/background/order_item_list", { const res = await axios.get("/api/v1/order/oldbackground/order_item_list", {
params params
}); });
return res; return res;
...@@ -87,7 +79,7 @@ export async function refundOrder(orderId, itemsToRefund) { ...@@ -87,7 +79,7 @@ export async function refundOrder(orderId, itemsToRefund) {
// order_id: orderId, // order_id: orderId,
// refund_list: itemsToRefund // refund_list: itemsToRefund
// }; // };
const res = await axios.post("/api/v1/order/background/order_refund", { const res = await axios.post("/api/v1/order/oldbackground/order_refund", {
order_id: orderId, order_id: orderId,
refund_list: itemsToRefund refund_list: itemsToRefund
}); });
...@@ -96,7 +88,7 @@ export async function refundOrder(orderId, itemsToRefund) { ...@@ -96,7 +88,7 @@ export async function refundOrder(orderId, itemsToRefund) {
// 订单驳回 // 订单驳回
export async function orderRefundReject(params) { export async function orderRefundReject(params) {
const res = await axios.get("/api/v1/order/background/order_refund_reject", { const res = await axios.get("/api/v1/order/oldbackground/order_refund_reject", {
params params
}); });
return res; return res;
...@@ -110,5 +102,5 @@ export function getOrderExportURL(eventId, type) { ...@@ -110,5 +102,5 @@ export function getOrderExportURL(eventId, type) {
}else{ }else{
ENV = "http://bp-test.ini.yidian-inc.com/" ENV = "http://bp-test.ini.yidian-inc.com/"
} }
return `${ENV}order/background/order_export?marketing_id=${eventId}&type=${type}`; return `${ENV}order/oldbackground/order_export?marketing_id=${eventId}&type=${type}`;
} }
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