...
|
...
|
@@ -122,6 +122,9 @@ setTimeout(() => { |
|
|
}
|
|
|
|
|
|
if (productId && (goodsId || productSkn)) {
|
|
|
let $promotionYohoCoin = $('#placeholder-promotion-yohocoin');
|
|
|
let promotionYohoCoinT = require('product/detail/promotion-yoho-coin.hbs');
|
|
|
|
|
|
setTimeout(() => {
|
|
|
$.ajax({
|
|
|
type: 'GET',
|
...
|
...
|
@@ -140,6 +143,23 @@ 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;
|
...
|
...
|
@@ -295,7 +315,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');
|
...
|
...
|
@@ -345,8 +365,6 @@ setTimeout(() => { |
|
|
function promotionInit() {
|
|
|
let $goodsDiscount = $('#goodsDiscount');
|
|
|
let $discountFirstItem = $goodsDiscount.find('.first-item');
|
|
|
let $coinItem = $goodsDiscount.find('.coin-item');
|
|
|
let $coinIntroBox = $('.coin-intro-box');
|
|
|
let $discountFolder = $goodsDiscount.find('.discount-folder');
|
|
|
let $discountArrow = $goodsDiscount.find('.first-item .iconfont');
|
|
|
|
...
|
...
|
@@ -370,15 +388,6 @@ setTimeout(() => { |
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
// 返有货币点击事件
|
|
|
$coinItem.on('click', function() {
|
|
|
$coinIntroBox.removeClass('hide');
|
|
|
});
|
|
|
|
|
|
$coinIntroBox.on('click', function() {
|
|
|
$coinIntroBox.addClass('hide');
|
|
|
});
|
|
|
}
|
|
|
|
|
|
// boot
|
...
|
...
|
|