Commit ea615704 authored by 何娜's avatar 何娜

学信API url优化

parent 91d022c5
Pipeline #7353 failed with stage
......@@ -58,7 +58,7 @@ class OrderController extends Controller {
async fetchOrderId() {
const {ctx, service} = this;
try {
const {appKey} = ctx.params;
const {appKey} = ctx.query;
// const appKeyInfo = await service.partner.fetchInfo(appKey);
// ctx.logger.info(appKey, ',appKeyInfo,', appKeyInfo);
// if (!(appKeyInfo && appKeyInfo.valid === true && appKeyInfo.enableIt === true)) {
......
......@@ -8,7 +8,7 @@ module.exports = app => {
const chsiRouter = router.namespace(app.config.projectRootPath);
chsiRouter.get('/getorderSn/:appKey', controller.order.fetchOrderId);// 合作方获取订单号
chsiRouter.get('/getOrderSn', controller.order.fetchOrderId);// 合作方获取订单号
// taxRouter.post('/getCode', controller.task.fetchCapture);// 获取验证码
......
......@@ -11,6 +11,7 @@ module.exports = {
try {
const { host, customerUrl } = ctx.app.config.signatureAPI;
const notifyMap = new Map();
ctx.logger.info('host',host, 'customerUrl', customerUrl)
const ret = await ctx.curl(host + customerUrl, {
charset: 'utf-8',
timeout: ['30s', '30s'],
......@@ -24,8 +25,8 @@ module.exports = {
notifyMap.set(customer.appKey, { notifyUrl: customer.callBackUrl });
}
});
ctx.app.notifyMap = notifyMap;
}
ctx.app.notifyMap = notifyMap;
} catch (e) {
ctx.logger.error('【schedule/notifyUrlTask】catch error:', JSON.stringify(e));
}
......
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