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