فهرست منبع

续方咨询修改

yeshijie 8 سال پیش
والد
کامیت
c58ed2a6b8
1فایلهای تغییر یافته به همراه10 افزوده شده و 8 حذف شده
  1. 10 8
      src/server/models/client/wechat.client.js

+ 10 - 8
src/server/models/client/wechat.client.js

@ -324,6 +324,8 @@ class WechatClient extends RedisModel {
                    var patient = map.get("openid");
                    map.delete("openid");
                    let agent = topic.agent;
                    let consultTitle = topic.type==8?"续方":"健康";
                    let description = topic.type==8?"续方咨询":topic.description;
                    let url = config.wechatConfig.baseUrl + "/wx/html/yszx/html/consulting-doctor.html";
                    if(agent){//代理人发起的议题
                        var agentOpenid = "";
@ -333,7 +335,7 @@ class WechatClient extends RedisModel {
                                if(agent == member.code){
                                    agentOpenid = key;
                                    var openid = key;
                                    var first = "您的家人("+patient.name+")的健康咨询有新的回复";
                                    var first = "您的家人("+patient.name+")的"+consultTitle+"咨询有新的回复";
                                    // 发送模板消息
                                    WechatSDK.sendTemplateMessage({
                                        touser: openid,
@ -343,7 +345,7 @@ class WechatClient extends RedisModel {
                                        data: {
                                            first: {value: first, color: "#000000"}
                                            , remark: {value: "", color: "#000000"}
                                            , keyword1: {value: topic.description, color: "#000000"}
                                            , keyword1: {value: description, color: "#000000"}
                                            , keyword2: {value: replyContent, color: "#000000"}
                                            , keyword3: {value: senderName, color: "#000000"}
                                        }
@ -354,7 +356,7 @@ class WechatClient extends RedisModel {
                            }
                        }
                        if(patient.openid&&patient.openid!=agentOpenid){
                            var first = "您的健康咨询有新的回复";
                            var first = "您的"+consultTitle+"咨询有新的回复";
                            // 发送模板消息
                            WechatSDK.sendTemplateMessage({
                                touser: patient.openid,
@ -364,7 +366,7 @@ class WechatClient extends RedisModel {
                                data: {
                                    first: {value: first, color: "#000000"}
                                    , remark: {value: "", color: "#000000"}
                                    , keyword1: {value: topic.description, color: "#000000"}
                                    , keyword1: {value: description, color: "#000000"}
                                    , keyword2: {value: replyContent, color: "#000000"}
                                    , keyword3: {value: senderName, color: "#000000"}
                                }
@ -382,9 +384,9 @@ class WechatClient extends RedisModel {
                                url: url + "?openid=" + patient.openid +"&type="+topic.type+"&doctor="+message.sender_id+
                                "&consult=" + topic.id + "&toUser=" + targetUserId + "&toName=" + targetUserName+"&represented="+patient.code,
                                data: {
                                    first: {value: "您的健康咨询有新的回复", color: "#000000"}
                                    first: {value: "您的"+consultTitle+"咨询有新的回复", color: "#000000"}
                                    , remark: {value: "", color: "#000000"}
                                    , keyword1: {value: topic.description, color: "#000000"}
                                    , keyword1: {value: description, color: "#000000"}
                                    , keyword2: {value: replyContent, color: "#000000"}
                                    , keyword3: {value: senderName, color: "#000000"}
                                }
@ -397,7 +399,7 @@ class WechatClient extends RedisModel {
                                if(!patient.openid||key!=patient.openid){
                                    var member = map.get(key);
                                    var openid = key;
                                    var first = "您的家人("+patient.name+")的健康咨询有新的回复";
                                    var first = "您的家人("+patient.name+")的"+consultTitle+"咨询有新的回复";
                                    // 发送模板消息
                                    WechatSDK.sendTemplateMessage({
                                        touser: openid,
@ -407,7 +409,7 @@ class WechatClient extends RedisModel {
                                        data: {
                                            first: {value: first, color: "#000000"}
                                            , remark: {value: "", color: "#000000"}
                                            , keyword1: {value: topic.description, color: "#000000"}
                                            , keyword1: {value: description, color: "#000000"}
                                            , keyword2: {value: replyContent, color: "#000000"}
                                            , keyword3: {value: senderName, color: "#000000"}
                                        }