Showing
5 changed files
with
157 additions
and
0 deletions
@@ -45,6 +45,35 @@ | @@ -45,6 +45,35 @@ | ||
45 | {{/goods}} | 45 | {{/goods}} |
46 | </div> | 46 | </div> |
47 | {{/if}} | 47 | {{/if}} |
48 | + {{#if isBundle}} | ||
49 | + <div class="bundle-title"> | ||
50 | + <div class="opt"> | ||
51 | + <i class="iconfont chk select{{#if checked}} checked{{/if}}"></i> | ||
52 | + {{#inValid}} | ||
53 | + <span class="disable fill-text">失效</span> | ||
54 | + {{/inValid}} | ||
55 | + </div> | ||
56 | + <div class="title"> | ||
57 | + <span>{{poolTitle}}</span> | ||
58 | + </div> | ||
59 | + </div> | ||
60 | + <div class="bundle-nums clearfix"> | ||
61 | + <div class="label"> | ||
62 | + <span>套餐数量</span> | ||
63 | + </div> | ||
64 | + <div class="num-opt"> | ||
65 | + <a href="javascript:;" class="btn btn-opt-minus{{#ifor minSelectNum isGift isAdvanceBuy}} disabled{{/ifor}}"><span class="iconfont"></span></a> | ||
66 | + <input type="text" class="good-num" disabled="true" value="{{count}}" data-min="{{minNumber}}" data-max="{{maxNumber}}"> | ||
67 | + <a href="javascript:;" class="btn btn-opt-plus{{#ifor maxSelectNum isGift isAdvanceBuy}} disabled{{/ifor}}"><span class="iconfont"></span></a> | ||
68 | + </div> | ||
69 | + <div class="count pull-right">x{{count}}</div> | ||
70 | + </div> | ||
71 | + <div class="good-list"> | ||
72 | + {{#goods}} | ||
73 | + {{> cart-good}} | ||
74 | + {{/goods}} | ||
75 | + </div> | ||
76 | + {{/if}} | ||
48 | </div> | 77 | </div> |
49 | {{/goodPools}} | 78 | {{/goodPools}} |
50 | {{#goods}} | 79 | {{#goods}} |
@@ -33,11 +33,13 @@ | @@ -33,11 +33,13 @@ | ||
33 | {{#ifnot noEdit}} | 33 | {{#ifnot noEdit}} |
34 | <div class="intro intro-edit"> | 34 | <div class="intro intro-edit"> |
35 | <div class="edit-box"> | 35 | <div class="edit-box"> |
36 | + {{#ifnot ../isBundle}} | ||
36 | <div class="num-opt"> | 37 | <div class="num-opt"> |
37 | <a href="javascript:;" class="btn btn-opt-minus{{#ifor minSelectNum isGift isAdvanceBuy}} disabled{{/ifor}}"><span class="iconfont"></span></a> | 38 | <a href="javascript:;" class="btn btn-opt-minus{{#ifor minSelectNum isGift isAdvanceBuy}} disabled{{/ifor}}"><span class="iconfont"></span></a> |
38 | <input type="text" class="good-num" disabled="true" value="{{count}}" data-min="{{minNumber}}" data-max="{{maxNumber}}"> | 39 | <input type="text" class="good-num" disabled="true" value="{{count}}" data-min="{{minNumber}}" data-max="{{maxNumber}}"> |
39 | <a href="javascript:;" class="btn btn-opt-plus{{#ifor maxSelectNum isGift isAdvanceBuy}} disabled{{/ifor}}"><span class="iconfont"></span></a> | 40 | <a href="javascript:;" class="btn btn-opt-plus{{#ifor maxSelectNum isGift isAdvanceBuy}} disabled{{/ifor}}"><span class="iconfont"></span></a> |
40 | </div> | 41 | </div> |
42 | + {{/ifnot}} | ||
41 | <div class="edit-size-info"> | 43 | <div class="edit-size-info"> |
42 | <div class="txt">颜色:{{color}} 尺码:{{size}}</div> | 44 | <div class="txt">颜色:{{color}} 尺码:{{size}}</div> |
43 | <div class="down"> | 45 | <div class="down"> |
public/scss/cart/_bundle.css
0 → 100644
1 | +.bundle-title { | ||
2 | + height: 80px; | ||
3 | + display: flex; | ||
4 | + overflow: hidden; | ||
5 | + | ||
6 | + .opt { | ||
7 | + width: 100px; | ||
8 | + display: flex; | ||
9 | + align-items: center; | ||
10 | + justify-content: center; | ||
11 | + | ||
12 | + .select { | ||
13 | + display: block; | ||
14 | + } | ||
15 | + | ||
16 | + .edit { | ||
17 | + display: none; | ||
18 | + } | ||
19 | + | ||
20 | + .disable { | ||
21 | + background-color: #7f7f7f; | ||
22 | + } | ||
23 | + } | ||
24 | + | ||
25 | + .title { | ||
26 | + display: flex; | ||
27 | + align-items: center; | ||
28 | + | ||
29 | + span { | ||
30 | + height: 40px; | ||
31 | + padding: 4px; | ||
32 | + font-size: 16px; | ||
33 | + background-color: #d1021c; | ||
34 | + color: #fff; | ||
35 | + border-radius: 5px; | ||
36 | + } | ||
37 | + } | ||
38 | +} | ||
39 | + | ||
40 | +.bundle-nums { | ||
41 | + height: 80px; | ||
42 | + display: none; | ||
43 | + overflow: hidden; | ||
44 | + | ||
45 | + .label { | ||
46 | + width: 284px; | ||
47 | + height: 80px; | ||
48 | + display: flex; | ||
49 | + align-items: center; | ||
50 | + | ||
51 | + span { | ||
52 | + padding-left: 100px; | ||
53 | + } | ||
54 | + } | ||
55 | + | ||
56 | + .num-opt { | ||
57 | + border: solid 1PX #dfdfdf; | ||
58 | + border-radius: 5px; | ||
59 | + display: flex; | ||
60 | + align-items: center; | ||
61 | + overflow: hidden; | ||
62 | + | ||
63 | + .btn { | ||
64 | + width: 78px; | ||
65 | + display: block; | ||
66 | + height: 100%; | ||
67 | + text-align: center; | ||
68 | + line-height: 74px; | ||
69 | + | ||
70 | + .iconfont { | ||
71 | + color: #444; | ||
72 | + } | ||
73 | + | ||
74 | + &.disabled { | ||
75 | + .iconfont { | ||
76 | + color: #b0b0b0; | ||
77 | + } | ||
78 | + } | ||
79 | + | ||
80 | + &.btn-opt-minus { | ||
81 | + border-right: 1PX solid #dfdfdf; | ||
82 | + | ||
83 | + .iconfont:before { | ||
84 | + content: "\e625"; | ||
85 | + } | ||
86 | + } | ||
87 | + | ||
88 | + &.btn-opt-plus { | ||
89 | + border-left: 1px solid #dfdfdf; | ||
90 | + | ||
91 | + .iconfont:before { | ||
92 | + content: "\e624"; | ||
93 | + } | ||
94 | + } | ||
95 | + } | ||
96 | + | ||
97 | + .good-num { | ||
98 | + width: 120px; | ||
99 | + text-align: center; | ||
100 | + color: #444; | ||
101 | + font-size: 32px; | ||
102 | + background-color: #fff; | ||
103 | + border: none; | ||
104 | + line-height: 74px; | ||
105 | + height: 74px; | ||
106 | + | ||
107 | + &:disabled { | ||
108 | + color: initial; | ||
109 | + } | ||
110 | + } | ||
111 | + } | ||
112 | + | ||
113 | + .count { | ||
114 | + width: 155px; | ||
115 | + text-align: right; | ||
116 | + margin-right: 30px; | ||
117 | + line-height: 80px; | ||
118 | + color: #999; | ||
119 | + } | ||
120 | +} | ||
121 | + | ||
122 | +.edit .bundle-nums { | ||
123 | + display: flex; | ||
124 | +} |
@@ -256,6 +256,7 @@ const procCartData = (data, isAdvanceCart) => { | @@ -256,6 +256,7 @@ const procCartData = (data, isAdvanceCart) => { | ||
256 | return { | 256 | return { |
257 | isBrand: pool.pool_type <= 1, | 257 | isBrand: pool.pool_type <= 1, |
258 | isPromotion: pool.pool_type === 2, | 258 | isPromotion: pool.pool_type === 2, |
259 | + isBundle: pool.pool_type === 3, | ||
259 | poolTitle: pool.pool_title, | 260 | poolTitle: pool.pool_title, |
260 | goods: _.get(pool, 'goods_list', []).map(good => { | 261 | goods: _.get(pool, 'goods_list', []).map(good => { |
261 | return formatCartGoods(good, isAdvanceCart); | 262 | return formatCartGoods(good, isAdvanceCart); |
-
Please register or login to post a comment