Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

libai / fireflyReg

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • fireflyReg
  • h5pay
  • phonepay
  • visapay.html
Find file
BlameHistoryPermalink
  • libai's avatar
    测试 · 8e24e39a
    libai committed a year ago
    8e24e39a
visapay.html 4.2 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
<!DOCTYPE html>
<html>

<head lang="en">
	<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>
	<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;
		}
	</style>

</head>

<body>
	<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=202007081146666666"></script>
	<script type="text/javascript">
		$('title').text(langList[langType].paytitle);

		$('.gash-tips').text(langList[langType].ques);

		var _url = 'https://www.firefly.live/h5pay';
		var flag = false;
		getUserInfo();
		$.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 () {
					var money = $(this).children("button").children('i').text();
					var rid = $(this).children(".gash-rid").text();
					sessionStorage.money = money;
					sessionStorage.rid = rid;
					console.log(flag);
					if (flag) {
						$.ajax({
							url: $ip + "/pay/getPaymentWall.html",
							type: "POST",
							data: {
								uid: sessionStorage.uid,
								country: '86',
								rid: sessionStorage.rid,
								amount: sessionStorage.money * 100,
								returnUrl: _url + '/phonepay/paySuccess.html?lang=' + sessionStorage.lang + '&type=h5',
								failureUrl: _url + '/phonepay/payFail.html?lang=' + sessionStorage.lang + '&type=h5',
								firstName: sessionStorage.firstName || '',
								lastName: sessionStorage.lastName || '',
								email: sessionStorage.email || '',
								phone: sessionStorage.phone || '',
								product: langList[langType].visatitle,
								payType: sessionStorage.pay,
							},
							success: function (res) {
								var data = JSON.parse(res);
								console.log(data);
								if (data.code == 1) {
									window.location.href = data.url;
								} else {
									layer.msg(data.msg);
								}
							}
						})
					} else {
						window.location.href = 'visaInfo.html';
					}


				})
			}
		})

		var blackList = [10004, 3908840, 4062416]
		function getUserInfo() {
			$.ajax({
				type: "POST",
				url: $ip + '/pay/checkAsiaBillFirst.html',
				data: {
					'cid': "web_gw",
					'os': "h5",
					'lang': sessionStorage.lang,
					'vest': 0,
					'uid': sessionStorage.uid
				},
				dataType: "JSON",
				success: function (res) {
					if (res.code == 0) {
						if (sessionStorage.pay == 'PAYMENTWALL') {
							flag = false;
						} else {
							flag = true;
						}
					} else if (res.code == 1) {
						if (blackList.indexOf(res.entity.uid) > -1) {
							return
						}
						flag = true;
						sessionStorage.firstName = res.entity.firstName;
						sessionStorage.lastName = res.entity.lastName;
						sessionStorage.email = res.entity.email;
						sessionStorage.phone = res.entity.phone;
					}
				}
			})
		}

	</script>

</body>

</html>