|
@ -39,6 +39,27 @@ class HlwyyWechatAssistantSDK {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
|
|
static requestSms(params,handler){
|
|
|
|
log.info("7:"+params)
|
|
|
|
wechatreqq({
|
|
|
|
url: "http://"+config.thirdApiMessageConfig.host+":"+config.thirdApiMessageConfig.port+"/open/noLogin/smsToDoctor?consult="+params,
|
|
|
|
json: true,
|
|
|
|
headers: {
|
|
|
|
"content-type": "application/json",
|
|
|
|
},
|
|
|
|
method: 'GET'
|
|
|
|
}, 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);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
module.exports = HlwyyWechatAssistantSDK;
|
|
module.exports = HlwyyWechatAssistantSDK;
|