Merge branch 'feature/cart' of http://git.dev.yoho.cn/web/yohobuy into develop
Showing
29 changed files
with
148 additions
and
106 deletions
@@ -10,9 +10,9 @@ class Helpers | @@ -10,9 +10,9 @@ class Helpers | ||
10 | 10 | ||
11 | /** | 11 | /** |
12 | * 构建网站的URL | 12 | * 构建网站的URL |
13 | - * | 13 | + * |
14 | * 备注:所有的URL构建都尽量使用该方法,便于以后维护. | 14 | * 备注:所有的URL构建都尽量使用该方法,便于以后维护. |
15 | - * | 15 | + * |
16 | * @param string $uri 如 "/passport/reg/index" | 16 | * @param string $uri 如 "/passport/reg/index" |
17 | * @param array $param 参数项 array(key1 => value1, key2 => value2,),默认为array() | 17 | * @param array $param 参数项 array(key1 => value1, key2 => value2,),默认为array() |
18 | * @param string $module 模块名 如"index"表示默认, "guang"表示逛,"list"表示商品列表,"search"表示搜索 | 18 | * @param string $module 模块名 如"index"表示默认, "guang"表示逛,"list"表示商品列表,"search"表示搜索 |
@@ -53,7 +53,7 @@ class Helpers | @@ -53,7 +53,7 @@ class Helpers | ||
53 | 53 | ||
54 | /** | 54 | /** |
55 | * 根据尺寸获得图片url | 55 | * 根据尺寸获得图片url |
56 | - * | 56 | + * |
57 | * @param string $url 路径 | 57 | * @param string $url 路径 |
58 | * @param integer $width 图片宽度 | 58 | * @param integer $width 图片宽度 |
59 | * @param integer $height 图片高度 | 59 | * @param integer $height 图片高度 |
@@ -67,7 +67,7 @@ class Helpers | @@ -67,7 +67,7 @@ class Helpers | ||
67 | 67 | ||
68 | /** | 68 | /** |
69 | * 获取过滤APP里附加参数后的URL链接 | 69 | * 获取过滤APP里附加参数后的URL链接 |
70 | - * | 70 | + * |
71 | * @param string $url 路径 | 71 | * @param string $url 路径 |
72 | * @return string 去除掉如&openby:yohobuy={"action":"go.brand"}这样的APP附加参数 | 72 | * @return string 去除掉如&openby:yohobuy={"action":"go.brand"}这样的APP附加参数 |
73 | */ | 73 | */ |
@@ -84,7 +84,7 @@ class Helpers | @@ -84,7 +84,7 @@ class Helpers | ||
84 | 84 | ||
85 | /** | 85 | /** |
86 | * 根据用户访问的COOKIE判断出性别 | 86 | * 根据用户访问的COOKIE判断出性别 |
87 | - * | 87 | + * |
88 | * @return string | 88 | * @return string |
89 | */ | 89 | */ |
90 | public static function getGenderByCookie() | 90 | public static function getGenderByCookie() |
@@ -102,7 +102,7 @@ class Helpers | @@ -102,7 +102,7 @@ class Helpers | ||
102 | 102 | ||
103 | /** | 103 | /** |
104 | * 根据用户访问的COOKIE判断出频道 | 104 | * 根据用户访问的COOKIE判断出频道 |
105 | - * | 105 | + * |
106 | * @return int | 106 | * @return int |
107 | */ | 107 | */ |
108 | public static function getChannelByCookie() | 108 | public static function getChannelByCookie() |
@@ -124,7 +124,7 @@ class Helpers | @@ -124,7 +124,7 @@ class Helpers | ||
124 | 124 | ||
125 | /** | 125 | /** |
126 | * 从用户加入购物车的COOKIE取出购物车凭证 | 126 | * 从用户加入购物车的COOKIE取出购物车凭证 |
127 | - * | 127 | + * |
128 | * @return string | 128 | * @return string |
129 | */ | 129 | */ |
130 | public static function getShoppingKeyByCookie() | 130 | public static function getShoppingKeyByCookie() |
@@ -135,7 +135,7 @@ class Helpers | @@ -135,7 +135,7 @@ class Helpers | ||
135 | 135 | ||
136 | /** | 136 | /** |
137 | * 获取商品的ICON | 137 | * 获取商品的ICON |
138 | - * | 138 | + * |
139 | * @param int $type | 139 | * @param int $type |
140 | * @return array | 140 | * @return array |
141 | */ | 141 | */ |
@@ -195,7 +195,7 @@ class Helpers | @@ -195,7 +195,7 @@ class Helpers | ||
195 | 195 | ||
196 | /** | 196 | /** |
197 | * 格式化商品信息 | 197 | * 格式化商品信息 |
198 | - * | 198 | + * |
199 | * @param array $productData 需要格式化的商品数据 | 199 | * @param array $productData 需要格式化的商品数据 |
200 | * @param bool $showTags 控制是否显示标签 | 200 | * @param bool $showTags 控制是否显示标签 |
201 | * @param bool $showNew 控制是否显示NEW图标 | 201 | * @param bool $showNew 控制是否显示NEW图标 |
@@ -273,7 +273,7 @@ class Helpers | @@ -273,7 +273,7 @@ class Helpers | ||
273 | 273 | ||
274 | /** | 274 | /** |
275 | * 格式化资讯文章 | 275 | * 格式化资讯文章 |
276 | - * | 276 | + * |
277 | * @param array $articleData 需要格式化的资讯数据 | 277 | * @param array $articleData 需要格式化的资讯数据 |
278 | * @param bool $showTag 是否显示左上角标签 | 278 | * @param bool $showTag 是否显示左上角标签 |
279 | * @param mixed $isApp 是否显示分享,在APP客户端里嵌入需要传url链接 | 279 | * @param mixed $isApp 是否显示分享,在APP客户端里嵌入需要传url链接 |
@@ -348,7 +348,7 @@ class Helpers | @@ -348,7 +348,7 @@ class Helpers | ||
348 | 348 | ||
349 | /** | 349 | /** |
350 | * 格式化广告焦点图数据 | 350 | * 格式化广告焦点图数据 |
351 | - * | 351 | + * |
352 | * @param array $bannerData 需要格式化的广告图数据 | 352 | * @param array $bannerData 需要格式化的广告图数据 |
353 | * @param int $width 图片的宽度 | 353 | * @param int $width 图片的宽度 |
354 | * @param int $height 图片的高度 | 354 | * @param int $height 图片的高度 |
@@ -370,7 +370,7 @@ class Helpers | @@ -370,7 +370,7 @@ class Helpers | ||
370 | 370 | ||
371 | /** | 371 | /** |
372 | * 生成公开的TOKEN凭证 | 372 | * 生成公开的TOKEN凭证 |
373 | - * | 373 | + * |
374 | * @param string $string 字符串 | 374 | * @param string $string 字符串 |
375 | * @return string | 375 | * @return string |
376 | */ | 376 | */ |
@@ -381,7 +381,7 @@ class Helpers | @@ -381,7 +381,7 @@ class Helpers | ||
381 | 381 | ||
382 | /** | 382 | /** |
383 | * 验证TOKEN凭证 | 383 | * 验证TOKEN凭证 |
384 | - * | 384 | + * |
385 | * @param string $string 字符串 | 385 | * @param string $string 字符串 |
386 | * @param string $token 公开访问TOKEN | 386 | * @param string $token 公开访问TOKEN |
387 | * @return bool | 387 | * @return bool |
@@ -397,7 +397,7 @@ class Helpers | @@ -397,7 +397,7 @@ class Helpers | ||
397 | 397 | ||
398 | /** | 398 | /** |
399 | * 验证手机是否合法 | 399 | * 验证手机是否合法 |
400 | - * | 400 | + * |
401 | * @param int $mobile | 401 | * @param int $mobile |
402 | * @return boolean | 402 | * @return boolean |
403 | */ | 403 | */ |
@@ -411,7 +411,7 @@ class Helpers | @@ -411,7 +411,7 @@ class Helpers | ||
411 | 411 | ||
412 | /** | 412 | /** |
413 | * 验证密码是否合法 | 413 | * 验证密码是否合法 |
414 | - * | 414 | + * |
415 | * @param int $password | 415 | * @param int $password |
416 | * @return boolean | 416 | * @return boolean |
417 | */ | 417 | */ |
@@ -425,7 +425,7 @@ class Helpers | @@ -425,7 +425,7 @@ class Helpers | ||
425 | 425 | ||
426 | /** | 426 | /** |
427 | * 验证邮箱是否合法 | 427 | * 验证邮箱是否合法 |
428 | - * | 428 | + * |
429 | * @param string $email | 429 | * @param string $email |
430 | * @return boolean | 430 | * @return boolean |
431 | */ | 431 | */ |
@@ -438,8 +438,8 @@ class Helpers | @@ -438,8 +438,8 @@ class Helpers | ||
438 | } | 438 | } |
439 | 439 | ||
440 | /** | 440 | /** |
441 | - * 验证国际手机号是否合法 | ||
442 | - * | 441 | + * 验证国际手机号是否合法 |
442 | + * | ||
443 | * @param string $areaMobile | 443 | * @param string $areaMobile |
444 | * @return boolean | 444 | * @return boolean |
445 | */ | 445 | */ |
@@ -518,7 +518,7 @@ class Helpers | @@ -518,7 +518,7 @@ class Helpers | ||
518 | 518 | ||
519 | /** | 519 | /** |
520 | * 格式化订单商品 | 520 | * 格式化订单商品 |
521 | - * | 521 | + * |
522 | * @param array $orderGoods 订单 | 522 | * @param array $orderGoods 订单 |
523 | * @param int $count 计订单件数 | 523 | * @param int $count 计订单件数 |
524 | * @param bool $haveLink 控制是否需要商品链接 | 524 | * @param bool $haveLink 控制是否需要商品链接 |
@@ -620,7 +620,7 @@ class Helpers | @@ -620,7 +620,7 @@ class Helpers | ||
620 | foreach ($value['goods_list'] as $single) { | 620 | foreach ($value['goods_list'] as $single) { |
621 | $oneGoods['id'] = $single['product_skn']; | 621 | $oneGoods['id'] = $single['product_skn']; |
622 | $oneGoods['name'] = $single['product_name']; | 622 | $oneGoods['name'] = $single['product_name']; |
623 | - $oneGoods['thumb'] = !empty($single['goods_images']) ? Images::getImageUrl($single['goods_images'], 120, 120) : ''; | 623 | + $oneGoods['thumb'] = !empty($single['goods_images']) ? Images::getImageUrl($single['goods_images'], 120, 160) : ''; |
624 | $oneGoods['appearDate'] = '12月'; // 目前app接口没有返回该数据 | 624 | $oneGoods['appearDate'] = '12月'; // 目前app接口没有返回该数据 |
625 | $oneGoods['price'] = $single['last_price']; | 625 | $oneGoods['price'] = $single['last_price']; |
626 | $oneGoods['marketPrice'] = $single['market_price']; | 626 | $oneGoods['marketPrice'] = $single['market_price']; |
@@ -686,7 +686,7 @@ class Helpers | @@ -686,7 +686,7 @@ class Helpers | ||
686 | 686 | ||
687 | /** | 687 | /** |
688 | * 获取会员的级别 | 688 | * 获取会员的级别 |
689 | - * | 689 | + * |
690 | * @param string $vipInfo | 690 | * @param string $vipInfo |
691 | * @return int | 691 | * @return int |
692 | */ | 692 | */ |
@@ -714,9 +714,9 @@ class Helpers | @@ -714,9 +714,9 @@ class Helpers | ||
714 | 714 | ||
715 | /** | 715 | /** |
716 | * 同步用户的会话 | 716 | * 同步用户的会话 |
717 | - * | 717 | + * |
718 | * 转向老的PHP服务器上处理, 因购物车相关的操作会依赖SESSION | 718 | * 转向老的PHP服务器上处理, 因购物车相关的操作会依赖SESSION |
719 | - * | 719 | + * |
720 | * @param int $uid 用户ID | 720 | * @param int $uid 用户ID |
721 | * @param string $refer 访问来源 | 721 | * @param string $refer 访问来源 |
722 | * @param string $callback 回调方法名 | 722 | * @param string $callback 回调方法名 |
@@ -730,9 +730,9 @@ class Helpers | @@ -730,9 +730,9 @@ class Helpers | ||
730 | 730 | ||
731 | /** | 731 | /** |
732 | * 退出清除用户的会话 | 732 | * 退出清除用户的会话 |
733 | - * | 733 | + * |
734 | * 转向老的PHP服务器上处理, 因购物车相关的操作会依赖SESSION | 734 | * 转向老的PHP服务器上处理, 因购物车相关的操作会依赖SESSION |
735 | - * | 735 | + * |
736 | * @param int $uid 用户ID | 736 | * @param int $uid 用户ID |
737 | * @param string $refer 访问来源 | 737 | * @param string $refer 访问来源 |
738 | * @param string $callback 回调方法名 | 738 | * @param string $callback 回调方法名 |
@@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
8 | var $ = require('jquery'), | 8 | var $ = require('jquery'), |
9 | Hammer = require('yoho.hammer'), | 9 | Hammer = require('yoho.hammer'), |
10 | tip = require('../../plugin/tip'), | 10 | tip = require('../../plugin/tip'), |
11 | - chosePanel = require('../../shopping-cart/chose-panel'); | 11 | + chosePanel = require('../../cart/chose-panel'); |
12 | 12 | ||
13 | var likeEle = document.getElementById('likeBtn'), | 13 | var likeEle = document.getElementById('likeBtn'), |
14 | likeHammer = likeEle && new Hammer(likeEle); | 14 | likeHammer = likeEle && new Hammer(likeEle); |
@@ -83,6 +83,3 @@ if (addToCartHammer) { | @@ -83,6 +83,3 @@ if (addToCartHammer) { | ||
83 | 83 | ||
84 | }); | 84 | }); |
85 | } | 85 | } |
86 | - | ||
87 | - | ||
88 | - |
@@ -44,6 +44,10 @@ | @@ -44,6 +44,10 @@ | ||
44 | 44 | ||
45 | &:before { | 45 | &:before { |
46 | content: '赠品'; | 46 | content: '赠品'; |
47 | + display: block; | ||
48 | + font-size: 12px; | ||
49 | + line-height: 25rem / $pxConvertRem; | ||
50 | + transform: scale(0.833); | ||
47 | } | 51 | } |
48 | } | 52 | } |
49 | 53 | ||
@@ -52,6 +56,7 @@ | @@ -52,6 +56,7 @@ | ||
52 | } | 56 | } |
53 | 57 | ||
54 | .name { | 58 | .name { |
59 | + width: 440rem / $pxConvertRem; | ||
55 | font-size: 28rem / $pxConvertRem; | 60 | font-size: 28rem / $pxConvertRem; |
56 | } | 61 | } |
57 | 62 | ||
@@ -74,8 +79,14 @@ | @@ -74,8 +79,14 @@ | ||
74 | } | 79 | } |
75 | 80 | ||
76 | .price { | 81 | .price { |
82 | + margin-left: 10rem / $pxConvertRem; | ||
77 | font-size: 24rem / $pxConvertRem; | 83 | font-size: 24rem / $pxConvertRem; |
78 | - color: #000; | 84 | + color: #f1545b; |
85 | + | ||
86 | + &.market-price { | ||
87 | + color: #999; | ||
88 | + text-decoration: line-through; | ||
89 | + } | ||
79 | } | 90 | } |
80 | 91 | ||
81 | .count { | 92 | .count { |
@@ -96,9 +107,9 @@ | @@ -96,9 +107,9 @@ | ||
96 | } | 107 | } |
97 | 108 | ||
98 | .title { | 109 | .title { |
99 | - height: 50rem / $pxConvertRem; | ||
100 | - line-height: 50rem / $pxConvertRem; | ||
101 | - padding-left: 20rem / $pxConvertRem; | 110 | + height: 60rem / $pxConvertRem; |
111 | + line-height: 60rem / $pxConvertRem; | ||
112 | + padding: 0 20rem / $pxConvertRem; | ||
102 | font-size: 24rem / $pxConvertRem; | 113 | font-size: 24rem / $pxConvertRem; |
103 | background: #f8f8f8; | 114 | background: #f8f8f8; |
104 | } | 115 | } |
@@ -109,4 +120,4 @@ | @@ -109,4 +120,4 @@ | ||
109 | content: '加价购'; | 120 | content: '加价购'; |
110 | } | 121 | } |
111 | } | 122 | } |
112 | -} | ||
123 | +} |
@@ -7,6 +7,7 @@ | @@ -7,6 +7,7 @@ | ||
7 | position: absolute; | 7 | position: absolute; |
8 | top: 50%; | 8 | top: 50%; |
9 | margin-top: -14rem / $pxConvertRem; | 9 | margin-top: -14rem / $pxConvertRem; |
10 | + margin-left: 20rem / $pxConvertRem; | ||
10 | font-size: 28rem / $pxConvertRem; | 11 | font-size: 28rem / $pxConvertRem; |
11 | color: #f0f0f0; | 12 | color: #f0f0f0; |
12 | 13 | ||
@@ -15,9 +16,40 @@ | @@ -15,9 +16,40 @@ | ||
15 | } | 16 | } |
16 | } | 17 | } |
17 | 18 | ||
19 | + .few-tag{ | ||
20 | + width: 132rem / $pxConvertRem; | ||
21 | + position: absolute; | ||
22 | + left: 100rem / $pxConvertRem; | ||
23 | + text-align: center; | ||
24 | + top: 75%; | ||
25 | + color: #fff; | ||
26 | + } | ||
27 | + | ||
28 | + .gift-tag { | ||
29 | + background-color: #88BE51; | ||
30 | + } | ||
31 | + | ||
32 | + .plus-tag { | ||
33 | + background-color: #FC1264; | ||
34 | + } | ||
35 | + | ||
36 | + .few-tag-expire { | ||
37 | + position: absolute; | ||
38 | + top: 40%; | ||
39 | + left: 20rem / $pxConvertRem; | ||
40 | + background-color: #7f7f7f; | ||
41 | + display: inline-block; | ||
42 | + color: #fff; | ||
43 | + border-radius: 12rem / $pxConvertRem; | ||
44 | + padding: 4rem / $pxConvertRem; | ||
45 | + font-size: 20rem / $pxConvertRem; | ||
46 | + width: 48rem / $pxConvertRem; | ||
47 | + text-align: center; | ||
48 | + } | ||
49 | + | ||
18 | .info { | 50 | .info { |
19 | float: left; | 51 | float: left; |
20 | - margin-left: 30rem / $pxConvertRem; | 52 | + margin-left: 60rem / $pxConvertRem; |
21 | padding: 16rem / $pxConvertRem 0; | 53 | padding: 16rem / $pxConvertRem 0; |
22 | padding-right: 20rem / $pxConvertRem; | 54 | padding-right: 20rem / $pxConvertRem; |
23 | } | 55 | } |
@@ -32,13 +64,18 @@ | @@ -32,13 +64,18 @@ | ||
32 | 64 | ||
33 | .deps { | 65 | .deps { |
34 | margin-left: 173rem / $pxConvertRem; | 66 | margin-left: 173rem / $pxConvertRem; |
35 | - padding-bottom: 60rem / $pxConvertRem; | 67 | + padding-bottom: 72rem / $pxConvertRem; |
36 | border-bottom: 1px solid #e0e0e0; | 68 | border-bottom: 1px solid #e0e0e0; |
69 | + width: 380rem / $pxConvertRem; | ||
70 | + position: relative; | ||
71 | + min-height: 140rem / $pxConvertRem; | ||
37 | } | 72 | } |
38 | 73 | ||
39 | .name { | 74 | .name { |
40 | font-size: 28rem / $pxConvertRem; | 75 | font-size: 28rem / $pxConvertRem; |
41 | color: #5a5a5a; | 76 | color: #5a5a5a; |
77 | + width: 80%; | ||
78 | + display: inline-block; | ||
42 | } | 79 | } |
43 | 80 | ||
44 | .row:nth-child(2) { | 81 | .row:nth-child(2) { |
@@ -71,9 +108,13 @@ | @@ -71,9 +108,13 @@ | ||
71 | } | 108 | } |
72 | 109 | ||
73 | .count { | 110 | .count { |
74 | - font-size: 20rem / $pxConvertRem; | 111 | + font-size: 32rem / $pxConvertRem; |
75 | color: #999; | 112 | color: #999; |
76 | - margin-left: 22rem / $pxConvertRem; | 113 | + //margin-left: 22rem / $pxConvertRem; |
114 | + display: inline-block; | ||
115 | + width: 19%; | ||
116 | + position: absolute; | ||
117 | + text-align: center; | ||
77 | } | 118 | } |
78 | 119 | ||
79 | .sold-out, .low-stocks { | 120 | .sold-out, .low-stocks { |
@@ -181,15 +222,15 @@ | @@ -181,15 +222,15 @@ | ||
181 | font-size: 40rem / $pxConvertRem; | 222 | font-size: 40rem / $pxConvertRem; |
182 | line-height: 60rem / $pxConvertRem; | 223 | line-height: 60rem / $pxConvertRem; |
183 | text-align: center; | 224 | text-align: center; |
184 | - | 225 | + |
185 | } | 226 | } |
186 | &:last-child { | 227 | &:last-child { |
187 | span{ | 228 | span{ |
188 | width: 168rem / $pxConvertRem; | 229 | width: 168rem / $pxConvertRem; |
189 | overflow: hidden; | 230 | overflow: hidden; |
190 | font-size: 48em / $pxConvertRem; | 231 | font-size: 48em / $pxConvertRem; |
191 | - text-overflow:ellipsis; | ||
192 | - white-space:nowrap; | 232 | + text-overflow:ellipsis; |
233 | + white-space:nowrap; | ||
193 | } | 234 | } |
194 | } | 235 | } |
195 | } | 236 | } |
@@ -205,7 +246,6 @@ | @@ -205,7 +246,6 @@ | ||
205 | top: 20rem / $pxConvertRem;; | 246 | top: 20rem / $pxConvertRem;; |
206 | font-size: 52em / $pxConvertRem; | 247 | font-size: 52em / $pxConvertRem; |
207 | } | 248 | } |
208 | - | ||
209 | } | 249 | } |
210 | } | 250 | } |
211 | 251 |
@@ -158,5 +158,5 @@ a { | @@ -158,5 +158,5 @@ a { | ||
158 | @import "category/index"; | 158 | @import "category/index"; |
159 | @import "product/index"; | 159 | @import "product/index"; |
160 | @import "index/index"; | 160 | @import "index/index"; |
161 | -@import "shopping-cart/index"; | 161 | +@import "cart/index"; |
162 | @import "me/index"; //个人中心 | 162 | @import "me/index"; //个人中心 |
1 | {{> layout/header}} | 1 | {{> layout/header}} |
2 | <div class="gift-advance-page yoho-page"> | 2 | <div class="gift-advance-page yoho-page"> |
3 | - {{# shoppingCart}} | ||
4 | - {{#if gift}} | ||
5 | - {{# gift}} | ||
6 | - {{> shopping-cart/gift-advance-good}} | ||
7 | - {{/ gift}} | ||
8 | - {{^}} | ||
9 | - {{# advance}} | ||
10 | - <div class="advance-block"> | ||
11 | - <p class="title">{{title}}</p> | ||
12 | - {{# goods}} | ||
13 | - {{> shopping-cart/gift-advance-good}} | ||
14 | - {{/ goods}} | ||
15 | - </div> | ||
16 | - {{/ advance}} | ||
17 | - {{/if}} | ||
18 | - {{/ shoppingCart}} | 3 | + {{#if advanceBuyPage}} |
4 | + {{# advanceBuy}} | ||
5 | + <div class="advance-block"> | ||
6 | + <p class="title">{{title}}</p> | ||
7 | + {{#goods}} | ||
8 | + {{> cart/gift-advance-good}} | ||
9 | + {{/goods}} | ||
10 | + </div> | ||
11 | + {{/ advanceBuy}} | ||
12 | + {{else}} | ||
13 | + {{# gift}} | ||
14 | + {{> cart/gift-advance-good}} | ||
15 | + {{/ gift}} | ||
16 | + {{/if}} | ||
17 | + | ||
18 | + | ||
19 | </div> | 19 | </div> |
20 | -{{> layout/footer}} | ||
20 | +{{> layout/footer}} |
@@ -27,7 +27,7 @@ | @@ -27,7 +27,7 @@ | ||
27 | 27 | ||
28 | {{# commonCart}} | 28 | {{# commonCart}} |
29 | <div class="cart-content common"> | 29 | <div class="cart-content common"> |
30 | - {{> shopping-cart/cart-content}} | 30 | + {{> cart/cart-content}} |
31 | </div> | 31 | </div> |
32 | {{/ commonCart}} | 32 | {{/ commonCart}} |
33 | 33 | ||
@@ -38,7 +38,7 @@ | @@ -38,7 +38,7 @@ | ||
38 | <span class="txt">预售商品全场包邮,到货后立即发货</span> | 38 | <span class="txt">预售商品全场包邮,到货后立即发货</span> |
39 | <span class="txt">预售商品不参加活动,不可使用优惠券</span> | 39 | <span class="txt">预售商品不参加活动,不可使用优惠券</span> |
40 | </p> | 40 | </p> |
41 | - {{> shopping-cart/cart-content}} | 41 | + {{> cart/cart-content}} |
42 | </div> | 42 | </div> |
43 | {{/ preSellCart}} | 43 | {{/ preSellCart}} |
44 | {{/ shoppingCart}} | 44 | {{/ shoppingCart}} |
@@ -52,5 +52,5 @@ | @@ -52,5 +52,5 @@ | ||
52 | </div> | 52 | </div> |
53 | {{> product/recommend-for-you}} | 53 | {{> product/recommend-for-you}} |
54 | </div> | 54 | </div> |
55 | -{{> shopping-cart/chose-panel}} | 55 | + {{> cart/chose-panel}} |
56 | {{> layout/footer}} | 56 | {{> layout/footer}} |
1 | <div class="cart-goods"> | 1 | <div class="cart-goods"> |
2 | {{# goods}} | 2 | {{# goods}} |
3 | - {{> shopping-cart/good}} | 3 | + {{> cart/good}} |
4 | {{/ goods}} | 4 | {{/ goods}} |
5 | 5 | ||
6 | {{# $notValidGoods}} | 6 | {{# $notValidGoods}} |
7 | - {{> shopping-cart/good}} | 7 | + {{> cart/good}} |
8 | {{/ $notValidGoods}} | 8 | {{/ $notValidGoods}} |
9 | 9 | ||
10 | </div> | 10 | </div> |
@@ -22,8 +22,8 @@ | @@ -22,8 +22,8 @@ | ||
22 | <span class="price"> | 22 | <span class="price"> |
23 | ¥{{price}} | 23 | ¥{{price}} |
24 | </span> | 24 | </span> |
25 | - <span class="price"> | ||
26 | - ¥{{salePrice}} | 25 | + <span class="price market-price"> |
26 | + ¥{{marketPrice}} | ||
27 | </span> | 27 | </span> |
28 | <span class="count"> | 28 | <span class="count"> |
29 | ×{{count}} | 29 | ×{{count}} |
@@ -33,4 +33,4 @@ | @@ -33,4 +33,4 @@ | ||
33 | </div> | 33 | </div> |
34 | 34 | ||
35 | 35 | ||
36 | -</div> | ||
36 | +</div> |
1 | <div class="shopping-cart-good clearfix" data-id={{id}}> | 1 | <div class="shopping-cart-good clearfix" data-id={{id}}> |
2 | - <span class="checkbox icon-cb-checked iconfont"></span> | ||
3 | - <!-- {{#if isSoldOut}} | ||
4 | -<p class="">失效</p> | ||
5 | - {{^}} | ||
6 | - {{#if isGift}} | ||
7 | - {{^}} | ||
8 | -<span class="checkbox icon-cb-checked iconfont"></span> | ||
9 | - {{/if}} | 2 | + {{#if isSoldOut}} |
3 | + <span class="few-tag-expire">失效</span> | ||
4 | + {{^}} | ||
5 | + <span class="checkbox icon-cb-checked iconfont"></span> | ||
6 | + {{/if}} | ||
10 | 7 | ||
11 | - {{/if}}--> | ||
12 | <div class="info"> | 8 | <div class="info"> |
13 | <img class="thumb lazy" data-original={{thumb}}> | 9 | <img class="thumb lazy" data-original={{thumb}}> |
14 | - <!-- | ||
15 | - <a class="" href="{{url}}"> | ||
16 | - <img class="thumb lazy" data-original="{{thumb}}"> | ||
17 | - </a> | ||
18 | {{#if isAdvanceBuy}} | 10 | {{#if isAdvanceBuy}} |
19 | - <p class="few-tag">加价购</p> | 11 | + <p class="few-tag plus-tag">加价购</p> |
20 | {{^}} | 12 | {{^}} |
21 | {{#if isGift}} | 13 | {{#if isGift}} |
22 | - <p class="few-tag">赠品</p> | 14 | + <p class="few-tag gift-tag">赠品</p> |
23 | {{/if}} | 15 | {{/if}} |
24 | {{/if}} | 16 | {{/if}} |
25 | - {{#if isSoldOut}} | ||
26 | - <p class="few-tag">失效</p> | ||
27 | - {{/if}} | ||
28 | - | ||
29 | - --> | 17 | + </a> |
30 | 18 | ||
31 | <div class="deps show"> | 19 | <div class="deps show"> |
32 | <p class="name row">{{name}}</p> | 20 | <p class="name row">{{name}}</p> |
21 | + <span class="count"> | ||
22 | + ×{{count}} | ||
23 | + </span> | ||
33 | <p class="row"> | 24 | <p class="row"> |
34 | {{#if color}} | 25 | {{#if color}} |
35 | <span class="color"> | 26 | <span class="color"> |
@@ -48,9 +39,7 @@ | @@ -48,9 +39,7 @@ | ||
48 | <span class="price"> | 39 | <span class="price"> |
49 | ¥{{price}} | 40 | ¥{{price}} |
50 | </span> | 41 | </span> |
51 | - <span class="count"> | ||
52 | - ×{{count}} | ||
53 | - </span> | 42 | + |
54 | {{#if soldOut}} | 43 | {{#if soldOut}} |
55 | <span class="sold-out"> | 44 | <span class="sold-out"> |
56 | 已售罄 | 45 | 已售罄 |
@@ -221,29 +221,34 @@ | @@ -221,29 +221,34 @@ | ||
221 | {{!-- 购物车 --}} | 221 | {{!-- 购物车 --}} |
222 | {{#if shoppingCartPage}} | 222 | {{#if shoppingCartPage}} |
223 | <script> | 223 | <script> |
224 | - seajs.use('js/shopping-cart/cart'); | 224 | + seajs.use('js/cart/cart'); |
225 | seajs.use('js/product/recommend-for-you'); | 225 | seajs.use('js/product/recommend-for-you'); |
226 | </script> | 226 | </script> |
227 | {{/if}} | 227 | {{/if}} |
228 | -{{#if giftAdvancePage}} | 228 | +{{#if giftPage}} |
229 | <script> | 229 | <script> |
230 | - seajs.use('js/shopping-cart/gift-advance'); | 230 | + seajs.use('js/cart/gift-advance'); |
231 | +</script> | ||
232 | +{{/if}} | ||
233 | +{{#if advanceBuyPage}} | ||
234 | +<script> | ||
235 | + seajs.use('js/cart/gift-advance'); | ||
231 | </script> | 236 | </script> |
232 | {{/if}} | 237 | {{/if}} |
233 | {{#if orderEnsurePage}} | 238 | {{#if orderEnsurePage}} |
234 | <script> | 239 | <script> |
235 | - seajs.use('js/shopping-cart/order-ensure'); | 240 | + seajs.use('js/cart/order-ensure'); |
236 | </script> | 241 | </script> |
237 | {{/if}} | 242 | {{/if}} |
238 | {{#if selectAddressPage}} | 243 | {{#if selectAddressPage}} |
239 | <script> | 244 | <script> |
240 | seajs.use('js/me/address'); | 245 | seajs.use('js/me/address'); |
241 | - seajs.use('js/shopping-cart/select-address'); | 246 | + seajs.use('js/cart/select-address'); |
242 | </script> | 247 | </script> |
243 | {{/if}} | 248 | {{/if}} |
244 | {{#if selectCouponPage}} | 249 | {{#if selectCouponPage}} |
245 | <script> | 250 | <script> |
246 | - seajs.use('js/shopping-cart/select-coupon'); | 251 | + seajs.use('js/cart/select-coupon'); |
247 | </script> | 252 | </script> |
248 | {{/if}} | 253 | {{/if}} |
249 | {{!-- 个人中心 --}} | 254 | {{!-- 个人中心 --}} |
@@ -674,12 +674,12 @@ class CartModel | @@ -674,12 +674,12 @@ class CartModel | ||
674 | break; | 674 | break; |
675 | } | 675 | } |
676 | 676 | ||
677 | - if ($onlyAdvanceBuy) { | 677 | + if ($onlyGift) { |
678 | // 赠品 | 678 | // 赠品 |
679 | $result['freebie'] = Helpers::formatAdvanceGoods($data['gift_list']); | 679 | $result['freebie'] = Helpers::formatAdvanceGoods($data['gift_list']); |
680 | break; | 680 | break; |
681 | } | 681 | } |
682 | - if ($onlyGift) { | 682 | + if ($onlyAdvanceBuy) { |
683 | // 加价购 | 683 | // 加价购 |
684 | $result['advanceBuy'] = Helpers::formatAdvanceGoods($data['price_gift']); | 684 | $result['advanceBuy'] = Helpers::formatAdvanceGoods($data['price_gift']); |
685 | break; | 685 | break; |
@@ -143,11 +143,11 @@ class IndexController extends AbstractAction | @@ -143,11 +143,11 @@ class IndexController extends AbstractAction | ||
143 | $shoppingKey = Helpers::getShoppingKeyByCookie(); | 143 | $shoppingKey = Helpers::getShoppingKeyByCookie(); |
144 | $uid = $this->getUid(true); | 144 | $uid = $this->getUid(true); |
145 | $cartType = $this->get('cartType', 'ordinary'); | 145 | $cartType = $this->get('cartType', 'ordinary'); |
146 | - $data = array('shoppingCartPage' => true); | 146 | + $data = array('giftPage' => true); |
147 | $data += CartModel::getCartData($uid, $shoppingKey, $cartType, true); | 147 | $data += CartModel::getCartData($uid, $shoppingKey, $cartType, true); |
148 | 148 | ||
149 | // 渲染模板 | 149 | // 渲染模板 |
150 | - $this->_view->display('gift-advance-good', $data); | 150 | + $this->_view->display('gift-advance', $data); |
151 | } | 151 | } |
152 | 152 | ||
153 | /* | 153 | /* |
@@ -161,11 +161,11 @@ class IndexController extends AbstractAction | @@ -161,11 +161,11 @@ class IndexController extends AbstractAction | ||
161 | $shoppingKey = Helpers::getShoppingKeyByCookie(); | 161 | $shoppingKey = Helpers::getShoppingKeyByCookie(); |
162 | $uid = $this->getUid(true); | 162 | $uid = $this->getUid(true); |
163 | $cartType = $this->get('cartType', 'ordinary'); | 163 | $cartType = $this->get('cartType', 'ordinary'); |
164 | - $data = array('shoppingCartPage' => true); | 164 | + $data = array('advanceBuyPage' => true); |
165 | $data += CartModel::getCartData($uid, $shoppingKey, $cartType, false, true); | 165 | $data += CartModel::getCartData($uid, $shoppingKey, $cartType, false, true); |
166 | 166 | ||
167 | // 渲染模板 | 167 | // 渲染模板 |
168 | - $this->_view->display('gift-advance-good', $data); | 168 | + $this->_view->display('gift-advance', $data); |
169 | } | 169 | } |
170 | 170 | ||
171 | /* | 171 | /* |
@@ -425,10 +425,10 @@ class IndexController extends AbstractAction | @@ -425,10 +425,10 @@ class IndexController extends AbstractAction | ||
425 | $this->echoJson($result); | 425 | $this->echoJson($result); |
426 | } | 426 | } |
427 | } | 427 | } |
428 | - | 428 | + |
429 | /** | 429 | /** |
430 | * 加入购物车 | 430 | * 加入购物车 |
431 | - * | 431 | + * |
432 | * @param string productSku 商品的SKU | 432 | * @param string productSku 商品的SKU |
433 | * @param int buyNumber 购买数量 | 433 | * @param int buyNumber 购买数量 |
434 | * @param int promotionId 促销ID, 加价购有关 | 434 | * @param int promotionId 促销ID, 加价购有关 |
@@ -460,5 +460,5 @@ class IndexController extends AbstractAction | @@ -460,5 +460,5 @@ class IndexController extends AbstractAction | ||
460 | 460 | ||
461 | $this->echoJson($result); | 461 | $this->echoJson($result); |
462 | } | 462 | } |
463 | - | 463 | + |
464 | } | 464 | } |
-
Please register or login to post a comment