diff --git a/server/src/module/notify/controller/wechat/pay.ts b/server/src/module/notify/controller/wechat/pay.ts index bead5cc..0073aa4 100644 --- a/server/src/module/notify/controller/wechat/pay.ts +++ b/server/src/module/notify/controller/wechat/pay.ts @@ -57,7 +57,7 @@ const NotifyWechatPayAction = { const xml = await RawBody(ctx.req, { length: ctx.request.length, limit: '1mb', - encoding: ctx.request.charset && 'utf-8' + encoding: ctx.request.charset || 'utf-8' }); const notify = await wechatService.parseXML(xml); diff --git a/server/src/module/oa/controller/service/reply.ts b/server/src/module/oa/controller/service/reply.ts index 07287e4..23bc4a1 100644 --- a/server/src/module/oa/controller/service/reply.ts +++ b/server/src/module/oa/controller/service/reply.ts @@ -27,7 +27,7 @@ const OaReplyAction = { : await RawBody(ctx.req, { length: ctx.request.length, limit: '1mb', - encoding: ctx.request.charset && 'utf-8' + encoding: ctx.request.charset || 'utf-8' }); const xml = await wechatService.parseXML(bodyXml);