ilivepayInfo.html
5.34 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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<!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">
<link rel="stylesheet" href="../css/base.css" />
<script src='../lib/fsize.js'></script>
<title></title>
<style>
.main {
width: 10rem;
margin: 0 auto;
position: relative;
background-color: #11101A;
min-height: 100vh;
}
.mTitle {
padding: .453rem;
color: #F44D4D;
font-size: .32rem;
}
.mBox {
padding: 0 .453rem;
}
.mBoxName {
font-size: .4rem;
color: #999;
margin: .667rem 0 .293rem;
}
.mBoxIpt {
width: 100%;
border: none;
height: 1.173rem;
border: .027rem solid #333;
background-color: #11101a;
border-radius: 0.133rem;
text-indent: .32rem;
color: #FFF;
}
input::-webkit-input-placeholder {
color: #4d4d4d;
}
input:-moz-placeholder {
color: #4d4d4d;
}
input::-moz-placeholder {
color: #4d4d4d;
}
input:-ms-input-placeholder {
color: #4d4d4d;
}
.mBtn {
width: 8.533rem;
height: 1.28rem;
line-height: 1.28rem;
text-align: center;
margin: 1.627rem auto 0;
position: relative;
border-radius: 0.666rem;
background: linear-gradient(90deg, rgba(0, 240, 136, 1), rgba(0, 160, 233, 1));
font-size: 0.453rem;
color: #FFF;
}
</style>
</head>
<body>
<div class="main">
<p class="mTitle"></p>
<div class="mBox">
<p class="mBoxName mBoxName1"></p>
<input class="mBoxIpt iptName1" oninput="if(value.length>100)value=value.slice(0,100)" />
<p class="mBoxName mBoxName2"></p>
<input class="mBoxIpt iptName2" oninput="if(value.length>50)value=value.slice(0,50)" />
<p class="mBoxName mBoxName3"></p>
<input class="mBoxIpt iptTel" oninput="if(value.length>50)value=value.slice(0,50)" type="number"
pattern="[0-9]*" />
<p class="mBoxName mBoxName4"></p>
<input class="mBoxIpt iptEmali" oninput="if(value.length>100)value=value.slice(0,100)" />
</div>
<div class="mBtn"></div>
</div>
<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=202007081537777"></script>
<script type="text/javascript">
var data = url_get_params(location.href)
// if (data.uid != undefined) {
// sessionStorage.uid = data.uid
// sessionStorage.lang = data.lang
// sessionStorage.pay = data.pay
// sessionStorage.money = data.money / 100
// sessionStorage.rid = data.rid
// }
function url_get_params(url_path) {
var url = url_path;
var theRequest = new Object();
if (url.indexOf("?") != -1) {
var str = url.substr(url.indexOf("?") + 1);
strs = str.split("&");
for (var i = 0; i < strs.length; i++) {
theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
}
}
return theRequest;
}
if (langType == 2) {
$('.mTitle,.mBox input,.mBox p').css('direction', 'rtl');
}
var _url = 'https://firefly.live/h5pay';
$('title').text(langList[langType].paytitle);
// $('.mTitle').text(langList[langType].titleName);
$('.mBoxName1').text(langList[langType].firstName);
$('.iptName1').attr('placeholder', langList[langType].enterFirstName);
$('.mBoxName2').text(langList[langType].lastName);
$('.iptName2').attr('placeholder', langList[langType].enterLastName);
$('.mBoxName3').text(langList[langType].tel);
$('.iptTel').attr('placeholder', langList[langType].enterTel);
$('.mBoxName4').text(langList[langType].email);
$('.iptEmali').attr('placeholder', langList[langType].enterEmail);
$('.mBtn').text(langList[langType].submitName);
$('.mBtn').on('click', function () {
var name1 = $('.iptName1').val();
if (!name1 && name1.length == 0) {
layer.msg(langList[langType].msg1);
return false;
}
var name2 = $('.iptName2').val();
if (!name2 && name2.length == 0) {
layer.msg(langList[langType].msg2);
return false;
}
var tel = $('.iptTel').val();
if (!tel && tel.length == 0) {
layer.msg(langList[langType].msg3);
return false;
}
var email = $('.iptEmali').val().replace(/(^\s*)|(\s*$)/g, "");
if (!email && email.length == 0) {
layer.msg(langList[langType].msg4);
return false;
}
var reg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
if (!reg.test(email)) {
layer.msg(langList[langType].msg5);
return false;
}
$.ajax({
url: $ip + "/pay/toIlivepay",
type: "post",
data: {
uid: localStorage.uid,
country: '86',
rid: sessionStorage.rid,
amount: sessionStorage.money,
returnUrl: _url + '/phonepay/paySuccess.html?lang=' + sessionStorage.lang,
failureUrl: _url + '/phonepay/payFail.html?lang=' + sessionStorage.lang,
firstName: name1,
lastName: name2,
email: email,
phone: tel,
product: "H5寶石儲值",
payType: sessionStorage.pay,
},
success: function (data) {
let res = JSON.parse(data);
if (res.code == 1) {
window.location.href = res.url;
} else {
layer.msg(res.msg);
}
}
})
})
</script>
</body>
</html>