Authored by hf

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

... ... @@ -149,6 +149,28 @@ class UserData
}
/**
* 浏览记录数据
*
* @param int $uid 用户ID
* @param int $udid 客户端唯一标识
* @param int $page 第几页,默认为1
* @param int $limit 限制多少条,默认100
* @return array 接口返回的数据
*/
public static function browseRecord($uid, $udid, $page = 1, $limit = 100)
{
$param = Yohobuy::param();
$param['method'] = 'app.browse.product';
$param['uid'] = $uid;
$param['udid'] = $udid;
$param['page'] = $page;
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* YOHO币数据
*
* @param int $uid 用户ID
... ...
... ... @@ -130,12 +130,13 @@ $basicBtnC:#eb0313;
position: relative;
.swiper-pagination {
position: absolute;
z-index: 2;
bottom: pxToRem(40px);
.swiper-pagination-bullet {
margin-right: 2px;
}
.swiper-pagination-bullet-active {
background-color: #000;
background-color: #000 !important;
}
}
}
... ... @@ -220,6 +221,7 @@ $basicBtnC:#eb0313;
.vipLevel {
width: 100%;
box-sizing: border-box;
background-color: #fff;
display: table;
min-height: pxToRem(88px);
padding-left: pxToRem(28px);
... ... @@ -258,6 +260,7 @@ $basicBtnC:#eb0313;
.goodsDiscount {
font-size: pxToRem(28px);
color: $mainFontC;
background-color: #fff;
border-bottom: 1px solid $borderC;
h1 {
padding: pxToRem(30px) pxToRem(28px);
... ...
... ... @@ -3,6 +3,7 @@
<div class="banner-container">
<div class="tag-container">
<p class="good-tag new-tag">NEW</p>
<p class="good-tag renew-tag">再到着</p>
{{# tags}}
{{# is_new}}
<p class="good-tag new-tag">NEW</p>
... ...
... ... @@ -118,6 +118,29 @@ class HomeController extends AbstractAction
}
/**
* 浏览记录
*/
public function recordAction()
{
$result = array();
if ($this->isAjax()) {
$uid = $this->getUid();
$udid = $this->getUdid();
$page = $this->get('page', 1);
$limit = $this->get('limit', 100);
$result = UserModel::browserRecord($uid, $udid, $page, $limit);
}
if (empty($result)) {
echo ' ';
} else {
$this->echoJson($result);
}
}
/**
* 个人信息
*/
public function mydetailsAction()
... ...
... ... @@ -234,6 +234,29 @@ class UserModel
}
/**
* 处理浏览记录数据
*
* @param int $uid 用户ID
* @param int $udid 客户端唯一标识
* @param int $page 第几页,默认为1
* @param int $limit 限制多少条,默认100
* @return array处理之后的数据
*/
public static function browserRecord($uid, $udid, $page, $limit)
{
$result = array();
$records = UserData::browseRecord($uid, $udid, $page, $limit);
// 处理数据
if (isset($records['data']['product_list']) && !empty($records['data']['product_list'])) {
$result = $records['data']['product_list'];
}
return $result;
}
/**
* 处理YOHO币数据
*
* @param int $uid 用户ID
... ...