Authored by 郝肖肖

电子门票前端数据

@@ -151,53 +151,85 @@ @@ -151,53 +151,85 @@
151 151
152 <div class="trade-content"> 152 <div class="trade-content">
153 <div id="type-chose" class="type-chose"> 153 <div id="type-chose" class="type-chose">
154 - <div class="chose-color row clearfix">  
155 - <span class="title pull-left">选颜色:</span>  
156 - <ul class="colors pull-left clearfix">  
157 - {{#each colors}}  
158 - <li class="{{#if focus}}focus{{/if}} {{#if disable}}disable{{/if}} pull-left" title="{{title}}" data-color="{{name}}" data-total="{{total}}">  
159 - <img src="{{src}}">  
160 - </li>  
161 - {{/each}}  
162 - </ul>  
163 - </div>  
164 -  
165 - <div class="chose-size row clearfix">  
166 - <span class="title pull-left">  
167 - {{#if virtualGoods}}  
168 - 选日期:  
169 - {{^}}  
170 - 选尺码:  
171 - {{/if}}  
172 - </span>  
173 -  
174 - <div id="sizes" class="size-wrapper pull-left">  
175 - {{#each colors}}  
176 - <ul class="size{{#unless focus}} hide{{/unless}}">  
177 - {{#each size}}  
178 - <li {{#unless num}}class="disable"{{/unless}} data-sku="{{sku}}" data-num="{{num}}" data-name="{{name}}">{{name}}</li>  
179 - {{/each}} 154 + {{#if isTicket}}
  155 + <div class="chose-color row clearfix">
  156 + <span class="title pull-left">选日期:</span>
  157 + <ul class="colors pull-left clearfix">
  158 + {{#each colors}}
  159 + <li class="{{#if focus}}focus{{/if}} {{#if disable}}disable{{/if}} pull-left" title="{{title}}" data-color="{{name}}" data-total="{{total}}">
  160 + <img src="{{src}}">
  161 + </li>
  162 + {{/each}}
  163 + </ul>
  164 + </div>
  165 + <div class="chose-size row clearfix">
  166 + <span class="title pull-left">
  167 + 选区域:
  168 + </span>
  169 + <div id="sizes" class="size-wrapper pull-left">
  170 + {{#each colors}}
  171 + <ul class="size{{#unless focus}} hide{{/unless}}">
  172 + {{#each size}}
  173 + <li {{#unless num}}class="disable"{{/unless}} data-sku="{{sku}}" data-num="{{num}}" data-name="{{name}}">{{name}}</li>
  174 + {{/each}}
  175 +
  176 + <span class="size-warn warn-tip hide">
  177 + <i class="iconfont">&#xe62c;</i>
  178 + 请选择区域
  179 + </span>
  180 + </ul>
  181 + {{/each}}
  182 + </div>
  183 + </div>
  184 + {{^}}
  185 + <div class="chose-color row clearfix">
  186 + <span class="title pull-left">选颜色:</span>
  187 + <ul class="colors pull-left clearfix">
  188 + {{#each colors}}
  189 + <li class="{{#if focus}}focus{{/if}} {{#if disable}}disable{{/if}} pull-left" title="{{title}}" data-color="{{name}}" data-total="{{total}}">
  190 + <img src="{{src}}">
  191 + </li>
  192 + {{/each}}
  193 + </ul>
  194 + </div>
  195 + <div class="chose-size row clearfix">
  196 + <span class="title pull-left">
  197 + {{#if virtualGoods}}
  198 + 选日期:
  199 + {{^}}
  200 + 选尺码:
  201 + {{/if}}
  202 + </span>
180 203
181 - {{#unless virtualGoods}}  
182 - <span class="size-ruler"></span>  
183 - {{/unless}}  
184 -  
185 - <span class="size-warn warn-tip hide">  
186 - <i class="iconfont">&#xe62c;</i>  
187 - {{#if virtualGoods}}  
188 - 请选择日期  
189 - {{^}}  
190 - 请选择尺码  
191 - {{/if}}  
192 - </span>  
193 - </ul>  
194 - {{/each}} 204 + <div id="sizes" class="size-wrapper pull-left">
  205 + {{#each colors}}
  206 + <ul class="size{{#unless focus}} hide{{/unless}}">
  207 + {{#each size}}
  208 + <li {{#unless num}}class="disable"{{/unless}} data-sku="{{sku}}" data-num="{{num}}" data-name="{{name}}">{{name}}</li>
  209 + {{/each}}
  210 +
  211 + {{#unless virtualGoods}}
  212 + <span class="size-ruler"></span>
  213 + {{/unless}}
  214 +
  215 + <span class="size-warn warn-tip hide">
  216 + <i class="iconfont">&#xe62c;</i>
  217 + {{#if virtualGoods}}
  218 + 请选择日期
  219 + {{^}}
  220 + 请选择尺码
  221 + {{/if}}
  222 + </span>
  223 + </ul>
  224 + {{/each}}
195 225
196 - {{#unless virtualGoods}}  
197 - <p class="color-size-tip hide"></p>  
198 - {{/unless}} 226 + {{#unless virtualGoods}}
  227 + <p class="color-size-tip hide"></p>
  228 + {{/unless}}
  229 + </div>
199 </div> 230 </div>
200 - </div> 231 + {{/if}}
  232 +
201 233
202 <div class="chose-count row clearfix"> 234 <div class="chose-count row clearfix">
203 <span class="title pull-left">选数量:</span> 235 <span class="title pull-left">选数量:</span>
@@ -234,31 +266,41 @@ @@ -234,31 +266,41 @@
234 <span class="lc-btn lc-sold-out">限购码已抢光</span> 266 <span class="lc-btn lc-sold-out">限购码已抢光</span>
235 {{/if}} 267 {{/if}}
236 {{/ fashionTopGoods}} 268 {{/ fashionTopGoods}}
  269 +
  270 + {{#if isTicket}}
  271 + <span class="size-warn warn-tip"> &nbsp;限购4张</span>
  272 + {{/if}}
237 </div> 273 </div>
238 </div> 274 </div>
239 275
240 <p class="row"> 276 <p class="row">
241 - {{!-- 各颜色下所有尺码均售罄则只显示售罄按钮 --}}  
242 - {{#unless soldOut}}  
243 - {{# buyNow}}  
244 - <span id="buy-now" class="buy-btn buy-now item-buy{{#if dis}} dis{{/if}}" data-base="{{buyNowBase}}">立即购买</span>  
245 - {{/ buyNow}}  
246 - {{# openSoon}}  
247 - <span id="open-soon" class="buy-btn item-buy dis">即将开售</span>  
248 - {{/ openSoon}}  
249 - {{#if notForSale}}  
250 - <span class="buy-btn dis">  
251 - <i class="iconfont">&#xe62d;</i>  
252 - 非买品  
253 - </span>  
254 - {{/if}}  
255 - {{#if addToCart}}  
256 - <span id="add-to-cart" class="buy-btn item-buy add-to-cart">  
257 - <i class="iconfont">&#xe628;</i>  
258 - 添加到购物车  
259 - </span>  
260 - {{/if}}  
261 - {{/unless}} 277 + {{#if isTicket}}
  278 + {{!-- 电子门票按钮 --}}
  279 + <span id="buy-now" class="buy-btn buy-now item-buy{{#if dis}} dis{{/if}}" data-base="{{buyNowBase}}">立即购买</span>
  280 + {{^}}
  281 + {{!-- 各颜色下所有尺码均售罄则只显示售罄按钮 --}}
  282 + {{#unless soldOut}}
  283 + {{# buyNow}}
  284 + <span id="buy-now" class="buy-btn buy-now item-buy{{#if dis}} dis{{/if}}" data-base="{{buyNowBase}}">立即购买</span>
  285 + {{/ buyNow}}
  286 + {{# openSoon}}
  287 + <span id="open-soon" class="buy-btn item-buy dis">即将开售</span>
  288 + {{/ openSoon}}
  289 + {{#if notForSale}}
  290 + <span class="buy-btn dis">
  291 + <i class="iconfont">&#xe62d;</i>
  292 + 非买品
  293 + </span>
  294 + {{/if}}
  295 + {{#if addToCart}}
  296 + <span id="add-to-cart" class="buy-btn item-buy add-to-cart">
  297 + <i class="iconfont">&#xe628;</i>
  298 + 添加到购物车
  299 + </span>
  300 + {{/if}}
  301 + {{/unless}}
  302 + {{/if}}
  303 +
262 304
263 <span id="sold-out" class="buy-btn dis{{#unless soldOut}} hide{{/if}}"> 305 <span id="sold-out" class="buy-btn dis{{#unless soldOut}} hide{{/if}}">
264 <i class="iconfont">&#xe62d;</i> 306 <i class="iconfont">&#xe62d;</i>
@@ -69,6 +69,9 @@ class ItemModel @@ -69,6 +69,9 @@ class ItemModel
69 $goodsInfo['isOutlets'] = $baseInfo['isOutlets'] == 'Y' ? 'outlets' : ''; 69 $goodsInfo['isOutlets'] = $baseInfo['isOutlets'] == 'Y' ? 'outlets' : '';
70 } 70 }
71 71
  72 + //电子门票
  73 + $goodsInfo['isTicket'] = TRUE;
  74 +
72 // 商品价格 75 // 商品价格
73 if (isset($baseInfo['productPriceBo'])) { 76 if (isset($baseInfo['productPriceBo'])) {
74 $goodsInfo['marketPrice'] = $baseInfo['productPriceBo']['formatMarketPrice']; 77 $goodsInfo['marketPrice'] = $baseInfo['productPriceBo']['formatMarketPrice'];