...
|
...
|
@@ -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');
|
...
|
...
|
@@ -356,7 +376,7 @@ setTimeout(() => { |
|
|
|
|
|
// goods-discount下拉按钮点击事件
|
|
|
if ($goodsDiscount.length && $discountFolder.children().length > 0) {
|
|
|
$goodsDiscount.on('click', function() {
|
|
|
$discountFirstItem.on('click', function() {
|
|
|
if ($discountFolder.is(':hidden')) {
|
|
|
$discountFirstItem.removeClass('short-text');
|
|
|
$discountArrow.removeClass('icon-down').addClass('icon-up').html('');
|
...
|
...
|
|