Authored by 郝肖肖

是否显示立即购买按钮

@@ -269,8 +269,10 @@ @@ -269,8 +269,10 @@
269 <div class="row"> 269 <div class="row">
270 {{#if virtualGoods}} 270 {{#if virtualGoods}}
271 {{!-- 电子门票按钮 --}} 271 {{!-- 电子门票按钮 --}}
  272 + {{#if isVirtualBtn}}
272 <form name="ticket-form" action="/cart/index/ticketEnsure" method="POST" class="hide"></form> 273 <form name="ticket-form" action="/cart/index/ticketEnsure" method="POST" class="hide"></form>
273 <span id="buy-ticket" class="buy-ticket buy-now item-buy{{#if dis}} dis{{/if}}" >立即购买</span> 274 <span id="buy-ticket" class="buy-ticket buy-now item-buy{{#if dis}} dis{{/if}}" >立即购买</span>
  275 + {{/if}}
274 {{^}} 276 {{^}}
275 {{!-- 各颜色下所有尺码均售罄则只显示售罄按钮 --}} 277 {{!-- 各颜色下所有尺码均售罄则只显示售罄按钮 --}}
276 {{#unless soldOut}} 278 {{#unless soldOut}}
@@ -175,6 +175,10 @@ class ItemModel @@ -175,6 +175,10 @@ class ItemModel
175 //是否展览票 175 //是否展览票
176 $goodsInfo['isTicket'] = $goodsInfo['skn'] * 1 === EXHIBITION_TICKET; 176 $goodsInfo['isTicket'] = $goodsInfo['skn'] * 1 === EXHIBITION_TICKET;
177 $goodsInfo['virtualGoods'] = $virtualGoods;//是否是虚拟商品 177 $goodsInfo['virtualGoods'] = $virtualGoods;//是否是虚拟商品
  178 + if ($goodsInfo['virtualGoods']) {
  179 + //是否显示虚拟商品,立即购买按钮
  180 + $goodsInfo['isVirtualBtn'] = $soldOut ? false : true;
  181 + }
178 182
179 if (!$soldOut && !$notForSale && !$virtualGoods) { 183 if (!$soldOut && !$notForSale && !$virtualGoods) {
180 $goodsInfo['addToCart'] = true; 184 $goodsInfo['addToCart'] = true;