Authored by 郝肖肖

gulp ge

... ... @@ -31,6 +31,8 @@ var $footer = $('#yoho-footer'),
//为您优选-40位随机数指纹请求id
var RECID = (new Date().getTime() + '_H5_YOHOBUY_' + Math.floor(Math.random() * 1000000 + 1000000) + '_' + Math.floor(Math.random() * 1000000 + 1000000));
var _ChannelVary = {boys: 1, girls: 2, kids: 3, lifestyle: 4};
function cookie(name) {
var cookies = document.cookie,
cookieVal,
... ... @@ -144,6 +146,25 @@ function rePosFooter() {
}
}
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.push(hash[0]);
vars[hash[0]] = hash[1];
}
return vars;
}
// 给jQuery 扩展 queryString函数
$.extend({
queryString: queryString
});
/**
*
* add extra margin-bottom for footer to show yoho copyright when there is fixed bottom element on page
... ... @@ -206,6 +227,12 @@ function reMarginFooter(fixedElement) {
}
$footer.removeClass('hide');
// 接受微信商城或者第三方来源的数据埋点信息
if ($.queryString().union_type) {
setCookie('union_type', $.queryString().union_type);
}
}());
(function(w, d, s, j, f) {
... ... @@ -222,7 +249,7 @@ function reMarginFooter(fixedElement) {
a.src = j;
m.parentNode.insertBefore(a, m);
})(window, document, 'script', ('https:' === document.location.protocol ? 'https' : 'http') + '://' +
'cdn.yoho.cn/yas-jssdk/1.0.17/yas.js', '_yas');
'cdn.yoho.cn/yas-jssdk/1.0.18/yas.js', '_yas');
(function() {
var uid = getUid(),
... ... @@ -301,22 +328,9 @@ function givePoint(parameter) {
return false;
}
//男:1,女:2,潮童:3,创意生活:4
switch(cookie('_Channel')) {
case 'boys':
CID = 1;
break;
case 'girls':
CID = 2;
break;
case 'kids':
CID = 3;
break;
case 'lifestyle':
CID = 4;
break;
}
// 男:1,女:2,潮童:3,创意生活:4
CID = _ChannelVary[cookie('_Channel')] || 1;
parameter = $.extend({
'REC_POSE': '',
'REC_ID': RECID,
... ... @@ -409,23 +423,6 @@ $('.nav-home').on('touchstart', function() {
window.cancelAnimationFrame = cancelAnimationFrame;
}());
// 给jQuery 扩展 queryString函数
$.extend({
queryString: function() {
var vars = [],
hash,
i;
var hashes = window.location.search.slice(1).split('&');
for (i = 0; i < hashes.length; i++) {
hash = hashes[i].split('=');
vars.push(hash[0]);
vars[hash[0]] = hash[1];
}
return vars;
}
});
//临时修改 footer
function phoneHidden(phone) {
return phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');
... ... @@ -452,8 +449,12 @@ window.rePosFooter = rePosFooter;
window.reMarginFooter = reMarginFooter;
window.queryString = queryString();
window.givePoint = givePoint;
window._ChannelVary = _ChannelVary;
});
define("js/category/entry", ["jquery","hammer","swiper","lazyload","index"], function(require, exports, module){
/**
... ... @@ -4626,34 +4627,32 @@ define("js/index/footer", ["jquery","hammer"], function(require, exports, module
var $ = require("jquery"),
Hammer = require("hammer");
var floatLayerBtnHammer;
var floatLayerBtnHammer,
C_ID;
require("js/common");
/**
* 获取url参数
*/
function getQueryString(name) {
var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
var r = window.location.search.substr(1).match(reg);
if (r != null) {
return window.unescape(r[2]);
}
return null;
}
C_ID = window._ChannelVary[window.cookie('_Channel')] || 1;
function downLoadApp() {
var appUrl = 'http://www.yohoshow.com/about/index/yohobuyqr/';
var appUrl = 'http://union.yoho.cn/union/downapp.html';
var clickedAt = new Date();
setTimeout(function() {
var mkt = getQueryString('mkt_code');
var mkt = window.queryString.union_type || window.cookie('union_type') || false;
if ((new Date()) - clickedAt < 2000) {
if (mkt) {
appUrl += '?union_type=' + mkt;
}
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({
op: 'YB_DOWNLOAD_C',
param: JSON.stringify({'C_ID': C_ID, 'TO_URL': appUrl})
}, true);
}
window.location = appUrl;
}
}, 500);
... ...
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.