Authored by 毕凯

Merge branch 'feature/activity' into 'release/6.2'

load-href-handle



See merge request !981
... ... @@ -63,16 +63,19 @@ function topNavInit() {
}
function ceXuanFuInit() {
var cxf = $('#sidebar');
var pageid = cxf.attr('pageid');
let cxf = $('#sidebar');
let pageid = cxf.attr('pageid');
let href = '//activity.yoho.cn/featuresidebar/';
if (!pageid) {
return;
}
// //m.yohobuy.com/activity/featuresidebar/
// //activity.yoho.cn/featuresidebar/
$('#sidebar').load('//m.yohobuy.com/activity/featuresidebar/' + pageid + '.html', function() {
if (location.hostname === 'm.yohobuy.com') {
href = '//m.yohobuy.com/activity/featuresidebar/';
}
$('#sidebar').load(href + pageid + '.html', function() {
$('.sidebar-img').click(function() {
$('.sidebar').show();
});
... ... @@ -93,6 +96,12 @@ function ceXuanFuInit() {
function diXuanFuInit() {
let $bottomFixClickArea = $('#bottomFixClickArea');
let $bottomPerShow = $('.per-show');
let href = '//activity.yoho.cn/featurebottombar/';
if (location.hostname === 'm.yohobuy.com') {
href = '//m.yohobuy.com/activity/featurebottombar/';
}
$bottomPerShow.css('bottom', $bottomFixClickArea.height());
... ... @@ -100,7 +109,7 @@ function diXuanFuInit() {
let pageId = $(elem).data('url');
let $bottomShow = $('#bottomShow' + pageId);
$bottomShow.load('//m.yohobuy.com/activity/featurebottombar/' + pageId + '.html');
$bottomShow.load(href + pageId + '.html');
$('#bottomClick' + pageId).on('click', () => {
if ($bottomShow.hasClass('hide')) {
... ...
... ... @@ -903,7 +903,7 @@ var _replaceData = function _replaceData(el, cond, data, wh, fp) {
var brandDom = el.find('.product-brand');
if (brandDom) {
if (data.shop_id) {
brandDom.attr('href', '//m.yohobuy.com/product/index/brand?domain=' + data.brand_domain + '&openby:yohobuy={"action":"go.shop","params":{"shop_id":' + data.shop_id + ',"shop_template_type":' + data.shop_template_type + '}}');
brandDom.attr('href', '//m.yohobuy.com/product/index/brand?domain=' + data.brand_domain + '&openby:yohobuy={"action":"go.shop","params":{"shop_id":' + data.shop_id + ',"shop_template_type":' + data.shop_template_type + ',"is_red_shop":' + shop.is_red_shop + '}');
} else {
brandDom.attr('href', '//m.yohobuy.com/product/index/brand?domain=' + data.brand_domain + '&openby:yohobuy={"action":"go.brand","params":{"brand_id":' + data.brand_id + '}}');
}
... ...