Commit ca3fa992 authored by 何娜's avatar 何娜

tax_api

parent f89dfa94
......@@ -48,9 +48,9 @@ class OrderController extends Controller {
try {
ctx.validate(this.showRule);
const { appKey, orderSn } = ctx.request.body.params;
// await service.signature.signatureCheck(ctx.request.body);
await service.signature.signatureCheck(ctx.request.body);
let data = await service.cache.get({ key: orderSn });
let result = { code: 2, msg: '任务还在执行或未输入', data: {} };
let result = '任务还在执行或未输入';
if (data) {
if (data.status === 'success') {
const result = await service.storage.read(orderSn, appKey);
......@@ -60,9 +60,9 @@ class OrderController extends Controller {
};
return;
} else if (data.note) {
result = data.note;
result = data.note.message;
}
ctx.body = result;
ctx.body = {code: -1, msg: result};
return;
}
} catch (err) {
......
......@@ -16,8 +16,7 @@ module.exports = {
charset: 'utf-8',
timeout: ['30s', '30s'],
dataType: 'json',
contentType: 'json',
gzip: true
contentType: 'json'
});
ctx.logger.info('notifyUrlCode', JSON.stringify(ret.data.code));
if (ret.data.code === 0) {
......
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