...
|
...
|
@@ -38,11 +38,21 @@ let shareData = { |
|
|
imgUrl: productPic
|
|
|
};
|
|
|
|
|
|
if (yoho.isMarsApp || yoho.isNowApp) {
|
|
|
yoho.ready(function() {
|
|
|
let nowShareData = {
|
|
|
title: `推荐这本城市指南给你:${productName}`,
|
|
|
link: location.href.split('?')[0],
|
|
|
desc: '最近很多 KOL 在推!据说是探索城市必备神器',
|
|
|
desCircle: `最近被刷屏的这本城市指南终于可以买到了!${productName}`,
|
|
|
imgUrl: productPic
|
|
|
};
|
|
|
|
|
|
yoho.ready(function() {
|
|
|
if (yoho.isMarsApp) {
|
|
|
yoho.invokeMethod('set.shareInfo', shareData);
|
|
|
});
|
|
|
}
|
|
|
} else if (yoho.isNowApp) {
|
|
|
yoho.invokeMethod('set.shareInfo', nowShareData);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
window.rePosFooter && window.rePosFooter();
|
|
|
|
...
|
...
|
@@ -122,9 +132,6 @@ setTimeout(() => { |
|
|
}
|
|
|
|
|
|
if (productId && (goodsId || productSkn)) {
|
|
|
let $promotionYohoCoin = $('#placeholder-promotion-yohocoin');
|
|
|
let promotionYohoCoinT = require('product/detail/promotion-yoho-coin.hbs');
|
|
|
|
|
|
setTimeout(() => {
|
|
|
$.ajax({
|
|
|
type: 'GET',
|
...
|
...
|
@@ -143,23 +150,6 @@ setTimeout(() => { |
|
|
let regPro = /\/product\/pro_([\d]+)_([\d]+)/;
|
|
|
let regSeckill = /\/product\/seckill/;
|
|
|
|
|
|
$promotionYohoCoin.replaceWith(promotionYohoCoinT({
|
|
|
promYohoCoinText: data.promYohoCoinText
|
|
|
}));
|
|
|
|
|
|
let $coinItem = $('#goodsDiscountYohoCoin');
|
|
|
let $coinIntroBox = $('.coin-intro-box');
|
|
|
|
|
|
// 返有货币促销模块点击事件
|
|
|
$coinItem.on('click', function() {
|
|
|
$coinIntroBox.removeClass('hide');
|
|
|
});
|
|
|
|
|
|
// 关闭有货币促销展示面板
|
|
|
$coinIntroBox.on('click', function() {
|
|
|
$coinIntroBox.addClass('hide');
|
|
|
});
|
|
|
|
|
|
// let regProSeckill = /\/product\/seckill\/pro_([\d]+)_([\d]+)/;
|
|
|
let thisHref = window.location.href;
|
|
|
let thisRefer = document.referrer;
|
...
|
...
|
@@ -315,7 +305,7 @@ setTimeout(() => { |
|
|
/*
|
|
|
* 获取商品 相关数据: 1. 促销 2. feedback 3. 店铺, 并初始化
|
|
|
*/
|
|
|
(function(skn, productId, brandId) { // eslint-disable-line
|
|
|
+ (function(skn, productId, brandId) { // eslint-disable-line
|
|
|
// 模版: 促销, feedback, 店铺
|
|
|
let promotionT = require('product/detail/promotion.hbs');
|
|
|
let feedbackT = require('product/detail/feedbacks.hbs');
|
...
|
...
|
@@ -376,7 +366,7 @@ setTimeout(() => { |
|
|
|
|
|
// goods-discount下拉按钮点击事件
|
|
|
if ($goodsDiscount.length && $discountFolder.children().length > 0) {
|
|
|
$discountFirstItem.on('click', function() {
|
|
|
$goodsDiscount.on('click', function() {
|
|
|
if ($discountFolder.is(':hidden')) {
|
|
|
$discountFirstItem.removeClass('short-text');
|
|
|
$discountArrow.removeClass('icon-down').addClass('icon-up').html('');
|
...
|
...
|
|