Authored by 李靖

隐藏区域,显示虚拟商品标签

<div class="order-good" data-id="{{id}}" data-skn="{{skn}}">
<div class="thumb-wrap">
{{#if link}}
<a href="{{link}}"><img class="thumb lazy" data-original="{{thumb}}"></a>
<div class="pic-c">
<a href="{{link}}">
<img class="thumb lazy" data-original="{{thumb}}">
</a>
<p>虚拟商品</p>
</div>
{{else}}
<img class="thumb lazy" data-original="{{thumb}}">
<div class="pic-c">
<img class="thumb lazy" data-original="{{thumb}}">
<p>虚拟商品</p>
</div>
{{/if}}
<p class="tag{{#if gift}} gift-tag{{/if}}{{#if advanceBuy}} advance-buy-tag{{/if}}"></p>
</div>
... ... @@ -17,7 +25,7 @@
{{/if}}
{{#if size}}
<span class="size">
<span class="size{{#if tickets}} hide{{/if}}">
{{#if tickets}}区域{{else}}尺码{{/if}}:{{size}}
</span>
{{/if}}
... ...
... ... @@ -221,6 +221,12 @@ const orderDetailData = (uid, orderCode) => {
});
}
if (data.goodsType === 'ticket') {
obj = _.assign(obj, {
tickets: true
});
}
goods.push(obj);
orderDetail = _.assign(orderDetail, {
... ...
... ... @@ -5,7 +5,7 @@
{{#qrcodeData}}
<div class="qrcode yoho-page">
<h2 class='qrcode-title'>2016 非常潮流盛世 YO'HOOD门票(限量) {{ticks.length}}</h2>
<h2 class='qrcode-title'>2017 非常潮流盛世 YO'HOOD门票(限量) {{ticks.length}}</h2>
<p class='qrcode-tip'>提示:凭借二维码入场,每场二维码只可使用一次,请妥善保管;</p>
<div class='qrcode-wrap'>
... ...
... ... @@ -750,6 +750,16 @@ const getNewProductAsyncData = (data) => {
discount: discountBuy.bundleInfo.discount
};
}
// 2017电子门票不显示区域
let ticketsProps = finalResult.cartInfo.props;
_.forEach(ticketsProps, function(value) {
if (value.name === '区域') {
value.ticketHide = true;
value.name = '';
}
});
return finalResult;
});
});
... ...
<div class="order-good" data-id="{{id}}">
<div class="thumb-wrap">
{{#if link}}
<a href="{{link}}"><img class="thumb" src="{{image thumb 90 120}}"></a>
{{#if link}}
<div class="pic-c">
<a href="{{link}}">
<img class="thumb" src="{{image thumb 90 120}}">
</a>
{{#if tickets}}
<p>虚拟商品</p>
{{/if}}
</div>
{{else}}
<img class="thumb" src="{{image thumb 90 120}}">
<div class="pic-c">
<img class="thumb" src="{{image thumb 90 120}}">
{{#if tickets}}
<p>虚拟商品</p>
{{/if}}
</div>
{{/if}}
<p class="tag{{#if gift}} gift-tag{{/if}}{{#if advanceBuy}} advance-buy-tag{{/if}}"></p>
</div>
... ... @@ -17,7 +29,7 @@
{{/if}}
{{#if size}}
<span class="size">
<span class="size{{#if tickets}} hide{{/if}}">
{{#if tickets}}区域{{else}}尺码{{/if}}:{{size}}
</span>
{{/if}}
... ...
... ... @@ -23,11 +23,11 @@
</div>
<div class="chose-items">
{{#each props}}
<div class="block-list">
<div class="block-list{{#if ticketHide}} hide{{/if}}">
<span class="name">{{name}}</span>
<ul class="size-row clearfix">
{{#each values}}
<li class="block" data-prop-id="{{../type}}" data-value-id="{{id}}">{{name}}</li>
<li class="block{{#if ../ticketHide}} chosed hide{{/if}}" data-prop-id="{{../type}}" data-value-id="{{id}}">{{#if ../ticketHide}}{{else}}{{name}}{{/if}}</li>
{{/each}}
</ul>
</div>
... ...
... ... @@ -414,6 +414,14 @@ class ChosePanel {
return $(ele).text();
}));
if (this.modes.tickets) {
let $chosed = $('.block.chosed');
valueList = Array.from($chosed.not('.hide').map((index, ele) => {
return $(ele).text();
}));
}
if (valueList.length) {
$noChoose.addClass('hide');
$chooseInfo.removeClass('hide');
... ...
... ... @@ -78,4 +78,21 @@
color: #b0b0b0;
}
}
.pic-c {
position: relative;
p {
position: absolute;
bottom: 0;
left: 0;
color: #fff;
width: 100%;
text-align: center;
height: 35px;
line-height: 35px;
background-color: #d0021b;
font-size: 20px;
}
}
}
... ...
... ... @@ -250,6 +250,23 @@
border-bottom: 1px solid #e0e0e0;
font-size: 26px;
.pic-c {
position: relative;
p {
position: absolute;
bottom: 0;
left: 0;
color: #fff;
width: 100%;
text-align: center;
height: 35px;
line-height: 35px;
background-color: #d0021b;
font-size: 20px;
}
}
&:last-child {
border-bottom: none;
}
... ...