app-downloads.html
14.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
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Yoho!Buy有货|年轻人潮流购物中心,中国潮流购物风向标</title>
<meta name="keywords"
content="Yoho!Buy有货 有货官网,潮流志,潮流男装,潮牌,美国潮牌,日本潮牌,香港潮牌,潮牌店,新品首发,欧美潮流,全球购,代购,时尚,流行,特卖,B2C,正品,购物网站,网上购物,货到付款">
<meta name="description" content="Yoho!Buy有货,年轻人潮流购物中心,中国最大的潮流商品购物网站。100%品牌正品保证,支持货到付款。">
<meta name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta http-equiv="cleartype" content="on">
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<meta content="telephone=no" name="format-detection"/>
<meta content="email=no" name="format-detection"/>
<link rel="dns-prefetch" href="//cdn.yoho.cn">
<link rel="dns-prefetch" href="//static.yohobuy.com">
<link rel="dns-prefetch" href="//img10.static.yhbimg.com">
<link rel="dns-prefetch" href="//img11.static.yhbimg.com">
<link rel="dns-prefetch" href="//img12.static.yhbimg.com">
<link rel="dns-prefetch" href="//img13.static.yhbimg.com">
<link rel="dns-prefetch" href="//analytics.m.yohobuy.com">
<link rel="dns-prefetch" href="//search.m.yohobuy.com">
<link rel="dns-prefetch" href="//list.m.yohobuy.com">
<link rel="dns-prefetch" href="//guang.m.yohobuy.com">
<script type="text/javascript">
(function (d, c) {
var e = d.documentElement, a = "orientationchange" in window ? "orientationchange" : "resize", b = function () {
var f = e.clientWidth;
if (!f) {
return
}
if (f >= 640) {
e.style.fontSize = "40px"
} else {
e.style.fontSize = 40 * (f / 640) + "px"
}
};
if (!d.addEventListener) {
return
}
b();
c.addEventListener(a, b, false);
d.addEventListener("DOMContentLoaded", b, false)
})(document, window);
</script>
<link rel="stylesheet" media="all" href="//cdn.yoho.cn/m-yohobuy-node/5.3.20/common.css">
<link rel="stylesheet" media="all" href="//cdn.yoho.cn/m-yohobuy-node/5.3.20/activity.app-downloads.css">
<link rel="apple-touch-icon-precomposed"
href="//static.yohobuy.com/m/v1/img/touch/apple-touch-icon-144x144-precomposed-new.png">
<link rel="apple-touch-startup-image" sizes="640x920"
href="//static.yohobuy.com/m/v1/img/startup/startup-retina.png"
media="screen and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2)">
<link rel="apple-touch-startup-image" sizes="320x460" href="//static.yohobuy.com/m/v1/img/startup/startup.png"
media="screen and (max-device-width: 320)">
</head>
<body class=" ">
<div class="main-wrap" id="main-wrap">
<div class="container">
<div id="no-download"></div>
<div class="banner"></div>
<div class="main">
<div class="slide-box">
<div class="swiper-wrapper clearfix">
<div class="yohobuy" tag="0">
<div class="swiper-yohobuy bg"></div>
<div class="ewm-area">
<img src="//cdn.yoho.cn/yohocn/160315/images/ewm-yohobuy.png"/>
<div class="ewm-info"></div>
</div>
<span id="download" class="download-btn" onclick="evokeDown();">点击下载 · Yoho!Buy有货</span>
</div>
</div>
</div>
<div class="slide-pagination clearfix">
</div>
</div>
<div class="footer">
CopyRight © 2007-2017 YOHO!新力传媒
</div>
<div class="mask">
<div class="wx-img1"></div>
<div class="wx-img2"></div>
<div class="wx-img3"></div>
</div>
</div>
</div>
<script>var STATIC_RESOURCE_PATH = '//cdn.yoho.cn/m-yohobuy-node/assets';</script>
<script src="//cdn.yoho.cn/m-yohobuy-node/5.3.20/libs.js"></script>
<!--<script src="//cdn.yoho.cn/m-yohobuy-node/5.3.20/activity.app-downloads.js"></script>-->
<script type="text/javascript">
function cookie(name) {
var cookies = document.cookie,
cookieVal;
if (cookies) {
cookies = cookies.split(';');
cookies.forEach(function (c) {
if (c.indexOf(name) > -1) {
cookieVal = decodeURIComponent($.trim(c.replace(name + '=', '')));
return;
}
});
}
return cookieVal;
}
function queryString() {
var vars = {},
hash,
i;
var hashes = window.location.search.slice(1).split('&');
for (i = 0; i < hashes.length; i++) {
hash = hashes[i].split('=');
vars[hash[0]] = hash[1];
}
return vars;
}
function xhrGet(url, cb) {
var conn = (window.XMLHttpRequest) ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP");
conn.onreadystatechange = function () {
if (conn.readyState == 4 && conn.status == 200) {
cb(conn.responseText)
}
};
conn.open("GET", url, true);
conn.send();
}
window.cookie = cookie;
var params = queryString();
var openbyYohobuy = decodeURIComponent(params['openby:yohobuy'] || '') || '{"action":"go.home","params":{"gender":"1","channel":"2"}}';
var url = 'yohobuy://yohobuy.com/goapp?openby:yohobuy=' + openbyYohobuy;
var isWechat = /micromessenger/i.test(navigator.userAgent || '');
if(isWechat){
url = 'http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho&g_f=995445';
location.href = url;
}
var u = navigator.userAgent.toLowerCase();
var isiOS = u.indexOf('os') > -1 || u.indexOf('iphone') > -1 || u.indexOf('mac') > -1 || u.indexOf('ipad') > -1;
var androidExp = new RegExp('MQQBrowser');//安卓QQ内置浏览器正则
var isAndroidQQ = androidExp.test(navigator.userAgent); //判断是不是QQ内置浏览器
var version, type, appid, td;
var isApp = /yohobuy/i.test(navigator.userAgent);
if(params.union_type){
url = 'yohobuy://yohobuy.com/goapp?ct='+params.union_type+'&openby:yohobuy=' + openbyYohobuy;
}
if (isiOS) {
var regStr_saf = /os [\d._]*/gi;
var verinfo = u.match(regStr_saf);
version = (verinfo + '').replace(/[^0-9|_.]/ig, '').replace(/_/ig, '.');
type = 'ios';
appid = '490655927';
td = window.screen.width + '_' + window.screen.height + '_' + type + '_' + version;
} else if (u.indexOf('android') > -1 || u.indexOf('linux') > -1) {
type = 'android';
appid = 'com.yoho';
try {
var indextd = u.indexOf('_td');
var index = u.indexOf(' build');
var preString = '';
if (indextd > -1) {
preString = u.substr(0, indextd);
preString = preString.substr(preString.lastIndexOf(";") + 1);
preString = preString.replace(/\s+/g, '').replace(/_/ig, '');
var sansungIndex = preString.indexOf('samsung-');
if (sansungIndex > -1) {
preString = preString.substr(8);
}
} else if (index > -1) {
preString = u.substr(0, index);
preString = preString.substr(preString.lastIndexOf(";") + 1);
preString = preString.replace(/\s+/g, '').replace(/_/ig, '');
//alert(preString);
}
deviceType = preString;
version = u.substr(u.indexOf('android') + 8, 3);
td = deviceType + '_' + type + '_' + version;
} catch (e) {
}
}
var appPath = url;
var ifr;
function evokeDown() {
//记录唤醒时间
var openTime = +new Date();
window.setTimeout(function () {
if (ifr) {
document.body.removeChild(ifr);
}
//如果setTimeout 回调超过2500ms,则弹出下载
if ((+new Date()) - openTime > 500 && !isApp) {
if (isiOS) {
url = '//itunes.apple.com/cn/app/yoho!-you-huo/id490655927?mt=8';
} else {
url = '//yoho-apps.qiniudn.com/YohoBuy_YOHO.apk';
}
unionClick();
location.href = url;
// window.open(url);
}
}, 1000);
if (isiOS) {
window.location.href = appPath;
} else {
ifr = document.createElement('iframe');
ifr.src = appPath;
ifr.style.display = 'none';
document.body.appendChild(ifr);
}
}
//1: 男生,2-女生,3-潮童,4-创意生活
var CHANNELS = {
boys: 1,
girls: 2,
kids: 3,
lifestyle: 4
};
function downloadApp() {
var url;
var channel = window.cookie('_Channel');
if(isWechat){
url = 'http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho&g_f=995445';
}else{
if (isiOS) {
url = '//itunes.apple.com/cn/app/yoho!-you-huo/id490655927?mt=8';
} else {
if(isAndroidQQ){ //安卓qq处理方式同微信,也进入应用宝下载
url = 'http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho&g_f=995445';
}else{
url = '//yoho-apps.qiniudn.com/YohoBuy_YOHO.apk';
}
}
}
// 上报 nginx 数据
xhrGet('//m.yohobuy.com/activitylog.json?download2', function () {
});
// 上报 yas 数据
if (typeof _yas !== 'undefined') {
_yas.sendCustomInfo && _yas.sendCustomInfo({
op: 'YB_DOWNLOAD_C',
param: JSON.stringify({
C_ID: CHANNELS[channel],
TO_URL: encodeURIComponent(url)
})
}, true);
}
// 联盟点击
if (params.union_type) {
unionClick();
}
location.href = url;
}
function unionClick() {
var unionUrl = 'https://union.yoho.cn/union/ClickUnionRest/addUnion?client_type=' + type;
// var unionUrl = 'http://127.0.0.1:8088/union/ClickUnionRest/addUnion?client_type=' + type;
if (params.union_type) {
unionUrl += '&union_type=' + params.union_type;
}
if (params.identify_id) {
unionUrl += '&identify_id=' + params.identify_id;
}
if (params.callbackurl) {
unionUrl += '&callbackurl=' + params.callbackurl;
}
if (params.td) {
unionUrl += '&td=' + params.td;
} else {
unionUrl += '&td=' + td;
}
if (params.appid) {
unionUrl += '&appid=' + params.appid;
} else {
unionUrl += '&appid=' + appid;
}
if (params.idfa) {
unionUrl += '&idfa=' + params.idfa;
} else if (params.IDFA) {
unionUrl += '&idfa=' + params.IDFA;
}
if (params.imei) {
unionUrl += '&imei=' + params.imei;
} else if (params.IMEI) {
unionUrl += '&imei=' + params.IMEI;
}
if(params.invite_code){
unionUrl += '&invite_code=' + params.invite_code;
}
xhrGet(unionUrl, function () {
});
}
</script>
<script>
(function (w, d, s, j, f) {
var a = d.createElement(s);
var m = d.getElementsByTagName(s)[0];
w.YohoAcquisitionObject = f;
w[f] = function () {
w[f].p = arguments;
};
a.async = 1;
a.src = j;
m.parentNode.insertBefore(a, m);
}(window, document, 'script', (document.location.protocol === 'https:' ? 'https:' : 'http:') + '//cdn.yoho.cn/yas-jssdk/2.2.1/yas.js', '_yas'));
var _hmt = _hmt || [];
(function () {
function getUid() {
var uid,
name = '_UID',
cookies = (document.cookie && document.cookie.split(';')) || [];
cookies.forEach(function (c) {
if (c.indexOf(name) > -1) {
uid = decodeURIComponent(c.replace(name + '=', '').trim());
return;
}
});
if (!uid) return 0;
uid = uid.split('::');
if (!uid || uid.length < 4) {
return 0;
}
return uid[1];
}
// function queryString() {
// var vars = {},
// hash,
// i;
// var hashes = window.location.search.slice(1).split('&');
//
// for (i = 0; i < hashes.length; i++) {
// hash = hashes[i].split('=');
// vars[hash[0]] = hash[1];
// }
// return vars;
// }
var uid = getUid() || params.uid;
uid = uid === 0 ? '' : uid;
window._ozuid = uid; // 暴露ozuid
if (window._yas) {
window._yas(1 * new Date(), '2.2.1', 'yohobuy_m', uid, '', '');
}
// 非登录状态,加载百度统计
if (!uid) {
setTimeout(function () {
(function () {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?65dd99e0435a55177ffda862198ce841";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
(function () {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?e5b83a487a4458aa5abca43f5779b764";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
}, 1000);
}
}());
</script>
</body>
</html>