molpay.html
10.9 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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,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="viewport" content="width=device-width, initial-scale=1">
<meta name="wap-font-scale" content="no">
<script src="../lib/fsize.js"></script>
<script src="../lib/jquery-3.1.1.min.js"></script>
<link rel="stylesheet" href="../css/base.css">
<link rel="stylesheet" href="../css/fireflyPay.css?v='20180628'">
<title></title>
<style type="text/css">
.mol-top{
width: 8rem;
}
.mol-top li{
width: 4rem;
}
.p-w{
background-color: #11101A;
padding-top: .5rem;
}
.gash-for-ul {
margin: 0 auto;
width: 10rem;
position: absolute;
left: 0;
top: 0;
transition: 0.5s all;
}
.gash-for-ul li {
height: 1.45rem;
line-height: 1.45rem;
color: #00F8DC;
background: #11101A;
margin-bottom: 0.05rem;
border: 0.04rem solid transparent ;
text-align: left;
}
.p-active{
border: 0.04rem solid #1cebd1 !important;
}
.gash-for-ul li img {
width: 0.5rem;
vertical-align: middle;
margin-top: -0.1rem;
margin-left: 0.5rem;
}
.gash-for-ul li span {
margin-left: 0.3rem;
font-size: 0.45rem;
}
.gash-for-ul li button {
height: 0.73rem;
line-height: 0.75rem;
width: 2.2rem;
background: linear-gradient(to right, #00f088, #00a0e9);
border-radius: 2rem;
color: #fff;
float: right;
margin-top: 0.35rem;
margin-right: 0.46rem;
font-size: 0.4rem;
}
.gash-rid {
visibility: hidden;
}
.login-tips{
color:#00a0e9;
}
.mol-content{
height: 13rem;
}
</style>
</head>
<body>
<div class="p-w">
<ul class="mol-top clearfix">
<li class="mol-li1 L-Cn mol-act">錢包儲值<div class="mol-click"></div></li>
<li class="mol-li1 L-En mol-act">Wallet<div class="mol-click"></div></li>
<li class="mol-li2 L-Cn">點卡儲值<div class="mol-click"></div></li>
<li class="mol-li2 L-En">Point card<div class="mol-click"></div></li>
</ul>
<div class="mol-content">
<div class="mol-card">
<p class="mol-title L-Cn">摩爾點卡儲值參考列表</p>
<p class="mol-title L-En">MOL Point card Pop-up referring list</p>
<p>USA</p>
<img class="usa-list" src="../images/mol-list1.png" alt="">
<img class="mal-list" src="../images/mol-list2.png" alt="">
</div>
<div style="padding-top: 1rem;" class="gash-for-ul clearfix"></div>
</div>
<button style="margin-top: 0.6rem" class="login-btn login-btn-go L-Cn">下一步</button>
<button style="margin-top: 0.6rem" class="login-btn login-btn-go L-En">Next</button>
<p class="login-tips L-Cn">如果出現儲值問題,請登錄FIREFLY.LIVE并聯繫客服</p>
<p class="login-tips L-En" >Any question, please contact online services</p>
</div>
</body>
<script src="../layer-v3.1.0/layer/layer.js"></script>
<script src="../lib/globalizationJq.js"></script>
<script>
if(sessionStorage.lang==1)$("title").text("Top-Up GEMs")
else $("title").text("寶石儲值")
btnOk = false;
btndianka = false;
var $ip = "https://webserver.yabolive.net";
// var $ip = "http://ceshi.yabolive.tv/web";
sessionStorage.pay = "MOLPAY";
$.ajax({
url: $ip + "/setting/getRecharge.html",
type: "post",
data: {
'cid': "web_gw",
'os': "WEB",
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"><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("touchstart", function () {
$(this).siblings("li").removeClass("p-active");
$(this).addClass("p-active");
rid= $(this).find('.gash-rid').text();
console.log(rid);
money=$(this).find('button i').text();
console.log(money);
btnOk = true;
$(".login-btn").removeClass("login-btn-go");
// var html=[];
// html+='<div><button class="next-btn btn" id="next-go">确认</button></div>';
// $(".paypalh").html(html);
// $(".next-btn").attr("id","next-go");
// $('.next-btn').attr("disabled",false);
})
}
})
$.ajax({
url: $ip + "/setting/getRecharge.html",
type: "post",
data: {
'cid': "web_gw",
'os': "WEB",
lang: sessionStorage.lang,
'vest': 0,
'paytype': "MOLPCPAY"
},
error: function (msg) {
console.log('请求出错');
},
success: function (msg) {
var data = JSON.parse(msg);
console.log(data)
}
})
$(".mol-card").on("touchstart", function (e) {
e.preventDefault();
startX = e.originalEvent.changedTouches[0].pageX,
startY = e.originalEvent.changedTouches[0].pageY;
});
$(".mol-card").on("touchmove", function (e) {
e.preventDefault();
moveEndX = e.originalEvent.changedTouches[0].pageX,
moveEndY = e.originalEvent.changedTouches[0].pageY,
X = moveEndX - startX,
Y = moveEndY - startY;
if (Math.abs(X) > Math.abs(Y) && X > 70) {
}
else if (Math.abs(X) > Math.abs(Y) && X < -70) {
}
else if (Math.abs(Y) > Math.abs(X) && Y > 10) {
// alert("top 2 bottom");
$(".mol-card").css("top","0");
}
else if (Math.abs(Y) > Math.abs(X) && Y < 10) {
// alert("bottom 2 top");
$(".mol-card").css("top","-5.2rem");
}
else {
}
});
$(".mol-content").on("touchstart", function (e) {
e.preventDefault();
startX = e.originalEvent.changedTouches[0].pageX,
startY = e.originalEvent.changedTouches[0].pageY;
});
$(".mol-content").on("touchmove", function (e) {
e.preventDefault();
moveEndX = e.originalEvent.changedTouches[0].pageX,
moveEndY = e.originalEvent.changedTouches[0].pageY,
X = moveEndX - startX,
Y = moveEndY - startY;
if (Math.abs(X) > Math.abs(Y) && X > 100) {
$(".gash-for-ul").css("left", "0rem");
$(".mol-card").css("left", "10rem");
$(".mol-li1").addClass("mol-act");
$(".mol-li2").removeClass("mol-act")
sessionStorage.pay = 'MOLPAY'
btndianka = false;
}
else if (Math.abs(X) > Math.abs(Y) && X < -100) {
$(".gash-for-ul").css("left", "-10rem");
sessionStorage.pay = 'MOLPCPAY';
btndianka = true;
$(".mol-card").css("left", "0rem");
$(".mol-li2").addClass("mol-act");
$(".mol-li1").removeClass("mol-act")
$(".login-btn").removeClass("login-btn-go");
}
else if (Math.abs(Y) > Math.abs(X) && Y > 10) {
// alert("top 2 bottom");
}
else if (Math.abs(Y) > Math.abs(X) && Y < 10) {
// alert("bottom 2 top");
}
else {
}
});
$(".mol-li1").on("touchstart", function () {
$(".gash-for-ul").css("left", "0rem");
$(".mol-card").css("left", "10rem");
$(".mol-li1").addClass("mol-act");
$(".mol-li2").removeClass("mol-act");
sessionStorage.pay = 'MOLPAY';
btndianka = false;
})
$(".mol-li2").on("touchstart", function () {
$(".gash-for-ul").css("left", "-10rem");
$(".mol-card").css("left", "0rem");
$(".mol-li2").addClass("mol-act");
$(".mol-li1").removeClass("mol-act");
sessionStorage.pay = 'MOLPCPAY';
btndianka = true;
})
$(".login-btn").on("touchstart", function () {
if (btnOk == true||btndianka==true) {
if (sessionStorage.pay == 'MOLPAY') {
$.ajax({
url: "https://webserver.yabolive.net/pay/getPayPreid.html",
type: "post",
data: {
'cid': "web_gw",
'os': "WEB",
lang: sessionStorage.lang,
"uid": sessionStorage.uid,
"product": "橙钻货币充值",
"country": "86",
"rid": rid,
"payType": sessionStorage.pay,
"payTypeSub": "H5",
"amount": money * 100,
"extend": "0",
"returnUrl": "http://www.firefly.live/phonepay/payend.html",
},
success: function (msg) {
var data = JSON.parse(msg);
console.log(data);
window.location.href = data.payInfo.url;
}
})
}
else if (sessionStorage.pay == 'MOLPCPAY') {
$.ajax({
url: $ip + "/pay/getPayPreid.html",
type: "post",
data: {
"cid": "web_gw",
"os": "h5",
"uid": sessionStorage.uid,
"product": "橙钻货币充值",
"country": "86",
"rid": 914,
"lang": sessionStorage.lang,
"payType": sessionStorage.pay,
"payTypeSub": "H5",
"amount": 500,
"extend": "",
"returnUrl": "http://www.firefly.live/phonepay/payend.html",
},
success: function (msg) {
var data = JSON.parse(msg);
console.log(data);
window.location.href = data.payInfo.url
}
})
}
}
else {
if(sessionStorage.lang==1) layer.msg("Please select Top-Up amount")
else layer.msg("請選擇充值金額");
}
})
</script>
</html>