瀏覽代碼

Merge branch 'feature-1.2.6' of Amoy/im.doctor into dev

linzhuo 8 年之前
父節點
當前提交
fddcee06e0
共有 3 個文件被更改,包括 9 次插入5 次删除
  1. 2 1
      src/doctor/include/commons.js
  2. 5 3
      src/doctor/models/doctor.js
  3. 2 1
      src/doctor/resources/config/config.prod.js

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

@ -34,9 +34,10 @@ exports.CONTENT_TYPE = {
    SessionEnd: 7,  // 咨询结束
    SessionEnd: 7,  // 咨询结束
    TransSessionBegin:8,//邀请医生咨询开始
    TransSessionBegin:8,//邀请医生咨询开始
    TransImg:9,//求助医生图片信息
    TransImg:9,//求助医生图片信息
    D_CT_01:"D_CT_01",//您有新的指定咨询
    commaValues: function () {
    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
     * @param channel
     */
     */
    static pushMessage(message, 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');
            log.info('message type equ 6 or 7 or 8 not send');
            return;
            return;
@ -126,9 +128,9 @@ class Doctor extends BaseModel {
            let title = '新消息';
            let title = '新消息';
            let content = message.content;
            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 = '[图片]';
                content = '[图片]';
            } else if (message.contentType === CONTENT_TYPES.Audio) {
            } else if (message.contentType == CONTENT_TYPES.Audio) {
                content = '[语音]';
                content = '[语音]';
            } else if (message.contentType > 3) {
            } else if (message.contentType > 3) {
                content = '您有一条新消息';
                content = '您有一条新消息';

+ 2 - 1
src/doctor/resources/config/config.prod.js

@ -69,4 +69,5 @@ exports.imDbConfig = imDbConfig;
exports.geTuiConfig = geTuiConfig;
exports.geTuiConfig = geTuiConfig;
exports.geTuiAppStoreCfg = geTuiAppStoreCfg;
exports.geTuiAppStoreCfg = geTuiAppStoreCfg;
exports.wlyyServerConfig = wlyyServerConfig;
exports.wlyyServerConfig = wlyyServerConfig;
exports.transServerConfig = transServerConfig;
exports.transServerConfig = transServerConfig;
exports.wechatConfig = wechatConfig;