Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop
Showing
19 changed files
with
299 additions
and
166 deletions
@@ -51,17 +51,17 @@ class CartData | @@ -51,17 +51,17 @@ class CartData | ||
51 | } | 51 | } |
52 | 52 | ||
53 | /** | 53 | /** |
54 | - * 修改购物车商品数据 | 54 | + * 移入收藏夹 |
55 | * | 55 | * |
56 | * @param int $uid 用户ID | 56 | * @param int $uid 用户ID |
57 | - * @param string $swapData 商品数据 | 57 | + * @param string $sku 商品sku列表 |
58 | * @return array 接口返回的数据 | 58 | * @return array 接口返回的数据 |
59 | */ | 59 | */ |
60 | - public static function modifyCartProduct($uid, $swapData) | 60 | + public static function addToFav($uid, $sku) |
61 | { | 61 | { |
62 | $param = Yohobuy::param(); | 62 | $param = Yohobuy::param(); |
63 | - $param['method'] = 'app.Shopping.swap'; | ||
64 | - $param['swap_data'] = $swapData; | 63 | + $param['method'] = 'app.Shopping.addfavorite'; |
64 | + $param['product_sku_list'] = $sku; | ||
65 | $param['uid'] = $uid; | 65 | $param['uid'] = $uid; |
66 | $param['client_secret'] = Sign::getSign($param); | 66 | $param['client_secret'] = Sign::getSign($param); |
67 | 67 | ||
@@ -69,17 +69,35 @@ class CartData | @@ -69,17 +69,35 @@ class CartData | ||
69 | } | 69 | } |
70 | 70 | ||
71 | /** | 71 | /** |
72 | - * 移入收藏夹 | 72 | + * 获取购物车商品数据 |
73 | * | 73 | * |
74 | * @param int $uid 用户ID | 74 | * @param int $uid 用户ID |
75 | - * @param string $sku 商品sku列表 | 75 | + * @param int $skn 商品skn |
76 | * @return array 接口返回的数据 | 76 | * @return array 接口返回的数据 |
77 | */ | 77 | */ |
78 | - public static function addToFav($uid, $sku) | 78 | + public static function cartProductData($uid, $skn) |
79 | { | 79 | { |
80 | $param = Yohobuy::param(); | 80 | $param = Yohobuy::param(); |
81 | - $param['method'] = 'app.Shopping.addfavorite'; | ||
82 | - $param['product_sku_list'] = $sku; | 81 | + $param['method'] = 'app.product.data'; |
82 | + $param['product_skn'] = $skn; | ||
83 | + $param['uid'] = $uid; | ||
84 | + $param['client_secret'] = Sign::getSign($param); | ||
85 | + | ||
86 | + return Yohobuy::get(Yohobuy::API_URL, $param); | ||
87 | + } | ||
88 | + | ||
89 | + /** | ||
90 | + * 修改购物车商品数据 | ||
91 | + * | ||
92 | + * @param int $uid 用户ID | ||
93 | + * @param string $swapData 商品数据 | ||
94 | + * @return array 接口返回的数据 | ||
95 | + */ | ||
96 | + public static function modifyCartProduct($uid, $swapData) | ||
97 | + { | ||
98 | + $param = Yohobuy::param(); | ||
99 | + $param['method'] = 'app.Shopping.swap'; | ||
100 | + $param['swap_data'] = $swapData; | ||
83 | $param['uid'] = $uid; | 101 | $param['uid'] = $uid; |
84 | $param['client_secret'] = Sign::getSign($param); | 102 | $param['client_secret'] = Sign::getSign($param); |
85 | 103 |
@@ -47,15 +47,6 @@ function search() { | @@ -47,15 +47,6 @@ function search() { | ||
47 | slidesPerView: 'auto' | 47 | slidesPerView: 'auto' |
48 | }); | 48 | }); |
49 | 49 | ||
50 | - //优选 | ||
51 | - // recommendSwiper = new Swiper('#swiper-recommend', { | ||
52 | - // slidesPerView: 'auto', | ||
53 | - // grabCursor: true, | ||
54 | - // slideElement: 'li', | ||
55 | - // lazyLoading: true, | ||
56 | - // watchSlidesVisibility: true | ||
57 | - // }); | ||
58 | - | ||
59 | searching = false; | 50 | searching = false; |
60 | end = true; | 51 | end = true; |
61 | loading.hideLoadingMask(); | 52 | loading.hideLoadingMask(); |
@@ -12,7 +12,6 @@ var goodsSwiper; | @@ -12,7 +12,6 @@ var goodsSwiper; | ||
12 | require('./desc'); | 12 | require('./desc'); |
13 | require('./comments-consults'); | 13 | require('./comments-consults'); |
14 | require('./like'); | 14 | require('./like'); |
15 | -require('../recommend-for-you.js'); | ||
16 | 15 | ||
17 | lazyLoad($('img.lazy')); | 16 | lazyLoad($('img.lazy')); |
18 | 17 |
@@ -105,4 +105,22 @@ | @@ -105,4 +105,22 @@ | ||
105 | font-weight: bold; | 105 | font-weight: bold; |
106 | color: #fff; | 106 | color: #fff; |
107 | } | 107 | } |
108 | +} | ||
109 | +.systemMain{ | ||
110 | + width: 92%; | ||
111 | + height: 100%; | ||
112 | + overflow: hidden; | ||
113 | + background-color:#444; | ||
114 | + color: #fff; | ||
115 | + padding:0 4%; | ||
116 | + position: absolute; | ||
117 | + top: 0; | ||
118 | + left: 0; | ||
119 | + p{ | ||
120 | + font-size: 52em / $pxConvertRem; | ||
121 | + line-height: 60rem / $pxConvertRem; | ||
122 | + &:first-of-type{ | ||
123 | + padding-top: 90rem / $pxConvertRem; | ||
124 | + } | ||
125 | + } | ||
108 | } | 126 | } |
1 | .goods-comments-page { | 1 | .goods-comments-page { |
2 | .goods-comments { | 2 | .goods-comments { |
3 | .comment-item { | 3 | .comment-item { |
4 | - border: 1px solid $borderC; | 4 | + border-bottom: 1px solid $borderC; |
5 | padding: 0 pxToRem(28px); | 5 | padding: 0 pxToRem(28px); |
6 | .user-name { | 6 | .user-name { |
7 | font-size: pxToRem(24px); | 7 | font-size: pxToRem(24px); |
@@ -39,12 +39,14 @@ | @@ -39,12 +39,14 @@ | ||
39 | } | 39 | } |
40 | 40 | ||
41 | .goods-consults-page { | 41 | .goods-consults-page { |
42 | + background-color: #f0f0f0; | ||
42 | .goto-consult { | 43 | .goto-consult { |
43 | padding: 0 pxToRem(28px); | 44 | padding: 0 pxToRem(28px); |
44 | height: pxToRem(120px); | 45 | height: pxToRem(120px); |
45 | background-color: #ffffff; | 46 | background-color: #ffffff; |
46 | i, | 47 | i, |
47 | - span { | 48 | + span, |
49 | + a { | ||
48 | line-height: pxToRem(120px); | 50 | line-height: pxToRem(120px); |
49 | font-size: pxToRem(28px); | 51 | font-size: pxToRem(28px); |
50 | color: $mainFontC; | 52 | color: $mainFontC; |
@@ -59,6 +61,7 @@ | @@ -59,6 +61,7 @@ | ||
59 | } | 61 | } |
60 | .goods-consults { | 62 | .goods-consults { |
61 | .consult-item { | 63 | .consult-item { |
64 | + margin-top: pxToRem(30px); | ||
62 | padding: pxToRem(20px) pxToRem(28px); | 65 | padding: pxToRem(20px) pxToRem(28px); |
63 | background-color: #fff; | 66 | background-color: #fff; |
64 | .question { | 67 | .question { |
@@ -98,10 +101,10 @@ | @@ -98,10 +101,10 @@ | ||
98 | } | 101 | } |
99 | } | 102 | } |
100 | } | 103 | } |
101 | - .gap-block { | ||
102 | - min-height: 30rem/$pxConvertRem; | ||
103 | - background-color: #f0f0f0; | ||
104 | - } | 104 | + // .gap-block { |
105 | + // min-height: 30rem/$pxConvertRem; | ||
106 | + // background-color: #f0f0f0; | ||
107 | + // } | ||
105 | } | 108 | } |
106 | 109 | ||
107 | .consult-form-page { | 110 | .consult-form-page { |
@@ -30,50 +30,52 @@ $basicBtnC:#eb0313; | @@ -30,50 +30,52 @@ $basicBtnC:#eb0313; | ||
30 | left: pxToRem(30px); | 30 | left: pxToRem(30px); |
31 | right: auto; | 31 | right: auto; |
32 | } | 32 | } |
33 | -.tag-container{ | 33 | + |
34 | +.tag-container { | ||
34 | position: absolute; | 35 | position: absolute; |
35 | left: pxToRem(108px); | 36 | left: pxToRem(108px); |
36 | top: pxToRem(40px); | 37 | top: pxToRem(40px); |
37 | height: pxToRem(35px); | 38 | height: pxToRem(35px); |
38 | - // width: pxToRem(70px); | ||
39 | - color: #fff; | ||
40 | - font-size: pxToRem(20px); | ||
41 | - line-height: pxToRem(35px); | ||
42 | - z-index: 2; | ||
43 | - .good-tag{ | ||
44 | - display: inline-block; | ||
45 | - box-sizing: border-box; | ||
46 | - margin-left: .5px; | ||
47 | - font-size: pxToRem(23px); | ||
48 | - text-align: center; | ||
49 | - line-height: pxToRem(35px); | ||
50 | - padding:0 8px; | ||
51 | - } | ||
52 | - .new-tag { | ||
53 | - background-color: #78dc7e; | ||
54 | - color: #fff; | ||
55 | - } | ||
56 | - .renew-tag { | ||
57 | - background-color: #78dc7e; | ||
58 | - color: #fff; | ||
59 | - } | ||
60 | - .sale-tag { | ||
61 | - background-color: #ff575c; | ||
62 | - color: #fff; | ||
63 | - } | ||
64 | - .new-festival-tag { | ||
65 | - background-color: #000; | ||
66 | - color: #fff; | ||
67 | - } | ||
68 | - .limit-tag { | ||
69 | - border: 1px solid #000; | ||
70 | - color: #000; | ||
71 | - } | ||
72 | - .soonSoldOut-tag{ | ||
73 | - background-color:#ffac5b; | ||
74 | - color:#fff; | ||
75 | - } | 39 | + // width: pxToRem(70px); |
40 | + color: #fff; | ||
41 | + font-size: pxToRem(20px); | ||
42 | + line-height: pxToRem(35px); | ||
43 | + z-index: 2; | ||
44 | + .good-tag { | ||
45 | + display: inline-block; | ||
46 | + box-sizing: border-box; | ||
47 | + margin-left: .5px; | ||
48 | + font-size: pxToRem(23px); | ||
49 | + text-align: center; | ||
50 | + line-height: pxToRem(35px); | ||
51 | + padding: 0 8px; | ||
52 | + } | ||
53 | + .new-tag { | ||
54 | + background-color: #78dc7e; | ||
55 | + color: #fff; | ||
56 | + } | ||
57 | + .renew-tag { | ||
58 | + background-color: #78dc7e; | ||
59 | + color: #fff; | ||
60 | + } | ||
61 | + .sale-tag { | ||
62 | + background-color: #ff575c; | ||
63 | + color: #fff; | ||
64 | + } | ||
65 | + .new-festival-tag { | ||
66 | + background-color: #000; | ||
67 | + color: #fff; | ||
68 | + } | ||
69 | + .limit-tag { | ||
70 | + border: 1px solid #000; | ||
71 | + color: #000; | ||
72 | + } | ||
73 | + .soonSoldOut-tag { | ||
74 | + background-color: #ffac5b; | ||
75 | + color: #fff; | ||
76 | + } | ||
76 | } | 77 | } |
78 | + | ||
77 | .good-detail-page { | 79 | .good-detail-page { |
78 | overflow: hidden; | 80 | overflow: hidden; |
79 | background-color: #f0f0f0; | 81 | background-color: #f0f0f0; |
@@ -104,16 +106,16 @@ $basicBtnC:#eb0313; | @@ -104,16 +106,16 @@ $basicBtnC:#eb0313; | ||
104 | width: 100%; | 106 | width: 100%; |
105 | // .row { | 107 | // .row { |
106 | // display: table-row; | 108 | // display: table-row; |
107 | - .column { | ||
108 | - box-sizing:border-box; | ||
109 | - display: table-cell; | ||
110 | - padding: pxToRem(16px) pxToRem(12px); | ||
111 | - width: 50%; | ||
112 | - border: 1px solid #fff; | ||
113 | - font-size: pxToRem(24px); | ||
114 | - background-color: $tableCellC; | ||
115 | - float:left; | ||
116 | - } | 109 | + .column { |
110 | + box-sizing: border-box; | ||
111 | + display: table-cell; | ||
112 | + padding: pxToRem(16px) pxToRem(12px); | ||
113 | + width: 50%; | ||
114 | + border: 1px solid #fff; | ||
115 | + font-size: pxToRem(24px); | ||
116 | + background-color: $tableCellC; | ||
117 | + float: left; | ||
118 | + } | ||
117 | // } | 119 | // } |
118 | } | 120 | } |
119 | } | 121 | } |
@@ -136,15 +138,15 @@ $basicBtnC:#eb0313; | @@ -136,15 +138,15 @@ $basicBtnC:#eb0313; | ||
136 | position: absolute; | 138 | position: absolute; |
137 | z-index: 2; | 139 | z-index: 2; |
138 | bottom: pxToRem(40px); | 140 | bottom: pxToRem(40px); |
139 | - .pagination-inner{ | ||
140 | - span{ | 141 | + .pagination-inner { |
142 | + span { | ||
141 | background-color: #b0b0b0; | 143 | background-color: #b0b0b0; |
142 | } | 144 | } |
143 | .swiper-pagination-bullet { | 145 | .swiper-pagination-bullet { |
144 | margin-right: 2px; | 146 | margin-right: 2px; |
145 | } | 147 | } |
146 | .swiper-pagination-bullet-active { | 148 | .swiper-pagination-bullet-active { |
147 | - background-color: #000 ; | 149 | + background-color: #000; |
148 | } | 150 | } |
149 | } | 151 | } |
150 | } | 152 | } |
@@ -227,8 +229,47 @@ $basicBtnC:#eb0313; | @@ -227,8 +229,47 @@ $basicBtnC:#eb0313; | ||
227 | vertical-align: middle; | 229 | vertical-align: middle; |
228 | } | 230 | } |
229 | } | 231 | } |
232 | + .vip-level { | ||
233 | + box-sizing: box-border; | ||
234 | + padding-left: pxToRem(28px); | ||
235 | + padding-right: pxToRem(28px); | ||
236 | + min-height: pxToRem(88px); | ||
237 | + background-color: #fff; | ||
238 | + font-size: pxToRem(22px); | ||
239 | + color: #999999; | ||
240 | + border-bottom: 1px solid $borderC; | ||
241 | + .icons-item { | ||
242 | + float: left; | ||
243 | + width: 33.3%; | ||
244 | + height: pxToRem(88px); | ||
245 | + margin: 0; | ||
246 | + span { | ||
247 | + vertical-align: middle; | ||
248 | + display: inline-block; | ||
249 | + line-height: pxToRem(88px); | ||
250 | + } | ||
251 | + .vip-img { | ||
252 | + width: pxToRem(53px); | ||
253 | + height: pxToRem(32px); | ||
254 | + } | ||
255 | + &:nth-child(3) .vip-img{ | ||
256 | + background: image-url('product/silver.png') no-repeat; | ||
257 | + } | ||
258 | + &:nth-child(2) .vip-img{ | ||
259 | + background: image-url('product/golden.png') no-repeat; | ||
260 | + } | ||
261 | + &:nth-child(1) .vip-img{ | ||
262 | + background: image-url('product/platinum.png') no-repeat; | ||
263 | + } | ||
264 | + &:first-child { | ||
265 | + text-align: left; | ||
266 | + } | ||
267 | + &:last-child { | ||
268 | + text-align: right; | ||
269 | + } | ||
270 | + } | ||
271 | + } | ||
230 | .vipLevel { | 272 | .vipLevel { |
231 | - width: 100%; | ||
232 | box-sizing: border-box; | 273 | box-sizing: border-box; |
233 | background-color: #fff; | 274 | background-color: #fff; |
234 | display: table; | 275 | display: table; |
@@ -242,25 +283,24 @@ $basicBtnC:#eb0313; | @@ -242,25 +283,24 @@ $basicBtnC:#eb0313; | ||
242 | display: table-cell; | 283 | display: table-cell; |
243 | vertical-align: middle; | 284 | vertical-align: middle; |
244 | } | 285 | } |
245 | - .vip-img{ | 286 | + .vip-img { |
246 | padding-right: pxToRem(22px); | 287 | padding-right: pxToRem(22px); |
247 | - .img{ | ||
248 | - width: pxToRem(52px); | ||
249 | - height: pxToRem(32px); | 288 | + .img { |
289 | + width: pxToRem(53px); | ||
290 | + height: pxToRem(33px); | ||
250 | } | 291 | } |
251 | - &:nth-child(3n-3) .img{ | 292 | + &:nth-child(3n-3) .img { |
252 | background: image-url('product/silver.png') no-repeat; | 293 | background: image-url('product/silver.png') no-repeat; |
253 | } | 294 | } |
254 | - &:nth-child(3n-2) .img{ | 295 | + &:nth-child(3n-2) .img { |
255 | background: image-url('product/golden.png') no-repeat; | 296 | background: image-url('product/golden.png') no-repeat; |
256 | } | 297 | } |
257 | - &:nth-child(3n-1) .img{ | 298 | + &:nth-child(3n-1) .img { |
258 | background: image-url('product/platinum.png') no-repeat; | 299 | background: image-url('product/platinum.png') no-repeat; |
259 | } | 300 | } |
260 | - | ||
261 | } | 301 | } |
262 | .vip-price { | 302 | .vip-price { |
263 | - padding-right: pxToRem(55px); | 303 | + padding-right: pxToRem(52px); |
264 | } | 304 | } |
265 | .vip-price:last-child { | 305 | .vip-price:last-child { |
266 | padding-right: 0; | 306 | padding-right: 0; |
@@ -295,7 +335,6 @@ $basicBtnC:#eb0313; | @@ -295,7 +335,6 @@ $basicBtnC:#eb0313; | ||
295 | .goodsDiscount { | 335 | .goodsDiscount { |
296 | text-indent: pxToRem(-14px); | 336 | text-indent: pxToRem(-14px); |
297 | } | 337 | } |
298 | - | ||
299 | .enter-store { | 338 | .enter-store { |
300 | min-height: pxToRem(100px); | 339 | min-height: pxToRem(100px); |
301 | display: table; | 340 | display: table; |
@@ -327,7 +366,6 @@ $basicBtnC:#eb0313; | @@ -327,7 +366,6 @@ $basicBtnC:#eb0313; | ||
327 | } | 366 | } |
328 | } | 367 | } |
329 | } | 368 | } |
330 | - | ||
331 | //底部固定栏 | 369 | //底部固定栏 |
332 | .cart-bar { | 370 | .cart-bar { |
333 | position: relative; | 371 | position: relative; |
@@ -350,10 +388,10 @@ $basicBtnC:#eb0313; | @@ -350,10 +388,10 @@ $basicBtnC:#eb0313; | ||
350 | font-size: pxToRem(34px); | 388 | font-size: pxToRem(34px); |
351 | color: #ccc | 389 | color: #ccc |
352 | } | 390 | } |
353 | - &.favorite.liked{ | ||
354 | - color:$basicBtnC;; | 391 | + &.favorite.liked { |
392 | + color: $basicBtnC; | ||
393 | + ; | ||
355 | } | 394 | } |
356 | - | ||
357 | &.addto-cart, | 395 | &.addto-cart, |
358 | &.sold-out { | 396 | &.sold-out { |
359 | height: pxToRem(80px); | 397 | height: pxToRem(80px); |
@@ -382,11 +420,10 @@ $basicBtnC:#eb0313; | @@ -382,11 +420,10 @@ $basicBtnC:#eb0313; | ||
382 | font-size: pxToRem(24px); | 420 | font-size: pxToRem(24px); |
383 | } | 421 | } |
384 | } | 422 | } |
385 | - | ||
386 | - .recommend-for-you{ | 423 | + .recommend-for-you { |
387 | margin-bottom: pxToRem(120px); | 424 | margin-bottom: pxToRem(120px); |
388 | } | 425 | } |
389 | } | 426 | } |
427 | + | ||
390 | @import "comments-consults"; | 428 | @import "comments-consults"; |
391 | @import "product-description"; | 429 | @import "product-description"; |
392 | - |
1 | +{{> layout/header}} | ||
2 | +<div class="systemMain"> | ||
3 | + <P>尊敬的顾客:</P> | ||
4 | + <P>您好!</P> | ||
5 | + <P>为了向您提供更优质的服务,目前系统正在升级,请您耐心等待。</P> | ||
6 | + <P>系统升级期间,部分地区用户体验会有暂 时中断,如遇紧急事宜,欢迎垂询客服热线:400-889-9646 09:00-22:30(周一至周日)。</P> | ||
7 | + <P>稍后系统将恢复正常使用,欢迎您继续光顾 YOHO!BUY 有货!</P> | ||
8 | + <P>带来不便之处深表 歉意,请您谅解!</P> | ||
9 | + <P>特此公告</P> | ||
10 | + <P>YOHO!BUY 有货 客户服务中心。</P> | ||
11 | +</div> | ||
12 | +{{> layout/footer}} |
1 | {{> layout/header}} | 1 | {{> layout/header}} |
2 | <div class="goods-comments-page yoho-page"> | 2 | <div class="goods-comments-page yoho-page"> |
3 | {{#comments}} | 3 | {{#comments}} |
4 | - <div class="goods-comments"> | 4 | + <div class="goods-comments" id="goods-comments"> |
5 | {{#list}} | 5 | {{#list}} |
6 | <div class="comment-item"> | 6 | <div class="comment-item"> |
7 | <span class="user-name"> | 7 | <span class="user-name"> |
@@ -20,7 +20,10 @@ | @@ -20,7 +20,10 @@ | ||
20 | {{/list}} | 20 | {{/list}} |
21 | </div> | 21 | </div> |
22 | {{/comments}} | 22 | {{/comments}} |
23 | - | 23 | + |
24 | + {{#if loadmore}} | ||
25 | + <input id="loadMoreUrl" type="hidden" value={{loadMoreUrl}}> | ||
26 | + {{/if}} | ||
24 | </div> | 27 | </div> |
25 | 28 | ||
26 | {{> layout/footer}} | 29 | {{> layout/footer}} |
@@ -3,12 +3,11 @@ | @@ -3,12 +3,11 @@ | ||
3 | <div class="goto-consult"> | 3 | <div class="goto-consult"> |
4 | <i class="iconfont consult-logo"></i> | 4 | <i class="iconfont consult-logo"></i> |
5 | <span>我要咨询</span> | 5 | <span>我要咨询</span> |
6 | - <i class="iconfont enter-consult-page"></i> | 6 | + <a href="/consultform" class="iconfont enter-consult-page"></a> |
7 | </div> | 7 | </div> |
8 | {{# consults}} | 8 | {{# consults}} |
9 | - <div class="goods-consults"> | 9 | + <div class="goods-consults" id="goods-consults"> |
10 | {{#list}} | 10 | {{#list}} |
11 | - <div class="gap-block"></div> | ||
12 | <div class="consult-item"> | 11 | <div class="consult-item"> |
13 | <div class="question"> | 12 | <div class="question"> |
14 | <span class="iconfont"></span> | 13 | <span class="iconfont"></span> |
@@ -27,5 +26,9 @@ | @@ -27,5 +26,9 @@ | ||
27 | {{/list}} | 26 | {{/list}} |
28 | </div> | 27 | </div> |
29 | {{/ consults}} | 28 | {{/ consults}} |
29 | + | ||
30 | + {{#if loadmore}} | ||
31 | + <input id="loadMoreUrl" type="hidden" value={{loadMoreUrl}}> | ||
32 | + {{/if}} | ||
30 | </div> | 33 | </div> |
31 | {{> layout/footer}} | 34 | {{> layout/footer}} |
@@ -53,6 +53,19 @@ | @@ -53,6 +53,19 @@ | ||
53 | </div> | 53 | </div> |
54 | 54 | ||
55 | {{# vipLevel}} | 55 | {{# vipLevel}} |
56 | + <ul class="vip-level clearfix"> | ||
57 | + {{# list}} | ||
58 | + <li class="icons-item"> | ||
59 | + <span class="vip-img" style="background-size:cover;"> | ||
60 | + <!-- <div class="img" alt="" style="background-size:cover;"></div> --> | ||
61 | + </span> | ||
62 | + <span class="vip-price">{{text}}</span> | ||
63 | + </li> | ||
64 | + {{/ list}} | ||
65 | + </ul> | ||
66 | + {{/vipLevel}} | ||
67 | + | ||
68 | + <!-- {{# vipLevel}} | ||
56 | <div class="vipLevel"> | 69 | <div class="vipLevel"> |
57 | {{# list}} | 70 | {{# list}} |
58 | <span class="vip-img"> | 71 | <span class="vip-img"> |
@@ -61,7 +74,7 @@ | @@ -61,7 +74,7 @@ | ||
61 | <span class="vip-price">{{text}}</span> | 74 | <span class="vip-price">{{text}}</span> |
62 | {{/ list}} | 75 | {{/ list}} |
63 | </div> | 76 | </div> |
64 | - {{/ vipLevel}} | 77 | + {{/ vipLevel}} --> |
65 | 78 | ||
66 | {{# goodsDiscount}} | 79 | {{# goodsDiscount}} |
67 | <div class="goodsDiscount"> | 80 | <div class="goodsDiscount"> |
@@ -112,17 +125,14 @@ | @@ -112,17 +125,14 @@ | ||
112 | {{#if numInCart}} | 125 | {{#if numInCart}} |
113 | <span class="num-tag">{{numInCart}}</span> | 126 | <span class="num-tag">{{numInCart}}</span> |
114 | {{/if}} | 127 | {{/if}} |
115 | - <a href="" class="num-incart iconfont"></a> | 128 | + <a href="/shoppingCart" class="num-incart iconfont"></a> |
116 | {{#if goodsInstore}} | 129 | {{#if goodsInstore}} |
117 | - <a href="" class="addto-cart ">加入购物车</a> | 130 | + <a href="/shoppingCart" class="addto-cart ">加入购物车</a> |
118 | {{else}} | 131 | {{else}} |
119 | - <a href="" class="sold-out">已售罄</a> | ||
120 | - {{/if}} | ||
121 | - {{#if isCollect}} | ||
122 | - <a href="#" id="likeBtn" class="favorite iconfont liked"></a> | ||
123 | - {{else}} | ||
124 | - <a href="" id="likeBtn" class="favorite iconfont"></a> | 132 | + <a href="javascript:;" class="sold-out">已售罄</a> |
125 | {{/if}} | 133 | {{/if}} |
134 | + | ||
135 | + <a href="javascript:;" id="likeBtn" class="favorite iconfont {{#isCollect}}liked{{/isCollect}}"></a> | ||
126 | </div> | 136 | </div> |
127 | {{/cartInfo}} | 137 | {{/cartInfo}} |
128 | 138 |
@@ -45,7 +45,7 @@ | @@ -45,7 +45,7 @@ | ||
45 | <body {{#if isPassportPage}}class=passport-body{{/if}}> | 45 | <body {{#if isPassportPage}}class=passport-body{{/if}}> |
46 | {{#if systemUpdate}} | 46 | {{#if systemUpdate}} |
47 | <div class="systemUpdate"> | 47 | <div class="systemUpdate"> |
48 | - <a href="systemUpdate" class="systemHeader">YOHO!BUY关于系统升级的公告</a> | 48 | + <a href="index/systemUpdate" class="systemHeader">YOHO!BUY关于系统升级的公告</a> |
49 | <span>X</span> | 49 | <span>X</span> |
50 | </div> | 50 | </div> |
51 | {{/if}} | 51 | {{/if}} |
@@ -166,7 +166,13 @@ | @@ -166,7 +166,13 @@ | ||
166 | {{!-- 商品详情评论 --}} | 166 | {{!-- 商品详情评论 --}} |
167 | {{#if goodsCommentsPage}} | 167 | {{#if goodsCommentsPage}} |
168 | <script> | 168 | <script> |
169 | - seajs.use('js/product/detail/comments-consults'); | 169 | + seajs.use('js/product/detail/loadmore'); |
170 | +</script> | ||
171 | +{{/if}} | ||
172 | +{{!-- 商品详情咨询 --}} | ||
173 | +{{#if goodsConsultsPage}} | ||
174 | +<script> | ||
175 | + seajs.use('js/product/detail/loadmore'); | ||
170 | </script> | 176 | </script> |
171 | {{/if}} | 177 | {{/if}} |
172 | {{!-- 品类 --}} | 178 | {{!-- 品类 --}} |
@@ -59,7 +59,7 @@ | @@ -59,7 +59,7 @@ | ||
59 | <span class="iconfont"></span>暂无咨询 | 59 | <span class="iconfont"></span>暂无咨询 |
60 | </div> | 60 | </div> |
61 | <div class="consult-content-footer"> | 61 | <div class="consult-content-footer"> |
62 | - <a href="{{link}}"> | 62 | + <a href="/consultform"> |
63 | 我要咨询 | 63 | 我要咨询 |
64 | <span class="iconfont"></span></a> | 64 | <span class="iconfont"></span></a> |
65 | </div> | 65 | </div> |
@@ -38,9 +38,11 @@ class IndexController extends AbstractAction | @@ -38,9 +38,11 @@ class IndexController extends AbstractAction | ||
38 | * | 38 | * |
39 | */ | 39 | */ |
40 | 40 | ||
41 | - public function systemUpdate() | 41 | + public function systemUpdateAction() |
42 | { | 42 | { |
43 | - $this->_view->display('systemUpdate',''); | 43 | + $this->setTitle('关于系统升级的公告'); |
44 | + | ||
45 | + $this->_view->display('systemUpdate'); | ||
44 | } | 46 | } |
45 | 47 | ||
46 | } | 48 | } |
@@ -231,54 +231,19 @@ class ShoppingCartController extends AbstractAction | @@ -231,54 +231,19 @@ class ShoppingCartController extends AbstractAction | ||
231 | 231 | ||
232 | public function goodinfoAction() | 232 | public function goodinfoAction() |
233 | { | 233 | { |
234 | + $result = array(); | ||
235 | + | ||
234 | if ($this->isAjax()) { | 236 | if ($this->isAjax()) { |
235 | - $data = array( | ||
236 | - 'thumb' => 'http://img11.static.yhbimg.com/goodsimg/2015/09/17/03/014cacfa5c458b9732c68adf1af15d7a45.jpg?imageMogr2/thumbnail/120x120/extent/120x120/background/d2hpdGU=/position/center/quality/90', | ||
237 | - 'name' => '黄伟文Wyman X y yohood 联名商品YYYOHOOD圆领卫衣', | ||
238 | - 'price' => 289, | ||
239 | - 'salePrice' => 241, | ||
240 | - 'colors' => array( | ||
241 | - array( | ||
242 | - 'id' => 1, | ||
243 | - 'name' => '黄色' | ||
244 | - ), | ||
245 | - array( | ||
246 | - 'id' => 2, | ||
247 | - 'chosed' => true, | ||
248 | - 'name' => '白色' | ||
249 | - ) | ||
250 | - ), | ||
251 | - 'sizes' => array( | ||
252 | - array( | ||
253 | - 'id' => 1, | ||
254 | - 'name' => 'XS' | ||
255 | - ), | ||
256 | - array( | ||
257 | - 'id' => 2, | ||
258 | - 'name' => 'S' | ||
259 | - ), | ||
260 | - array( | ||
261 | - 'id' => 3, | ||
262 | - 'chosed' => true, | ||
263 | - 'name' => 'M' | ||
264 | - ), | ||
265 | - array( | ||
266 | - 'id' => 4, | ||
267 | - 'name' => 'L' | ||
268 | - ), | ||
269 | - array( | ||
270 | - 'id' => 5, | ||
271 | - 'name' => 'XL' | ||
272 | - ), | ||
273 | - array( | ||
274 | - 'id' => 6, | ||
275 | - 'name' => 'XXL' | ||
276 | - ) | ||
277 | - ), | ||
278 | - 'num' => 1 | ||
279 | - ); | ||
280 | - | ||
281 | - $this->echoJson(array('code' => 200, 'data' => $data)); | 237 | + $num = $this->get('buy_num', 1); |
238 | + $skn = $this->get('id', 1); | ||
239 | + $result = CartModel::cartProductData($this->_uid, $skn, $num); // 测试skn的ID为51172055 | ||
240 | + $result['num'] = $num; | ||
282 | } | 241 | } |
242 | + | ||
243 | + if (empty($result)) { | ||
244 | + echo ' '; | ||
245 | + } else { | ||
246 | + $this->echoJson($result); | ||
247 | + } | ||
283 | } | 248 | } |
284 | } | 249 | } |
@@ -3,6 +3,7 @@ | @@ -3,6 +3,7 @@ | ||
3 | namespace Index; | 3 | namespace Index; |
4 | 4 | ||
5 | use LibModels\Wap\Home\CartData; | 5 | use LibModels\Wap\Home\CartData; |
6 | +use Plugin\Helpers; | ||
6 | use Plugin\Images; | 7 | use Plugin\Images; |
7 | 8 | ||
8 | /** | 9 | /** |
@@ -98,6 +99,70 @@ class CartModel | @@ -98,6 +99,70 @@ class CartModel | ||
98 | } | 99 | } |
99 | 100 | ||
100 | /** | 101 | /** |
102 | + * 处理购物车商品数据 | ||
103 | + * | ||
104 | + * @param int $uid 用户ID | ||
105 | + * @param int $skn 商品skn | ||
106 | + * @param int $num 购买数目 | ||
107 | + * @return array 接口返回的数据 | ||
108 | + */ | ||
109 | + public static function cartProductData($uid, $skn, $num) | ||
110 | + { | ||
111 | + $result = array('code' => 400, 'message' => '出错啦~'); | ||
112 | + | ||
113 | + $product = CartData::cartProductData($uid, $skn); | ||
114 | + if (isset($product['code']) && $product['code'] === 200) { | ||
115 | + $result['code'] = 200; | ||
116 | + $data = array(); | ||
117 | + $productData = $product['data']; | ||
118 | + | ||
119 | + // 品牌信息 | ||
120 | + if (isset($productData['brand_info']) && !empty($productData['brand_info'])) { | ||
121 | + $data['thumb'] = Helpers::getImageUrl($productData['brand_info']['brand_ico'], 120, 120); | ||
122 | + } | ||
123 | + | ||
124 | + $data['name'] = $productData['product_name']; | ||
125 | + $data['price'] = $productData['market_price']; | ||
126 | + $data['salePrice'] = $productData['sales_price']; | ||
127 | + $data['storage'] = $productData['storage_sum']; | ||
128 | + $data['num'] = $num; | ||
129 | + | ||
130 | + // 商品选择 | ||
131 | + if (isset($productData['goods_list'])) { | ||
132 | + $goodsList = $productData['goods_list']; | ||
133 | + | ||
134 | + $colors = array(); | ||
135 | + $oneColor = array(); | ||
136 | + $sizes = array(); | ||
137 | + $oneSize = array(); | ||
138 | + foreach ($goodsList as $val) { | ||
139 | + // 颜色 | ||
140 | + $oneColor = array(); | ||
141 | + $oneColor['id'] = $val['color_id']; | ||
142 | + $oneColor['name'] = $val['color_name']; | ||
143 | + | ||
144 | + // 尺码 | ||
145 | + foreach ($val['size_list'] as $one) { | ||
146 | + $oneSize = array(); | ||
147 | + $oneSize['id'] = $one['size_id']; | ||
148 | + $oneSize['name'] = $one['size_name']; | ||
149 | + } | ||
150 | + $sizes[] = $oneSize; | ||
151 | + | ||
152 | + $oneColor['sizes'] = $sizes; | ||
153 | + $colors[] = $oneColor; | ||
154 | + } | ||
155 | + | ||
156 | + $data['colors'] = $colors; | ||
157 | + } | ||
158 | + | ||
159 | + $result['data'] = $data; | ||
160 | + } | ||
161 | + | ||
162 | + return $result; | ||
163 | + } | ||
164 | + | ||
165 | + /** | ||
101 | * 修改购物车商品数据 | 166 | * 修改购物车商品数据 |
102 | * | 167 | * |
103 | * @param int $uid 用户ID | 168 | * @param int $uid 用户ID |
@@ -135,6 +200,7 @@ class CartModel | @@ -135,6 +200,7 @@ class CartModel | ||
135 | // 购买的商品列表 | 200 | // 购买的商品列表 |
136 | foreach ($data['goods_list'] as $value) { | 201 | foreach ($data['goods_list'] as $value) { |
137 | $oneGoods['id'] = $value['product_sku']; | 202 | $oneGoods['id'] = $value['product_sku']; |
203 | + $oneGoods['skn'] = $value['product_skn']; | ||
138 | $oneGoods['name'] = $value['product_name']; | 204 | $oneGoods['name'] = $value['product_name']; |
139 | $oneGoods['thumb'] = Images::getImageUrl($value['goods_images'], 120, 120); | 205 | $oneGoods['thumb'] = Images::getImageUrl($value['goods_images'], 120, 120); |
140 | $oneGoods['color'] = $value['color_name']; | 206 | $oneGoods['color'] = $value['color_name']; |
-
Please register or login to post a comment