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

fix token bug

parent 1a724cc1
Pipeline #22615 passed with stage
in 12 seconds
......@@ -51,17 +51,16 @@ class WechatService extends Service {
if (!flag) {
this.ctx.set('content-type', 'text/xml');
let xml = {
MsgType: 'transfer_customer_service',
ToUserName: data.FromUserName,
FromUserName: data.ToUserName,
CreateTime: parseInt(new Date() / 1000),
};
const builder = new xml2js.Builder();
xml = builder.buildObject(xml);
const xml = `<xml>
<ToUserName><![CDATA[${data.FromUserName}]]></ToUserName>
<FromUserName><![CDATA[${data.ToUserName}]]></FromUserName>
<CreateTime>${parseInt(new Date() / 1000)}</CreateTime>
<MsgType><![CDATA[transfer_customer_service]]></MsgType>
</xml>`;
this.ctx.body = xml;
ctx.logger.info('course_ctx: ' + JSON.stringify(this.ctx));
}
return;
// return;
}
async sendText(data) {
......
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