Authored by hf

Merge branch 'develop/wap' into beta/wap

1 -@import "new-arrival", "discount", "list", "detail", "suspend-cart", "hot-rank", "_recommend-for-you.scss";  
  1 +@import "new-arrival", "discount", "list", "detail", "suspend-cart", "hot-rank", "_recommend-for-you.scss", "limit";
  1 +.limit-good-page {
  2 + background-color: #f4f4f4;
  3 + color: #444;
  4 +
  5 + .top {
  6 + font-size: 0.6rem;
  7 + height: 2rem;
  8 + line-height: 2.2rem;
  9 + margin-bottom: 0.1rem;
  10 + background-color: #fff;
  11 + padding: 0.2rem 0;
  12 +
  13 +
  14 + div {
  15 + width: 20%;
  16 + display: inline-block;
  17 + float: left;
  18 + img {
  19 + width: 1.5rem;
  20 + border: 1px solid #ccc;
  21 + border-radius: 100%;
  22 + position: relative;
  23 + top: 0.25rem;
  24 + }
  25 + }
  26 +
  27 + p {
  28 + display: inline-block;
  29 + float: left;
  30 + width: 80%;
  31 + }
  32 + }
  33 +
  34 + .detail {
  35 + background-color: #fff;
  36 + padding: 0.6rem 0.8rem;
  37 + border-bottom: 1px solid #e6e6e6;
  38 +
  39 + .name {
  40 + font-size: 0.9rem;
  41 + margin-bottom: 0.5rem;
  42 + }
  43 + .sale-info {
  44 + height: 1rem;
  45 + line-height: 1rem;
  46 + }
  47 + .price {
  48 + font-size: 0.8rem;
  49 + color: #d0021b;
  50 + float: left;
  51 + }
  52 +
  53 + .date {
  54 + font-size: 0.6rem;
  55 + float: right;
  56 +
  57 + .text {
  58 + position: relative;
  59 + top: 0.08rem;
  60 + }
  61 + }
  62 + }
  63 +
  64 + .goodDesc {
  65 + margin-top: 1rem;
  66 + }
  67 +
  68 + .bottom {
  69 + background-color: #fff;
  70 + border-top: 1px solid #e6e6e6;
  71 + padding: 0.5rem 2rem 2rem 2rem;
  72 + height: 3rem;
  73 + position: absolute;
  74 + bottom: 0;
  75 + width: 12rem;
  76 + margin: 0 auto;
  77 +
  78 + .logo {
  79 + width: 100;
  80 + height: 2.5rem;
  81 +
  82 + background-image: image-url('logo-bottom.png');
  83 + background-size: 100%;
  84 + background-repeat: no-repeat;
  85 + background-position: center;
  86 + }
  87 +
  88 + .btn {
  89 + font-size: 0.8rem;
  90 + background-color: #fff;
  91 + border: 1px solid #444;
  92 + border-radius: 0.2rem;
  93 + padding: 0.3rem 0.6rem;
  94 + }
  95 +
  96 + .btn:active {
  97 + background-color: #ccc;
  98 + }
  99 +
  100 + .left, .right {
  101 + display: inline-block;
  102 + float: left;
  103 + }
  104 +
  105 + .left {
  106 + width: 39%;
  107 + }
  108 +
  109 + .right {
  110 + width: 60%;
  111 + font-size: 0.65rem;
  112 +
  113 + span {
  114 + display: block;
  115 + width: 95%;
  116 + margin: 0 auto;
  117 + }
  118 + }
  119 + }
  120 +}
@@ -61,8 +61,8 @@ @@ -61,8 +61,8 @@
61 <img src="{{jsUrl}}/cuxiao/img/newuser/160301/line-1.jpg"> 61 <img src="{{jsUrl}}/cuxiao/img/newuser/160301/line-1.jpg">
62 <div class="img-box"> 62 <div class="img-box">
63 <img src="{{jsUrl}}/cuxiao/img/newuser/160301/12.jpg"> 63 <img src="{{jsUrl}}/cuxiao/img/newuser/160301/12.jpg">
64 - <a class="href href-left" href="{{url_1}}"></a>  
65 - <a class="href href-right" href="{{url_2}}"></a> 64 + <a class="href href-left" href="{{url_2}}"></a>
  65 + <a class="href href-right" href="{{url_3}}"></a>
66 </div> 66 </div>
67 <div class="img-box"> 67 <div class="img-box">
68 <img src="{{jsUrl}}/cuxiao/img/newuser/160301/13.jpg"> 68 <img src="{{jsUrl}}/cuxiao/img/newuser/160301/13.jpg">
@@ -72,8 +72,8 @@ @@ -72,8 +72,8 @@
72 <img src="{{jsUrl}}/cuxiao/img/newuser/160301/line-1.jpg"> 72 <img src="{{jsUrl}}/cuxiao/img/newuser/160301/line-1.jpg">
73 <div class="img-box"> 73 <div class="img-box">
74 <img src="{{jsUrl}}/cuxiao/img/newuser/160301/14.jpg"> 74 <img src="{{jsUrl}}/cuxiao/img/newuser/160301/14.jpg">
75 - <a class="href href-left" href="{{url_3}}"></a>  
76 - <a class="href href-right" href="{{url_4}}"></a> 75 + <a class="href href-left" href="{{url_4}}"></a>
  76 + <a class="href href-right" href="{{url_5}}"></a>
77 </div> 77 </div>
78 <div class="img-box"> 78 <div class="img-box">
79 <img src="{{jsUrl}}/cuxiao/img/newuser/160301/15.jpg"> 79 <img src="{{jsUrl}}/cuxiao/img/newuser/160301/15.jpg">
@@ -83,8 +83,8 @@ @@ -83,8 +83,8 @@
83 <img src="{{jsUrl}}/cuxiao/img/newuser/160301/line-1.jpg"> 83 <img src="{{jsUrl}}/cuxiao/img/newuser/160301/line-1.jpg">
84 <div class="img-box"> 84 <div class="img-box">
85 <img src="{{jsUrl}}/cuxiao/img/newuser/160301/16.jpg"> 85 <img src="{{jsUrl}}/cuxiao/img/newuser/160301/16.jpg">
86 - <a class="href href-left" href="{{url_5}}"></a>  
87 - <a class="href href-right" href="{{url_6}}"></a> 86 + <a class="href href-left" href="{{url_6}}"></a>
  87 + <a class="href href-right" href="{{url_7}}"></a>
88 </div> 88 </div>
89 <div class="img-box"> 89 <div class="img-box">
90 <img src="{{jsUrl}}/cuxiao/img/newuser/160301/17.jpg"> 90 <img src="{{jsUrl}}/cuxiao/img/newuser/160301/17.jpg">
  1 +{{> layout/header}}
  2 +<div class="yoho-page">
  3 + <div class="goodDesc"></div>
  4 +</div>
  5 +{{> layout/footer}}
  1 +{{> layout/header}}
  2 +<div class="limit-good-page yoho-page">
  3 + <div class="top clearfix">
  4 + <div>
  5 + <img src="{{profile}}" alt="">
  6 + </div>
  7 + <p>我在Yoho!Buy有货发现了一个限定发售商品</p>
  8 + </div>
  9 + <div class="banner">
  10 + <a href="{{bannerSrc}}">
  11 + <img src="{{banner}}" alt="">
  12 + </a>
  13 + </div>
  14 + <div class="detail clearfix">
  15 + <p class="name">{{name}}</p>
  16 + <div class="sale-info">
  17 + <span class="price">¥{{price}}</span>
  18 + <span class="date">
  19 + <span class="iconfont">&#xe603;</span>
  20 + <span class="text">{{releaseDate}}</span>
  21 + </span>
  22 + </div>
  23 + </div>
  24 +
  25 + <div class="goodDesc"></div>
  26 +
  27 + <div class="bottom">
  28 + <div class="logo"></div>
  29 + <div class="left">
  30 + <a href="{{appSrc}}">
  31 + <button class="btn">
  32 + 立即下载
  33 + </button>
  34 + </a>
  35 + </div>
  36 + <div class="right">
  37 + <span>下载Yoho!Buy有货APP</span>
  38 + <span>抢购超级限量款</span>
  39 + </div>
  40 + </div>
  41 +
  42 +</div>
  43 +{{> layout/footer}}
@@ -51,6 +51,24 @@ class HomeController extends AbstractAction @@ -51,6 +51,24 @@ class HomeController extends AbstractAction
51 'myIndexPage' => true, 51 'myIndexPage' => true,
52 'showDownloadApp' => true, 52 'showDownloadApp' => true,
53 'navHome' => true, 53 'navHome' => true,
  54 + 'notice' => array(
  55 + /*array(
  56 + 'title' => '1. 通知内容内容通知内容内容通知内容内容通知内容内容通知内容内容',
  57 + 'url' => 'http://www.yoho.cn'
  58 + ),
  59 + array(
  60 + 'title' => '2. 通知内容内容通知内容内容通知内容内容通知内容内容通知内容内容',
  61 + 'url' => 'http://www.yoho.cn'
  62 + ),
  63 + array(
  64 + 'title' => '3. 通知内容内容通知内容内容通知内容内容通知内容内容通知内容内容',
  65 + 'url' => 'http://www.yoho.cn'
  66 + ),
  67 + array(
  68 + 'title' => '4. 通知内容内容通知内容内容通知内容内容通知内容内容通知内容内容',
  69 + 'url' => 'http://www.yoho.cn'
  70 + )*/
  71 + ),
54 'pageFooter' => true, 72 'pageFooter' => true,
55 'cartUrl' => Helpers::url('/cart/index/index', null), 73 'cartUrl' => Helpers::url('/cart/index/index', null),
56 'signinUrl' => Helpers::url('/signin.html', array('refer' => Helpers::url('/home'))), 74 'signinUrl' => Helpers::url('/signin.html', array('refer' => Helpers::url('/home'))),
@@ -218,6 +218,7 @@ class UserModel @@ -218,6 +218,7 @@ class UserModel
218 $product['discountPrice'] = ($val['market_price'] - $val['sales_price'] > 0) ? '¥' . Helpers::transPrice($val['sales_price']) : false; 218 $product['discountPrice'] = ($val['market_price'] - $val['sales_price'] > 0) ? '¥' . Helpers::transPrice($val['sales_price']) : false;
219 $product['savePrice'] = ($val['price_down'] > 0) ? '¥' . Helpers::transPrice($val['price_down']) : false; 219 $product['savePrice'] = ($val['price_down'] > 0) ? '¥' . Helpers::transPrice($val['price_down']) : false;
220 $product['sellOut'] = ($val['storage'] <= 0); 220 $product['sellOut'] = ($val['storage'] <= 0);
  221 + $product['invalidGoods'] = ($val['status'] == 0); // 下架商品
221 222
222 $datas[] = $product; 223 $datas[] = $product;
223 } 224 }
@@ -358,9 +359,9 @@ class UserModel @@ -358,9 +359,9 @@ class UserModel
358 $record = array(); 359 $record = array();
359 foreach ($data as &$val) { 360 foreach ($data as &$val) {
360 // 排除下架的商品 361 // 排除下架的商品
361 - if ($val['status'] == 0) { 362 + /*if ($val['status'] == 0) {
362 continue; 363 continue;
363 - } 364 + }*/
364 365
365 $record = array(); 366 $record = array();
366 $record['product_name'] = $val['product_name']; 367 $record['product_name'] = $val['product_name'];
@@ -369,6 +370,7 @@ class UserModel @@ -369,6 +370,7 @@ class UserModel
369 $record['image'] = !empty($val['image']) ? Helpers::getImageUrl($val['image'], 447, 596) : ''; 370 $record['image'] = !empty($val['image']) ? Helpers::getImageUrl($val['image'], 447, 596) : '';
370 $record['sales_price'] = Helpers::transPrice($val['sales_price']); 371 $record['sales_price'] = Helpers::transPrice($val['sales_price']);
371 $record['market_price'] = ($val['market_price'] - $val['sales_price'] > 0) ? Helpers::transPrice($val['market_price']) : false; 372 $record['market_price'] = ($val['market_price'] - $val['sales_price'] > 0) ? Helpers::transPrice($val['market_price']) : false;
  373 + $record['invalidGoods'] = ($val['status'] == 0); // 下架商品
372 $record['storage'] = $val['storage']; 374 $record['storage'] = $val['storage'];
373 $allRecords[] = $record; 375 $allRecords[] = $record;
374 } 376 }
@@ -229,4 +229,26 @@ class IndexController extends AbstractAction @@ -229,4 +229,26 @@ class IndexController extends AbstractAction
229 $this->_view->display('index', $data); 229 $this->_view->display('index', $data);
230 } 230 }
231 231
  232 + public function limitDetailAction()
  233 + {
  234 + $data = array();
  235 + $this->_view->display('limit-detail', $data);
  236 + }
  237 +
  238 + public function limitAction()
  239 + {
  240 + $data = array(
  241 + 'profile' => 'http://cdn.yoho.cn/myohobuy/assets/img/me/index/user-avatar.png?1455719653',
  242 + 'banner' => 'http://img11.static.yhbimg.com/yhb-img01/2016/02/25/02/016ed5a17fb9d9bc7542174c22dccb4acf.jpg?imageView/2/w/640/h/240',
  243 + 'bannerSrc' => './',
  244 + 'name' => '潮流尖端商品啊啊啊啊',
  245 + 'price' => '1999',
  246 + 'releaseDate' => '2016年12月发售',
  247 + 'appSrc' => './'
  248 + );
  249 +
  250 +
  251 +
  252 + $this->_view->display('limit', $data);
  253 + }
232 } 254 }