Browse Source

BUG修改

8 years ago
parent
commit
cd419f3bc5
2 changed files with 7 additions and 4 deletions
  1. 2 1
      src/doctor/include/commons.js
  2. 5 3
      src/doctor/models/doctor.js

+ 2 - 1
src/doctor/include/commons.js

@ -34,9 +34,10 @@ exports.CONTENT_TYPE = {
    SessionEnd: 7,  // 咨询结束
    TransSessionBegin:8,//邀请医生咨询开始
    TransImg:9,//求助医生图片信息
    D_CT_01:"D_CT_01",//您有新的指定咨询
    commaValues: function () {
        return "1,2,3,4,5,6,7";
        return "1,2,3,4,5,6,7,8,9";
    }
};

+ 5 - 3
src/doctor/models/doctor.js

@ -98,7 +98,9 @@ class Doctor extends BaseModel {
     * @param channel
     */
    static pushMessage(message, channel){
        if(message.contentType==CONTENT_TYPES.SessionBegin||message.contentType==CONTENT_TYPES.SessionEnd||message.contentType==CONTENT_TYPES.TransSessionBegin){
        if(message.contentType==CONTENT_TYPES.SessionBegin
            ||message.contentType==CONTENT_TYPES.SessionEnd
            ||message.contentType==CONTENT_TYPES.TransSessionBegin){
            //开始和结束不做推送
            log.info('message type equ 6 or 7 or 8 not send');
            return;
@ -126,9 +128,9 @@ class Doctor extends BaseModel {
            let title = '新消息';
            let content = message.content;
            if (message.contentType === CONTENT_TYPES.Image||message.contentType==CONTENT_TYPES.TransImg) {
            if (message.contentType == CONTENT_TYPES.Image||message.contentType==CONTENT_TYPES.TransImg) {
                content = '[图片]';
            } else if (message.contentType === CONTENT_TYPES.Audio) {
            } else if (message.contentType == CONTENT_TYPES.Audio) {
                content = '[语音]';
            } else if (message.contentType > 3) {
                content = '您有一条新消息';