Commit ca3fa992 authored by 何娜's avatar 何娜

tax_api

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