Browse Source

医生演示,不可进入处增加提示

chenyue 6 years ago
parent
commit
cf2a391e1f

+ 5 - 1
html/home/js/yishengim.js

@ -386,6 +386,10 @@ bindEvents = function () {
	})
	*/
	.on('tap','li',function() {
		var userAgent = JSON.parse(plus.storage.getItem("userAgent"));
			    if(userAgent.observer){
			        mui.toast("观察者模式无法发送消息");
			    }else{
		var $this = $(this),
		code = $this.attr('data-code'),
		name = $this.attr('data-name'),
@ -395,7 +399,7 @@ bindEvents = function () {
		}else{
			openWebview("../../message/html/tuanduiqunliao.html",{sessionId: code, sessionName: name});
		}
		
		}
	})
	
	/**

+ 14 - 1
html/jkjy/js/article-info.js

@ -4,13 +4,18 @@ var showHandleBar = true;
var patient = null;
var patientName = "";
var pCodes = [],
    referrer;
    referrer,
    isfromAdmin;
mui.init();
mui.plusReady(function() {
    self = plus.webview.currentWebview();
    articleId = self.articleId;
    patient = self.patient;
    var userAgent = JSON.parse(plus.storage.getItem("userAgent"));
    if(userAgent.observer){
        isfromAdmin=true;
    }
    patientName = self.patientName;
    pCodes = self.pCodes;
    referrer = self.referrer;
@ -168,6 +173,9 @@ function send(article){
function bindEvents() {
    $("#xiangqing-content").on('tap','.collection', function(){
    	if(isfromAdmin){
        		mui.toast("观察者模式无法收藏健康文章");
        	}else{
        var $this = $(this);
        var status = $this.attr("data-status");
        var code = $this.attr("data-code");
@ -176,11 +184,15 @@ function bindEvents() {
        }else{
            unCollectionArticle(code,$this);
        }
        }
    }).on('tap','.share', function(){
        var $this = $(this);
        var code = $this.attr("data-code");
        var title = $this.attr("data-title");
        if(!patient){
        	if(isfromAdmin){
        		mui.toast("观察者模式无法发送健康文章");
        	}else{
            if(pCodes){
                dialog({
                    title: '<div><div class="c-f18 c-17b3ec c-t-left">发送给</div><div class="mt5 c-f14 c-t-left c-909090">'+pCodes.length+'人</div></div>',
@ -202,6 +214,7 @@ function bindEvents() {
                    origin: 'jiaoyu'
                });
            }
            }
        }else{
            showDialog(code,title,patientName);
        }

+ 36 - 23
html/jkjy/js/article-list.js

@ -8,7 +8,8 @@ var firstLevelId,
    patientName,
    teamCode,
    pCodes, //从慢病管理页面中跳转过来的多个居民的code
    referrer;
    referrer,
    isfromAdmin;
var isAdmin; //判断是否是管理员
@ -21,6 +22,10 @@ mui.init();
mui.plusReady(function(){
    var self = plus.webview.currentWebview();
    firstLevelId = self.firstLevelId;
    var userAgent = JSON.parse(plus.storage.getItem("userAgent"));
    if(userAgent.observer){
        isfromAdmin=true;
    }
    isAdmin = self.isAdmin;
    patient = self.patient; 
    patientName = self.patientName;
@ -325,6 +330,9 @@ function bindEvents(){
        }
        return false;
    }).on('tap','div.collect', function(){
    	if(isfromAdmin){
        		mui.toast("观察者模式无法收藏健康文章");
        	}else{
        var $this = $(this);
        var status = $this.attr("data-status");
        var code = $this.attr("data-code");
@ -333,6 +341,7 @@ function bindEvents(){
        }else{
            unCollectionArticle(code,$this);
        }
        }
    }).on('tap','div.share', function(){
        var $this = $(this);
        var code = $this.attr("data-code");
@ -341,30 +350,34 @@ function bindEvents(){
            openWebviewExtras("../../home/html/tuisong_duixiang.html",{articleId:code});
        }else{
            if(!patient){
                if(pCodes){
                    dialog({
                        title: '<div><div class="c-f18 c-17b3ec c-t-left">发送给</div><div class="mt5 c-f14 c-t-left c-909090">'+pCodes.length+'人</div></div>',
                        content: '<div><div class="c-f16 c-323232 c-t-left mb10">《'+title+'》</div><input id="messageInput" class="c-f14 pl10" placeholder="给居民留言..."/></div>',
                        okValue: '立即发送',
                        cancelValue: '我再看看',
                        cancel: function () {
                            return;
                        },
                        ok: function() {
                            send(code);
                        }
                    }).showModal();
                    return false;
                }else{
                    openWebview("xuanzejumin_more.html", {
                        article: code,
                        articleTitle: title,
                        origin: 'jiaoyu'
                    });
                }
            	if(isfromAdmin){
            		mui.toast("观察者模式无法发送健康文章");
            	}else{
	                if(pCodes){
	                    dialog({
	                        title: '<div><div class="c-f18 c-17b3ec c-t-left">发送给</div><div class="mt5 c-f14 c-t-left c-909090">'+pCodes.length+'人</div></div>',
	                        content: '<div><div class="c-f16 c-323232 c-t-left mb10">《'+title+'》</div><input id="messageInput" class="c-f14 pl10" placeholder="给居民留言..."/></div>',
	                        okValue: '立即发送',
	                        cancelValue: '我再看看',
	                        cancel: function () {
	                            return;
	                        },
	                        ok: function() {
	                            send(code);
	                        }
	                    }).showModal();
	                    return false;
	                }else{
	                    openWebview("xuanzejumin_more.html", {
	                        article: code,
	                        articleTitle: title,
	                        origin: 'jiaoyu'
	                    });
	                }           		
            	}
            }else{
                showDialog(code,title,patientName);
            }
            } 
        }
    });
    

+ 7 - 2
html/mine/html/zuyuanziliao.html

@ -175,7 +175,11 @@
					})
			})
			
			$('.send-c').on('tap', function(){
			$('.send-c').on('tap', function(){				
			    var userAgent = JSON.parse(plus.storage.getItem("userAgent"));
			    if(userAgent.observer){
			        mui.toast("观察者模式无法发送消息");
			    }else{
				mui.openWindow({ 
					id: "p2p",
					url: "../../message/html/p2p.html",
@ -186,7 +190,8 @@
						otherPhoto: docInfo.photo,
						otherSex: docInfo.sex
					}
				})
				})			    	
			    }
			})
		</script>
	</body>