Browse Source

Merge branch 'master' of http://192.168.1.220:10080/raolu/PC-prescription

yezehua 7 years ago
parent
commit
95f72dd0bb
3 changed files with 26 additions and 3 deletions
  1. 23 0
      js/api-service.js
  2. 1 1
      js/buz/prescription-consulting.js
  3. 2 2
      js/util.js

+ 23 - 0
js/api-service.js

@ -194,6 +194,28 @@
        return uuid.join('');
    }
    
    /*
     * 获取图片路径方法修改
     */
    function getImgUrl(str){
        if(typeof str != 'string'){
            return "";
        }
        if(str.length == 0){
            return "";
        }else{
            if(str.indexOf("../")>-1){
                //访问本地路径
                return str;
            }else if((str.indexOf("http://")>-1) || (str.indexOf("https://")>-1)){
                return str;
            }else{
                //服务器上的图片路径
                return imgServer + str;
            }
        }
    }
    APIService = {
        agentName: agentName,
@ -205,6 +227,7 @@
        httpPost: httpPost,
        imHttpGet: imHttpGet,
        imHttpPost: imHttpPost,
        getImgUrl: getImgUrl,
        getDoctorInfo: function() {
            return httpGet('doctor/baseinfo');
        },

+ 1 - 1
js/buz/prescription-consulting.js

@ -116,7 +116,7 @@ function formatMsg(reply){
                break;
            }
        }
        var img = APIService.getImgUrl(reply.avatar);
        var img = APIService.getImgUrl(member.avatar);
        if((img.indexOf('http') == -1) && (img.indexOf("https") == -1)){
            img = member.is_patient ? 'img/p-default.png' : 'img/d-male.png';
        }

+ 2 - 2
js/util.js

@ -129,10 +129,10 @@ function getStatusName(status){
            name = '支付失败';
            break;
        case '50':
            name = '订单已支付';
            name = '配药中';
            break;
        case '60':
            name = '配药完成';
            name = '等待领药';
            break;
        case '61':
        case '62':