|
@ -40,6 +40,30 @@ class HlwyyWechatAssistantSDK {
|
|
|
log.error('请求居民微信模版消息发送模版消息->请求失败:', error.message);
|
|
|
}
|
|
|
});
|
|
|
log.info("9:"+config.imClientType.id);
|
|
|
if(config.imClientType.id == 'zsyy'){
|
|
|
log.info("10:进入i健康模板消息推送");
|
|
|
//i健康模板消息推送
|
|
|
wechatreqq({
|
|
|
url: "http://"+config.xmIjkTemplateConfig.host+":"+config.xmIjkTemplateConfig.port+config.xmIjkTemplateConfig.model+config.xmIjkTemplateConfig.enpoint+"?"+params,
|
|
|
json: true,
|
|
|
headers: {
|
|
|
"content-type": "application/json",
|
|
|
},
|
|
|
method: 'POST',
|
|
|
body: JSON.stringify(params)
|
|
|
}, function(error, response, body) {
|
|
|
if (!error && response.statusCode == 200) {
|
|
|
log.info('请求居民微信模版消息接口发送模版消息->请求成功:', body);
|
|
|
// console.log(body) // 请求成功的处理逻辑
|
|
|
}else{
|
|
|
// log.error('请求居民微信模版消息发送模版消息->请求失败:', body.toString());
|
|
|
// log.error('请求居民微信模版消息发送模版消息->请求失败:', response.toString());
|
|
|
log.error('请求居民微信模版消息发送模版消息->请求失败:', error.message);
|
|
|
}
|
|
|
});
|
|
|
log.info("11:结束i健康模板消息推送");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|