Authored by 毕凯

Merge branch 'develop/wap' into feature/wap/postcss

@import "new-arrival", "discount", "list", "detail", "suspend-cart", "hot-rank", "_recommend-for-you.scss";
\ No newline at end of file
@import "new-arrival", "discount", "list", "detail", "suspend-cart", "hot-rank", "_recommend-for-you.scss", "limit";
... ...
.limit-good-page {
background-color: #f4f4f4;
color: #444;
.top {
font-size: 0.6rem;
height: 2rem;
line-height: 2.2rem;
margin-bottom: 0.1rem;
background-color: #fff;
padding: 0.2rem 0;
div {
width: 20%;
display: inline-block;
float: left;
img {
width: 1.5rem;
border: 1px solid #ccc;
border-radius: 100%;
position: relative;
top: 0.25rem;
}
}
p {
display: inline-block;
float: left;
width: 80%;
}
}
.detail {
background-color: #fff;
padding: 0.6rem 0.8rem;
border-bottom: 1px solid #e6e6e6;
.name {
font-size: 0.9rem;
margin-bottom: 0.5rem;
}
.sale-info {
height: 1rem;
line-height: 1rem;
}
.price {
font-size: 0.8rem;
color: #d0021b;
float: left;
}
.date {
font-size: 0.6rem;
float: right;
.text {
position: relative;
top: 0.08rem;
}
}
}
.goodDesc {
margin-top: 1rem;
}
.bottom {
background-color: #fff;
border-top: 1px solid #e6e6e6;
padding: 0.5rem 2rem 2rem 2rem;
height: 3rem;
position: absolute;
bottom: 0;
width: 12rem;
margin: 0 auto;
.logo {
width: 100;
height: 2.5rem;
background-image: image-url('logo-bottom.png');
background-size: 100%;
background-repeat: no-repeat;
background-position: center;
}
.btn {
font-size: 0.8rem;
background-color: #fff;
border: 1px solid #444;
border-radius: 0.2rem;
padding: 0.3rem 0.6rem;
}
.btn:active {
background-color: #ccc;
}
.left, .right {
display: inline-block;
float: left;
}
.left {
width: 39%;
}
.right {
width: 60%;
font-size: 0.65rem;
span {
display: block;
width: 95%;
margin: 0 auto;
}
}
}
}
... ...
{{> layout/header}}
<div class="yoho-page">
<div class="goodDesc"></div>
</div>
{{> layout/footer}}
... ...
{{> layout/header}}
<div class="limit-good-page yoho-page">
<div class="top clearfix">
<div>
<img src="{{profile}}" alt="">
</div>
<p>我在Yoho!Buy有货发现了一个限定发售商品</p>
</div>
<div class="banner">
<a href="{{bannerSrc}}">
<img src="{{banner}}" alt="">
</a>
</div>
<div class="detail clearfix">
<p class="name">{{name}}</p>
<div class="sale-info">
<span class="price">¥{{price}}</span>
<span class="date">
<span class="iconfont">&#xe603;</span>
<span class="text">{{releaseDate}}</span>
</span>
</div>
</div>
<div class="goodDesc"></div>
<div class="bottom">
<div class="logo"></div>
<div class="left">
<a href="{{appSrc}}">
<button class="btn">
立即下载
</button>
</a>
</div>
<div class="right">
<span>下载Yoho!Buy有货APP</span>
<span>抢购超级限量款</span>
</div>
</div>
</div>
{{> layout/footer}}
... ...
... ... @@ -238,6 +238,7 @@ class UserModel
$product['discountPrice'] = ($val['market_price'] - $val['sales_price'] > 0) ? '¥' . Helpers::transPrice($val['sales_price']) : false;
$product['savePrice'] = ($val['price_down'] > 0) ? '¥' . Helpers::transPrice($val['price_down']) : false;
$product['sellOut'] = ($val['storage'] <= 0);
$product['invalidGoods'] = ($val['status'] == 0); // 下架商品
$datas[] = $product;
}
... ... @@ -378,9 +379,9 @@ class UserModel
$record = array();
foreach ($data as &$val) {
// 排除下架的商品
if ($val['status'] == 0) {
/*if ($val['status'] == 0) {
continue;
}
}*/
$record = array();
$record['product_name'] = $val['product_name'];
... ... @@ -389,6 +390,7 @@ class UserModel
$record['image'] = !empty($val['image']) ? Helpers::getImageUrl($val['image'], 447, 596) : '';
$record['sales_price'] = Helpers::transPrice($val['sales_price']);
$record['market_price'] = ($val['market_price'] - $val['sales_price'] > 0) ? Helpers::transPrice($val['market_price']) : false;
$record['invalidGoods'] = ($val['status'] == 0); // 下架商品
$record['storage'] = $val['storage'];
$allRecords[] = $record;
}
... ...
... ... @@ -229,4 +229,26 @@ class IndexController extends AbstractAction
$this->_view->display('index', $data);
}
public function limitDetailAction()
{
$data = array();
$this->_view->display('limit-detail', $data);
}
public function limitAction()
{
$data = array(
'profile' => 'http://cdn.yoho.cn/myohobuy/assets/img/me/index/user-avatar.png?1455719653',
'banner' => 'http://img11.static.yhbimg.com/yhb-img01/2016/02/25/02/016ed5a17fb9d9bc7542174c22dccb4acf.jpg?imageView/2/w/640/h/240',
'bannerSrc' => './',
'name' => '潮流尖端商品啊啊啊啊',
'price' => '1999',
'releaseDate' => '2016年12月发售',
'appSrc' => './'
);
$this->_view->display('limit', $data);
}
}
... ...