Authored by htoooth

健状性增强

@@ -677,6 +677,16 @@ const _detailDataPkg = (origin, uid, vipLevel) => { @@ -677,6 +677,16 @@ const _detailDataPkg = (origin, uid, vipLevel) => {
677 let notForSale = origin.attribute === 2; // 非卖品 677 let notForSale = origin.attribute === 2; // 非卖品
678 let virtualGoods = origin.attribute === 3; // 虚拟商品 678 let virtualGoods = origin.attribute === 3; // 虚拟商品
679 679
  680 + if (virtualGoods) {
  681 + result.virtualGoods = virtualGoods;
  682 +
  683 + // 是否显示虚拟商品,立即购买按钮
  684 + result.isVirtualBtn = soldOut ? false : true;
  685 +
  686 + // 是否展览票
  687 + result.isTicket = origin.erpProductId * 1 === EXHIBITION_TICKET;
  688 + }
  689 +
680 if (!soldOut && !notForSale && !virtualGoods) { 690 if (!soldOut && !notForSale && !virtualGoods) {
681 result.addToCart = true; 691 result.addToCart = true;
682 692
@@ -695,14 +705,10 @@ const _detailDataPkg = (origin, uid, vipLevel) => { @@ -695,14 +705,10 @@ const _detailDataPkg = (origin, uid, vipLevel) => {
695 // 虚拟商品 705 // 虚拟商品
696 result.buyNow = true; // 是否立即购买 706 result.buyNow = true; // 是否立即购买
697 result.buyNowBase = helpers.urlFormat('ticket', null, 'shopping'); 707 result.buyNowBase = helpers.urlFormat('ticket', null, 'shopping');
698 - result.virtualGoods = virtualGoods;  
699 if (result.salePrice) { 708 if (result.salePrice) {
700 result.advancePrice = result.salePrice; // 先行价格 709 result.advancePrice = result.salePrice; // 先行价格
701 delete result.salePrice; 710 delete result.salePrice;
702 } 711 }
703 -  
704 - // 是否展览票  
705 - result.isTicket = origin.erpProductId * 1 === EXHIBITION_TICKET;  
706 } 712 }
707 713
708 // 去掉即将售罄 714 // 去掉即将售罄
@@ -270,8 +270,10 @@ @@ -270,8 +270,10 @@
270 <p class="row"> 270 <p class="row">
271 {{#if virtualGoods}} 271 {{#if virtualGoods}}
272 {{!-- 电子门票按钮 --}} 272 {{!-- 电子门票按钮 --}}
273 - <form name="ticket-form" action="//www.yohobuy.com/cart/index/ticketEnsure" method="POST" class="hide"></form>  
274 - <span id="buy-ticket" class="buy-ticket buy-now item-buy{{#if dis}} dis{{/if}}" >立即购买</span> 273 + {{#if isVirtualBtn}}
  274 + <form name="ticket-form" action="//www.yohobuy.com/cart/index/ticketEnsure" method="POST" class="hide"></form>
  275 + <span id="buy-ticket" class="buy-ticket buy-now item-buy{{#if dis}} dis{{/if}}" >立即购买</span>
  276 + {{/if}}
275 {{else}} 277 {{else}}
276 {{!-- 各颜色下所有尺码均售罄则只显示售罄按钮 --}} 278 {{!-- 各颜色下所有尺码均售罄则只显示售罄按钮 --}}
277 {{#unless soldOut}} 279 {{#unless soldOut}}