Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop
Showing
5 changed files
with
73 additions
and
1 deletions
@@ -149,6 +149,28 @@ class UserData | @@ -149,6 +149,28 @@ class UserData | ||
149 | } | 149 | } |
150 | 150 | ||
151 | /** | 151 | /** |
152 | + * 浏览记录数据 | ||
153 | + * | ||
154 | + * @param int $uid 用户ID | ||
155 | + * @param int $udid 客户端唯一标识 | ||
156 | + * @param int $page 第几页,默认为1 | ||
157 | + * @param int $limit 限制多少条,默认100 | ||
158 | + * @return array 接口返回的数据 | ||
159 | + */ | ||
160 | + public static function browseRecord($uid, $udid, $page = 1, $limit = 100) | ||
161 | + { | ||
162 | + $param = Yohobuy::param(); | ||
163 | + $param['method'] = 'app.browse.product'; | ||
164 | + $param['uid'] = $uid; | ||
165 | + $param['udid'] = $udid; | ||
166 | + $param['page'] = $page; | ||
167 | + $param['limit'] = $limit; | ||
168 | + $param['client_secret'] = Sign::getSign($param); | ||
169 | + | ||
170 | + return Yohobuy::get(Yohobuy::API_URL, $param); | ||
171 | + } | ||
172 | + | ||
173 | + /** | ||
152 | * YOHO币数据 | 174 | * YOHO币数据 |
153 | * | 175 | * |
154 | * @param int $uid 用户ID | 176 | * @param int $uid 用户ID |
@@ -130,12 +130,13 @@ $basicBtnC:#eb0313; | @@ -130,12 +130,13 @@ $basicBtnC:#eb0313; | ||
130 | position: relative; | 130 | position: relative; |
131 | .swiper-pagination { | 131 | .swiper-pagination { |
132 | position: absolute; | 132 | position: absolute; |
133 | + z-index: 2; | ||
133 | bottom: pxToRem(40px); | 134 | bottom: pxToRem(40px); |
134 | .swiper-pagination-bullet { | 135 | .swiper-pagination-bullet { |
135 | margin-right: 2px; | 136 | margin-right: 2px; |
136 | } | 137 | } |
137 | .swiper-pagination-bullet-active { | 138 | .swiper-pagination-bullet-active { |
138 | - background-color: #000; | 139 | + background-color: #000 !important; |
139 | } | 140 | } |
140 | } | 141 | } |
141 | } | 142 | } |
@@ -220,6 +221,7 @@ $basicBtnC:#eb0313; | @@ -220,6 +221,7 @@ $basicBtnC:#eb0313; | ||
220 | .vipLevel { | 221 | .vipLevel { |
221 | width: 100%; | 222 | width: 100%; |
222 | box-sizing: border-box; | 223 | box-sizing: border-box; |
224 | + background-color: #fff; | ||
223 | display: table; | 225 | display: table; |
224 | min-height: pxToRem(88px); | 226 | min-height: pxToRem(88px); |
225 | padding-left: pxToRem(28px); | 227 | padding-left: pxToRem(28px); |
@@ -258,6 +260,7 @@ $basicBtnC:#eb0313; | @@ -258,6 +260,7 @@ $basicBtnC:#eb0313; | ||
258 | .goodsDiscount { | 260 | .goodsDiscount { |
259 | font-size: pxToRem(28px); | 261 | font-size: pxToRem(28px); |
260 | color: $mainFontC; | 262 | color: $mainFontC; |
263 | + background-color: #fff; | ||
261 | border-bottom: 1px solid $borderC; | 264 | border-bottom: 1px solid $borderC; |
262 | h1 { | 265 | h1 { |
263 | padding: pxToRem(30px) pxToRem(28px); | 266 | padding: pxToRem(30px) pxToRem(28px); |
@@ -3,6 +3,7 @@ | @@ -3,6 +3,7 @@ | ||
3 | <div class="banner-container"> | 3 | <div class="banner-container"> |
4 | <div class="tag-container"> | 4 | <div class="tag-container"> |
5 | <p class="good-tag new-tag">NEW</p> | 5 | <p class="good-tag new-tag">NEW</p> |
6 | + <p class="good-tag renew-tag">再到着</p> | ||
6 | {{# tags}} | 7 | {{# tags}} |
7 | {{# is_new}} | 8 | {{# is_new}} |
8 | <p class="good-tag new-tag">NEW</p> | 9 | <p class="good-tag new-tag">NEW</p> |
@@ -118,6 +118,29 @@ class HomeController extends AbstractAction | @@ -118,6 +118,29 @@ class HomeController extends AbstractAction | ||
118 | } | 118 | } |
119 | 119 | ||
120 | /** | 120 | /** |
121 | + * 浏览记录 | ||
122 | + */ | ||
123 | + public function recordAction() | ||
124 | + { | ||
125 | + $result = array(); | ||
126 | + | ||
127 | + if ($this->isAjax()) { | ||
128 | + $uid = $this->getUid(); | ||
129 | + $udid = $this->getUdid(); | ||
130 | + $page = $this->get('page', 1); | ||
131 | + $limit = $this->get('limit', 100); | ||
132 | + | ||
133 | + $result = UserModel::browserRecord($uid, $udid, $page, $limit); | ||
134 | + } | ||
135 | + | ||
136 | + if (empty($result)) { | ||
137 | + echo ' '; | ||
138 | + } else { | ||
139 | + $this->echoJson($result); | ||
140 | + } | ||
141 | + } | ||
142 | + | ||
143 | + /** | ||
121 | * 个人信息 | 144 | * 个人信息 |
122 | */ | 145 | */ |
123 | public function mydetailsAction() | 146 | public function mydetailsAction() |
@@ -234,6 +234,29 @@ class UserModel | @@ -234,6 +234,29 @@ class UserModel | ||
234 | } | 234 | } |
235 | 235 | ||
236 | /** | 236 | /** |
237 | + * 处理浏览记录数据 | ||
238 | + * | ||
239 | + * @param int $uid 用户ID | ||
240 | + * @param int $udid 客户端唯一标识 | ||
241 | + * @param int $page 第几页,默认为1 | ||
242 | + * @param int $limit 限制多少条,默认100 | ||
243 | + * @return array处理之后的数据 | ||
244 | + */ | ||
245 | + public static function browserRecord($uid, $udid, $page, $limit) | ||
246 | + { | ||
247 | + $result = array(); | ||
248 | + | ||
249 | + $records = UserData::browseRecord($uid, $udid, $page, $limit); | ||
250 | + | ||
251 | + // 处理数据 | ||
252 | + if (isset($records['data']['product_list']) && !empty($records['data']['product_list'])) { | ||
253 | + $result = $records['data']['product_list']; | ||
254 | + } | ||
255 | + | ||
256 | + return $result; | ||
257 | + } | ||
258 | + | ||
259 | + /** | ||
237 | * 处理YOHO币数据 | 260 | * 处理YOHO币数据 |
238 | * | 261 | * |
239 | * @param int $uid 用户ID | 262 | * @param int $uid 用户ID |
-
Please register or login to post a comment