Authored by 邱骏

修改楼层样式

... ... @@ -13,7 +13,8 @@ const isTest = process.env.NODE_ENV === 'test3' || process.env.NODE_ENV === 'tes
const domains = {
// api: 'http://api.yoho.cn/',
api: 'http://api.yoho.cn/',
// service: 'http://service.yoho.cn/',
// yoLuck: 'https://action.yoho.cn',
... ... @@ -26,7 +27,7 @@ const domains = {
// platformApi: 'http://172.16.6.210:8088/',
api: 'http://api-test3.dev.yohocorp.com/',
// api: 'http://api-test3.dev.yohocorp.com/',
service: 'http://api-test3.dev.yohocorp.com/',
liveApi: 'http://testapi.live.yohops.com:9999/',
singleApi: 'http://api-test3.dev.yohocorp.com/',
... ...
... ... @@ -329,8 +329,6 @@ function getShopProductLinks() {
let shopId = $(this).data('shopid');
let id = $(this)[0].id;
console.log(id, shopId);
if (shopId && id) {
shopArr.ids.push(id);
shopArr.shopIds.push(shopId);
... ... @@ -352,7 +350,6 @@ function getShopProductLinks() {
if (index >= 0) {
let divId = shopArr.ids[index];
let shopUrl = `//m.yohobuy.com/product/index/brand?shop_id=${shopInfo.shops_id}&openby:yohobuy={"action":"go.shop","params":{"shop_id":"${shopInfo.shops_id}","shop_template_type":"${shopInfo.shop_template_type}","shop_name":"${shopInfo.shop_name}"${is_red_shop}}}`;// eslint-disable-line
console.log(shopUrl);
$('#' + divId).find('.shop-wrapper a').attr('href', shopUrl);
}
}
... ... @@ -926,57 +923,6 @@ function activityPlan() {
}
}
// 单独改变未完成的楼层的高度
function changeShopAndProductHeightSingle(parent, className) {
let img = $(parent).find('.' + className);
if (img[0] && !img.hasClass('completed')) {
// console.log(img[0].src, /(\.jpg|\.png)/.test(img[0].src));
if (/(\.jpg|\.png)/.test(img[0].src)) {
let image = new Image();
image.src = img[0].src;
image.onload = function() {
img.removeClass(className);
img.addClass('completed');
let height = $(parent).find('.product-wrapper .feature-product-info').height();
$(parent).find('.shop-wrapper .feature-shop-info').height(height);
};
} else {
setTimeout(changeShopAndProductHeightSingle, 300, parent, className);
}
}
}
// 改变店铺+商品组中店铺的高度
function changeShopAndProductHeight() {
$('.shop-product-container').each(function() {
let img = $(this).find('.product-detail-img').eq(0);
let that = this;
if (img[0] && !img.hasClass('completed')) {
// console.log(img[0].src, /(\.jpg|\.png)/.test(img[0].src));
if (/(\.jpg|\.png)/.test(img[0].src)) {
let image = new Image();
image.src = img[0].src;
image.onload = function() {
img.addClass('completed');
let height = $(that).find('.product-wrapper .feature-product-info').height();
$(that).find('.shop-wrapper .feature-shop-info').height(height);
};
} else {
let className = 'no-completed-' + Math.random().toString(16).substr(2, 8);
img.addClass(className);
setTimeout(changeShopAndProductHeightSingle, 300, that, className);
}
}
});
}
$(function() {
if ($('.over').length) {
// 过期/删除 状态的 活动
... ... @@ -1041,8 +987,6 @@ $(function() {
// 定时计划
activityPlan();
changeShopAndProductHeight();
getShopProductLinks();
// 小程序相关处理
... ...
... ... @@ -398,7 +398,7 @@
}
&.left .product-wrapper {
padding-left: 220px;
padding-left: 222px;
.product-source .feature-product-info:nth-child(n+4) {
display: none;
... ...