Commit fa9a80c3 authored by 任国军's avatar 任国军

fix wechat bug

parent 7ccd0ff1
Pipeline #22630 passed with stage
in 3 seconds
......@@ -33,7 +33,6 @@ class WechatService extends Service {
async sendMsg(data) {
const { ctx } = this;
ctx.logger.info('111');
if (ctx.isEmpty(data) || ctx.isEmpty(data.MsgType)) {
ctx.logger.info(JSON.stringify(data));
return;
......@@ -53,8 +52,8 @@ class WechatService extends Service {
this.ctx.set('content-type', 'text/xml');
let xml = {
MsgType: 'transfer_customer_service',
ToUserName: data.ToUserName,
FromUserName: data.FromUserName,
ToUserName: data.FromUserName,
FromUserName: data.ToUserName,
CreateTime: parseInt(new Date() / 1000),
};
const builder = new xml2js.Builder();
......
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