|
@@ -38,11 +38,21 @@ let shareData = { |
|
@@ -38,11 +38,21 @@ let shareData = { |
38
|
imgUrl: productPic
|
38
|
imgUrl: productPic
|
39
|
};
|
39
|
};
|
40
|
|
40
|
|
41
|
-if (yoho.isMarsApp || yoho.isNowApp) {
|
|
|
42
|
- yoho.ready(function() {
|
41
|
+let nowShareData = {
|
|
|
42
|
+ title: `推荐这本城市指南给你:${productName}`,
|
|
|
43
|
+ link: location.href.split('?')[0],
|
|
|
44
|
+ desc: '最近很多 KOL 在推!据说是探索城市必备神器',
|
|
|
45
|
+ desCircle: `最近被刷屏的这本城市指南终于可以买到了!${productName}`,
|
|
|
46
|
+ imgUrl: productPic
|
|
|
47
|
+};
|
|
|
48
|
+
|
|
|
49
|
+yoho.ready(function() {
|
|
|
50
|
+ if (yoho.isMarsApp) {
|
43
|
yoho.invokeMethod('set.shareInfo', shareData);
|
51
|
yoho.invokeMethod('set.shareInfo', shareData);
|
44
|
- });
|
|
|
45
|
-}
|
52
|
+ } else if (yoho.isNowApp) {
|
|
|
53
|
+ yoho.invokeMethod('set.shareInfo', nowShareData);
|
|
|
54
|
+ }
|
|
|
55
|
+});
|
46
|
|
56
|
|
47
|
window.rePosFooter && window.rePosFooter();
|
57
|
window.rePosFooter && window.rePosFooter();
|
48
|
|
58
|
|
|
@@ -122,9 +132,6 @@ setTimeout(() => { |
|
@@ -122,9 +132,6 @@ setTimeout(() => { |
122
|
}
|
132
|
}
|
123
|
|
133
|
|
124
|
if (productId && (goodsId || productSkn)) {
|
134
|
if (productId && (goodsId || productSkn)) {
|
125
|
- let $promotionYohoCoin = $('#placeholder-promotion-yohocoin');
|
|
|
126
|
- let promotionYohoCoinT = require('product/detail/promotion-yoho-coin.hbs');
|
|
|
127
|
-
|
|
|
128
|
setTimeout(() => {
|
135
|
setTimeout(() => {
|
129
|
$.ajax({
|
136
|
$.ajax({
|
130
|
type: 'GET',
|
137
|
type: 'GET',
|
|
@@ -143,23 +150,6 @@ setTimeout(() => { |
|
@@ -143,23 +150,6 @@ setTimeout(() => { |
143
|
let regPro = /\/product\/pro_([\d]+)_([\d]+)/;
|
150
|
let regPro = /\/product\/pro_([\d]+)_([\d]+)/;
|
144
|
let regSeckill = /\/product\/seckill/;
|
151
|
let regSeckill = /\/product\/seckill/;
|
145
|
|
152
|
|
146
|
- $promotionYohoCoin.replaceWith(promotionYohoCoinT({
|
|
|
147
|
- promYohoCoinText: data.promYohoCoinText
|
|
|
148
|
- }));
|
|
|
149
|
-
|
|
|
150
|
- let $coinItem = $('#goodsDiscountYohoCoin');
|
|
|
151
|
- let $coinIntroBox = $('.coin-intro-box');
|
|
|
152
|
-
|
|
|
153
|
- // 返有货币促销模块点击事件
|
|
|
154
|
- $coinItem.on('click', function() {
|
|
|
155
|
- $coinIntroBox.removeClass('hide');
|
|
|
156
|
- });
|
|
|
157
|
-
|
|
|
158
|
- // 关闭有货币促销展示面板
|
|
|
159
|
- $coinIntroBox.on('click', function() {
|
|
|
160
|
- $coinIntroBox.addClass('hide');
|
|
|
161
|
- });
|
|
|
162
|
-
|
|
|
163
|
// let regProSeckill = /\/product\/seckill\/pro_([\d]+)_([\d]+)/;
|
153
|
// let regProSeckill = /\/product\/seckill\/pro_([\d]+)_([\d]+)/;
|
164
|
let thisHref = window.location.href;
|
154
|
let thisHref = window.location.href;
|
165
|
let thisRefer = document.referrer;
|
155
|
let thisRefer = document.referrer;
|
|
@@ -315,7 +305,7 @@ setTimeout(() => { |
|
@@ -315,7 +305,7 @@ setTimeout(() => { |
315
|
/*
|
305
|
/*
|
316
|
* 获取商品 相关数据: 1. 促销 2. feedback 3. 店铺, 并初始化
|
306
|
* 获取商品 相关数据: 1. 促销 2. feedback 3. 店铺, 并初始化
|
317
|
*/
|
307
|
*/
|
318
|
-(function(skn, productId, brandId) { // eslint-disable-line
|
308
|
++ (function(skn, productId, brandId) { // eslint-disable-line
|
319
|
// 模版: 促销, feedback, 店铺
|
309
|
// 模版: 促销, feedback, 店铺
|
320
|
let promotionT = require('product/detail/promotion.hbs');
|
310
|
let promotionT = require('product/detail/promotion.hbs');
|
321
|
let feedbackT = require('product/detail/feedbacks.hbs');
|
311
|
let feedbackT = require('product/detail/feedbacks.hbs');
|
|
@@ -376,7 +366,7 @@ setTimeout(() => { |
|
@@ -376,7 +366,7 @@ setTimeout(() => { |
376
|
|
366
|
|
377
|
// goods-discount下拉按钮点击事件
|
367
|
// goods-discount下拉按钮点击事件
|
378
|
if ($goodsDiscount.length && $discountFolder.children().length > 0) {
|
368
|
if ($goodsDiscount.length && $discountFolder.children().length > 0) {
|
379
|
- $discountFirstItem.on('click', function() {
|
369
|
+ $goodsDiscount.on('click', function() {
|
380
|
if ($discountFolder.is(':hidden')) {
|
370
|
if ($discountFolder.is(':hidden')) {
|
381
|
$discountFirstItem.removeClass('short-text');
|
371
|
$discountFirstItem.removeClass('short-text');
|
382
|
$discountArrow.removeClass('icon-down').addClass('icon-up').html('');
|
372
|
$discountArrow.removeClass('icon-down').addClass('icon-up').html('');
|