Authored by hf

code review by hf: do format php codes

@@ -26,6 +26,8 @@ var navHammer, @@ -26,6 +26,8 @@ var navHammer,
26 26
27 var isRefreshByDelete = window.cookie('_yoho-cart-refreshByDelete') === 'true' ? true : false; 27 var isRefreshByDelete = window.cookie('_yoho-cart-refreshByDelete') === 'true' ? true : false;
28 28
  29 +var lowStockCount = 0;
  30 +
29 31
30 loading.showLoadingMask(); 32 loading.showLoadingMask();
31 33
@@ -93,8 +95,8 @@ function shouldLowStocks() { @@ -93,8 +95,8 @@ function shouldLowStocks() {
93 95
94 $lowStocks.each(function(idx, item) { 96 $lowStocks.each(function(idx, item) {
95 if ($(item).parent().parent().parent().siblings('.checkbox').hasClass('icon-cb-checked')) { 97 if ($(item).parent().parent().parent().siblings('.checkbox').hasClass('icon-cb-checked')) {
  98 + lowStockCount += 1;
96 result = true; 99 result = true;
97 - return false;  
98 } 100 }
99 }); 101 });
100 102
@@ -185,8 +187,9 @@ if ($('.freebie').length > 0) { @@ -185,8 +187,9 @@ if ($('.freebie').length > 0) {
185 } 187 }
186 188
187 $('.btn-balance').on('touchend', function() { 189 $('.btn-balance').on('touchend', function() {
  190 + lowStockCount = 0;
188 if (shouldLowStocks()) { 191 if (shouldLowStocks()) {
189 - tip.show('所选商品中含有库存不足的商品'); 192 + tip.show('所选商品中有' + lowStockCount + '种库存不足的商品');
190 return false; 193 return false;
191 } 194 }
192 195
@@ -57,6 +57,7 @@ @@ -57,6 +57,7 @@
57 57
58 .price{ 58 .price{
59 font-size: pxToRem(24px); 59 font-size: pxToRem(24px);
  60 + display: inline;
60 } 61 }
61 .sale-price { 62 .sale-price {
62 color: #e10; 63 color: #e10;
@@ -141,7 +141,7 @@ @@ -141,7 +141,7 @@
141 } 141 }
142 142
143 .freebie-and-advance-buy { 143 .freebie-and-advance-buy {
144 - padding: 20rem / $pxConvertRem; 144 + padding: 20rem / $pxConvertRem 0;
145 font-size: 24rem / $pxConvertRem; 145 font-size: 24rem / $pxConvertRem;
146 border-top: 1px solid #e0e0e0; 146 border-top: 1px solid #e0e0e0;
147 margin-bottom: 30rem / $pxConvertRem; 147 margin-bottom: 30rem / $pxConvertRem;
@@ -152,7 +152,6 @@ @@ -152,7 +152,6 @@
152 line-height: 80rem / $pxConvertRem; 152 line-height: 80rem / $pxConvertRem;
153 margin-bottom: 10rem / $pxConvertRem; 153 margin-bottom: 10rem / $pxConvertRem;
154 padding: 0 20rem / $pxConvertRem; 154 padding: 0 20rem / $pxConvertRem;
155 - background: #f1f1f1;  
156 155
157 &:last-child { 156 &:last-child {
158 margin-bottom: 0; 157 margin-bottom: 0;
@@ -162,6 +161,22 @@ @@ -162,6 +161,22 @@
162 float: right; 161 float: right;
163 width: 100%; 162 width: 100%;
164 } 163 }
  164 +
  165 + .under-line {
  166 + display: inline-block;
  167 + height: 1px;
  168 + width: 91%;
  169 + position: absolute;
  170 + left: 9%;
  171 + background-color: #f1f1f1;
  172 + }
  173 +
  174 + }
  175 +
  176 + > li:first-child {
  177 + .under-line {
  178 + display: none;
  179 + }
165 } 180 }
166 181
167 .count { 182 .count {
@@ -191,7 +206,9 @@ @@ -191,7 +206,9 @@
191 height: 4px; 206 height: 4px;
192 background-color: #000; 207 background-color: #000;
193 border-radius: 50%; 208 border-radius: 50%;
194 - margin-right: 8rem / $pxConvertRem; 209 + position: relative;
  210 + left: 0;
  211 + top: -.12rem;
195 } 212 }
196 } 213 }
197 .price-compute { 214 .price-compute {
@@ -20,6 +20,9 @@ @@ -20,6 +20,9 @@
20 &:last-of-type{ 20 &:last-of-type{
21 border-bottom:none; 21 border-bottom:none;
22 } 22 }
  23 + a:visited {
  24 + color: #444444;
  25 + }
23 span{ 26 span{
24 width: 85%; 27 width: 85%;
25 height: 100%; 28 height: 100%;
@@ -36,6 +39,6 @@ @@ -36,6 +39,6 @@
36 .deal_main{ 39 .deal_main{
37 margin: .5rem 3%; 40 margin: .5rem 3%;
38 font-size:1.2em; 41 font-size:1.2em;
39 - widows: 94%; 42 + width: 94%;
40 overflow: hidden; 43 overflow: hidden;
41 } 44 }
@@ -276,7 +276,7 @@ $basicBtnC:#eb0313; @@ -276,7 +276,7 @@ $basicBtnC:#eb0313;
276 } 276 }
277 } 277 }
278 .price-date { 278 .price-date {
279 - // width: 100%; 279 + width: 100%;
280 color: $subFontC; 280 color: $subFontC;
281 height: pxToRem(88px); 281 height: pxToRem(88px);
282 padding-left: pxToRem(28px); 282 padding-left: pxToRem(28px);
@@ -365,6 +365,9 @@ $basicBtnC:#eb0313; @@ -365,6 +365,9 @@ $basicBtnC:#eb0313;
365 } 365 }
366 } 366 }
367 .goodsDiscount { 367 .goodsDiscount {
  368 + display: block;
  369 + width: 100%;
  370 + height:auto;
368 font-size: pxToRem(28px); 371 font-size: pxToRem(28px);
369 color: $mainFontC; 372 color: $mainFontC;
370 background-color: #fff; 373 background-color: #fff;
@@ -373,7 +376,6 @@ $basicBtnC:#eb0313; @@ -373,7 +376,6 @@ $basicBtnC:#eb0313;
373 position: relative; 376 position: relative;
374 padding: pxToRem(30px) pxToRem(60px) pxToRem(30px) pxToRem(28px); 377 padding: pxToRem(30px) pxToRem(60px) pxToRem(30px) pxToRem(28px);
375 line-height: pxToRem(36px); 378 line-height: pxToRem(36px);
376 - // line-height: pxToRem(88px);  
377 } 379 }
378 380
379 .short-text { 381 .short-text {
1 {{> layout/header}} 1 {{> layout/header}}
2 <div class="my-address-page select-address-page yoho-page"> 2 <div class="my-address-page select-address-page yoho-page">
3 - <div class="page-wrap"> 3 + <div class="page-wrap clearfix">
4 {{# address}} 4 {{# address}}
5 <a class="address-item" data-address-id="{{address_id}}" data-is-support="{{is_support}}" href="/cart/index/orderEnsure"> 5 <a class="address-item" data-address-id="{{address_id}}" data-is-support="{{is_support}}" href="/cart/index/orderEnsure">
6 <span class="name">{{consignee}}</span> 6 <span class="name">{{consignee}}</span>
@@ -22,6 +22,7 @@ @@ -22,6 +22,7 @@
22 <span class="iconfont icon-right-arrow">&#xe614;</span> 22 <span class="iconfont icon-right-arrow">&#xe614;</span>
23 <span class="count">{{giftCount}}</span> 23 <span class="count">{{giftCount}}</span>
24 </a> 24 </a>
  25 + <span class="under-line"></span>
25 </li> 26 </li>
26 {{/if}} 27 {{/if}}
27 {{#if advanceBuy}} 28 {{#if advanceBuy}}
@@ -32,6 +33,7 @@ @@ -32,6 +33,7 @@
32 <span class="iconfont icon-right-arrow">&#xe614;</span> 33 <span class="iconfont icon-right-arrow">&#xe614;</span>
33 <span class="count">{{advanceBuyCount}}</span> 34 <span class="count">{{advanceBuyCount}}</span>
34 </a> 35 </a>
  36 + <span class="under-line"></span>
35 </li> 37 </li>
36 {{/if}} 38 {{/if}}
37 </ul> 39 </ul>
@@ -873,8 +873,8 @@ class HomeController extends AbstractAction @@ -873,8 +873,8 @@ class HomeController extends AbstractAction
873 $input->SetOpenid($openId); 873 $input->SetOpenid($openId);
874 $order = WxPayApi::unifiedOrder($input); 874 $order = WxPayApi::unifiedOrder($input);
875 $jsApiParameters = $tools->GetJsApiParameters($order); 875 $jsApiParameters = $tools->GetJsApiParameters($order);
876 -  
877 - $this->echoJson(array('code' => 200, 'data' => array('jsApiParameters' => json_decode($jsApiParameters)))); 876 + $this->echoJson(array('code' => 200, 'data' => array('jsApiParameters' => json_decode($jsApiParameters) )) );
  877 +
878 } while (false); 878 } while (false);
879 } 879 }
880 880
@@ -912,7 +912,7 @@ class HomeController extends AbstractAction @@ -912,7 +912,7 @@ class HomeController extends AbstractAction
912 } 912 }
913 913
914 $this->setTitle('订单详情'); 914 $this->setTitle('订单详情');
915 - $this->setNavHeader('订单详情', true, false); 915 + $this->setNavHeader('订单详情', Helpers::url('/home/orders'), false);
916 916
917 $this->_view->display('order-detail', array( 917 $this->_view->display('order-detail', array(
918 'orderDetailPage' => true, 918 'orderDetailPage' => true,