chenyue il y a 6 ans
Parent
commit
7650a232e4

+ 3 - 3
html/payment/html/paymentList.html

@ -22,13 +22,13 @@
		<div id="app" v-cloak>
			<div class="bgc-fff c-f17 plr15 ptb10" >
				<span class="c-333">{{data.cardNo}}&nbsp;({{data.name}})&nbsp;</span>
				<span class="qiehuan-txt" @click="changeCards">切换</span>
				<span v-if="cardlenght>1" class="qiehuan-txt" @click="changeCards">切换</span>
				<img src="../images/rili_icon.png" class="date-icon"/>			
			</div>
			<div id="wrapper" class="mui-scroll-wrapper" style="top: 50px;"  v-if="length!=0">
				<div class="mui-scroll">
					<ul class="plr15 pb15">
						<li class="labelIcon" :class="payTypeList[item.payType]?payTypeList[item.payType].type:''"  v-for="(item,i) in dataList" v-key="i"  @click="gotoResult(item.seqNo)">
						<li  v-for="(item,i) in dataList" v-key="i" class="labelIcon" :class="payTypeList[item.payType]?payTypeList[item.payType].type:''"  @tap="gotoResult(item.seqNo)">
							<div>
								<img :src="payTypeList[item.payType]?payTypeList[item.payType].Img:''" width="24" height="24"/>
								<span class="c-f14 pl10" style="position: relative;top: -2px;">{{payTypeList[item.payType]?payTypeList[item.payType].text:''}}</span>
@ -41,7 +41,7 @@
								<span>{{item.hospitalName}}</span>
								<span style="float: right;">{{item.payTimeStart}}</span>
							</div>	
						</li>	
						</li>					
					</ul>
				</div>
			</div>

+ 12 - 18
html/payment/js/payment.js

@ -122,18 +122,7 @@ var loading = dialog({
							paySign: data.sign, // 支付签名
							success: function (res) {
								// 支付成功后的回调函数
								alert(JSON.stringify(res))
								if(res.errMsg == "chooseWXPay:ok"){
	                               window.location.href='../../payment/html/paymentResult.html?seqNo='+data.seqNo;
	                            }else{
		
									var errorparams={seqNo:data.seqNo,wxErrorMsg:res.errMsg}
									sendPost("third/hy/pay/setPayLogWxFail", errorparams, "json", "post",function(){  
								    	dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:'请求失败'}).show();
								     }, function(res){
								     	window.location.href='../../payment/html/paymentResult.html?seqNo='+data.seqNo;
								    })
	                            }
	                               window.location.href='../../payment/html/paymentResult.html?seqNo='+data.seqNo;									
							},
							cencel:function(res){
								// 支付取消回调函数
@ -141,7 +130,12 @@ var loading = dialog({
							},
							fail: function(res){
								// 支付失败回调函数
								//alert(JSON.stringify(res));
								var errorparams={seqNo:data.seqNo,wxErrorMsg:res.errMsg}
								sendPost("third/hy/pay/setPayLogWxFail", errorparams, "json", "post",function(){  
							    	dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:'请求失败'}).show();
							     }, function(res){
							     	window.location.href='../../payment/html/paymentResult.html?seqNo='+data.seqNo;
							    })
							}
						});
					}else{		        	
@ -198,11 +192,11 @@ function judgeWxVersion(name){
	else
	 {  
	 	if ( wechatInfo[1] < "5.0" ) { 
				 	    loading.close();
		    			dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:'当前微信低于5.0,不支持微信支付,请升级后支付'}).show(); 
		    		}else{
		    			ispass=true
		    		} 	
	 	    loading.close();
			dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:'当前微信低于5.0,不支持微信支付,请升级后支付'}).show(); 
		}else{
			ispass=true
		} 	
	 }
	 return ispass
} 

+ 13 - 9
html/payment/js/paymentList.js

@ -16,8 +16,8 @@ var iscrollState='';//判断滑动方向
			    contentover : "释放立即刷新",
			    contentrefresh : "正在刷新...",
			    callback: function(){
			    	id = 0;
			    	iscrollState='down'
			    	myVue.getList()
			    	myVue.isdown()
				}
		    },
@ -41,6 +41,7 @@ var iscrollState='';//判断滑动方向
			data:{},
			dataList:[],
			length:1,
			cardlenght:0,
			id:"",
			queryList:{
				month:"",
@ -68,7 +69,8 @@ var iscrollState='';//判断滑动方向
			    	dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:'请求失败'}).show();
			       }, function(res){
			        if(res.status == 200){ 
			        	if(res.data.length>0){			        		
			        	if(res.data.length>0){
			        		vm.cardlenght=res.data.length
							if(Request.id){																
				        		vm.data=res.data.filter(function(item){
				        			return item.id==Request.id
@ -149,15 +151,17 @@ var iscrollState='';//判断滑动方向
					}
				},10);
			},
			isdown:function(){alert(123)
				setTimeout(function(){
			isdown:function(){
//				setTimeout(function(){
					mui('#wrapper').pullRefresh().endPulldownToRefresh(false);
					mui('#wrapper').pullRefresh().enablePullupToRefresh();//重置
				},1000)},
			isup:function(){alert(456)
				setTimeout(function(){
					mui('#wrapper').pullRefresh().endPullupToRefresh(false);//true表示没有更多数据了
				},1000)},
//				},1000)
			},
			isup:function(){
//				setTimeout(function(){
					mui('#wrapper').pullRefresh().endPullupToRefresh(true);//true表示没有更多数据了
//				},1000)
			},
		},
	})

+ 3 - 4
html/payment/js/paymentResult.js

@ -18,7 +18,7 @@ var loading = dialog({
			},
			failureResult:{
				status:"failure-pay",
				msg:"恭喜您缴费成功,您将享有医院在线的所有服务,以下为您的缴费信息。",
				msg:"系统繁忙,请重新充值缴费。",
				Img:"../images/jiaofeishibai_icon.png",	
				txt:"缴费失败",				
			},
@ -45,12 +45,11 @@ var loading = dialog({
			        if(res.status == 200){
			        	vm.data=JSON.parse(res.data)
			        	if(!vm.data){vm.data=vm.initdata}
			        	if(vm.data.payStatus==1){
			        	if(vm.data.payStatus==1){   //充值状态,0未完成,1已完成,2失败
			        		vm.result=vm.successResult
			        	}else{
			        		vm.result=vm.failureResult
			        		vm.result.msg=vm.data.wechatMsg
			        	}			        	
			        	}
			        }else{
			          dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:'数据获取失败'}).show();
			        }