Authored by htoooth

健状性增强

... ... @@ -677,6 +677,16 @@ const _detailDataPkg = (origin, uid, vipLevel) => {
let notForSale = origin.attribute === 2; // 非卖品
let virtualGoods = origin.attribute === 3; // 虚拟商品
if (virtualGoods) {
result.virtualGoods = virtualGoods;
// 是否显示虚拟商品,立即购买按钮
result.isVirtualBtn = soldOut ? false : true;
// 是否展览票
result.isTicket = origin.erpProductId * 1 === EXHIBITION_TICKET;
}
if (!soldOut && !notForSale && !virtualGoods) {
result.addToCart = true;
... ... @@ -695,14 +705,10 @@ const _detailDataPkg = (origin, uid, vipLevel) => {
// 虚拟商品
result.buyNow = true; // 是否立即购买
result.buyNowBase = helpers.urlFormat('ticket', null, 'shopping');
result.virtualGoods = virtualGoods;
if (result.salePrice) {
result.advancePrice = result.salePrice; // 先行价格
delete result.salePrice;
}
// 是否展览票
result.isTicket = origin.erpProductId * 1 === EXHIBITION_TICKET;
}
// 去掉即将售罄
... ...
... ... @@ -270,8 +270,10 @@
<p class="row">
{{#if virtualGoods}}
{{!-- 电子门票按钮 --}}
{{#if isVirtualBtn}}
<form name="ticket-form" action="//www.yohobuy.com/cart/index/ticketEnsure" method="POST" class="hide"></form>
<span id="buy-ticket" class="buy-ticket buy-now item-buy{{#if dis}} dis{{/if}}" >立即购买</span>
{{/if}}
{{else}}
{{!-- 各颜色下所有尺码均售罄则只显示售罄按钮 --}}
{{#unless soldOut}}
... ...