支付回调

This commit is contained in:
luying
2021-11-09 19:24:00 +08:00
parent 173481a60c
commit 106493b878
26 changed files with 424 additions and 135 deletions

View File

@@ -20,10 +20,9 @@ function aesDecrypt(data, key, iv) {
module.exports = options => {
return async function parmsDecode(ctx: Context, next) {
let m = ctx.request.url.indexOf("/dev");
let n = ctx.request.url.indexOf("/web");
let url = ctx.request.url;
ctx.logcode = genCode(10);
if(m == 0 || n == 0) {
if(url.indexOf("/dev") == 0 || url.indexOf("/web") == 0 || url.indexOf("/cb") == 0) {
await next();
return;
}
@@ -59,7 +58,7 @@ module.exports = options => {
try{
await next();
} catch(e) {
ctx.service.utils.log('ERROR', `[${ctx.request.url}] [${ctx.logcode}] err: ${e.stack}`);
ctx.service.utils.log('ERROR', `[${ctx.request.url}] [${ctx.logcode}] err: ${(<Error>e).stack}`);
throw e;
}
const resBody = ctx.body;