|  | @ -339,6 +339,8 @@ class WechatClient extends RedisModel {
 | 
												
													
														
															|  |                                     // 发送模板消息
 |  |                                     // 发送模板消息
 | 
												
													
														
															|  |                                     WechatSDK.sendTemplateMessage({
 |  |                                     WechatSDK.sendTemplateMessage({
 | 
												
													
														
															|  |                                         touser: openid,
 |  |                                         touser: openid,
 | 
												
													
														
															|  | 
 |  |                                         name: member.name,
 | 
												
													
														
															|  | 
 |  |                                         patient: member.code,
 | 
												
													
														
															|  |                                         template_id: config.wechatConfig.template.consultTemplate,
 |  |                                         template_id: config.wechatConfig.template.consultTemplate,
 | 
												
													
														
															|  |                                         url: url + "?openid=" + openid + "&type="+topic.type+"&doctor="+message.sender_id+
 |  |                                         url: url + "?openid=" + openid + "&type="+topic.type+"&doctor="+message.sender_id+
 | 
												
													
														
															|  |                                         "&consult=" + topic.id + "&toUser=" + member.code + "&toName=" + member.name+"&represented="+patient.code,
 |  |                                         "&consult=" + topic.id + "&toUser=" + member.code + "&toName=" + member.name+"&represented="+patient.code,
 | 
												
											
												
													
														
															|  | @ -360,6 +362,8 @@ class WechatClient extends RedisModel {
 | 
												
													
														
															|  |                             // 发送模板消息
 |  |                             // 发送模板消息
 | 
												
													
														
															|  |                             WechatSDK.sendTemplateMessage({
 |  |                             WechatSDK.sendTemplateMessage({
 | 
												
													
														
															|  |                                 touser: patient.openid,
 |  |                                 touser: patient.openid,
 | 
												
													
														
															|  | 
 |  |                                 name: targetUserName,
 | 
												
													
														
															|  | 
 |  |                                 patient: targetUserId,
 | 
												
													
														
															|  |                                 template_id: config.wechatConfig.template.consultTemplate,
 |  |                                 template_id: config.wechatConfig.template.consultTemplate,
 | 
												
													
														
															|  |                                 url: url + "?openid=" + patient.openid +"&type="+topic.type+"&doctor="+message.sender_id+
 |  |                                 url: url + "?openid=" + patient.openid +"&type="+topic.type+"&doctor="+message.sender_id+
 | 
												
													
														
															|  |                                 "&consult=" + topic.id + "&toUser=" + targetUserId + "&toName=" + targetUserName+"&represented="+patient.code,
 |  |                                 "&consult=" + topic.id + "&toUser=" + targetUserId + "&toName=" + targetUserName+"&represented="+patient.code,
 | 
												
											
												
													
														
															|  | @ -380,6 +384,8 @@ class WechatClient extends RedisModel {
 | 
												
													
														
															|  |                         if(patient.openid){
 |  |                         if(patient.openid){
 | 
												
													
														
															|  |                             WechatSDK.sendTemplateMessage({
 |  |                             WechatSDK.sendTemplateMessage({
 | 
												
													
														
															|  |                                 touser: patient.openid,
 |  |                                 touser: patient.openid,
 | 
												
													
														
															|  | 
 |  |                                 name: targetUserName,
 | 
												
													
														
															|  | 
 |  |                                 patient: targetUserId,
 | 
												
													
														
															|  |                                 template_id: config.wechatConfig.template.consultTemplate,
 |  |                                 template_id: config.wechatConfig.template.consultTemplate,
 | 
												
													
														
															|  |                                 url: url + "?openid=" + patient.openid +"&type="+topic.type+"&doctor="+message.sender_id+
 |  |                                 url: url + "?openid=" + patient.openid +"&type="+topic.type+"&doctor="+message.sender_id+
 | 
												
													
														
															|  |                                 "&consult=" + topic.id + "&toUser=" + targetUserId + "&toName=" + targetUserName+"&represented="+patient.code,
 |  |                                 "&consult=" + topic.id + "&toUser=" + targetUserId + "&toName=" + targetUserName+"&represented="+patient.code,
 | 
												
											
												
													
														
															|  | @ -403,6 +409,8 @@ class WechatClient extends RedisModel {
 | 
												
													
														
															|  |                                     // 发送模板消息
 |  |                                     // 发送模板消息
 | 
												
													
														
															|  |                                     WechatSDK.sendTemplateMessage({
 |  |                                     WechatSDK.sendTemplateMessage({
 | 
												
													
														
															|  |                                         touser: openid,
 |  |                                         touser: openid,
 | 
												
													
														
															|  | 
 |  |                                         name: member.name,
 | 
												
													
														
															|  | 
 |  |                                         patient: member.code,
 | 
												
													
														
															|  |                                         template_id: config.wechatConfig.template.consultTemplate,
 |  |                                         template_id: config.wechatConfig.template.consultTemplate,
 | 
												
													
														
															|  |                                         url: url + "?openid=" + openid +"&type="+topic.type+"&doctor="+message.sender_id+
 |  |                                         url: url + "?openid=" + openid +"&type="+topic.type+"&doctor="+message.sender_id+
 | 
												
													
														
															|  |                                         "&consult=" + topic.id + "&toUser=" + member.code + "&toName=" + member.name+"&represented="+patient.code,
 |  |                                         "&consult=" + topic.id + "&toUser=" + member.code + "&toName=" + member.name+"&represented="+patient.code,
 |