Authored by 陈轩

Merge remote-tracking branch 'origin/release/5.1' into release/5.1

... ... @@ -201,7 +201,7 @@ let upvoteConsult = (params) => {
*/
let addConsult = (uid, productId, content) => {
let params = {
method: 'h5.consult.add',
method: 'app.consult.add',
product_id: productId,
content: content,
uid: uid
... ...
... ... @@ -978,6 +978,7 @@ const getSeckillData = (param) => {
method: 'app.seckill.data',
product_skn: param.productskn
};
return api.get('', params, {
code: 200
})
... ... @@ -995,7 +996,8 @@ const getSeckillData = (param) => {
};
let getProductData = (data) => {
let finalResult;
let finalResult = {};
let params = {
method: 'app.product.data'
};
... ... @@ -1028,6 +1030,7 @@ let getProductData = (data) => {
return {};
}
result = result.data;
return Promise.all([
_getShopsInfo(_.get(result, 'brandInfo.brandId', 0)),
_getPromotionInfo(result.productSkn),
... ... @@ -1044,6 +1047,11 @@ let getProductData = (data) => {
Object.assign(finalResult.feedbacks, info[2]);
Object.assign(finalResult, {isSecKill: result.isSecKill});
/* 预售商品不能购买 */
if (_.get(result, 'isDepositAdvance', '') === 'Y') {
finalResult.cartInfo.isDepositAdvance = true;
}
/* 如果有咨询,显示咨询,否则显示常见问题 */
if (info[4].total) {
... ...
... ... @@ -162,30 +162,36 @@
{{> cart/chose-panel}}
{{#cartInfo}}
<div class="cart-bar">
<a href="{{cartUrl}}" class="num-incart iconfont"><span class="num-tag hide"></span>&#xe62c;</a>
{{#if addToCartUrl}}
<a id="addtoCart" href="javascript:;" class="addto-cart">{{#if ../tickets}}立即购买{{else}}加入购物车{{/if}}</a>
{{/if}}
{{#if soldOut}}
<a href="javascript:;" class="sold-out">已售罄</a>
{{/if}}
{{#unless isDepositAdvance}}
{{#if addToCartUrl}}
<a id="addtoCart" href="javascript:;" class="addto-cart">{{#if ../tickets}}立即购买{{else}}加入购物车{{/if}}</a>
{{/if}}
{{#if notForSale}}
<a href="javascript:;" class="sold-out">非卖品</a>
{{/if}}
{{#if soldOut}}
<a href="javascript:;" class="sold-out">已售罄</a>
{{/if}}
{{#if limitNotForSale}}
<a href="javascript:;" class="sold-out limit">即将发售</a>
{{/if}}
{{#if notForSale}}
<a href="javascript:;" class="sold-out">非卖品</a>
{{/if}}
{{#if noLimitCode}}
<a href="javascript:;" class="sold-out limit">立即购买</a>
{{/if}}
{{#if limitNotForSale}}
<a href="javascript:;" class="sold-out limit">即将发售</a>
{{/if}}
{{#if canNotBuy}}
<a href="javascript:;" class="addto-cart can-not-buy">立即购买</a>
{{/if}}
{{#if noLimitCode}}
<a href="javascript:;" class="sold-out limit">立即购买</a>
{{/if}}
{{#if canNotBuy}}
<a href="javascript:;" class="addto-cart can-not-buy">立即购买</a>
{{/if}}
{{^}}
<a href="javascript:;" class="addto-cart" id="is-deposit-advance">立即购买</a>
{{/unless}}
<input type="hidden" id="limitCodeUrl" name="limitCodeUrl" value="{{limitCodeUrl}}">
... ...
... ... @@ -55,6 +55,10 @@
{{/if}}
</div>
{{/if}}
{{^}}
<div class="order-opt">
*定金预售订单只能在APP端操作
</div>
{{/unless}}
{{!-- 包含未发货和已发货状态,未发货不传logisticsUrl --}}
... ...
... ... @@ -15,6 +15,10 @@ var introUrl = $('#introUrl').val(),
searching = false,
end = false;
$('#is-deposit-advance').on('click', function() {
tip.show('定金预售商品只能在APP端购买');
});
// 判断是否要显示向左滑动提示
function hiddenTips($ele) {
var offsetContainer,
... ...