<!DOCTYPE html>
<html>

	<head lang="en">
		<!-- Global site tag (gtag.js) - Google Analytics -->
		<meta charset="UTF-8">

		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
		<meta content="telephone=no" name="format-detection">
		<meta name="wap-font-scale" content="no">
		<title></title>
		<meta name="keywords" content="FireFly,直播福利,直播,uplive,美女直播,美女視頻,泡泡寶盒,視頻直播,一直播,rc唱唱,美女直播間,丫播直播">
		<meta name="description" content="FireFly直播,深夜福利派送秀場。花樣主播私密秀,直播分享生活日常,記錄生活點點滴滴,陪你一起度過最美的時光,在直播間偶遇你的TA,連麥私聊,親密互動,說說生活,聊聊人生,談談理想......">
		<link rel="stylesheet" href="../css/layer.css">
		<link rel="stylesheet" href="../css/base.css" />
		<link rel="stylesheet" href="../css/phonepay.css?v='20180509'" />
		<link rel="stylesheet" href="../css/gash.css">
		<script src='../lib/fsize.js'></script>
		<style type="text/css">
			body,
			.gash-for-ul li {
				background-color: #11101A;
				margin-bottom: 0;
			}
			.gash-for-ul li  img{
				    margin-top: -0.25rem;
			}
			.payTitle{
			    color: #00a0e9;
			    padding-top: .2rem;
			    width: 90%;
			    margin: 0 auto;
			    font-size: .347rem;
			}
		</style>

	</head>

	<body>
		<p class="payTitle"></p>
		<ul class="gash-for-ul clearfix">

		</ul>

		<p class="gash-tips"></p>

		<script src="../lib/jquery-3.1.1.min.js"></script>
		<script src="../layer-v3.1.0/layer/layer.js"></script>
		<script src="../lib/payLangchange.js?v=202008181029"></script>
		<script type="text/javascript">
			$('title').text(langList[langType].paytitle);
			$('.payTitle').html(langList[langType].wpay1);
			$('.gash-tips').text(langList[langType].ques);
			var flag = true;
			$.ajax({
				url: $ip + "/setting/getRecharge.html",
				type: "POST",
				data: {
					'cid': "web_gw",
					'os': "h5",
					lang: sessionStorage.lang,
					'vest': 0,
					'paytype': sessionStorage.pay
				},
				error: function(msg) {
					console.log('请求出错');
				},
				success: function(msg) {
					var data = JSON.parse(msg);
					var html = [];
					for(var i = 0; i < data.data.length; i++) {
						html += '<li>';
						html += '<img src="../img/zuan.png" alt="">';
						html += '<span>' + data.data[i].diamond + '</span>';
						html += '<button>' + data.data[i].price[0].currency + "<i style='font-style:normal'>" + data.data[i].price[0].price + '</i></button>';
						html += "<span class='gash-rid'>" + data.data[i].rid + "</span>";
						html += '</li>';
					}
					$(".gash-for-ul").html(html);
					$(".gash-for-ul li").on("click", function() {

						if(flag) {
							flag = false;
							var money = $(this).children("button").children('i').text();
							var rid = $(this).children(".gash-rid").text();
							$.ajax({
								type:"POST",
								url:$ip+"/pay/getWPay.html",
								data:{
                    'lang':sessionStorage.lang,
                    'uid':sessionStorage.uid,
                    'product':"橙钻充值",
                    'country':"86",
                    'rid':rid,
                    'payType':sessionStorage.pay,
                    'h5':'https://events.yabolive.net/phonepay/payend.html',
                    'payTypeSub':"NAVITE",
                    'extend':"0",
                    'amount':money*100,
               },
								async:true,
								success:function(res){
									flag = true;
									var data = JSON.parse(res);
									if(data.code == 0){			
										var url = JSON.parse(data.message);
										if(sessionStorage.gofrom == 'web'){
											window.location.href =url.h5Url;
										} else {											
											appCollaboration(url.h5Url);
										}
									} else {
										layer.msg(data.message);
									}
								}
							});
						}

					})
				}
			})
			
			
			
			function appCollaboration(h5Url){
				var sUserAgent = navigator.userAgent.toLowerCase();
			  var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
			  var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
			  var bIsMidp = sUserAgent.match(/midp/i) == "midp";
			  var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
			  var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
			  var bIsAndroid = sUserAgent.match(/android/i) == "android";
			  var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
			  var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
			  if (!(bIsIpad|| bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM) ){
			  }
			  else if(bIsAndroid){
						
			      var obj = {
							"cid": 5,
		          "reqCode": new Date().getTime(),
		          "data": {
		              "url": h5Url,
		          }
						}
						var obj2 = JSON.stringify(obj);
			      window.yazhai.appCollaboration(obj2);
			  }else if(bIsIphoneOs||bIsIpad){
			  	var obj = {
							"cid": 5,
		          "reqCode": new Date().getTime(),
		          "data": {
		              "url": h5Url,
		              "software":1
		          }
						}
						var obj2 = JSON.stringify(obj);
			      window.webkit.messageHandlers.appCollaboration.postMessage(obj2);
			  }
			}
			//客户端回调结果
			function appCallback(msg) {
			    console.log(msg);
			}
		</script>

	</body>

</html>