Authored by 郝肖肖

门票我的订单显示

@@ -16,13 +16,13 @@ @@ -16,13 +16,13 @@
16 <p class="cur-status clearfix"> 16 <p class="cur-status clearfix">
17 当前状态:{{curStatus}} 17 当前状态:{{curStatus}}
18 {{#if operation.goPay}} 18 {{#if operation.goPay}}
19 - <a class="go-pay oo-btn" href="{{operation.goPay}}">立即付款</a> 19 + <a class="go-pay oo-btn" href="{{operation.goPay}}">立即付款</a>
20 {{/if}} 20 {{/if}}
21 {{#if changeable}} 21 {{#if changeable}}
22 - <span class="edit-order oo-btn">修改订单</span> 22 + <span class="edit-order oo-btn">修改订单</span>
23 {{/if}} 23 {{/if}}
24 {{#if operation.cancelOrder}} 24 {{#if operation.cancelOrder}}
25 - <span class="cancel-order oo-btn">取消订单</span> 25 + <span class="cancel-order oo-btn">取消订单</span>
26 {{/if}} 26 {{/if}}
27 </p> 27 </p>
28 {{#if complete}} 28 {{#if complete}}
@@ -207,16 +207,25 @@ @@ -207,16 +207,25 @@
207 </a> 207 </a>
208 <p class="name-color-size"> 208 <p class="name-color-size">
209 <a class="name" href="{{url}}" target="_blank">{{name}}</a> 209 <a class="name" href="{{url}}" target="_blank">{{name}}</a>
210 - {{#if color}}  
211 - 颜色:{{color}}  
212 - {{/if}} 210 + {{#if virtualGood}}
  211 + {{#if color}}
  212 + 日期:{{color}}
  213 + {{/if}}
  214 + {{#if size}}
  215 + 区域:{{size}}
  216 + {{/if}}
  217 + {{else}}
  218 + {{#if color}}
  219 + 颜色:{{color}}
  220 + {{/if}}
213 221
214 - {{#if size}}  
215 - 尺码:{{size}}  
216 - {{/if}} 222 + {{#if size}}
  223 + 尺码:{{size}}
  224 + {{/if}}
217 225
218 - {{#if date}}  
219 - 日期:{{date}} 226 + {{#if date}}
  227 + 日期:{{date}}
  228 + {{/if}}
220 {{/if}} 229 {{/if}}
221 </p> 230 </p>
222 </td> 231 </td>
@@ -151,7 +151,7 @@ @@ -151,7 +151,7 @@
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 - {{#if isTicket}} 154 + {{#if virtualGoods}}
155 <div class="chose-ticket chose-color row clearfix"> 155 <div class="chose-ticket chose-color row clearfix">
156 <span class="title pull-left">选日期:</span> 156 <span class="title pull-left">选日期:</span>
157 <div class="size-wrapper pull-left"> 157 <div class="size-wrapper pull-left">
@@ -198,11 +198,7 @@ @@ -198,11 +198,7 @@
198 </div> 198 </div>
199 <div class="chose-size row clearfix"> 199 <div class="chose-size row clearfix">
200 <span class="title pull-left"> 200 <span class="title pull-left">
201 - {{#if virtualGoods}}  
202 - 选日期:  
203 - {{^}}  
204 - 选尺码:  
205 - {{/if}} 201 + 选尺码:
206 </span> 202 </span>
207 203
208 <div id="sizes" class="size-wrapper pull-left"> 204 <div id="sizes" class="size-wrapper pull-left">
@@ -212,17 +208,9 @@ @@ -212,17 +208,9 @@
212 <li {{#unless num}}class="disable"{{/unless}} data-sku="{{sku}}" data-num="{{num}}" data-name="{{name}}">{{name}}</li> 208 <li {{#unless num}}class="disable"{{/unless}} data-sku="{{sku}}" data-num="{{num}}" data-name="{{name}}">{{name}}</li>
213 {{/each}} 209 {{/each}}
214 210
215 - {{#unless virtualGoods}}  
216 - <span class="size-ruler"></span>  
217 - {{/unless}}  
218 -  
219 <span class="size-warn warn-tip hide"> 211 <span class="size-warn warn-tip hide">
220 <i class="iconfont">&#xe62c;</i> 212 <i class="iconfont">&#xe62c;</i>
221 - {{#if virtualGoods}}  
222 - 请选择日期  
223 - {{^}}  
224 - 请选择尺码  
225 - {{/if}} 213 + 请选择尺码
226 </span> 214 </span>
227 </ul> 215 </ul>
228 {{/each}} 216 {{/each}}
@@ -271,16 +259,16 @@ @@ -271,16 +259,16 @@
271 {{/if}} 259 {{/if}}
272 {{/ fashionTopGoods}} 260 {{/ fashionTopGoods}}
273 261
274 - {{#if isTicket}} 262 + {{#if virtualGoods}}
275 <span class="size-warn warn-tip"> &nbsp;限购4张</span> 263 <span class="size-warn warn-tip"> &nbsp;限购4张</span>
276 {{/if}} 264 {{/if}}
277 </div> 265 </div>
278 </div> 266 </div>
279 267
280 <div class="row"> 268 <div class="row">
281 - {{#if isTicket}} 269 + {{#if virtualGoods}}
282 {{!-- 电子门票按钮 --}} 270 {{!-- 电子门票按钮 --}}
283 - <form name="ticket-form" action="/cart/index/ticketEnsure" method="POST"></form> 271 + <form name="ticket-form" action="/cart/index/ticketEnsure" method="POST" class="hide"></form>
284 <span id="buy-ticket" class="buy-btn buy-now item-buy{{#if dis}} dis{{/if}}" >立即购买</span> 272 <span id="buy-ticket" class="buy-btn buy-now item-buy{{#if dis}} dis{{/if}}" >立即购买</span>
285 {{^}} 273 {{^}}
286 {{!-- 各颜色下所有尺码均售罄则只显示售罄按钮 --}} 274 {{!-- 各颜色下所有尺码均售罄则只显示售罄按钮 --}}
@@ -34,16 +34,25 @@ @@ -34,16 +34,25 @@
34 {{/if}} 34 {{/if}}
35 <a class="name" href="{{href}}" target="_blank">{{name}}</a> 35 <a class="name" href="{{href}}" target="_blank">{{name}}</a>
36 <span class="color-size"> 36 <span class="color-size">
37 - {{#if color}}  
38 - 颜色:{{color}}&nbsp;&nbsp;  
39 - {{/if}} 37 + {{#if virtualGood}}
  38 + {{#if color}}
  39 + 日期:{{color}}&nbsp;&nbsp;
  40 + {{/if}}
  41 + {{#if size}}
  42 + 区域:{{size}}
  43 + {{/if}}
  44 + {{else}}
  45 + {{#if color}}
  46 + 颜色:{{color}}&nbsp;&nbsp;
  47 + {{/if}}
40 48
41 - {{#if size}}  
42 - 尺码:{{size}}  
43 - {{/if}} 49 + {{#if size}}
  50 + 尺码:{{size}}
  51 + {{/if}}
44 52
45 - {{#if arrivalDate}}  
46 - <i class="arrival-date">上市期:{{arrivalDate}}</i> 53 + {{#if arrivalDate}}
  54 + <i class="arrival-date">上市期:{{arrivalDate}}</i>
  55 + {{/if}}
47 {{/if}} 56 {{/if}}
48 </span> 57 </span>
49 </div> 58 </div>
@@ -124,11 +124,24 @@ var TicketCat = { @@ -124,11 +124,24 @@ var TicketCat = {
124 new dialog.Alert('请输入正确的手机号!').show(); 124 new dialog.Alert('请输入正确的手机号!').show();
125 return; 125 return;
126 } 126 }
  127 +
127 el.$showTicketMobile.removeClass('hide'); 128 el.$showTicketMobile.removeClass('hide');
128 el.$setTicketMobile.addClass('hide'); 129 el.$setTicketMobile.addClass('hide');
129 el.$ticketMobile.text(val); 130 el.$ticketMobile.text(val);
  131 +
  132 + window.setCookie('ticketMobileInput', val, {
  133 + domain: '.yohobuy.com',
  134 + path: '/'
  135 + });
130 }); 136 });
131 137
  138 + //手机号,保存cookie中,防止用户刷新
  139 + if (el.phoneReg.test(window.cookie('ticketMobileInput'))) {
  140 + el.$showTicketMobile.removeClass('hide');
  141 + el.$setTicketMobile.addClass('hide');
  142 + el.$ticketMobile.text(window.cookie('ticketMobileInput'));
  143 + }
  144 +
132 // 使用优惠券、使用yoho币点击展开 145 // 使用优惠券、使用yoho币点击展开
133 el.$pan.find('dt').click(function() { 146 el.$pan.find('dt').click(function() {
134 var pan = $(this).parent('dl.pan'); 147 var pan = $(this).parent('dl.pan');
@@ -68,10 +68,7 @@ class ItemModel @@ -68,10 +68,7 @@ class ItemModel
68 if (!empty($baseInfo['isOutlets'])) { 68 if (!empty($baseInfo['isOutlets'])) {
69 $goodsInfo['isOutlets'] = $baseInfo['isOutlets'] == 'Y' ? 'outlets' : ''; 69 $goodsInfo['isOutlets'] = $baseInfo['isOutlets'] == 'Y' ? 'outlets' : '';
70 } 70 }
71 -  
72 - //电子门票  
73 - $goodsInfo['isTicket'] = $baseInfo['isTicket'] = TRUE;  
74 - 71 +
75 // 商品价格 72 // 商品价格
76 if (isset($baseInfo['productPriceBo'])) { 73 if (isset($baseInfo['productPriceBo'])) {
77 $goodsInfo['marketPrice'] = $baseInfo['productPriceBo']['formatMarketPrice']; 74 $goodsInfo['marketPrice'] = $baseInfo['productPriceBo']['formatMarketPrice'];
@@ -1010,8 +1007,6 @@ class ItemModel @@ -1010,8 +1007,6 @@ class ItemModel
1010 $skuGoods = array();//sku商品 1007 $skuGoods = array();//sku商品
1011 $defaultImage = '';//默认图 1008 $defaultImage = '';//默认图
1012 $chooseSkuFlag = false;//选中sku状态 1009 $chooseSkuFlag = false;//选中sku状态
1013 - //摸拟数据  
1014 - $baseInfo['isTicket'] = empty($baseInfo['isTicket']) ? false : $baseInfo['isTicket'];  
1015 1010
1016 if (!empty($baseInfo['goodsList'])) { 1011 if (!empty($baseInfo['goodsList'])) {
1017 $goodsGroup = array(); 1012 $goodsGroup = array();
@@ -1032,8 +1027,8 @@ class ItemModel @@ -1032,8 +1027,8 @@ class ItemModel
1032 'thumbs' => array(), 1027 'thumbs' => array(),
1033 'size' => array(), 1028 'size' => array(),
1034 ); 1029 );
1035 - //不是门票的要显示图片  
1036 - if ($baseInfo['isTicket']) { 1030 + //不是门票的要显示图片,虚拟商品
  1031 + if ($baseInfo['attribute'] === 3) {
1037 $goodsGroup['src'] = Images::getImageUrl($value['colorImage'], 40, 40); 1032 $goodsGroup['src'] = Images::getImageUrl($value['colorImage'], 40, 40);
1038 } 1033 }
1039 1034
@@ -1058,8 +1053,8 @@ class ItemModel @@ -1058,8 +1053,8 @@ class ItemModel
1058 1053
1059 //商品的尺码列表 1054 //商品的尺码列表
1060 foreach ($value['goodsSizeBoList'] as $size) { 1055 foreach ($value['goodsSizeBoList'] as $size) {
1061 - if($baseInfo['attribute'] == 3 ) { //虚拟商品,增加为一件  
1062 - $size['goodsSizeStorageNum'] = $size['goodsSizeStorageNum'] > 1 ? 1: 0; 1056 + if($baseInfo['attribute'] == 3 ) { //虚拟商品,门票默认最大为4,
  1057 + $size['goodsSizeStorageNum'] = $size['goodsSizeStorageNum'] > 4 ? 4: 0;
1063 } 1058 }
1064 //如果status为0,即skc下架时就跳过该商品 1059 //如果status为0,即skc下架时就跳过该商品
1065 if ($value['status'] === 0) { 1060 if ($value['status'] === 0) {
@@ -1068,7 +1063,7 @@ class ItemModel @@ -1068,7 +1063,7 @@ class ItemModel
1068 $goodsGroup['size'][] = array( 1063 $goodsGroup['size'][] = array(
1069 'name' => $size['sizeName'], 1064 'name' => $size['sizeName'],
1070 'sku' => $size['goodsSizeSkuId'], 1065 'sku' => $size['goodsSizeSkuId'],
1071 - 'num' => $baseInfo['isTicket'] && $size['goodsSizeStorageNum'] > 4 ? 4 : intval($size['goodsSizeStorageNum']), 1066 + 'num' => intval($size['goodsSizeStorageNum']),
1072 'goodsId'=> $size['goodsId'] 1067 'goodsId'=> $size['goodsId']
1073 ); 1068 );
1074 //单个sku商品的总数 1069 //单个sku商品的总数