Xiao_yanpeng 7 rokov pred
rodič
commit
dc090c62c8

+ 5 - 9
app/record/html/consult-detail.html

@ -8,8 +8,7 @@
    <title>咨询详情页</title>
    <link href="../../../css/bootstrap.min.css" rel="stylesheet">
    <link href="../../../plugins/toastr/toastr.min.css" rel="stylesheet">
    <link href="../../../plugins/fancybox/jquery.fancybox.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="js/plugins/layer/skin/layer.css"/>
    <link rel="stylesheet" type="text/css" href="../../../plugins/layer/skin/layer.css"/>
    <link rel="stylesheet" href="../../../plugins/plyr/plyr.css">
    <link href="../css/style.css" rel="stylesheet">
    <link rel="stylesheet" href="../css/consulting.css">
@ -40,15 +39,13 @@
	            {{/if}}
            {{if type == 2}}
            <dd class="word-bread wb-img">
                <a class="fancybox" href="{{content | getSourceUrl}}" title="图片">
                    <img width="100" src="{{content | getSourceUrl}}" />
                </a>
                <img class="showBigPic" width="100" src="{{content | getSourceUrl}}" />
            </dd>
            {{/if}}
            {{if type == 3}}
            <dd class="word-bread">
                <div class="player" style="width:292px;">
                    <audio controls>
                    <audio controls style="position: relative;top: 15px;">
                        <!-- Audio files -->
                        <source src="{{content.path | getSourceUrl}}" type="audio/mp3">
                        <!-- Fallback for browsers that don't support the <audio> element -->
@ -76,7 +73,7 @@
                <div class="player" style="width:292px;">
                    <video poster="{{content.img | getSourceUrl}}" controls crossorigin>
                        <source src="{{content.path | getSourceUrl}}" type="video/mp4">
                        <a href="{{content.path | getSourceUrl}}">Download</a>
                        <!--<a href="{{content.path | getSourceUrl}}">Download</a>-->
                    </video>
                </div>
            </dd>
@ -139,7 +136,7 @@
    </script>
</body>
<script>
    (function(d,u){var a=new XMLHttpRequest(),b=d.body;if("withCredentials" in a){a.open("GET",u,true);a.send();a.onload=function(){var c=d.createElement("div");c.setAttribute("hidden","");c.innerHTML=a.responseText;b.insertBefore(c,b.childNodes[0])}}})(document, "css/plugins/plyr/sprite.svg");
    (function(d,u){var a=new XMLHttpRequest(),b=d.body;if("withCredentials" in a){a.open("GET",u,true);a.send();a.onload=function(){var c=d.createElement("div");c.setAttribute("hidden","");c.innerHTML=a.responseText;b.insertBefore(c,b.childNodes[0])}}})(document, "../../../plugins/plyr/sprite.svg");
</script>
<script src="../../../js/jquery-2.2.4.js"></script>
<script src="../../../js/bootstrap.min.js"></script>
@ -150,7 +147,6 @@
<script src="../../../js/template.js"></script>
<script src="../../../api/http-request.js"></script>
<script src="../../../api/record-api.js"></script>
<script src="../../../plugins/fancybox/jquery.fancybox.js"></script>
<script src="../../../plugins/plyr/plyr.js"></script>
<script src="../js/consult-detail.js"></script>
</html>

+ 20 - 16
app/record/js/consult-detail.js

@ -39,8 +39,7 @@ $(function(){
						html += formatMsg(reply);
					}
	            }
	//          $(".fancybox").fancybox({openEffect:"none",closeEffect:"none"});
	//          plyr.setup();
	          	plyr.setup();
	            $("#talkBox").append(html);
	        }
	    });
@ -55,6 +54,11 @@ $(function(){
	    if(typeMsg == 7 || typeMsg == 10 || typeMsg == 13){
	    	var content = reply.content;
	        html = template('sys_msg_tmp', {content: content});
	    }else if(typeMsg == 5){
	    	var con = JSON.parse(reply.content);
			if(reply.sender_id == docInfo.code){
				html = '<div class="time-tips"><span class="xt-xiaoxi">已向'+ con.doctor_name +'医生求助</span></div>';
			}
	    }else{
	    	//获取个人成员信息
		    var member;
@ -90,20 +94,20 @@ $(function(){
	        };
	        html = template('msg_tmp', obj);
	    }
	    
	    
	    
//	    else if(){
//	    }else if(typeMsg == 5){
//			var con = JSON.parse(reply.content);
//			if(msg.sender_id == docInfo.code){
//				html += '<div class="time-tips"><div>已向'+ con.doctor_name +'医生求助<a data-name="'+ con.doctor_name +'" data-code="'+ con.doctor +'" class="qiuzhu5" href="javascript:void(0)">立即查看</a> </div></div>';
//			} 
//			continue;
//		}else{
//	    }
	    return html;
	}
    
    template.helper('getSourceUrl', function(str){
        return httpRequest.getImgUrl(str);
    });
    
    $("#talkBox").on("click",".showBigPic",function(){
    	var $this = $(this)
    	layer.open({
    		type: 1,
	      	title:false,
	      	shadeClose: true,
	      	content:'<img style="max-width:100%" src="'+$this.attr('src')+'">'
    	})
    })
})

+ 1 - 1
component/record/consultation-list.js

@ -26,7 +26,7 @@ Vue.component('consultation-list', {
		      type: 2,
		      title:title,
		      maxmin: true,
		      area: ['600px', '600px'],
		      area: ['1000px', '600px'],
		      shadeClose: false,
		      content: 'consult-detail.html?consult='+list.code+'&type='+list.type
		    });