Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop
Showing
26 changed files
with
666 additions
and
431 deletions
docs/清首页缓存.txt
0 → 100644
1 | + | ||
2 | +guang.m.yohobuy.com/guang/index/clear?type=boys | ||
3 | +guang.m.yohobuy.com/guang/index/clear?type=girls | ||
4 | +guang.m.yohobuy.com/guang/index/clear?type=kids | ||
5 | +guang.m.yohobuy.com/guang/index/clear?type=lifestyle | ||
6 | + | ||
7 | + | ||
8 | + | ||
9 | +http://new.yohobuy.com/cache/clear?key=Default_Kids_index&token=yoho9646abcdef | ||
10 | + | ||
11 | +http://new.yohobuy.com/cache/clear?key=Default_Lifestyle_index&token=yoho9646abcdef | ||
12 | + | ||
13 | +http://new.yohobuy.com/cache/clear?key=Default_Woman_index&token=yoho9646abcdef | ||
14 | + | ||
15 | +##http://new.yohobuy.com/cache/clear?key=Default_Default_index&token=yoho9646abcdef | ||
16 | + | ||
17 | + | ||
18 | +其中token就按照上述中去填写,key代表具体要清的缓存的键 | ||
19 | + | ||
20 | +具体key的对应关系如下: | ||
21 | +key 说明 | ||
22 | +Default_Kids_index 潮童页面缓存 | ||
23 | +Default_Lifestyle_index 创意生活页面缓存 | ||
24 | +Default_Woman_index 女生页面缓存 | ||
25 | +Default_Default_index 男生 |
docs/网站搜索接口说明.docx
0 → 100644
No preview for this file type
docs/逛接口说明.xls
0 → 100644
No preview for this file type
framework @ 75bbc3b0
@@ -261,6 +261,7 @@ class AbstractAction extends Controller_Abstract | @@ -261,6 +261,7 @@ class AbstractAction extends Controller_Abstract | ||
261 | * 获取Session | 261 | * 获取Session |
262 | * | 262 | * |
263 | * @param string $name 名称 | 263 | * @param string $name 名称 |
264 | + * @return mixed | ||
264 | */ | 265 | */ |
265 | public function getSession($name) | 266 | public function getSession($name) |
266 | { | 267 | { |
@@ -270,12 +271,18 @@ class AbstractAction extends Controller_Abstract | @@ -270,12 +271,18 @@ class AbstractAction extends Controller_Abstract | ||
270 | /** | 271 | /** |
271 | * 获取当前登录的用户ID | 272 | * 获取当前登录的用户ID |
272 | * | 273 | * |
274 | + * @param bool $useSession 是否使用Session会话 | ||
273 | * @return int | 275 | * @return int |
274 | - * @todo | ||
275 | */ | 276 | */ |
276 | - protected function getUid() | 277 | + protected function getUid($useSession = false) |
277 | { | 278 | { |
278 | if (!$this->_uid) { | 279 | if (!$this->_uid) { |
280 | + // 从SESSION获取 | ||
281 | + if ($useSession) { | ||
282 | + $this->_uid = $this->getSession('_UID'); | ||
283 | + } | ||
284 | + // 从COOKIE获取 | ||
285 | + else { | ||
279 | $cookie = $this->getCookie('_UID'); | 286 | $cookie = $this->getCookie('_UID'); |
280 | if (!empty($cookie)) { | 287 | if (!empty($cookie)) { |
281 | $cookieList = explode('::', $cookie); | 288 | $cookieList = explode('::', $cookie); |
@@ -285,6 +292,7 @@ class AbstractAction extends Controller_Abstract | @@ -285,6 +292,7 @@ class AbstractAction extends Controller_Abstract | ||
285 | } | 292 | } |
286 | } | 293 | } |
287 | } | 294 | } |
295 | + } | ||
288 | return $this->_uid; | 296 | return $this->_uid; |
289 | } | 297 | } |
290 | 298 |
library/LibModels/Wap/Home/GuangData.php
0 → 100644
1 | +<?php | ||
2 | + | ||
3 | +namespace LibModels\Wap\Home; | ||
4 | + | ||
5 | +use Api\Sign; | ||
6 | +use Api\Yohobuy; | ||
7 | + | ||
8 | +/** | ||
9 | + * 我的逛数据模型 | ||
10 | + * | ||
11 | + * @name GuangData | ||
12 | + * @package LibModels/Wap/Home | ||
13 | + * @copyright yoho.inc | ||
14 | + * @version 1.0 (2015-11-13) | ||
15 | + * @author xiaowei | ||
16 | + */ | ||
17 | +class GuangData | ||
18 | +{ | ||
19 | + | ||
20 | + const GUANG_URI = 'guang/api/v1/favorite/'; | ||
21 | + | ||
22 | + //我的guang | ||
23 | + public static function getGuangInfo($uid, $page, $yh_channel = 1, $gender = '1,3', $limit = 10) | ||
24 | + { | ||
25 | + $param = Yohobuy::param(); | ||
26 | + $param['uid'] = $uid; | ||
27 | + $param['page'] = $page; | ||
28 | + $param['gender'] = $gender; | ||
29 | + $param['limit'] = $limit; | ||
30 | + $param['yh_channel'] = $yh_channel; | ||
31 | + $param['client_secret'] = Sign::getSign($param); | ||
32 | +// return Yohobuy::post(Yohobuy::API_URL, $param); | ||
33 | + return Yohobuy::post(Yohobuy::SERVICE_URL . self::GUANG_URI . 'getUserFavArticleList', $param); | ||
34 | + } | ||
35 | + | ||
36 | +} |
@@ -2,7 +2,6 @@ | @@ -2,7 +2,6 @@ | ||
2 | 2 | ||
3 | namespace LibModels\Wap\Home; | 3 | namespace LibModels\Wap\Home; |
4 | 4 | ||
5 | -use Api\Sign; | ||
6 | use Api\Yohobuy; | 5 | use Api\Yohobuy; |
7 | 6 | ||
8 | /** | 7 | /** |
@@ -18,16 +17,23 @@ class OnlineData | @@ -18,16 +17,23 @@ class OnlineData | ||
18 | { | 17 | { |
19 | const ONLINE_URI = 'operations/api/v1/help/'; | 18 | const ONLINE_URI = 'operations/api/v1/help/'; |
20 | 19 | ||
21 | - //获取帮助列表(分类) | 20 | + /* |
21 | + * 获取帮助列表(分类),缓存1h | ||
22 | + * clientType客户端 | ||
23 | + */ | ||
22 | public static function getOnlineServiceInfo($clientType='iphone') | 24 | public static function getOnlineServiceInfo($clientType='iphone') |
23 | { | 25 | { |
24 | - return Yohobuy::get(Yohobuy::SERVICE_URL .self::ONLINE_URI.'getCategory', array('client_type'=>$clientType)); | 26 | + return Yohobuy::get(Yohobuy::SERVICE_URL .self::ONLINE_URI.'getCategory', array('client_type'=>$clientType),3600); |
25 | } | 27 | } |
26 | 28 | ||
27 | - //获取问题详情 | 29 | + /* |
30 | + * 获取问题详情,缓存1h | ||
31 | + * cateId问题分类ID | ||
32 | + * clientType客户端 | ||
33 | + */ | ||
28 | public static function getOnlineServiceDetail($cateId, $clientType = 'iphone') | 34 | public static function getOnlineServiceDetail($cateId, $clientType = 'iphone') |
29 | { | 35 | { |
30 | - return Yohobuy::get(Yohobuy::SERVICE_URL .self::ONLINE_URI.'getHelp', array('category_id'=>$cateId,'client_type'=>$clientType)); | 36 | + return Yohobuy::get(Yohobuy::SERVICE_URL .self::ONLINE_URI.'getHelp', array('category_id'=>$cateId,'client_type'=>$clientType),3600); |
31 | } | 37 | } |
32 | 38 | ||
33 | } | 39 | } |
@@ -24,7 +24,7 @@ class OrderData | @@ -24,7 +24,7 @@ class OrderData | ||
24 | * and open the template in the editor. | 24 | * and open the template in the editor. |
25 | */ | 25 | */ |
26 | 26 | ||
27 | - public function getOrderData($type, $page, $limit, $gender, $yh_channel, $uid) { | 27 | + static function getOrderData($type, $page, $limit, $gender, $yh_channel, $uid) { |
28 | //构建必传参数 | 28 | //构建必传参数 |
29 | $param = Yohobuy::param(); | 29 | $param = Yohobuy::param(); |
30 | $param['gender'] = $gender; | 30 | $param['gender'] = $gender; |
@@ -36,7 +36,7 @@ class OrderData | @@ -36,7 +36,7 @@ class OrderData | ||
36 | $param['yh_channel'] = $yh_channel; | 36 | $param['yh_channel'] = $yh_channel; |
37 | $param['client_secret'] = Sign::getSign($param); | 37 | $param['client_secret'] = Sign::getSign($param); |
38 | //调用接口获得数据 | 38 | //调用接口获得数据 |
39 | - return Yohobuy::get(Yohobuy::API_URL2, $param); | 39 | + return Yohobuy::get(Yohobuy::API_URL, $param); |
40 | } | 40 | } |
41 | 41 | ||
42 | /* | 42 | /* |
@@ -45,7 +45,7 @@ class OrderData | @@ -45,7 +45,7 @@ class OrderData | ||
45 | * and open the template in the editor. | 45 | * and open the template in the editor. |
46 | */ | 46 | */ |
47 | 47 | ||
48 | - public function cancelOrderData($order_code, $uid, $gender, $yh_channel, $method) { | 48 | + static function cancelOrderData($order_code, $uid, $gender, $yh_channel, $method) { |
49 | $param = Yohobuy::param(); | 49 | $param = Yohobuy::param(); |
50 | $param['order_code'] = $order_code; | 50 | $param['order_code'] = $order_code; |
51 | $param['uid'] = $uid; | 51 | $param['uid'] = $uid; |
@@ -62,7 +62,7 @@ class OrderData | @@ -62,7 +62,7 @@ class OrderData | ||
62 | * and open the template in the editor. | 62 | * and open the template in the editor. |
63 | */ | 63 | */ |
64 | 64 | ||
65 | - public function deleteOrderData($order_code, $uid, $gender, $yh_channel, $method) { | 65 | + static function deleteOrderData($order_code, $uid, $gender, $yh_channel, $method) { |
66 | $param = Yohobuy::param(); | 66 | $param = Yohobuy::param(); |
67 | $param['order_code'] = $order_code; | 67 | $param['order_code'] = $order_code; |
68 | $param['uid'] = $uid; | 68 | $param['uid'] = $uid; |
@@ -74,4 +74,20 @@ class OrderData | @@ -74,4 +74,20 @@ class OrderData | ||
74 | return Yohobuy::get(Yohobuy::API_URL, $param); | 74 | return Yohobuy::get(Yohobuy::API_URL, $param); |
75 | } | 75 | } |
76 | 76 | ||
77 | + /* | ||
78 | + * 支付订单 | ||
79 | + * To change this template file, choose Tools | Templates | ||
80 | + * and open the template in the editor. | ||
81 | + */ | ||
82 | + | ||
83 | + static function getPaymentData($contentCode, $gender, $yh_channel) { | ||
84 | + $param = Yohobuy::param(); | ||
85 | + $param['content_code'] = $contentCode; | ||
86 | + $param['gender'] = $gender; | ||
87 | + $param['yh_channel'] = $yh_channel; | ||
88 | + $param['client_secret'] = Sign::getSign($param); | ||
89 | + //print_r($param); | ||
90 | + return Yohobuy::get(Yohobuy::SERVICE_URL . '/operations/api/v5/resource/get', $param); | ||
91 | + } | ||
92 | + | ||
77 | } | 93 | } |
@@ -130,6 +130,24 @@ class UserData | @@ -130,6 +130,24 @@ class UserData | ||
130 | } | 130 | } |
131 | 131 | ||
132 | /** | 132 | /** |
133 | + * 取消收藏的商品数据 | ||
134 | + * | ||
135 | + * @param int $uid 用户ID | ||
136 | + * @param int $fav_id 要取消的收藏id | ||
137 | + * @return array 接口返回的数据 | ||
138 | + */ | ||
139 | + public static function favoriteDelete($uid, $fav_id) | ||
140 | + { | ||
141 | + $param = Yohobuy::param(); | ||
142 | + $param['method'] = 'app.favorite.cancel'; | ||
143 | + $param['type'] = 'product'; | ||
144 | + $param['fav_id'] = $fav_id; | ||
145 | + $param['client_secret'] = Sign::getSign($param); | ||
146 | + | ||
147 | + return Yohobuy::get(Yohobuy::API_URL, $param); | ||
148 | + } | ||
149 | + | ||
150 | + /** | ||
133 | * YOHO币数据 | 151 | * YOHO币数据 |
134 | * | 152 | * |
135 | * @param int $uid 用户ID | 153 | * @param int $uid 用户ID |
@@ -267,6 +285,24 @@ class UserData | @@ -267,6 +285,24 @@ class UserData | ||
267 | } | 285 | } |
268 | 286 | ||
269 | /** | 287 | /** |
288 | + * 删除地址 | ||
289 | + * | ||
290 | + * @param int $uid 用户ID | ||
291 | + * @param int $id 地址唯一标识符id | ||
292 | + * @return array 接口返回的数据 | ||
293 | + */ | ||
294 | + public static function deleteAddress($uid, $id) | ||
295 | + { | ||
296 | + $param = Yohobuy::param(); | ||
297 | + $param['id'] = $id; | ||
298 | + $param['method'] = 'app.address.del'; | ||
299 | + $param['uid'] = $uid; | ||
300 | + $param['client_secret'] = Sign::getSign($param); | ||
301 | + | ||
302 | + return Yohobuy::get(Yohobuy::API_URL, $param); | ||
303 | + } | ||
304 | + | ||
305 | + /** | ||
270 | * 意见反馈数据 | 306 | * 意见反馈数据 |
271 | * | 307 | * |
272 | * @param string $udid 客户端唯一标识 | 308 | * @param string $udid 客户端唯一标识 |
@@ -133,15 +133,9 @@ class Images | @@ -133,15 +133,9 @@ class Images | ||
133 | { | 133 | { |
134 | $images[$files['name']] = $files['tmp_name']; | 134 | $images[$files['name']] = $files['tmp_name']; |
135 | } | 135 | } |
136 | - if($_SERVER['HTTP_HOST'] != 'test.service.api.yohobuy.com') //代理转接 | ||
137 | - { | ||
138 | - return self::agentCurlImage($images); | ||
139 | - } | ||
140 | - else | ||
141 | - { | 136 | + |
142 | return self::uploadStreamImage($images); | 137 | return self::uploadStreamImage($images); |
143 | } | 138 | } |
144 | - } | ||
145 | 139 | ||
146 | /** | 140 | /** |
147 | * 上传图片[图片上传域名限制于http://test.service.api.yohobuy.com] | 141 | * 上传图片[图片上传域名限制于http://test.service.api.yohobuy.com] |
@@ -200,43 +194,6 @@ class Images | @@ -200,43 +194,6 @@ class Images | ||
200 | } | 194 | } |
201 | 195 | ||
202 | /** | 196 | /** |
203 | - * 代理上传图片 | ||
204 | - * | ||
205 | - * @param array|string $files | ||
206 | - * @return array | ||
207 | - */ | ||
208 | - private static function agentCurlImage($file) | ||
209 | - { | ||
210 | - $ch = curl_init(); | ||
211 | - curl_setopt($ch, CURLOPT_HEADER, 0); | ||
212 | - curl_setopt($ch, CURLOPT_VERBOSE, 0); | ||
213 | - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | ||
214 | - curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible;)"); | ||
215 | - curl_setopt($ch, CURLOPT_URL, 'http://test.service.api.yohobuy.com/sns/ajax/uploadimg'); | ||
216 | - curl_setopt($ch, CURLOPT_POST, true); | ||
217 | - $params = array(); | ||
218 | - $files = is_array($file) ? $file : array($file); | ||
219 | - foreach($files as $key => $name) | ||
220 | - { | ||
221 | - $key = is_numeric($key) ? $key.'.jpg' : $key; | ||
222 | - $filename = dirname($name).'/'.$key; | ||
223 | - rename($name, $filename); | ||
224 | - if (@class_exists('\CURLFile')) | ||
225 | - { | ||
226 | - $params["images[$key]"] = new \CURLFile(realpath($filename)); | ||
227 | - } | ||
228 | - else | ||
229 | - { | ||
230 | - $params["images[$key]"] = '@' . realpath($filename); | ||
231 | - } | ||
232 | - } | ||
233 | - curl_setopt($ch, CURLOPT_POSTFIELDS, $params); | ||
234 | - $response = json_decode(curl_exec($ch), true); | ||
235 | - return $response['data']; | ||
236 | - | ||
237 | - } | ||
238 | - | ||
239 | - /** | ||
240 | * 获取模板的图片地址 | 197 | * 获取模板的图片地址 |
241 | * @param $fileName | 198 | * @param $fileName |
242 | * @param int $width | 199 | * @param int $width |
@@ -55,16 +55,19 @@ function initInfosEvt($container) { | @@ -55,16 +55,19 @@ function initInfosEvt($container) { | ||
55 | 55 | ||
56 | cHammer = new Hammer($container[0]); | 56 | cHammer = new Hammer($container[0]); |
57 | 57 | ||
58 | + //点赞或者收藏事件 | ||
58 | cHammer.on('tap', function(e) { | 59 | cHammer.on('tap', function(e) { |
59 | var $this = $(e.target), | 60 | var $this = $(e.target), |
60 | opt = 'ok', | 61 | opt = 'ok', |
61 | - $likeBtn, | ||
62 | - $collectBtn, | 62 | + $btn, |
63 | $info; | 63 | $info; |
64 | 64 | ||
65 | - $likeBtn = $this.closest('.like-btn'); | ||
66 | - if ($likeBtn.length > 0) { | ||
67 | - if ($likeBtn.hasClass('like')) { | 65 | + e.preventDefault(); |
66 | + | ||
67 | + //点赞 | ||
68 | + $btn = $this.closest('.like-btn'); | ||
69 | + if ($btn.length > 0) { | ||
70 | + if ($btn.hasClass('like')) { | ||
68 | opt = 'cancel'; | 71 | opt = 'cancel'; |
69 | } | 72 | } |
70 | 73 | ||
@@ -80,22 +83,23 @@ function initInfosEvt($container) { | @@ -80,22 +83,23 @@ function initInfosEvt($container) { | ||
80 | var code = data.code; | 83 | var code = data.code; |
81 | 84 | ||
82 | if (code === 200) { | 85 | if (code === 200) { |
83 | - $likeBtn.next('.like-count').text(data.data); | 86 | + $btn.next('.like-count').text(data.data); |
84 | 87 | ||
85 | //切换点赞状态 | 88 | //切换点赞状态 |
86 | - $likeBtn.toggleClass('like'); | 89 | + $btn.toggleClass('like'); |
87 | } | 90 | } |
88 | }, | 91 | }, |
89 | error: function() { | 92 | error: function() { |
90 | tip.show('网络断开连接了~'); | 93 | tip.show('网络断开连接了~'); |
91 | } | 94 | } |
92 | }); | 95 | }); |
96 | + return; | ||
93 | } | 97 | } |
94 | 98 | ||
95 | - // 2015/11/03 hf: 增加APP里的收藏资讯功能. 写得不对的地方还请大神修改! | ||
96 | - $collectBtn = $this.closest('.collect-btn'); | ||
97 | - if ($collectBtn.length > 0) { | ||
98 | - if ($collectBtn.hasClass('collected')) { | 99 | + //APP收藏 |
100 | + $btn = $this.closest('.collect-btn'); | ||
101 | + if ($btn.length > 0) { | ||
102 | + if ($btn.hasClass('collected')) { | ||
99 | opt = 'cancel'; | 103 | opt = 'cancel'; |
100 | } | 104 | } |
101 | 105 | ||
@@ -111,7 +115,7 @@ function initInfosEvt($container) { | @@ -111,7 +115,7 @@ function initInfosEvt($container) { | ||
111 | if (data.code && data.code === 200) { | 115 | if (data.code && data.code === 200) { |
112 | 116 | ||
113 | //切换收藏状态 | 117 | //切换收藏状态 |
114 | - $collectBtn.toggleClass('collected'); | 118 | + $btn.toggleClass('collected'); |
115 | } | 119 | } |
116 | }, | 120 | }, |
117 | error: function() { | 121 | error: function() { |
@@ -6,6 +6,22 @@ | @@ -6,6 +6,22 @@ | ||
6 | 6 | ||
7 | var $ = require('jquery'); | 7 | var $ = require('jquery'); |
8 | 8 | ||
9 | -var info = require('../guang/info'); | 9 | +var $infoList = $('#info-list'); |
10 | 10 | ||
11 | -info.initInfoEvt($('#info-list')); | ||
11 | +var winH = $(window).height(); | ||
12 | + | ||
13 | +var info = require('../guang/info'), | ||
14 | + loadMore = info.loadMore; | ||
15 | + | ||
16 | +var setting = { | ||
17 | + page: 2, | ||
18 | + end: false | ||
19 | +}; | ||
20 | + | ||
21 | +info.initInfoEvt($infoList); | ||
22 | + | ||
23 | +$(window).scroll(function() { | ||
24 | + if ($(window).scrollTop() + winH >= $(document).height() - 0.25 * $infoList.height()) { | ||
25 | + loadMore($infoList, setting); | ||
26 | + } | ||
27 | +}); |
@@ -136,8 +136,8 @@ orderHammer.on('tap', function(e) { | @@ -136,8 +136,8 @@ orderHammer.on('tap', function(e) { | ||
136 | success: function(data) { | 136 | success: function(data) { |
137 | if (data.code === 200) { | 137 | if (data.code === 200) { |
138 | 138 | ||
139 | - //取消订单 | ||
140 | - alert('order cancel'); | 139 | + //取消订单页面刷新 |
140 | + location.href = location.href; | ||
141 | } | 141 | } |
142 | } | 142 | } |
143 | }); | 143 | }); |
@@ -6,8 +6,11 @@ | @@ -6,8 +6,11 @@ | ||
6 | var $ = require('jquery'), | 6 | var $ = require('jquery'), |
7 | Swiper = require('yoho.iswiper'), | 7 | Swiper = require('yoho.iswiper'), |
8 | lazyLoad = require('yoho.lazyload'), | 8 | lazyLoad = require('yoho.lazyload'), |
9 | - Handlebars = require('yoho.handlebars'), | ||
10 | - goodsSwiper, | 9 | + Handlebars = require('yoho.handlebars'); |
10 | + | ||
11 | +var goodsSwiper, | ||
12 | + | ||
13 | + // winH = $(window).height(), | ||
11 | sizeSwiper, | 14 | sizeSwiper, |
12 | refSwiper, | 15 | refSwiper, |
13 | handleHelper; | 16 | handleHelper; |
@@ -57,7 +60,9 @@ handleHelper = Handlebars.registerHelper('addOne', function(index) { | @@ -57,7 +60,9 @@ handleHelper = Handlebars.registerHelper('addOne', function(index) { | ||
57 | return index + 1; | 60 | return index + 1; |
58 | }); | 61 | }); |
59 | 62 | ||
60 | -// $('#iframe').load(function() { | ||
61 | -// var mainheight = $(this).contents().find('body').height() + 30; | ||
62 | -// $(this).height(mainheight); | 63 | + |
64 | +//srcoll to load more | ||
65 | +// $(window).scroll(function () { | ||
66 | +// if ($(window).scrollTop() + winH >= $(document).height() - 50) { | ||
67 | +// } | ||
63 | // }); | 68 | // }); |
@@ -5,7 +5,7 @@ $tableCellC:#eee; | @@ -5,7 +5,7 @@ $tableCellC:#eee; | ||
5 | $basicBtnC:#eb0313; | 5 | $basicBtnC:#eb0313; |
6 | 6 | ||
7 | .good-detail-page { | 7 | .good-detail-page { |
8 | - | 8 | +overflow: hidden; |
9 | /* basic component */ | 9 | /* basic component */ |
10 | .page-block{ | 10 | .page-block{ |
11 | box-sizing:border-box; | 11 | box-sizing:border-box; |
@@ -14,7 +14,6 @@ $basicBtnC:#eb0313; | @@ -14,7 +14,6 @@ $basicBtnC:#eb0313; | ||
14 | border-top: 1px solid $borderC; | 14 | border-top: 1px solid $borderC; |
15 | padding: 0 pxToRem(28px); | 15 | padding: 0 pxToRem(28px); |
16 | >.title{ | 16 | >.title{ |
17 | - min-height: pxToRem(88px); | ||
18 | line-height: pxToRem(88px); | 17 | line-height: pxToRem(88px); |
19 | color: $mainFontC; | 18 | color: $mainFontC; |
20 | font-size : pxToRem(28px); | 19 | font-size : pxToRem(28px); |
@@ -23,7 +22,6 @@ $basicBtnC:#eb0313; | @@ -23,7 +22,6 @@ $basicBtnC:#eb0313; | ||
23 | span{ | 22 | span{ |
24 | color:#a0a0a0; | 23 | color:#a0a0a0; |
25 | font-size:pxToRem(18px); | 24 | font-size:pxToRem(18px); |
26 | - // vertical-align: baseline; | ||
27 | } | 25 | } |
28 | } | 26 | } |
29 | .detail{ | 27 | .detail{ |
@@ -40,24 +38,15 @@ $basicBtnC:#eb0313; | @@ -40,24 +38,15 @@ $basicBtnC:#eb0313; | ||
40 | .column{ | 38 | .column{ |
41 | display: table-cell; | 39 | display: table-cell; |
42 | padding: 0.4em 0.8em; | 40 | padding: 0.4em 0.8em; |
43 | - border:1px solid white; | 41 | + border:1px solid #fff; |
44 | font-size: pxToRem(24px); | 42 | font-size: pxToRem(24px); |
45 | background-color: $tableCellC; | 43 | background-color: $tableCellC; |
46 | } | 44 | } |
47 | } | 45 | } |
48 | } | 46 | } |
49 | - | ||
50 | - // table { | ||
51 | - // width: 100%; | ||
52 | - // tbody td{ | ||
53 | - // padding: 0.4em 0.8em; | ||
54 | - // border:3px solid white; | ||
55 | - // font-size: pxToRem(24px); | ||
56 | - // background-color: $tableCellC; | ||
57 | - // } | ||
58 | - // } | ||
59 | } | 47 | } |
60 | } | 48 | } |
49 | + | ||
61 | .gap-block{ | 50 | .gap-block{ |
62 | min-height: 30rem/$pxConvertRem; | 51 | min-height: 30rem/$pxConvertRem; |
63 | background-color: #f0f0f0; | 52 | background-color: #f0f0f0; |
@@ -167,7 +156,7 @@ $basicBtnC:#eb0313; | @@ -167,7 +156,7 @@ $basicBtnC:#eb0313; | ||
167 | h1{ | 156 | h1{ |
168 | display: inline-block; | 157 | display: inline-block; |
169 | line-height: pxToRem(88px); | 158 | line-height: pxToRem(88px); |
170 | -} | 159 | + } |
171 | } | 160 | } |
172 | .goodsName, | 161 | .goodsName, |
173 | .goodsSubtitle{ | 162 | .goodsSubtitle{ |
@@ -179,6 +168,8 @@ $basicBtnC:#eb0313; | @@ -179,6 +168,8 @@ $basicBtnC:#eb0313; | ||
179 | } | 168 | } |
180 | } | 169 | } |
181 | .vipLevel { | 170 | .vipLevel { |
171 | + width: 100%; | ||
172 | + box-sizing:border-box; | ||
182 | display: table; | 173 | display: table; |
183 | min-height: pxToRem(88px); | 174 | min-height: pxToRem(88px); |
184 | padding-left:pxToRem(28px); | 175 | padding-left:pxToRem(28px); |
@@ -213,17 +204,21 @@ $basicBtnC:#eb0313; | @@ -213,17 +204,21 @@ $basicBtnC:#eb0313; | ||
213 | color: $mainFontC; | 204 | color: $mainFontC; |
214 | line-height: pxToRem(88px); | 205 | line-height: pxToRem(88px); |
215 | 206 | ||
216 | - border-bottom: 2px solid $borderC; | 207 | + border-bottom: 1px solid $borderC; |
217 | 208 | ||
218 | .iconfont{ | 209 | .iconfont{ |
219 | - // padding-right:28rem/$pxConvertRem; | ||
220 | - font-size: inherit; | 210 | + display: inline-block; |
211 | + width: pxToRem(35px); | ||
212 | + font-size: pxToRem(45px); | ||
221 | float: right; | 213 | float: right; |
222 | color:#e0e0e0; | 214 | color:#e0e0e0; |
223 | - text-align: right; | 215 | + // padding-left:pxToRem(50px); |
224 | } | 216 | } |
225 | } | 217 | } |
226 | - | 218 | +.goodsSubtitle, |
219 | +.goodsDiscount{ | ||
220 | + text-indent: pxToRem(-14px); | ||
221 | +} | ||
227 | .feedback-list-page { | 222 | .feedback-list-page { |
228 | padding-top: pxToRem(30px); | 223 | padding-top: pxToRem(30px); |
229 | background-color: #f0f0f0; | 224 | background-color: #f0f0f0; |
@@ -254,30 +249,28 @@ $basicBtnC:#eb0313; | @@ -254,30 +249,28 @@ $basicBtnC:#eb0313; | ||
254 | color: #000; | 249 | color: #000; |
255 | } | 250 | } |
256 | } | 251 | } |
257 | - | ||
258 | .comment-nav { | 252 | .comment-nav { |
259 | border-right: 1px solid #ccc; | 253 | border-right: 1px solid #ccc; |
260 | } | 254 | } |
261 | - | ||
262 | .comment-content{ | 255 | .comment-content{ |
263 | .comment-content-main{ | 256 | .comment-content-main{ |
264 | background-color: #fff; | 257 | background-color: #fff; |
265 | border-bottom: 1px solid $borderC; | 258 | border-bottom: 1px solid $borderC; |
266 | .user-name{ | 259 | .user-name{ |
267 | - font-size: px2rem(24); | ||
268 | - line-height: px2rem(62); | 260 | + font-size: pxToRem(24px); |
261 | + line-height: pxToRem(62px); | ||
269 | color:$mainFontC; | 262 | color:$mainFontC; |
270 | - padding-left: px2rem(28); | ||
271 | - padding-right: px2rem(18); | 263 | + padding-left: pxToRem(28px); |
264 | + padding-right: pxToRem(18px); | ||
272 | } | 265 | } |
273 | .goods-spec, | 266 | .goods-spec, |
274 | .comment-time{ | 267 | .comment-time{ |
275 | - font-size: px2rem(24); | ||
276 | - line-height: px2rem(62); | 268 | + font-size: pxToRem(24px); |
269 | + line-height: pxToRem(62px); | ||
277 | } | 270 | } |
278 | .detail-content{ | 271 | .detail-content{ |
279 | - font-size: px2rem(28); | ||
280 | - line-height: px2rem(36); | 272 | + font-size: pxToRem(28px); |
273 | + line-height: pxToRem(36px); | ||
281 | font-size: pxToRem(24px); | 274 | font-size: pxToRem(24px); |
282 | line-height: pxToRem(62px); | 275 | line-height: pxToRem(62px); |
283 | color:$mainFontC; | 276 | color:$mainFontC; |
@@ -299,17 +292,15 @@ $basicBtnC:#eb0313; | @@ -299,17 +292,15 @@ $basicBtnC:#eb0313; | ||
299 | } | 292 | } |
300 | .detail-content, | 293 | .detail-content, |
301 | .comment-time{ | 294 | .comment-time{ |
302 | - padding-left: px2rem(28); | 295 | + padding-left: pxToRem(28px); |
303 | 296 | ||
304 | } | 297 | } |
305 | .detail-content{ | 298 | .detail-content{ |
306 | - padding-right: px2rem(28); | 299 | + padding-right: pxToRem(28px); |
307 | padding-left: pxToRem(28px); | 300 | padding-left: pxToRem(28px); |
308 | - | ||
309 | } | 301 | } |
310 | .detail-content{ | 302 | .detail-content{ |
311 | padding-right: pxToRem(28px); | 303 | padding-right: pxToRem(28px); |
312 | - | ||
313 | } | 304 | } |
314 | .comment-time{ | 305 | .comment-time{ |
315 | color:#c1c1c1; | 306 | color:#c1c1c1; |
@@ -322,7 +313,7 @@ $basicBtnC:#eb0313; | @@ -322,7 +313,7 @@ $basicBtnC:#eb0313; | ||
322 | text-align: center; | 313 | text-align: center; |
323 | background-color: #fff; | 314 | background-color: #fff; |
324 | 315 | ||
325 | - border-bottom: 2px solid $borderC; | 316 | + border-bottom: 1px solid $borderC; |
326 | line-height: pxToRem(88px); | 317 | line-height: pxToRem(88px); |
327 | font-size: pxToRem(28px); | 318 | font-size: pxToRem(28px); |
328 | 319 | ||
@@ -332,7 +323,7 @@ $basicBtnC:#eb0313; | @@ -332,7 +323,7 @@ $basicBtnC:#eb0313; | ||
332 | font-size: inherit; | 323 | font-size: inherit; |
333 | } | 324 | } |
334 | } | 325 | } |
335 | - } | 326 | +} |
336 | 327 | ||
337 | 328 | ||
338 | } | 329 | } |
@@ -353,10 +344,8 @@ $basicBtnC:#eb0313; | @@ -353,10 +344,8 @@ $basicBtnC:#eb0313; | ||
353 | .store-logo{ | 344 | .store-logo{ |
354 | // padding-right: 35rem/$pxConvertRem; | 345 | // padding-right: 35rem/$pxConvertRem; |
355 | img{ | 346 | img{ |
356 | - | ||
357 | width: pxToRem(109px); | 347 | width: pxToRem(109px); |
358 | height: pxToRem(68px); | 348 | height: pxToRem(68px); |
359 | - | ||
360 | margin-left: 0; | 349 | margin-left: 0; |
361 | margin-right: pxToRem(-25px); | 350 | margin-right: pxToRem(-25px); |
362 | } | 351 | } |
@@ -374,17 +363,19 @@ $basicBtnC:#eb0313; | @@ -374,17 +363,19 @@ $basicBtnC:#eb0313; | ||
374 | } | 363 | } |
375 | } | 364 | } |
376 | } | 365 | } |
377 | - .goods-desc{ | 366 | +.goods-desc{ |
378 | .service{ | 367 | .service{ |
368 | + width: pxToRem(489px); | ||
369 | + height: pxToRem(28px); | ||
379 | margin-top: pxToRem(22px); | 370 | margin-top: pxToRem(22px); |
380 | } | 371 | } |
381 | - } | ||
382 | - .tips{ | 372 | +} |
373 | +.tips{ | ||
383 | color:$subFontC; | 374 | color:$subFontC; |
384 | font-size: pxToRem(18px); | 375 | font-size: pxToRem(18px); |
385 | margin-top: pxToRem(20px); | 376 | margin-top: pxToRem(20px); |
386 | - } | ||
387 | - .materials{ | 377 | +} |
378 | +.materials{ | ||
388 | .detail{ | 379 | .detail{ |
389 | img{ | 380 | img{ |
390 | display: block; | 381 | display: block; |
@@ -395,12 +386,14 @@ $basicBtnC:#eb0313; | @@ -395,12 +386,14 @@ $basicBtnC:#eb0313; | ||
395 | float: left; | 386 | float: left; |
396 | } | 387 | } |
397 | .material-desc{ | 388 | .material-desc{ |
398 | - // float: left; | ||
399 | font-size: pxToRem(24px); | 389 | font-size: pxToRem(24px); |
390 | + overflow: hidden; | ||
400 | 391 | ||
401 | } | 392 | } |
402 | } | 393 | } |
403 | .material-type{ | 394 | .material-type{ |
395 | + width: pxToRem(581px); | ||
396 | + height: pxToRem(99px); | ||
404 | border-top: 1px solid $borderC; | 397 | border-top: 1px solid $borderC; |
405 | padding: pxToRem(17px) 0; | 398 | padding: pxToRem(17px) 0; |
406 | } | 399 | } |
@@ -435,10 +428,15 @@ $basicBtnC:#eb0313; | @@ -435,10 +428,15 @@ $basicBtnC:#eb0313; | ||
435 | } | 428 | } |
436 | 429 | ||
437 | #reference-swiper-container{ | 430 | #reference-swiper-container{ |
431 | + | ||
438 | .first-group{ | 432 | .first-group{ |
439 | - width: pxToRem(58px); | ||
440 | - >div{ | ||
441 | - height: pxToRem(67px); | 433 | + width: pxToRem(70px); |
434 | + margin-top: pxToRem(66px); | ||
435 | + .avatar{ | ||
436 | + line-height: pxToRem(40px); | ||
437 | + width: pxToRem(40px); | ||
438 | + height: pxToRem(40px); | ||
439 | + margin: pxToRem(18px) 0; | ||
442 | } | 440 | } |
443 | } | 441 | } |
444 | } | 442 | } |
@@ -446,7 +444,7 @@ $basicBtnC:#eb0313; | @@ -446,7 +444,7 @@ $basicBtnC:#eb0313; | ||
446 | .measurement-method{ | 444 | .measurement-method{ |
447 | .detail{ | 445 | .detail{ |
448 | width: 100%; | 446 | width: 100%; |
449 | - height: pxToRem(300px); | 447 | + // height: pxToRem(300px); |
450 | img{ | 448 | img{ |
451 | float:left; | 449 | float:left; |
452 | width: pxToRem(270px); | 450 | width: pxToRem(270px); |
@@ -455,7 +453,7 @@ $basicBtnC:#eb0313; | @@ -455,7 +453,7 @@ $basicBtnC:#eb0313; | ||
455 | margin-right: pxToRem(28px); | 453 | margin-right: pxToRem(28px); |
456 | } | 454 | } |
457 | .right-part{ | 455 | .right-part{ |
458 | - float:left; | 456 | + overflow: hidden; |
459 | .title{ | 457 | .title{ |
460 | >h1{ | 458 | >h1{ |
461 | margin-top: pxToRem(10px); | 459 | margin-top: pxToRem(10px); |
@@ -480,7 +478,7 @@ $basicBtnC:#eb0313; | @@ -480,7 +478,7 @@ $basicBtnC:#eb0313; | ||
480 | height: pxToRem(15px); | 478 | height: pxToRem(15px); |
481 | background-color: $basicBtnC; | 479 | background-color: $basicBtnC; |
482 | border-radius: 50%; | 480 | border-radius: 50%; |
483 | - color:white; | 481 | + color:#fff; |
484 | text-align: center; | 482 | text-align: center; |
485 | line-height: pxToRem(15px); | 483 | line-height: pxToRem(15px); |
486 | font-size: pxToRem(13px); | 484 | font-size: pxToRem(13px); |
@@ -491,37 +489,33 @@ $basicBtnC:#eb0313; | @@ -491,37 +489,33 @@ $basicBtnC:#eb0313; | ||
491 | } | 489 | } |
492 | } | 490 | } |
493 | clear:both; | 491 | clear:both; |
494 | - } | ||
495 | - } | ||
496 | - .cart-bar{ | 492 | +} |
493 | +} | ||
494 | +.cart-bar{ | ||
497 | position: relative; | 495 | position: relative; |
498 | box-sizing:border-box; | 496 | box-sizing:border-box; |
499 | width: 100%; | 497 | width: 100%; |
500 | height: pxToRem(120px); | 498 | height: pxToRem(120px); |
501 | position:fixed; | 499 | position:fixed; |
502 | bottom: 0; | 500 | bottom: 0; |
503 | - background-color: white; | 501 | + background-color: #fff; |
504 | z-index: 64; | 502 | z-index: 64; |
505 | padding:pxToRem(20px) pxToRem(28px); | 503 | padding:pxToRem(20px) pxToRem(28px); |
506 | text-align: center; | 504 | text-align: center; |
507 | - | ||
508 | - | ||
509 | a{ | 505 | a{ |
510 | display: inline-block; | 506 | display: inline-block; |
511 | &.num-incart{ | 507 | &.num-incart{ |
512 | - width: pxToRem(45px); | ||
513 | - height: pxToRem(45px); | ||
514 | - background: url(../img/product/cart.png) no-repeat; | 508 | + font-size: pxToRem(47px); |
509 | + color:#444; | ||
515 | } | 510 | } |
516 | &.favorite{ | 511 | &.favorite{ |
517 | - width: pxToRem(34px); | ||
518 | - height: pxToRem(32px); | ||
519 | - background:url(../img/product/favorite.png) no-repeat; | 512 | + font-size: pxToRem(34px); |
513 | + color:$basicBtnC; | ||
520 | } | 514 | } |
521 | &.addto-cart{ | 515 | &.addto-cart{ |
522 | height: pxToRem(80px); | 516 | height: pxToRem(80px); |
523 | width: pxToRem(260px); | 517 | width: pxToRem(260px); |
524 | - margin:0 pxToRem(100px) 0 pxToRem(128px); | 518 | + margin:0 pxToRem(100px) 0 pxToRem(115px); |
525 | color: #fff; | 519 | color: #fff; |
526 | background-color: $basicBtnC; | 520 | background-color: $basicBtnC; |
527 | font-size: pxToRem(40px); | 521 | font-size: pxToRem(40px); |
@@ -538,11 +532,8 @@ $basicBtnC:#eb0313; | @@ -538,11 +532,8 @@ $basicBtnC:#eb0313; | ||
538 | height: pxToRem(36px); | 532 | height: pxToRem(36px); |
539 | background-color: $basicBtnC; | 533 | background-color: $basicBtnC; |
540 | border-radius: 50%; | 534 | border-radius: 50%; |
541 | - color:white; | 535 | + color:#fff; |
542 | font-size: pxToRem(24px); | 536 | font-size: pxToRem(24px); |
543 | } | 537 | } |
544 | - | ||
545 | - } | ||
546 | - | ||
547 | - | 538 | +} |
548 | } | 539 | } |
1 | {{> layout/header}} | 1 | {{> layout/header}} |
2 | <div class="my-page yoho-page"> | 2 | <div class="my-page yoho-page"> |
3 | <div class="my-header"> | 3 | <div class="my-header"> |
4 | - <div class="user-info"> | 4 | + <div class="user-info"><!--/home/personaldetails--> |
5 | <img class="user-avatar" src="{{head_ico}}"> | 5 | <img class="user-avatar" src="{{head_ico}}"> |
6 | <span class="username">{{profile_name}}</span> | 6 | <span class="username">{{profile_name}}</span> |
7 | {{#vip_info}} | 7 | {{#vip_info}} |
@@ -11,11 +11,11 @@ | @@ -11,11 +11,11 @@ | ||
11 | </div> | 11 | </div> |
12 | </div> | 12 | </div> |
13 | <div class="my-link clearfix"> | 13 | <div class="my-link clearfix"> |
14 | - <a class="link-item" href="/home/"> | 14 | + <a class="link-item" href="/home/favorite"> |
15 | {{product_favorite_total}} | 15 | {{product_favorite_total}} |
16 | <p>收藏的商品</p> | 16 | <p>收藏的商品</p> |
17 | </a> | 17 | </a> |
18 | - <a class="link-item" href="/home/"> | 18 | + <a class="link-item" href="/home/favorite?tab=brand"> |
19 | {{brand_favorite_total}} | 19 | {{brand_favorite_total}} |
20 | <p>收藏的品牌</p> | 20 | <p>收藏的品牌</p> |
21 | </a> | 21 | </a> |
@@ -54,26 +54,26 @@ | @@ -54,26 +54,26 @@ | ||
54 | </a> | 54 | </a> |
55 | </div> | 55 | </div> |
56 | <div class="group-list"> | 56 | <div class="group-list"> |
57 | - <a class="list-item" href="/home/"> | 57 | + <a class="list-item" href="/home/coupons"> |
58 | <span class="iconfont icon"></span> | 58 | <span class="iconfont icon"></span> |
59 | 优惠券 | 59 | 优惠券 |
60 | <span class="iconfont num">{{coupon_num}} </span> | 60 | <span class="iconfont num">{{coupon_num}} </span> |
61 | </a> | 61 | </a> |
62 | - <a class="list-item" href="/home/"> | 62 | + <a class="list-item" href="/home/currency"> |
63 | <span class="iconfont icon"></span> | 63 | <span class="iconfont icon"></span> |
64 | YOHO 币 | 64 | YOHO 币 |
65 | <span class="iconfont num">{{yoho_coin_num}} </span> | 65 | <span class="iconfont num">{{yoho_coin_num}} </span> |
66 | </a> | 66 | </a> |
67 | </div> | 67 | </div> |
68 | <div class="group-list"> | 68 | <div class="group-list"> |
69 | - <a class="list-item" href="/home/"> | 69 | + <a class="list-item" href="/home/message"> |
70 | <span class="iconfont icon"></span> | 70 | <span class="iconfont icon"></span> |
71 | 消息 | 71 | 消息 |
72 | <span class="iconfont num">{{inbox_total}} </span> | 72 | <span class="iconfont num">{{inbox_total}} </span> |
73 | </a> | 73 | </a> |
74 | </div> | 74 | </div> |
75 | <div class="group-list"> | 75 | <div class="group-list"> |
76 | - <a class="list-item" href="/home/"> | 76 | + <a class="list-item" href="/home/onlineService"> |
77 | <span class="iconfont icon"></span> | 77 | <span class="iconfont icon"></span> |
78 | 在线客服 | 78 | 在线客服 |
79 | <span class="iconfont num"></span> | 79 | <span class="iconfont num"></span> |
1 | - | ||
2 | {{> layout/header}} | 1 | {{> layout/header}} |
3 | <div class="good-detail-page yoho-page"> | 2 | <div class="good-detail-page yoho-page"> |
4 | - | ||
5 | <div class="banner-container"> | 3 | <div class="banner-container"> |
6 | - | ||
7 | <h1 class="is-new-lable">NEW</h1> | 4 | <h1 class="is-new-lable">NEW</h1> |
8 | {{# bannerTop}} | 5 | {{# bannerTop}} |
9 | {{> product/banner_swiper_arrow}} | 6 | {{> product/banner_swiper_arrow}} |
10 | {{/ bannerTop}} | 7 | {{/ bannerTop}} |
11 | </div> | 8 | </div> |
12 | 9 | ||
13 | - | ||
14 | - | ||
15 | - | ||
16 | {{# goodsName}} | 10 | {{# goodsName}} |
17 | <h2 class="goodsName"><span>{{.}}</span></h2> | 11 | <h2 class="goodsName"><span>{{.}}</span></h2> |
18 | {{/ goodsName}} | 12 | {{/ goodsName}} |
@@ -21,10 +15,6 @@ | @@ -21,10 +15,6 @@ | ||
21 | <h1 class="goodsSubtitle"><span>{{.}}</span></h1> | 15 | <h1 class="goodsSubtitle"><span>{{.}}</span></h1> |
22 | {{/ goodsSubtitle}} | 16 | {{/ goodsSubtitle}} |
23 | 17 | ||
24 | - <!-- {{# goodsTitle}} | ||
25 | - <h1 class="goodsTitle">{{.}}</h1> | ||
26 | - {{/ goodsTitle}} --> | ||
27 | - | ||
28 | <div class="price-date"> | 18 | <div class="price-date"> |
29 | {{#goodsPrice}} | 19 | {{#goodsPrice}} |
30 | <div class="goodsPrice"> | 20 | <div class="goodsPrice"> |
@@ -32,44 +22,32 @@ | @@ -32,44 +22,32 @@ | ||
32 | <h1 class="previousPrice">{{previousPrice}}</h1> | 22 | <h1 class="previousPrice">{{previousPrice}}</h1> |
33 | </div> | 23 | </div> |
34 | {{/goodsPrice}} | 24 | {{/goodsPrice}} |
35 | - | ||
36 | {{#periodOfMarket}} | 25 | {{#periodOfMarket}} |
37 | <div class="periodOfMarket"> | 26 | <div class="periodOfMarket"> |
38 | <h1>上市期:</h1> | 27 | <h1>上市期:</h1> |
39 | <h1 >{{.}}</h1> | 28 | <h1 >{{.}}</h1> |
40 | </div> | 29 | </div> |
41 | {{/periodOfMarket}} | 30 | {{/periodOfMarket}} |
42 | - </div> | ||
43 | - | ||
44 | - <!-- {{# vipLevel}} | ||
45 | - <div class="vipLevel"> | ||
46 | - {{# list}} | ||
47 | - {{#if @last}} | ||
48 | - <span>{{text}}</span> | ||
49 | - {{^}} | ||
50 | - <span>{{text}}</span> | | ||
51 | - {{/if}} | ||
52 | - {{/ list}} | ||
53 | - </div> | ||
54 | - {{/ vipLevel}} --> | 31 | +</div> |
55 | 32 | ||
56 | - {{# vipLevel}} | ||
57 | - <div class="vipLevel"> | 33 | +{{# vipLevel}} |
34 | +<div class="vipLevel"> | ||
58 | {{# list}} | 35 | {{# list}} |
59 | - <span class="vip-img"><img src="{{img}}" alt=""></span> | 36 | +<span class="vip-img"> |
37 | + <img class="lazy" data-original="{{img}}" alt=""> | ||
38 | +</span> | ||
60 | <span class="vip-price">{{text}}</span> | 39 | <span class="vip-price">{{text}}</span> |
61 | {{/ list}} | 40 | {{/ list}} |
62 | - </div> | ||
63 | - {{/ vipLevel}} | 41 | +</div> |
42 | +{{/ vipLevel}} | ||
64 | 43 | ||
65 | - {{#goodsDiscount}} | ||
66 | - <div class="goodsDiscount"> | 44 | +{{#goodsDiscount}} |
45 | +<div class="goodsDiscount"> | ||
67 | <h1>{{.}}<span class="iconfont"></span></h1> | 46 | <h1>{{.}}<span class="iconfont"></span></h1> |
68 | - </div> | ||
69 | - {{/goodsDiscount}} | ||
70 | - | 47 | +</div> |
48 | +{{/goodsDiscount}} | ||
71 | 49 | ||
72 | - <div class="feedback-list-page "> | 50 | +<div class="feedback-list-page "> |
73 | {{# feedbacks}} | 51 | {{# feedbacks}} |
74 | <ul id="nav-tab" class="nav-tab clearfix"> | 52 | <ul id="nav-tab" class="nav-tab clearfix"> |
75 | <li class="comment-nav focus">{{commentName}}</li> | 53 | <li class="comment-nav focus">{{commentName}}</li> |
@@ -104,30 +82,31 @@ | @@ -104,30 +82,31 @@ | ||
104 | </div> | 82 | </div> |
105 | </div> | 83 | </div> |
106 | {{/ feedbacks}} | 84 | {{/ feedbacks}} |
107 | - </div> | ||
108 | - <div class="gap-block"></div> | 85 | +</div> |
86 | + | ||
87 | +<div class="gap-block"></div> | ||
109 | 88 | ||
110 | - {{# enterStore}} | ||
111 | - <div class="enter-store page-block"> | 89 | +{{# enterStore}} |
90 | +<div class="enter-store page-block"> | ||
112 | <a class="store-logo" href="{{url}}" style=""> | 91 | <a class="store-logo" href="{{url}}" style=""> |
113 | - <img src="{{img}}" alt="{{storeName}}"> | 92 | + <img class="lazy" data-original="{{img}}" alt="{{storeName}}"> |
114 | </a> | 93 | </a> |
115 | <a class="store-name" href="{{url}}">{{storeName}}</a> | 94 | <a class="store-name" href="{{url}}">{{storeName}}</a> |
116 | <a class="store-link" href="{{url}}">进入店铺<span class="iconfont"></span></a> | 95 | <a class="store-link" href="{{url}}">进入店铺<span class="iconfont"></span></a> |
117 | - </div> | ||
118 | - {{/ enterStore}} | ||
119 | - <div class="gap-block"></div> | ||
120 | - <!-- <iframe src="http://www.baidu.com" id="main" width="320" height="300" frameborder="0" scrolling="auto"></iframe> --> | 96 | +</div> |
97 | +{{/ enterStore}} | ||
98 | + | ||
99 | +<div class="gap-block"></div> | ||
121 | 100 | ||
122 | - {{#goodsDescription}} | ||
123 | - <div class="goods-desc page-block"> | ||
124 | - <img class="service" src="http://static.dev.yohobuy.com/img/product/service.png" alt=""> | 101 | +{{#goodsDescription}} |
102 | +<div class="goods-desc page-block"> | ||
103 | + <img class="service lazy" data-original="http://static.dev.yohobuy.com/img/product/service.png" alt=""> | ||
125 | <h1 class="title"> | 104 | <h1 class="title"> |
126 | {{title}} | 105 | {{title}} |
127 | <span class="en-title">{{enTitle}}</span> | 106 | <span class="en-title">{{enTitle}}</span> |
128 | - </h1> | ||
129 | - {{#detail}} | ||
130 | - <div class="detail table"> | 107 | +</h1> |
108 | +{{#detail}} | ||
109 | +<div class="detail table"> | ||
131 | <div class="row"> | 110 | <div class="row"> |
132 | <div class="column">编号:{{nubmer}}</div> | 111 | <div class="column">编号:{{nubmer}}</div> |
133 | <div class="column">帽型:{{hatType}}</div> | 112 | <div class="column">帽型:{{hatType}}</div> |
@@ -144,21 +123,21 @@ | @@ -144,21 +123,21 @@ | ||
144 | <div class="column">性别:{{gender}}</div> | 123 | <div class="column">性别:{{gender}}</div> |
145 | <div class="column">风格:{{style}}</div> | 124 | <div class="column">风格:{{style}}</div> |
146 | </div> | 125 | </div> |
147 | - </div> | ||
148 | - {{/detail}} | ||
149 | - </div> | ||
150 | - {{/goodsDescription}} | 126 | +</div> |
127 | +{{/detail}} | ||
128 | +</div> | ||
129 | +{{/goodsDescription}} | ||
151 | 130 | ||
152 | - <div class="gap-block"></div> | 131 | +<div class="gap-block"></div> |
153 | 132 | ||
154 | - {{#sizeInfo}} | ||
155 | - <div class="size-info page-block"> | 133 | +{{#sizeInfo}} |
134 | +<div class="size-info page-block"> | ||
156 | <h1 class="title"> | 135 | <h1 class="title"> |
157 | {{title}} | 136 | {{title}} |
158 | <span class="en-title">{{enTitle}}</span> | 137 | <span class="en-title">{{enTitle}}</span> |
159 | - </h1> | ||
160 | - {{#detail}} | ||
161 | - <div class="detail"> | 138 | +</h1> |
139 | +{{#detail}} | ||
140 | +<div class="detail"> | ||
162 | <div class="swiper-container detail-swiper" id="size-swiper-container"> | 141 | <div class="swiper-container detail-swiper" id="size-swiper-container"> |
163 | <div class="swiper-wrapper"> | 142 | <div class="swiper-wrapper"> |
164 | {{#list}} | 143 | {{#list}} |
@@ -169,24 +148,24 @@ | @@ -169,24 +148,24 @@ | ||
169 | </div> | 148 | </div> |
170 | {{/list}} | 149 | {{/list}} |
171 | </div> | 150 | </div> |
172 | - </div> | ||
173 | - <p class="tips">提示:左滑查看完整表格信息</p> | ||
174 | - </div> | ||
175 | - {{/detail}} | ||
176 | - </div> | ||
177 | - {{/sizeInfo}} | 151 | +</div> |
152 | +<p class="tips">提示:左滑查看完整表格信息</p> | ||
153 | +</div> | ||
154 | +{{/detail}} | ||
155 | +</div> | ||
156 | +{{/sizeInfo}} | ||
178 | 157 | ||
179 | - <div class="gap-block"></div> | 158 | +<div class="gap-block"></div> |
180 | 159 | ||
181 | - {{#measurementMethod}} | ||
182 | - <div class="measurement-method page-block"> | 160 | +{{#measurementMethod}} |
161 | +<div class="measurement-method page-block"> | ||
183 | <h1 class="title"> | 162 | <h1 class="title"> |
184 | {{title}} | 163 | {{title}} |
185 | <span class="en-title">{{enTitle}}</span> | 164 | <span class="en-title">{{enTitle}}</span> |
186 | </h1> | 165 | </h1> |
187 | {{#detail}} | 166 | {{#detail}} |
188 | <div class="detail" style="width:100%"> | 167 | <div class="detail" style="width:100%"> |
189 | - <img src="{{img}}" alt=""> | 168 | + <img class="lazy" data-original="{{img}}" alt=""> |
190 | <div class="right-part"> | 169 | <div class="right-part"> |
191 | <div class="title"> | 170 | <div class="title"> |
192 | <h1 >{{sort}}</h1> | 171 | <h1 >{{sort}}</h1> |
@@ -220,13 +199,8 @@ | @@ -220,13 +199,8 @@ | ||
220 | {{#list}} | 199 | {{#list}} |
221 | {{#if @first}} | 200 | {{#if @first}} |
222 | <div class="swiper-slide first-group" > | 201 | <div class="swiper-slide first-group" > |
223 | - <div class="model-field" >{{fieldName}}</div> | ||
224 | - <div class="first-model"> | ||
225 | - <img src="{{firstModel}}" alt=""> | ||
226 | - </div> | ||
227 | - <div class="second-model"> | ||
228 | - <img src="{{secondModel}}" alt=""> | ||
229 | - </div> | 202 | + <img class="lazy avatar" data-original="{{firstModel}}" alt=""> |
203 | + <img class="lazy avatar" data-original="{{secondModel}}" alt=""> | ||
230 | </div> | 204 | </div> |
231 | {{^}} | 205 | {{^}} |
232 | <div class="swiper-slide" > | 206 | <div class="swiper-slide" > |
@@ -241,52 +215,49 @@ | @@ -241,52 +215,49 @@ | ||
241 | <p class="tips">提示:左滑查看完整表格信息</p> | 215 | <p class="tips">提示:左滑查看完整表格信息</p> |
242 | </div> | 216 | </div> |
243 | {{/detail}} | 217 | {{/detail}} |
244 | - </div> | ||
245 | - {{/reference}} | 218 | +</div> |
219 | +{{/reference}} | ||
246 | 220 | ||
247 | - <div class="gap-block"></div> | 221 | +<div class="gap-block"></div> |
248 | 222 | ||
249 | - {{#materials}} | ||
250 | - <div class="materials page-block"> | 223 | +{{#materials}} |
224 | +<div class="materials page-block"> | ||
251 | <h1 class="title"> | 225 | <h1 class="title"> |
252 | {{title}} | 226 | {{title}} |
253 | <span class="en-title">{{enTitle}}</span> | 227 | <span class="en-title">{{enTitle}}</span> |
254 | - </h1> | ||
255 | - <div class="detail"> | ||
256 | - <img src="{{img}}" alt=""> | 228 | +</h1> |
229 | +<div class="detail"> | ||
230 | + <img class="lazy" data-original="{{img}}" alt=""> | ||
257 | <p class="material-desc"> | 231 | <p class="material-desc"> |
258 | - | ||
259 | {{desc}} | 232 | {{desc}} |
260 | </p> | 233 | </p> |
234 | +</div> | ||
235 | +<img class="lazy material-type" data-original="{{materialType}}" alt="" > | ||
236 | +</div> | ||
237 | +{{/materials}} | ||
261 | 238 | ||
262 | - </div> | ||
263 | - <img src="{{materialType}}" alt="" class="material-type"> | ||
264 | - </div> | ||
265 | - {{/materials}} | ||
266 | - | ||
267 | - <div class="gap-block"></div> | 239 | +<div class="gap-block"></div> |
268 | 240 | ||
269 | - {{#productDetail}} | ||
270 | - <div class="product-detail page-block"> | 241 | +{{#productDetail}} |
242 | +<div class="product-detail page-block"> | ||
271 | <h1 class="title"> | 243 | <h1 class="title"> |
272 | {{title}} | 244 | {{title}} |
273 | <span class="en-title">{{enTitle}}</span> | 245 | <span class="en-title">{{enTitle}}</span> |
274 | - </h1> | ||
275 | - <div class="detail"> | 246 | +</h1> |
247 | +<div class="detail"> | ||
276 | <p>{{desc}}</p> | 248 | <p>{{desc}}</p> |
277 | - <img src="{{img}}" alt=""> | ||
278 | - </div> | ||
279 | - </div> | ||
280 | - {{/productDetail}} | ||
281 | - | 249 | + <img class="lazy" data-original="{{img}}" alt=""> |
250 | +</div> | ||
251 | +</div> | ||
252 | +{{/productDetail}} | ||
282 | 253 | ||
283 | - {{#cartInfo}} | ||
284 | - <div class="cart-bar"> | 254 | +{{#cartInfo}} |
255 | +<div class="cart-bar"> | ||
285 | <span class="num-tag">{{numInCart}}</span> | 256 | <span class="num-tag">{{numInCart}}</span> |
286 | - <a href="" class="num-incart"></a> | ||
287 | - <a href="" class="addto-cart">加入购物车</a> | ||
288 | - <a href="" class="favorite"></a> | ||
289 | - </div> | ||
290 | - {{/cartInfo}} | 257 | + <a href="" class="num-incart iconfont"></a> |
258 | + <a href="" class="addto-cart ">加入购物车</a> | ||
259 | + <a href="" class="favorite iconfont"></a> | ||
260 | +</div> | ||
261 | +{{/cartInfo}} | ||
291 | </div> | 262 | </div> |
292 | {{> layout/footer}} | 263 | {{> layout/footer}} |
@@ -18,10 +18,27 @@ use LibModels\Wap\Home\OrderData; | @@ -18,10 +18,27 @@ use LibModels\Wap\Home\OrderData; | ||
18 | class HomeController extends AbstractAction | 18 | class HomeController extends AbstractAction |
19 | { | 19 | { |
20 | 20 | ||
21 | + protected $_uid; | ||
22 | + | ||
23 | +// /** | ||
24 | +// * 初始化 | ||
25 | +// */ | ||
26 | +// public function init() | ||
27 | +// { | ||
28 | +// // 检查用户是否登录, 未登录则跳转到登录页 | ||
29 | +// $uid = $this->getUid(true); | ||
30 | +// if (!$uid) { | ||
31 | +// $this->go(Helpers::url('/signin.html')); | ||
32 | +// } | ||
33 | +// | ||
34 | +// parent::init(); | ||
35 | +// } | ||
36 | + | ||
21 | /** | 37 | /** |
22 | * 个人中心入口 | 38 | * 个人中心入口 |
23 | */ | 39 | */ |
24 | - public function indexAction() { | 40 | + public function indexAction() |
41 | + { | ||
25 | // 设置网站标题 | 42 | // 设置网站标题 |
26 | $this->setTitle('个人中心'); | 43 | $this->setTitle('个人中心'); |
27 | $this->setNavHeader('个人中心', true, SITE_MAIN); | 44 | $this->setNavHeader('个人中心', true, SITE_MAIN); |
@@ -45,143 +62,60 @@ class HomeController extends AbstractAction | @@ -45,143 +62,60 @@ class HomeController extends AbstractAction | ||
45 | /** | 62 | /** |
46 | * 用户收藏的商品 | 63 | * 用户收藏的商品 |
47 | */ | 64 | */ |
48 | - public function favoriteAction() { | 65 | + public function favoriteAction() |
66 | + { | ||
67 | + // 设置网站标题 | ||
68 | + $this->setTitle('我的收藏'); | ||
69 | + $this->setNavHeader('我的收藏', true, SITE_MAIN); | ||
70 | + | ||
71 | + $tab = $this->get('tab', ''); | ||
49 | $uid = $this->getUid(); | 72 | $uid = $this->getUid(); |
73 | + $uid = 8826435; | ||
74 | + $gender = Helpers::getGenderByCookie(); | ||
50 | 75 | ||
51 | $favProducts = \Index\UserModel::getFavProductData($uid); | 76 | $favProducts = \Index\UserModel::getFavProductData($uid); |
52 | - | ||
53 | - //print_r($favProducts); | ||
54 | - | ||
55 | - $this->_view->display('favorite', array( | 77 | + $favBrands = \Index\UserModel::getFavBrandData($uid, $gender); |
78 | + $data = array( | ||
56 | 'favPage' => true, //加载js | 79 | 'favPage' => true, //加载js |
57 | - 'pageHeader' => array( | ||
58 | - 'navBack' => true, | ||
59 | - 'navTitle' => '我的收藏', | ||
60 | - 'navHome' => true | ||
61 | - ), | ||
62 | 'pageFooter' => true, | 80 | 'pageFooter' => true, |
63 | 'favorite' => true, | 81 | 'favorite' => true, |
64 | - 'hasFavProduct' => array( | ||
65 | - '0' => array( | ||
66 | - 'imgUrl' => 'http://img11.static.yhbimg.com/goodsimg/2015/11/04/05/01ce2aff32fc3c90584f516167cd526d91.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
67 | - 'title' => 'adidas Originals ZX FLUXM22508 ', | ||
68 | - 'price' => '¥800', | ||
69 | - 'discountPrice' => false, | ||
70 | - 'savePrice' => false, | ||
71 | - 'sellOut' => true | ||
72 | - ), | ||
73 | - '1' => array( | ||
74 | - 'imgUrl' => 'http://img11.static.yhbimg.com/goodsimg/2015/11/04/05/01ce2aff32fc3c90584f516167cd526d91.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
75 | - 'title' => 'adidas Originals ZX FLUXM22508 ', | ||
76 | - 'price' => '¥800', | ||
77 | - 'discountPrice' => '¥500', | ||
78 | - 'savePrice' => '¥300', | ||
79 | - 'sellOut' => false | ||
80 | - ) | ||
81 | - ), | ||
82 | - 'hasFavBrand' => array( | ||
83 | - '0' => array( | ||
84 | - 'id' => '1', | ||
85 | - 'brandImg' => 'http://img11.static.yhbimg.com/goodsimg/2015/11/04/05/01ce2aff32fc3c90584f516167cd526d91.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
86 | - 'brandName' => 'VANS', | ||
87 | - 'update' => 12, | ||
88 | - 'discount' => 10, | ||
89 | - 'link' => '#', | ||
90 | - 'productList' => array( | ||
91 | - '0' => array( | ||
92 | - 'imgUrl' => 'http://img11.static.yhbimg.com/goodsimg/2015/11/04/05/01ce2aff32fc3c90584f516167cd526d91.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
93 | - 'price' => '¥240', | ||
94 | - 'discount' => '¥240' | ||
95 | - ), | ||
96 | - '1' => array( | ||
97 | - 'imgUrl' => 'http://img11.static.yhbimg.com/goodsimg/2015/11/04/05/01ce2aff32fc3c90584f516167cd526d91.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
98 | - 'price' => '¥240', | ||
99 | - 'discount' => '¥240' | ||
100 | - ), | ||
101 | - '2' => array( | ||
102 | - 'imgUrl' => 'http://img11.static.yhbimg.com/goodsimg/2015/11/04/05/01ce2aff32fc3c90584f516167cd526d91.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
103 | - 'price' => '¥240', | ||
104 | - 'discount' => '¥240' | ||
105 | - ), | ||
106 | - '3' => array( | ||
107 | - 'imgUrl' => 'http://img11.static.yhbimg.com/goodsimg/2015/11/04/05/01ce2aff32fc3c90584f516167cd526d91.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
108 | - 'price' => '¥240', | ||
109 | - 'discount' => '¥240' | ||
110 | - ) | ||
111 | - ) | ||
112 | - ), | ||
113 | - '1' => array( | ||
114 | - 'id' => '2', | ||
115 | - 'brandImg' => 'http://img11.static.yhbimg.com/goodsimg/2015/11/04/05/01ce2aff32fc3c90584f516167cd526d91.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
116 | - 'brandName' => 'VANS', | ||
117 | - 'update' => 12, | ||
118 | - 'discount' => 10, | ||
119 | - 'link' => '#', | ||
120 | - 'productList' => array( | ||
121 | - '0' => array( | ||
122 | - 'imgUrl' => 'http://img11.static.yhbimg.com/goodsimg/2015/11/04/05/01ce2aff32fc3c90584f516167cd526d91.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
123 | - 'price' => '¥240', | ||
124 | - 'discount' => '¥240' | ||
125 | - ), | ||
126 | - '1' => array( | ||
127 | - 'imgUrl' => 'http://img11.static.yhbimg.com/goodsimg/2015/11/04/05/01ce2aff32fc3c90584f516167cd526d91.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
128 | - 'price' => '¥240', | ||
129 | - 'discount' => '¥240' | ||
130 | - ), | ||
131 | - '2' => array( | ||
132 | - 'imgUrl' => 'http://img11.static.yhbimg.com/goodsimg/2015/11/04/05/01ce2aff32fc3c90584f516167cd526d91.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
133 | - 'price' => '¥240', | ||
134 | - 'discount' => '¥240' | ||
135 | - ), | ||
136 | - '3' => array( | ||
137 | - 'imgUrl' => 'http://img11.static.yhbimg.com/goodsimg/2015/11/04/05/01ce2aff32fc3c90584f516167cd526d91.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
138 | - 'price' => '¥240', | ||
139 | - 'discount' => '¥240' | ||
140 | - ) | ||
141 | - ) | ||
142 | - ), | ||
143 | - '2' => array( | ||
144 | - 'id' => '3', | ||
145 | - 'brandImg' => 'http://img11.static.yhbimg.com/goodsimg/2015/11/04/05/01ce2aff32fc3c90584f516167cd526d91.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
146 | - 'brandName' => 'VANS', | ||
147 | - 'update' => 12, | ||
148 | - 'discount' => 10, | ||
149 | - 'link' => '#', | ||
150 | - 'productList' => array( | ||
151 | - 'imgUrl' => 'http://img11.static.yhbimg.com/goodsimg/2015/11/04/05/01ce2aff32fc3c90584f516167cd526d91.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90', | ||
152 | - 'price' => '¥240', | ||
153 | - 'discount' => false | ||
154 | - ) | ||
155 | - ) | ||
156 | - ) | ||
157 | - )); | 82 | + 'hasFavProduct' => $favProducts, |
83 | + 'hasFavBrand' => $favBrands | ||
84 | + ); | ||
85 | + // 判断时候为品牌页 | ||
86 | + if ($tab === 'brand') { | ||
87 | + $data['brandTab'] = true; | ||
158 | } | 88 | } |
159 | 89 | ||
90 | + $this->_view->display('favorite', $data); | ||
91 | + } | ||
160 | 92 | ||
161 | /** | 93 | /** |
162 | * 用户收藏的商品-删除 | 94 | * 用户收藏的商品-删除 |
163 | */ | 95 | */ |
164 | - public function favoriteDelAction() { | ||
165 | - | ||
166 | - //$this->echoJson(); | ||
167 | - } | 96 | + public function favoriteDelAction() |
97 | + { | ||
98 | + $result = array(); | ||
168 | 99 | ||
169 | - /** | ||
170 | - * 用户收藏的品牌 | ||
171 | - */ | ||
172 | - public function favoritebrandAction() { | 100 | + if ($this->isAjax()) { |
173 | $uid = $this->getUid(); | 101 | $uid = $this->getUid(); |
174 | - $gender = Helpers::getGenderByCookie(); | 102 | + $fav_id = $this->post('fav_id', 0); |
175 | 103 | ||
176 | - $favBrands = \Index\UserModel::getFavBrandData($uid, $gender); | 104 | + $result = \Index\UserModel::favoriteDelete($uid, $fav_id); |
105 | + } | ||
177 | 106 | ||
178 | - print_r($favBrands); | 107 | + if (empty($result)) { |
108 | + echo ' '; | ||
109 | + } else { | ||
110 | + $this->echoJson($result); | ||
111 | + } | ||
179 | } | 112 | } |
180 | 113 | ||
181 | /** | 114 | /** |
182 | * 个人信息 | 115 | * 个人信息 |
183 | */ | 116 | */ |
184 | - public function personalDetailsAction() { | 117 | + public function personalDetailsAction() |
118 | + { | ||
185 | $this->setTitle('个人信息'); | 119 | $this->setTitle('个人信息'); |
186 | $this->setNavHeader('个人信息', true, SITE_MAIN); | 120 | $this->setNavHeader('个人信息', true, SITE_MAIN); |
187 | 121 | ||
@@ -195,12 +129,13 @@ class HomeController extends AbstractAction | @@ -195,12 +129,13 @@ class HomeController extends AbstractAction | ||
195 | /** | 129 | /** |
196 | * YOHO币 | 130 | * YOHO币 |
197 | */ | 131 | */ |
198 | - public function currencyAction() { | 132 | + public function currencyAction() |
133 | + { | ||
199 | $this->setTitle('YOHO币'); | 134 | $this->setTitle('YOHO币'); |
200 | $this->setNavHeader('YOHO币', true, false); | 135 | $this->setNavHeader('YOHO币', true, false); |
201 | 136 | ||
202 | // $uid = $this->getUid(); | 137 | // $uid = $this->getUid(); |
203 | - $uid = 967016; | 138 | + $uid = 8826435; |
204 | $currency = \Index\UserModel::getYohoCoinData($uid); | 139 | $currency = \Index\UserModel::getYohoCoinData($uid); |
205 | 140 | ||
206 | $currency['pageFooter'] = true; | 141 | $currency['pageFooter'] = true; |
@@ -210,7 +145,8 @@ class HomeController extends AbstractAction | @@ -210,7 +145,8 @@ class HomeController extends AbstractAction | ||
210 | /** | 145 | /** |
211 | * 优惠券 | 146 | * 优惠券 |
212 | */ | 147 | */ |
213 | - public function couponsAction() { | 148 | + public function couponsAction() |
149 | + { | ||
214 | 150 | ||
215 | $this->setTitle('优惠券'); | 151 | $this->setTitle('优惠券'); |
216 | $this->setNavHeader('优惠券', true, SITE_MAIN); | 152 | $this->setNavHeader('优惠券', true, SITE_MAIN); |
@@ -227,12 +163,13 @@ class HomeController extends AbstractAction | @@ -227,12 +163,13 @@ class HomeController extends AbstractAction | ||
227 | /** | 163 | /** |
228 | * 我的消息 | 164 | * 我的消息 |
229 | */ | 165 | */ |
230 | - public function messageAction() { | 166 | + public function messageAction() |
167 | + { | ||
231 | // $uid = $this->getUid(); | 168 | // $uid = $this->getUid(); |
232 | $page = $this->get('page', 0); | 169 | $page = $this->get('page', 0); |
233 | $size = $this->get('size', 10); | 170 | $size = $this->get('size', 10); |
234 | 171 | ||
235 | - $uid = 967016; | 172 | + $uid = 8826435; |
236 | $messages = \Index\UserModel::getMessageData($uid, $page, $size); | 173 | $messages = \Index\UserModel::getMessageData($uid, $page, $size); |
237 | 174 | ||
238 | print_r($messages); | 175 | print_r($messages); |
@@ -241,13 +178,14 @@ class HomeController extends AbstractAction | @@ -241,13 +178,14 @@ class HomeController extends AbstractAction | ||
241 | /** | 178 | /** |
242 | * 地址管理 | 179 | * 地址管理 |
243 | */ | 180 | */ |
244 | - public function addressAction() { | 181 | + public function addressAction() |
182 | + { | ||
245 | // 设置网站标题 | 183 | // 设置网站标题 |
246 | $this->setTitle('地址管理'); | 184 | $this->setTitle('地址管理'); |
247 | $this->setNavHeader('地址管理', true, SITE_MAIN); | 185 | $this->setNavHeader('地址管理', true, SITE_MAIN); |
248 | 186 | ||
249 | // $uid = $this->getUid(); | 187 | // $uid = $this->getUid(); |
250 | - $uid = 967016; | 188 | + $uid = 8826435; |
251 | 189 | ||
252 | $address = \Index\UserModel::getAddressData($uid); | 190 | $address = \Index\UserModel::getAddressData($uid); |
253 | $addressList = \Index\UserModel::getAddressListData($uid); | 191 | $addressList = \Index\UserModel::getAddressListData($uid); |
@@ -265,12 +203,13 @@ class HomeController extends AbstractAction | @@ -265,12 +203,13 @@ class HomeController extends AbstractAction | ||
265 | /** | 203 | /** |
266 | * 修改地址或者添加新地址 | 204 | * 修改地址或者添加新地址 |
267 | */ | 205 | */ |
268 | - public function saveAddressAction() { | 206 | + public function saveAddressAction() |
207 | + { | ||
269 | $result = array(); | 208 | $result = array(); |
270 | 209 | ||
271 | if ($this->isAjax()) { | 210 | if ($this->isAjax()) { |
272 | // $uid = $this->getUid(); | 211 | // $uid = $this->getUid(); |
273 | - $uid = 967016; | 212 | + $uid = 8826435; |
274 | $address = $this->post('address', ''); | 213 | $address = $this->post('address', ''); |
275 | $area_code = $this->post('area_code', ''); | 214 | $area_code = $this->post('area_code', ''); |
276 | $consignee = $this->post('consignee', ''); | 215 | $consignee = $this->post('consignee', ''); |
@@ -292,12 +231,13 @@ class HomeController extends AbstractAction | @@ -292,12 +231,13 @@ class HomeController extends AbstractAction | ||
292 | /** | 231 | /** |
293 | * 设置默认地址 | 232 | * 设置默认地址 |
294 | */ | 233 | */ |
295 | - public function defaultAddressAction() { | 234 | + public function defaultAddressAction() |
235 | + { | ||
296 | $result = array(); | 236 | $result = array(); |
297 | 237 | ||
298 | if ($this->isAjax()) { | 238 | if ($this->isAjax()) { |
299 | // $uid = $this->getUid(); | 239 | // $uid = $this->getUid(); |
300 | - $uid = 967016; | 240 | + $uid = 8826435; |
301 | $id = $this->post('id', ''); | 241 | $id = $this->post('id', ''); |
302 | 242 | ||
303 | $result = \Index\UserModel::setDefaultAddress($uid, $id); | 243 | $result = \Index\UserModel::setDefaultAddress($uid, $id); |
@@ -310,8 +250,31 @@ class HomeController extends AbstractAction | @@ -310,8 +250,31 @@ class HomeController extends AbstractAction | ||
310 | } | 250 | } |
311 | } | 251 | } |
312 | 252 | ||
253 | + /** | ||
254 | + * 删除地址 | ||
255 | + */ | ||
256 | + public function addressDelAction() | ||
257 | + { | ||
258 | + $result = array(); | ||
259 | + | ||
260 | + if ($this->isAjax()) { | ||
261 | + // $uid = $this->getUid(); | ||
262 | + $uid = 8826435; | ||
263 | + $id = $this->post('id', ''); | ||
264 | + | ||
265 | + $result = \Index\UserModel::deleteAddress($uid, $id); | ||
266 | + } | ||
267 | + | ||
268 | + if (empty($result)) { | ||
269 | + echo ' '; | ||
270 | + } else { | ||
271 | + $this->echoJson($result); | ||
272 | + } | ||
273 | + } | ||
274 | + | ||
313 | //在线客服 | 275 | //在线客服 |
314 | - public function onlineServiceAction() { | 276 | + public function onlineServiceAction() |
277 | + { | ||
315 | // 设置网站标题 | 278 | // 设置网站标题 |
316 | $this->setTitle('在线客服'); | 279 | $this->setTitle('在线客服'); |
317 | $this->setNavHeader('在线客服', true, SITE_MAIN); | 280 | $this->setNavHeader('在线客服', true, SITE_MAIN); |
@@ -326,7 +289,8 @@ class HomeController extends AbstractAction | @@ -326,7 +289,8 @@ class HomeController extends AbstractAction | ||
326 | } | 289 | } |
327 | 290 | ||
328 | //在线客服-具体详情 | 291 | //在线客服-具体详情 |
329 | - public function onlineServiceDetailAction() { | 292 | + public function onlineServiceDetailAction() |
293 | + { | ||
330 | $service = array(); | 294 | $service = array(); |
331 | $cateId = $this->get('cateId', 0); | 295 | $cateId = $this->get('cateId', 0); |
332 | $cateName = $this->get('cateName', ''); | 296 | $cateName = $this->get('cateName', ''); |
@@ -341,14 +305,23 @@ class HomeController extends AbstractAction | @@ -341,14 +305,23 @@ class HomeController extends AbstractAction | ||
341 | /** | 305 | /** |
342 | * 我的逛 | 306 | * 我的逛 |
343 | */ | 307 | */ |
344 | - public function myGuangAction() { | ||
345 | - echo 'My Guang'; | 308 | + public function myGuangAction() |
309 | + { | ||
310 | + $page = $this->get('page', 1); | ||
311 | + $limit = $this->get('limit', 10); | ||
312 | + $uid = $this->getUid(); | ||
313 | + $yh_channel = Helpers::getChannelByCookie(); | ||
314 | + $uid=5687179; | ||
315 | + $gender = Helpers::getGenderByCookie(); | ||
316 | + $guangInfo = \home\GuangModel::getMyGuang($uid, $page,$yh_channel,$gender, $limit); | ||
317 | + $this->_view->display('my-guang', array('myGuang'=>$guangInfo)); | ||
346 | } | 318 | } |
347 | 319 | ||
348 | /** | 320 | /** |
349 | * 意见反馈 | 321 | * 意见反馈 |
350 | */ | 322 | */ |
351 | - public function suggestAction() { | 323 | + public function suggestAction() |
324 | + { | ||
352 | // 设置网站标题 | 325 | // 设置网站标题 |
353 | $this->setTitle('意见反馈'); | 326 | $this->setTitle('意见反馈'); |
354 | $this->setNavHeader('意见反馈', true, SITE_MAIN); | 327 | $this->setNavHeader('意见反馈', true, SITE_MAIN); |
@@ -370,7 +343,8 @@ class HomeController extends AbstractAction | @@ -370,7 +343,8 @@ class HomeController extends AbstractAction | ||
370 | /** | 343 | /** |
371 | * 意见反馈-提交表单页面 | 344 | * 意见反馈-提交表单页面 |
372 | */ | 345 | */ |
373 | - public function suggestSubAction() { | 346 | + public function suggestSubAction() |
347 | + { | ||
374 | 348 | ||
375 | // 设置网站标题 | 349 | // 设置网站标题 |
376 | $this->setTitle('反馈问题'); | 350 | $this->setTitle('反馈问题'); |
@@ -398,19 +372,19 @@ class HomeController extends AbstractAction | @@ -398,19 +372,19 @@ class HomeController extends AbstractAction | ||
398 | /** | 372 | /** |
399 | * 异步上传图片 | 373 | * 异步上传图片 |
400 | */ | 374 | */ |
401 | - public function suggestimgUploadAction() { | ||
402 | - if ($this->isAjax()) { | ||
403 | - $filename = $this->get('filename', ''); | ||
404 | - $result = \Plugin\Images::saveImage($filename); | 375 | + public function suggestimgUploadAction() |
376 | + { | ||
377 | + $filename = $this->post('filename', ''); | ||
378 | + $result = \Index\UserModel::saveSuggestImg($filename); | ||
405 | 379 | ||
406 | $this->echoJson($result); | 380 | $this->echoJson($result); |
407 | } | 381 | } |
408 | - } | ||
409 | 382 | ||
410 | /** | 383 | /** |
411 | * 异步保存意见反馈数据 | 384 | * 异步保存意见反馈数据 |
412 | */ | 385 | */ |
413 | - public function savesuggestAction() { | 386 | + public function savesuggestAction() |
387 | + { | ||
414 | if ($this->isAjax()) { | 388 | if ($this->isAjax()) { |
415 | $uid = $this->getUid(); | 389 | $uid = $this->getUid(); |
416 | $content = $this->post('content', ''); | 390 | $content = $this->post('content', ''); |
@@ -424,7 +398,8 @@ class HomeController extends AbstractAction | @@ -424,7 +398,8 @@ class HomeController extends AbstractAction | ||
424 | /** | 398 | /** |
425 | * 会员等级展示页 | 399 | * 会员等级展示页 |
426 | */ | 400 | */ |
427 | - public function gradeAction() { | 401 | + public function gradeAction() |
402 | + { | ||
428 | //设置网站seo信息 | 403 | //设置网站seo信息 |
429 | $this->setTitle('会员等级'); | 404 | $this->setTitle('会员等级'); |
430 | //显示网站导航头部信息 | 405 | //显示网站导航头部信息 |
@@ -433,7 +408,7 @@ class HomeController extends AbstractAction | @@ -433,7 +408,7 @@ class HomeController extends AbstractAction | ||
433 | $gender = Helpers::getGenderByCookie(); | 408 | $gender = Helpers::getGenderByCookie(); |
434 | $channel = Helpers::getChannelByCookie(); | 409 | $channel = Helpers::getChannelByCookie(); |
435 | $uid = $this->getUid(); | 410 | $uid = $this->getUid(); |
436 | - $uid = '7566245'; //临时测试用 | 411 | + $uid = '10267443'; //临时测试用 |
437 | $data = GradeModel::getGrade($gender, $channel, $uid); | 412 | $data = GradeModel::getGrade($gender, $channel, $uid); |
438 | $data['pageFooter'] = true; | 413 | $data['pageFooter'] = true; |
439 | $this->_view->display('vip-grade', $data); | 414 | $this->_view->display('vip-grade', $data); |
@@ -443,7 +418,8 @@ class HomeController extends AbstractAction | @@ -443,7 +418,8 @@ class HomeController extends AbstractAction | ||
443 | * 会员特权查看页 | 418 | * 会员特权查看页 |
444 | */ | 419 | */ |
445 | 420 | ||
446 | - public function preferentialAction() { | 421 | + public function preferentialAction() |
422 | + { | ||
447 | //设置网站seo信息 | 423 | //设置网站seo信息 |
448 | $this->setTitle('会员等级'); | 424 | $this->setTitle('会员等级'); |
449 | //显示网站导航头部信息 | 425 | //显示网站导航头部信息 |
@@ -460,7 +436,8 @@ class HomeController extends AbstractAction | @@ -460,7 +436,8 @@ class HomeController extends AbstractAction | ||
460 | * 我的订单页面 | 436 | * 我的订单页面 |
461 | */ | 437 | */ |
462 | 438 | ||
463 | - public function orderAction() { | 439 | + public function orderAction() |
440 | + { | ||
464 | //获得type值 | 441 | //获得type值 |
465 | $type = $this->get('type', 1); | 442 | $type = $this->get('type', 1); |
466 | $this->setTitle('我的订单'); | 443 | $this->setTitle('我的订单'); |
@@ -480,7 +457,8 @@ class HomeController extends AbstractAction | @@ -480,7 +457,8 @@ class HomeController extends AbstractAction | ||
480 | } | 457 | } |
481 | 458 | ||
482 | //ajax请求订单页面 | 459 | //ajax请求订单页面 |
483 | - public function getOrdersAction() { | 460 | + public function getOrdersAction() |
461 | + { | ||
484 | //判断是不是ajax请求 | 462 | //判断是不是ajax请求 |
485 | if (!$this->isAjax()) { | 463 | if (!$this->isAjax()) { |
486 | $this->error(); | 464 | $this->error(); |
@@ -492,7 +470,7 @@ class HomeController extends AbstractAction | @@ -492,7 +470,7 @@ class HomeController extends AbstractAction | ||
492 | $gender = Helpers::getGenderByCookie(); | 470 | $gender = Helpers::getGenderByCookie(); |
493 | $yh_channel = $this->get('yh_channel', 1); | 471 | $yh_channel = $this->get('yh_channel', 1); |
494 | $uid = $this->getUid(); | 472 | $uid = $this->getUid(); |
495 | - $uid = '7566245'; //测试用 | 473 | + $uid = '10267443'; //测试用 |
496 | //调用模型层getOrder方法获得并处理数据 | 474 | //调用模型层getOrder方法获得并处理数据 |
497 | $data = OrderModel::getOrder($type, $page, $limit, $gender, $yh_channel, $uid); | 475 | $data = OrderModel::getOrder($type, $page, $limit, $gender, $yh_channel, $uid); |
498 | //如果没有订单数据,就给一个随便逛逛链接 | 476 | //如果没有订单数据,就给一个随便逛逛链接 |
@@ -514,7 +492,8 @@ class HomeController extends AbstractAction | @@ -514,7 +492,8 @@ class HomeController extends AbstractAction | ||
514 | * 我的订单-取消订单 | 492 | * 我的订单-取消订单 |
515 | */ | 493 | */ |
516 | 494 | ||
517 | - public function cancelOrderAction() { | 495 | + public function cancelOrderAction() |
496 | + { | ||
518 | 497 | ||
519 | //判断是不是ajax请求 | 498 | //判断是不是ajax请求 |
520 | if (!$this->isAjax()) { | 499 | if (!$this->isAjax()) { |
@@ -528,37 +507,35 @@ class HomeController extends AbstractAction | @@ -528,37 +507,35 @@ class HomeController extends AbstractAction | ||
528 | $yh_channel = $this->get('yh_channel', 1); | 507 | $yh_channel = $this->get('yh_channel', 1); |
529 | $method = 'app.SpaceOrders.close'; | 508 | $method = 'app.SpaceOrders.close'; |
530 | $data = OrderData::cancelOrderData($order_code, $uid, $gender, $yh_channel, $method); | 509 | $data = OrderData::cancelOrderData($order_code, $uid, $gender, $yh_channel, $method); |
531 | - if ($data['code'] == 200) { | ||
532 | - echo $data['message']; | ||
533 | - } | 510 | + $this->echoJson($data); |
534 | } | 511 | } |
535 | 512 | ||
536 | /* | 513 | /* |
537 | * 我的订单-删除订单 | 514 | * 我的订单-删除订单 |
538 | */ | 515 | */ |
539 | 516 | ||
540 | - public function deleteOrderAction() { | 517 | + public function delOrderAction() |
518 | + { | ||
541 | //判断是不是ajax请求 | 519 | //判断是不是ajax请求 |
542 | if (!$this->isAjax()) { | 520 | if (!$this->isAjax()) { |
543 | $this->error(); | 521 | $this->error(); |
544 | } | 522 | } |
545 | //传入order_code和uid以删除订单 | 523 | //传入order_code和uid以删除订单 |
546 | - $order_code = $this->get('orderCode'); | 524 | + $order_code = $this->get('id'); |
547 | $uid = $this->getUid(); | 525 | $uid = $this->getUid(); |
548 | $uid = '10267443'; //测试用 | 526 | $uid = '10267443'; //测试用 |
549 | $gender = Helpers::getGenderByCookie(); | 527 | $gender = Helpers::getGenderByCookie(); |
550 | $yh_channel = $this->get('yh_channel', 1); | 528 | $yh_channel = $this->get('yh_channel', 1); |
551 | $method = 'app.SpaceOrders.delOrderByCode'; | 529 | $method = 'app.SpaceOrders.delOrderByCode'; |
552 | $data = OrderData::deleteOrderData($order_code, $uid, $gender, $yh_channel, $method); | 530 | $data = OrderData::deleteOrderData($order_code, $uid, $gender, $yh_channel, $method); |
553 | - if ($data['code'] == 200) { | ||
554 | - echo $data['message']; | ||
555 | - } | 531 | + $this->echoJson($data); |
556 | } | 532 | } |
557 | 533 | ||
558 | /** | 534 | /** |
559 | * 订单详情页 | 535 | * 订单详情页 |
560 | */ | 536 | */ |
561 | - public function orderDetailAction() { | 537 | + public function orderDetailAction() |
538 | + { | ||
562 | $data = array( | 539 | $data = array( |
563 | 'name' => '毛毛莉Lydia', | 540 | 'name' => '毛毛莉Lydia', |
564 | 'phoneNum' => '18600001133', | 541 | 'phoneNum' => '18600001133', |
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | -namespace home; | 3 | +namespace Home; |
4 | 4 | ||
5 | use LibModels\Wap\Home\GradeData; | 5 | use LibModels\Wap\Home\GradeData; |
6 | -use Action\AbstractAction; | ||
7 | use Plugin\Helpers; | 6 | use Plugin\Helpers; |
8 | 7 | ||
9 | /** | 8 | /** |
@@ -15,7 +14,8 @@ class GradeModel | @@ -15,7 +14,8 @@ class GradeModel | ||
15 | * 获取个人中心-会员等级数据 | 14 | * 获取个人中心-会员等级数据 |
16 | */ | 15 | */ |
17 | 16 | ||
18 | - public static function getGrade($gender, $channel, $uid) { | 17 | + public static function getGrade($gender, $channel, $uid) |
18 | + { | ||
19 | $result = array(); | 19 | $result = array(); |
20 | 20 | ||
21 | if (USE_CACHE) { | 21 | if (USE_CACHE) { |
@@ -82,7 +82,8 @@ class GradeModel | @@ -82,7 +82,8 @@ class GradeModel | ||
82 | * 获取个人中心-会员特权详情页 | 82 | * 获取个人中心-会员特权详情页 |
83 | */ | 83 | */ |
84 | 84 | ||
85 | - public function getPreferential($channel, $uid) { | 85 | + public function getPreferential($channel, $uid) |
86 | + { | ||
86 | $result = array(); | 87 | $result = array(); |
87 | 88 | ||
88 | if (USE_CACHE) { | 89 | if (USE_CACHE) { |
1 | +<?php | ||
2 | + | ||
3 | +namespace Home; | ||
4 | + | ||
5 | +use LibModels\Wap\Home\GuangData; | ||
6 | +use Action\AbstractAction; | ||
7 | +use Plugin\Helpers; | ||
8 | + | ||
9 | +/** | ||
10 | + * 我的逛数据处理 | ||
11 | + */ | ||
12 | +class GuangModel | ||
13 | +{ | ||
14 | + | ||
15 | + //获取我的逛列表 | ||
16 | + public static function getMyGuang($uid, $page,$yh_channel=1, $gender = '1,3', $limit = 10) | ||
17 | + { | ||
18 | + $result = array(); | ||
19 | + //调用接口获取数据 | ||
20 | + $res = GuangData::getGuangInfo($uid, $page, $yh_channel,$gender, $limit); | ||
21 | + $guangInfo = $res['data']['data']; | ||
22 | + if ($guangInfo) | ||
23 | + { | ||
24 | + foreach ($guangInfo as $k => $v) | ||
25 | + { | ||
26 | + $result[$k]['id'] = $v['id']; | ||
27 | + $result[$k]['author'] = $v['author']; | ||
28 | + $tag = self::getTag(TRUE, intval($v['category_id'])); | ||
29 | + $result[$k]['url'] = $v['url']; | ||
30 | + $result[$k]['img'] = $v['src']; | ||
31 | + $result[$k]['title'] = $v['title']; | ||
32 | + $result[$k]['text'] = $v['intro']; | ||
33 | + $result[$k]['pageView'] = $v['views_num']; | ||
34 | + $result[$k]['publish_time'] = $v['publish_time']; | ||
35 | + $like = ($v['isPraise'] == "Y") ? true : false; | ||
36 | + $collect = ($v['isFavor'] == "Y") ? true : false; | ||
37 | + $result[$k]['like'] = array('isLiked' => $like, 'count' => $v['praise_num']); | ||
38 | + $result[$k]['collect'] = array('isCollected' => $collect, 'url' => $v['url']); | ||
39 | + $result[$k] += $tag; | ||
40 | + $result[$k]['share'] = $v['url']; | ||
41 | + } | ||
42 | + } | ||
43 | + | ||
44 | + return $result; | ||
45 | + } | ||
46 | + | ||
47 | + //【标签】isTip-小贴士;isCollocation-搭配 isFashionMan-潮人 isFashionGood-潮品 isTopic-话题 | ||
48 | + private static function getTag($isShow, $tagId) | ||
49 | + { | ||
50 | + $ret['showTags'] = $isShow; | ||
51 | + $ret['isTopic'] = false; | ||
52 | + $ret['isCollocation'] = false; | ||
53 | + $ret['isFashionMan'] = false; | ||
54 | + $ret['isFashionGood'] = false; | ||
55 | + $ret['isTip'] = false; | ||
56 | + switch ($tagId) | ||
57 | + { | ||
58 | + case 1: | ||
59 | + $ret['isTopic'] = true; | ||
60 | + break; | ||
61 | + case 2: | ||
62 | + $ret['isCollocation'] = true; | ||
63 | + break; | ||
64 | + case 3: | ||
65 | + $ret['isFashionMan'] = true; | ||
66 | + break; | ||
67 | + case 4: | ||
68 | + $ret['isFashionGood'] = true; | ||
69 | + break; | ||
70 | + case 5: | ||
71 | + $ret['isTip'] = true; | ||
72 | + break; | ||
73 | + default: | ||
74 | + $ret['showTags'] = FALSE; | ||
75 | + break; | ||
76 | + } | ||
77 | + return $ret; | ||
78 | + } | ||
79 | + | ||
80 | +} |
@@ -59,7 +59,11 @@ class UserModel | @@ -59,7 +59,11 @@ class UserModel | ||
59 | foreach ($infoNumData['data'] as &$val) { | 59 | foreach ($infoNumData['data'] as &$val) { |
60 | empty($val) && $val = 0; | 60 | empty($val) && $val = 0; |
61 | } | 61 | } |
62 | + | ||
62 | $result = $infoNumData['data']; | 63 | $result = $infoNumData['data']; |
64 | + | ||
65 | + // 默认没有返回用户地址的数据,添加这块儿数据 | ||
66 | + $result['address_num'] = count(self::getAddressData($uid)); | ||
63 | } | 67 | } |
64 | 68 | ||
65 | return $result; | 69 | return $result; |
@@ -150,7 +154,19 @@ class UserModel | @@ -150,7 +154,19 @@ class UserModel | ||
150 | 154 | ||
151 | // 处理用户收藏的商品数据 | 155 | // 处理用户收藏的商品数据 |
152 | if (isset($favProduct['data']) && !empty($favProduct['data'])) { | 156 | if (isset($favProduct['data']) && !empty($favProduct['data'])) { |
153 | - $result = $favProduct['data']; | 157 | + $product = array(); |
158 | + foreach ($favProduct['data']['product_list'] as $val) { | ||
159 | + $product = array(); | ||
160 | + $product['imgUrl'] = $val['image']; | ||
161 | + $product['title'] = $val['product_name']; | ||
162 | + $product['price'] = '¥'.$val['market_price']; | ||
163 | + $product['discountPrice'] = '¥'.$val['sales_price']; | ||
164 | + $product['savePrice'] = ($val['market_price'] - $val['sales_price'] > 0) ? '¥'.($val['market_price'] - $val['sales_price']) : false; | ||
165 | + $product['sellOut'] = (bool)($val['price_down']); | ||
166 | + | ||
167 | + $result[] = $product; | ||
168 | + } | ||
169 | + | ||
154 | } | 170 | } |
155 | 171 | ||
156 | return $result; | 172 | return $result; |
@@ -172,7 +188,43 @@ class UserModel | @@ -172,7 +188,43 @@ class UserModel | ||
172 | 188 | ||
173 | // 处理用户收藏的品牌数据 | 189 | // 处理用户收藏的品牌数据 |
174 | if (isset($favBrand['data']) && !empty($favBrand['data'])) { | 190 | if (isset($favBrand['data']) && !empty($favBrand['data'])) { |
175 | - $result = $favBrand['data']; | 191 | + $brand = array(); |
192 | + foreach ($favBrand['data']['brand_list'] as $val) { | ||
193 | + $brand = array(); | ||
194 | + $brand['id'] = $val['brand_id']; | ||
195 | + $brand['brandImg'] = Images::getImageUrl($val['brand_ico'], 235, 314); | ||
196 | + $brand['brandName'] = $val['brand_name']; | ||
197 | + $brand['update'] = $val['new_product_num']; | ||
198 | + $brand['discount'] = $val['product_discount_num']; | ||
199 | + $brand['link'] = '#'; | ||
200 | + | ||
201 | + // 处理品牌产品 | ||
202 | + $product = array(); | ||
203 | + foreach ($val['new_product'] as $one) { | ||
204 | + $product = array(); | ||
205 | + $product['imgUrl'] = Images::getImageUrl($one['default_images'], 235, 314); | ||
206 | + $product['price'] = '¥'.$one['market_price']; | ||
207 | + $product['discount'] = '¥'.$one['sales_price']; | ||
208 | + | ||
209 | + $brand['productList'][] = $product; | ||
210 | + } | ||
211 | + | ||
212 | + $result[] = $brand; | ||
213 | + } | ||
214 | + } | ||
215 | + | ||
216 | + return $result; | ||
217 | + } | ||
218 | + | ||
219 | + public static function favoriteDelete($uid, $fav_id) | ||
220 | + { | ||
221 | + $result = array(); | ||
222 | + | ||
223 | + if (empty($fav_id)) { | ||
224 | + $result['code'] = 400; | ||
225 | + $result['message'] = '取消的商品不可用'; | ||
226 | + } else { | ||
227 | + $result = UserData::favoriteDelete($uid, $fav_id); | ||
176 | } | 228 | } |
177 | 229 | ||
178 | return $result; | 230 | return $result; |
@@ -336,6 +388,27 @@ class UserModel | @@ -336,6 +388,27 @@ class UserModel | ||
336 | } | 388 | } |
337 | 389 | ||
338 | /** | 390 | /** |
391 | + * 删除地址 | ||
392 | + * | ||
393 | + * @param int $uid 用户ID | ||
394 | + * @param int $id 地址唯一标识符id | ||
395 | + * @return array|mixed 处理之后的返回数据 | ||
396 | + */ | ||
397 | + public static function deleteAddress($uid, $id) | ||
398 | + { | ||
399 | + $result = array('code' => 400, 'message' => '错误'); | ||
400 | + | ||
401 | + // 调用接口删除地址 | ||
402 | + $address = UserData::deleteAddress($uid, $id); | ||
403 | + // 处理返回结果 | ||
404 | + if ($address && isset($address['code'])) { | ||
405 | + $result = $address; | ||
406 | + } | ||
407 | + | ||
408 | + return $result; | ||
409 | + } | ||
410 | + | ||
411 | + /** | ||
339 | * 处理意见反馈数据 | 412 | * 处理意见反馈数据 |
340 | * | 413 | * |
341 | * @param string $udid 客户端唯一标识 | 414 | * @param string $udid 客户端唯一标识 |
@@ -359,7 +432,7 @@ class UserModel | @@ -359,7 +432,7 @@ class UserModel | ||
359 | $one['imgUrl'] = Helpers::getImageUrl($val['cover_image'], 640, 240); | 432 | $one['imgUrl'] = Helpers::getImageUrl($val['cover_image'], 640, 240); |
360 | $one['title'] = $val['filter_content']; | 433 | $one['title'] = $val['filter_content']; |
361 | $one['content'] = $val['reply_content']; | 434 | $one['content'] = $val['reply_content']; |
362 | - $one['good'] = boolval($val['is_reliable']); | 435 | + $one['good'] = (bool)($val['is_reliable']); |
363 | $one['bad'] = !$one['good']; | 436 | $one['bad'] = !$one['good']; |
364 | 437 | ||
365 | $result[] = $one; | 438 | $result[] = $one; |
@@ -370,6 +443,25 @@ class UserModel | @@ -370,6 +443,25 @@ class UserModel | ||
370 | } | 443 | } |
371 | 444 | ||
372 | /** | 445 | /** |
446 | + * 图片上传 | ||
447 | + * | ||
448 | + * @return array|mixed 保存意见反馈数据之后的返回 | ||
449 | + */ | ||
450 | + public static function saveSuggestImg($filename) | ||
451 | + { | ||
452 | + $result = array(); | ||
453 | + | ||
454 | + if (!isset($_FILES[$filename])) { | ||
455 | + $result['code'] = 400; | ||
456 | + $result['message'] = '文件上传错误'; | ||
457 | + } else { | ||
458 | + $result = Images::saveImage($filename); | ||
459 | + } | ||
460 | + | ||
461 | + return $result; | ||
462 | + } | ||
463 | + | ||
464 | + /** | ||
373 | * 保存意见反馈数据 | 465 | * 保存意见反馈数据 |
374 | * | 466 | * |
375 | * @param int $uid 用户ID | 467 | * @param int $uid 用户ID |
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | -namespace home; | 3 | +namespace Home; |
4 | 4 | ||
5 | use LibModels\Wap\Home\OnlineData; | 5 | use LibModels\Wap\Home\OnlineData; |
6 | -use Action\AbstractAction; | ||
7 | use Plugin\Helpers; | 6 | use Plugin\Helpers; |
8 | 7 | ||
9 | /** | 8 | /** |
@@ -12,7 +11,10 @@ use Plugin\Helpers; | @@ -12,7 +11,10 @@ use Plugin\Helpers; | ||
12 | class OnlineModel | 11 | class OnlineModel |
13 | { | 12 | { |
14 | 13 | ||
15 | - //获取在线帮助分类 | 14 | + /* |
15 | + * 获取在线帮助分类 | ||
16 | + * $clientType客户端类型 | ||
17 | + */ | ||
16 | public static function getOnlineServiceInfo($clientType = 'iphone') | 18 | public static function getOnlineServiceInfo($clientType = 'iphone') |
17 | { | 19 | { |
18 | //调用接口获取数据 | 20 | //调用接口获取数据 |
@@ -42,7 +44,7 @@ class OnlineModel | @@ -42,7 +44,7 @@ class OnlineModel | ||
42 | foreach ($sub as $sk => $sv) | 44 | foreach ($sub as $sk => $sv) |
43 | { | 45 | { |
44 | $qTmp[$sk]['title'] = $sv['category_name']; | 46 | $qTmp[$sk]['title'] = $sv['category_name']; |
45 | - $qTmp[$sk]['link'] = '/home/onlineservicedetail?cateId=' . $sv['id'].'&cateName='.$sv['category_name']; | 47 | + $qTmp[$sk]['link'] = Helpers::url('/home/onlineservicedetail',array('cateId'=>$sv['id'],'cateName'=>$sv['category_name'])); |
46 | } | 48 | } |
47 | } | 49 | } |
48 | $question[$key]['list'] = $qTmp; | 50 | $question[$key]['list'] = $qTmp; |
@@ -60,7 +62,11 @@ class OnlineModel | @@ -60,7 +62,11 @@ class OnlineModel | ||
60 | return $result; | 62 | return $result; |
61 | } | 63 | } |
62 | 64 | ||
63 | - //加载分类下的问题和解决方法 | 65 | + /* |
66 | + * 加载分类下的问题和解决方法 | ||
67 | + * cateId问题分类ID | ||
68 | + * clientType客户端 | ||
69 | + */ | ||
64 | public static function getOnlineServiceDetail($cateId, $clinetType = 'iphone') | 70 | public static function getOnlineServiceDetail($cateId, $clinetType = 'iphone') |
65 | { | 71 | { |
66 | $result = array(); | 72 | $result = array(); |
@@ -105,7 +105,7 @@ SHOE BQT KEN BLOCK', | @@ -105,7 +105,7 @@ SHOE BQT KEN BLOCK', | ||
105 | 105 | ||
106 | 'sizeInfo'=>array( | 106 | 'sizeInfo'=>array( |
107 | 'title' => '尺码信息', | 107 | 'title' => '尺码信息', |
108 | - 'enTitle' =>'SIZE INFO', | 108 | + 'enTitle' =>'xSIZE INFO', |
109 | 109 | ||
110 | 'detail' =>array( | 110 | 'detail' =>array( |
111 | 'list'=>array( | 111 | 'list'=>array( |
@@ -169,7 +169,7 @@ SHOE BQT KEN BLOCK', | @@ -169,7 +169,7 @@ SHOE BQT KEN BLOCK', | ||
169 | 'detail' =>array( | 169 | 'detail' =>array( |
170 | 'list'=>array( | 170 | 'list'=>array( |
171 | array( | 171 | array( |
172 | - 'fieldName'=>' ', | 172 | + 'fieldName'=>'1 ', |
173 | 'firstModel'=>'http://static.dev.yohobuy.com/img/product/avatar1.png', | 173 | 'firstModel'=>'http://static.dev.yohobuy.com/img/product/avatar1.png', |
174 | 'secondModel' =>'http://static.dev.yohobuy.com/img/product/avatar2.png' | 174 | 'secondModel' =>'http://static.dev.yohobuy.com/img/product/avatar2.png' |
175 | ), | 175 | ), |
-
Please register or login to post a comment