Commit a83e8db0 authored by 姜登's avatar 姜登

gjj

parent 024d7c0a
Pipeline #3993 passed with stage
in 2 seconds
......@@ -93,6 +93,20 @@ class OrderController extends Controller {
}
}
async orderShow() {
const { ctx, service } = this;
const { appKey, orderId } = ctx.params;
const data = await service.order.getOneByOrderId(orderId);
if (data) {
if (data.status === 'success' && (data.appKey === appKey)) {
const result = await service.storage.read(orderId, appKey);
ctx.success(result);
return;
}
}
ctx.fail('无此订单号');
}
// async fetchOrderId() {
// const { ctx, service } = this;
// const signParams = ctx.helper.buildRequestBody({ token });
......
......@@ -39,6 +39,8 @@ module.exports = app => {
gjjRouter.post('/getCityConfig', controller.task.fetchCityConfig)//获取城市配置
gjjRouter.get('/orderData/:appKey/:orderId', controller.order.orderShow);//获取展示页面数据
// 这个接口之后会移除掉
// router.get('/orders', controller.order.fetchOrderId);
......
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