Authored by 毕凯

Merge branch 'develop/wap' of git.dev.yoho.cn:web/yohobuy into develop/wap

/**
* 新人专享
* @author: wsl<shuiling.wang@yoho.cn>
* @date: 2016/3/3
*/
var $ = require('jquery'),
lazyLoad = require('yoho.lazyload');
lazyLoad($('img.lazy'));
\ No newline at end of file
... ...
... ... @@ -108,4 +108,10 @@
}
}
}
}
.fresh-list{
position: relative;
min-height: 440px;
padding-left: 14px;
}
\ No newline at end of file
... ...
... ... @@ -6,3 +6,4 @@
@import "hot-rank";
@import "recommend-for-you";
@import "limit";
@import "limit-help";
... ...
.limit-help-page {
padding: 28px;
color: #444;
h2 {
font-size: 30px;
font-weight: bold;
}
.method {
display: block;
width: 80px;
height: 35px;
line-height: 35px;
background-color: #444;
color: #fff;
border-radius: 20px;
text-align: center;
margin: 20px 0;
}
li {
font-size: 24px;
}
.intro-img {
width: 100%;
height: 220px;
background-size: 100%;
background-repeat: no-repeat;
margin: 20px 0;
}
.method-1 {
li:nth-child(1) .intro-img{
background-image: resolve(product/help/1.png);
}
li:nth-child(2) .intro-img{
background-image: resolve(product/help/2.png);
}
li:nth-child(3) .intro-img{
background-image: resolve(product/help/3.png);
}
}
.method-2 {
li:nth-child(1) .intro-img{
background-image: resolve(product/help/4.png);
}
li:nth-child(2) .intro-img{
background-image: resolve(product/help/5.png);
}
li:nth-child(3) .intro-img{
background-image: resolve(product/help/6.png);
}
li:nth-child(4) .intro-img{
background-image: resolve(product/help/7.png);
}
}
.how {
li:nth-child(1) .intro-img{
background-image: resolve(product/help/8.png);
}
li:nth-child(2) .intro-img{
background-image: resolve(product/help/9.png);
margin-bottom: 0;
}
}
}
... ...
... ... @@ -159,6 +159,9 @@
<a href="javascript:;" class="sold-out">立即购买</a>
{{/if}}
<input type="hidden" name="limitCodeUrl" value="{{limitCodeUrl}}">
{{#limitProductCode}}
<input type="hidden" name="limitProductCode" value="{{.}}">
{{/limitProductCode}}
<a href="javascript:;" id="likeBtn" class="favorite iconfont {{#isCollect}}liked{{/isCollect}}">&#xe605;</a>
</div>
... ...
{{> layout/header}}
<div class="yoho-page">
<div class="goodDesc"></div>
</div>
{{> layout/footer}}
{{> layout/header}}
<div class="limit-help-page yoho-page">
<h2>不同限定商品获取限购码方式不同,获取限购码目前有两种方式:</h2>
<span class="method">方式一</span>
<ul class="method-1">
<li>1.在限定发售详情页点击分享或者底部“获取限购码”图标。
<div class="intro-img"></div>
</li>
<li>2.从弹出的分享中选取需要分享的渠道。
<div class="intro-img"></div>
</li>
<li>3.分享成功后返回Yoho!Buy有货APP会提示已获得限购码。
<div class="intro-img"></div>
</li>
</ul>
<span class="method">方式二</span>
<ul class="method-2">
<li>1.在限定发售详情页点击参加排队赢取限购码图标。
<div class="intro-img"></div>
</li>
<li>2.进入限定发售排队页面,点击参加排队。
<div class="intro-img"></div>
</li>
<li>3.排队成功后凭排队序列号作为抽奖凭证,等待开奖时间。
<div class="intro-img"></div>
</li>
<li>4.开奖后,排队页面会公布中奖名单,限购码会直接发送至账户。
<div class="intro-img"></div>
</li>
</ul>
<h2>查看和使用限购码</h2>
<ul class="how">
<li>1.从个人中心进入我的限购码页面,可查看所获取的限购码。
<div class="intro-img"></div>
</li>
<li>2.商品开售后,可凭此限购码购买对应商品。
<div class="intro-img"></div>
</li>
</ul>
</div>
{{> layout/footer}}
... ...
... ... @@ -340,3 +340,10 @@
seajs.use('js/me/currency-new');
</script>
{{/if}}
{{#if freshListPage}}
<script>
seajs.use('js/home/fresh-list');
</script>
{{/if}}
... ...
... ... @@ -314,13 +314,13 @@ class CartModel
* @param int $uid 用户ID
* @param string $cartType 购物车类型,ordinary表示普通购物车
* @param array $orderInfo cookie中记录的一些订单有关数据
* @param string $limitCode 限购商品的限购码,用户限购商品购买
* @param string $limitProductCode 限购商品码,用户限购商品购买
* @param string $sku 商品sku,用于限购商品购买
* @param stirng $skn 商品skn,用于限购商品购买
* @param int $buyNumber 购买商品数目,用户限购商品支付
* @return array 接口返回的数据
*/
public static function cartPay($uid, $cartType, $orderInfo, $limitCode, $sku, $skn, $buyNumber)
public static function cartPay($uid, $cartType, $orderInfo, $limitProductCode, $sku, $skn, $buyNumber)
{
$result = array();
... ... @@ -329,7 +329,7 @@ class CartModel
$skuList = json_encode(array(
array(
'type' => 'limitcode',
'limitproductcode' => $limitCode,
'limitproductcode' => $limitProductCode,
'skn' => $skn,
'sku' => $sku,
'buy_number' => $buyNumber
... ...
... ... @@ -330,6 +330,7 @@ class DetailModel
// 处理限购商品有关的按钮状态
self::procShowStatus($result, $showStatus, $isBeginSale);
$result['cartInfo']['limitProductCode'] = $baseInfo['limitProductCode'];
$result['cartInfo']['limitCodeUrl'] = 'yohobuy://' . Helpers::url('/product', array('skn' => $baseInfo['erpProductId']));
}
... ...
... ... @@ -295,14 +295,14 @@ class IndexController extends AbstractAction
}
// 如果传递了code, sku,skn,buy_number就代表是限购商品
$limitCode = $this->get('code', '');
$limitProductCode = $this->get('code', '');
$sku = $this->get('sku', '');
$skn = $this->get('skn', '');
$buyNumber = $this->get('buy_number', '');
// 购物车商品为空跳转到购物车页面
$uid = $this->getUid(true);
$order = CartModel::cartPay($uid, $cartType, $orderInfo, $limitCode, $sku, $skn, $buyNumber);
$order = CartModel::cartPay($uid, $cartType, $orderInfo, $limitProductCode, $sku, $skn, $buyNumber);
if (isset($order['cartUrl'])) {
$this->go($order['cartUrl']);
}
... ...
... ... @@ -229,10 +229,10 @@ class IndexController extends AbstractAction
$this->_view->display('index', $data);
}
public function limitDetailAction()
public function limitHelpAction()
{
$data = array();
$this->_view->display('limit-detail', $data);
$this->_view->display('limit-help', $data);
}
public function limitAction()
... ...