123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- var self,
- idCard,
- state;
- mui.plusReady(function(){
- self = plus.webview.currentWebview();
- state = self.state;
- idCard = self.idCard;
- //返回事件
- mui.back = function(){
- backAction();
- }
- plus.nativeUI.showWaiting();
- sendGet("doctor/patient/getPatientJWInfo",{idcard:idCard}, function(){
- plus.nativeUI.closeWaiting();
- mui.toast("请求失败");
- }, function(res){
- plus.nativeUI.closeWaiting();
- if(res.status==200){
- var html = template('list_tmp',{data:res.data,state:state})
- $(".c-main").html(html)
- bindEvent()
- }else{
- mui.toast('获取数据失败')
- }
- })
- function bindEvent(){
- $(".jm-btn").on('tap',function(){
- mui.openWindow({
- id: "juminqianyue",
- url: "juminqianyue.html",
- extras: {
- idCard:idCard,
- state:1
- }
- })
- })
- $(".jm-btn2").on('tap',function(){
- mui.openWindow({
- id: "dailiqianyue",
- url: "../../mine/html/dailiqianyue.html",
- extras: {
- name:self.name,
- idCard:self.idCard,
- kind:1
- }
- })
- })
- }
- //关闭页面
- function backAction(){
- var jmqy = plus.webview.getWebviewById('juminqianyue');
- var dljd = plus.webview.getWebviewById('dailijiandang');
- if(dljd){dljd.close('none')}
- if(jmqy){jmqy.close('none')}
- mui.later(function(){
- self.close()
- }, 300);
- }
- })
- template.helper("setPhoto", function(p) {
- return getImgUrl(p);
- })
- template.helper("setSex", function(p) {
- if(p==1){return '男'}
- if(p==2){return '女'}
- })
|