var Request = GetRequest(); var checktype=false; var loading = dialog({ contentType: 'load', skin: 'bk-popup', }); (function() { new Vue({ el: "#app", data: { result:{}, successResult:{ status:"success-pay", msg:"恭喜您缴费成功,您将享有医院在线的所有服务,以下为您的缴费信息。", Img:"../images/jiaofeichengong_icon.png", txt:"缴费成功", }, failureResult:{ status:"failure-pay", msg:"系统繁忙,请重新充值缴费。", Img:"../images/jiaofeishibai_icon.png", txt:"缴费失败", }, healthType:["","就诊卡缴费充值","住院缴费充值"], initdata:{seqNo:"","patientName":"","healthNo":"","healthType":1,"payAmount":"","payTimeStart":"",}, data:{}, frompay:false, }, mounted: function() { var vm = this checkUserAgent(); vm.checkType() }, methods: { //获取数据 getData:function(){ var vm=this loading.showModal(); sendPost("third/hy/pay/gerPayOrder", {seqNo:Request.seqNo}, "json", "get",function(){ loading.close(); dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:'请求失败'}).show(); }, function(res){ loading.close(); if(res.status == 200){ vm.data=res.data if(!vm.data){vm.data=vm.initdata} if(vm.data.payStatus==1){ //充值状态,0未完成,1已完成,2失败 vm.result=vm.successResult }else{ vm.result=vm.failureResult } }else{ dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:'数据获取失败'}).show(); } }) }, // backClick:function(){ window.history.back(); }, //判断是否验证登录通过 checkType:function(){ var vm=this var timer = setInterval(function(){ if(checktype){ clearInterval(timer); vm.getData() } },10); }, }, }) })() function queryInit(){ checktype=true }