Showing
11 changed files
with
258 additions
and
9 deletions
@@ -179,11 +179,34 @@ class GroupService extends global.yoho.BaseModel { | @@ -179,11 +179,34 @@ class GroupService extends global.yoho.BaseModel { | ||
179 | return result; | 179 | return result; |
180 | } | 180 | } |
181 | 181 | ||
182 | - async newGroupIndex() { | 182 | + async newGroupIndex(tabIndex) { |
183 | let result = {}; | 183 | let result = {}; |
184 | + let tabCurrentIndex = tabIndex || 0; | ||
184 | 185 | ||
185 | result.index = await this.newIndex(); | 186 | result.index = await this.newIndex(); |
186 | - console.log(result.index); | 187 | + let filters = []; |
188 | + | ||
189 | + result.index.forEach(item => { | ||
190 | + if (item.template_name === 'guessLike') { | ||
191 | + filters = item.data; | ||
192 | + } | ||
193 | + }); | ||
194 | + | ||
195 | + console.log(filters); | ||
196 | + | ||
197 | + let indexFilter = filters[tabCurrentIndex] || {}; | ||
198 | + let query = {}; | ||
199 | + | ||
200 | + console.log(filters); | ||
201 | + console.log(indexFilter); | ||
202 | + indexFilter.query.forEach(item => { | ||
203 | + query = Object.assign(query, item); | ||
204 | + }); | ||
205 | + | ||
206 | + result.filterGroupList = await this.filterGroupList({ | ||
207 | + ...query, | ||
208 | + joinLimit: null | ||
209 | + }); | ||
187 | 210 | ||
188 | return result; | 211 | return result; |
189 | } | 212 | } |
@@ -286,6 +309,7 @@ class GroupService extends global.yoho.BaseModel { | @@ -286,6 +309,7 @@ class GroupService extends global.yoho.BaseModel { | ||
286 | val.sales_price = val.sales_price ? val.sales_price.toFixed(2) : ''; | 309 | val.sales_price = val.sales_price ? val.sales_price.toFixed(2) : ''; |
287 | val.market_price = val.market_price ? val.market_price.toFixed(2) : ''; | 310 | val.market_price = val.market_price ? val.market_price.toFixed(2) : ''; |
288 | val.collagePrice = val.collagePrice ? val.collagePrice.toFixed(2) : ''; | 311 | val.collagePrice = val.collagePrice ? val.collagePrice.toFixed(2) : ''; |
312 | + val.joinLimitStr = val.join_limit === 1 ? '邀新团' : '普通团'; | ||
289 | }); | 313 | }); |
290 | } | 314 | } |
291 | return finalResult; | 315 | return finalResult; |
@@ -20,9 +20,12 @@ | @@ -20,9 +20,12 @@ | ||
20 | {{#ifcond template_name "==" 'collageBuyPrdList'}} | 20 | {{#ifcond template_name "==" 'collageBuyPrdList'}} |
21 | {{> group/resources/collage-buy-prd-list}} | 21 | {{> group/resources/collage-buy-prd-list}} |
22 | {{/ifcond}} | 22 | {{/ifcond}} |
23 | + {{#ifcond template_name "==" 'guessLike'}} | ||
24 | + {{> group/resources/guess-like}} | ||
25 | + {{/ifcond}} | ||
23 | {{/each}} | 26 | {{/each}} |
24 | </div> | 27 | </div> |
25 | - <div id='fixedTab' class="tab-filter" data-group="{{#if tabs.joinLimit}}{{tabs.joinLimit}}{{/if}}"> | 28 | + {{!-- <div id='fixedTab' class="tab-filter" data-group="{{#if tabs.joinLimit}}{{tabs.joinLimit}}{{/if}}"> |
26 | {{#if tabs.showTab}} | 29 | {{#if tabs.showTab}} |
27 | <div class="tab group-tab"> | 30 | <div class="tab group-tab"> |
28 | <div class="tab-item"> | 31 | <div class="tab-item"> |
@@ -34,13 +37,12 @@ | @@ -34,13 +37,12 @@ | ||
34 | </div> | 37 | </div> |
35 | {{/if}} | 38 | {{/if}} |
36 | {{> group/resources/filter-tab}} | 39 | {{> group/resources/filter-tab}} |
37 | - | ||
38 | - </div> | ||
39 | - <div id="goodsContainer"> | 40 | + </div> --}} |
41 | + <div id="goodsContainer" class="goods-container"> | ||
40 | {{#if filterList.length}} | 42 | {{#if filterList.length}} |
41 | - <div class="goods-list"> | 43 | + <div class="new-goods-list"> |
42 | {{#each filterList}} | 44 | {{#each filterList}} |
43 | - {{> group/resources/filter-list-item}} | 45 | + {{> group/resources/new-index-filter-list-item}} |
44 | {{/each}} | 46 | {{/each}} |
45 | </div> | 47 | </div> |
46 | {{/if}} | 48 | {{/if}} |
1 | +<div class="new-index-filter-list-item" data-activity-id="{{activity_id}}" data-product-skn="{{product_skn}}"> | ||
2 | + <div class="group-product-header"> | ||
3 | + {{#ifcond joinLimitStr "==" "邀新团"}} | ||
4 | + <div class="new-group-product-left-icon"> | ||
5 | + <span class="new-group-product-left-icon-number"></span> | ||
6 | + </div> | ||
7 | + {{/ifcond}} | ||
8 | + {{#if @root.lazyLoad}} | ||
9 | + <img class="lazy new-group-product-image" data-original="{{image2 default_images w=400 h=390 q=60 mode=3}}" /> | ||
10 | + {{else}} | ||
11 | + <img class="new-group-product-image" src="{{image2 default_images w=400 h=390 q=60 mode=3}}" /> | ||
12 | + {{/if}} | ||
13 | + </div> | ||
14 | + <div class="new-group-product-info-bg"> | ||
15 | + <div class="new-group-product-name">{{product_name}}</div> | ||
16 | + <div class="new-group-price"> | ||
17 | + <div class="group-free-number"> | ||
18 | + <div class="new-group-free-post"></div> | ||
19 | + <div class="new-group-number forcefontsize10">已拼{{joinPeopleNum}}件</div> | ||
20 | + </div> | ||
21 | + <div class="new-group-prict-bg"> | ||
22 | + <div class="new-group-number-price"> | ||
23 | + <span class="new-group-people-numer">{{people_num}}人团</span> | ||
24 | + <span class="new-group-price-collage">{{collage_price_str}}</span> | ||
25 | + </div> | ||
26 | + <div class="new-market-button"> | ||
27 | + <span class="new-group-price-market">单人价{{market_price_str}}</span> | ||
28 | + <div class="go-group-product"></div> | ||
29 | + </div> | ||
30 | + </div> | ||
31 | + </div> | ||
32 | + </div> | ||
33 | +</div> |
![](/fe/yohobuywap-node/raw/c44577cb36a748fd2c94e6df986602c1476d71a9/public/img/activity/group/group/Rectangle@3x.png)
2.77 KB
![](/fe/yohobuywap-node/raw/c44577cb36a748fd2c94e6df986602c1476d71a9/public/img/activity/group/group/go-group@3x.png)
4.78 KB
![](/fe/yohobuywap-node/raw/c44577cb36a748fd2c94e6df986602c1476d71a9/public/img/activity/group/group/new-free-post@3x.png)
2.11 KB
1 | +.guess-like { | ||
2 | + overflow: hidden; | ||
3 | + height: 80px; | ||
4 | + | ||
5 | + .wapper { | ||
6 | + overflow-x: scroll; | ||
7 | + -ms-overflow-style: none; | ||
8 | + overflow: -moz-scrollbars-none; | ||
9 | + | ||
10 | + .guess-scroll { | ||
11 | + display: flex; | ||
12 | + flex-direction: row; | ||
13 | + flex-wrap: nowrap; | ||
14 | + width: auto; | ||
15 | + min-width: 100%; | ||
16 | + | ||
17 | + .guess-tab { | ||
18 | + min-width: 160px; | ||
19 | + } | ||
20 | + } | ||
21 | + } | ||
22 | + | ||
23 | + .wapper::-webkit-scrollbar { width: 0 !important; } | ||
24 | +} |
@@ -5,8 +5,10 @@ | @@ -5,8 +5,10 @@ | ||
5 | @import "floor/two-image"; | 5 | @import "floor/two-image"; |
6 | @import "floor/split-image"; | 6 | @import "floor/split-image"; |
7 | @import "floor/collage-buy-list"; | 7 | @import "floor/collage-buy-list"; |
8 | +@import "floor/guess-like"; | ||
8 | @import "tabs"; | 9 | @import "tabs"; |
9 | @import "filter-list"; | 10 | @import "filter-list"; |
11 | +@import "new-filter-list"; | ||
10 | 12 | ||
11 | .group { | 13 | .group { |
12 | .resources { | 14 | .resources { |
1 | +.goods-container { | ||
2 | + background: #f0f0f0; | ||
3 | +} | ||
4 | + | ||
5 | +.new-goods-list { | ||
6 | + display: flex; | ||
7 | + flex-direction: column; | ||
8 | + margin: 0 20px; | ||
9 | +} | ||
10 | + | ||
11 | +.new-index-filter-list-item:first-child { | ||
12 | + margin-top: 0; | ||
13 | +} | ||
14 | + | ||
15 | +.new-index-filter-list-item { | ||
16 | + background: white; | ||
17 | + flex: 1; | ||
18 | + display: flex; | ||
19 | + margin-bottom: 10px; | ||
20 | + margin-top: 10px; | ||
21 | + | ||
22 | + .new-group-product-image { | ||
23 | + margin: 20px; | ||
24 | + width: 162px; | ||
25 | + height: 220px; | ||
26 | + } | ||
27 | + | ||
28 | + .new-group-product-info-bg { | ||
29 | + flex-grow: 1; | ||
30 | + display: flex; | ||
31 | + flex-direction: column; | ||
32 | + justify-content: space-between; | ||
33 | + margin-bottom: 20px; | ||
34 | + } | ||
35 | + | ||
36 | + .new-group-product-name { | ||
37 | + margin-top: 20px; | ||
38 | + margin-right: 20px; | ||
39 | + font-family: PingFang-SC-Regular, sans-serif; | ||
40 | + color: #222; | ||
41 | + letter-spacing: 0; | ||
42 | + line-height: 36px; | ||
43 | + height: 56px; | ||
44 | + font-size: 24px; | ||
45 | + display: -webkit-box; | ||
46 | + overflow: hidden; | ||
47 | + text-overflow: ellipsis; | ||
48 | + word-wrap: break-word; | ||
49 | + white-space: normal !important; | ||
50 | + -webkit-line-clamp: 2; | ||
51 | + -webkit-box-orient: vertical; | ||
52 | + } | ||
53 | + | ||
54 | + .new-group-free-post { | ||
55 | + width: 60px; | ||
56 | + height: 38px; | ||
57 | + background: url("img/activity/group/group/new-free-post@3x.png") no-repeat; | ||
58 | + background-size: contain; | ||
59 | + margin-right: 20px; | ||
60 | + } | ||
61 | + | ||
62 | + .new-market-button { | ||
63 | + display: flex; | ||
64 | + flex-direction: row; | ||
65 | + justify-content: space-between; | ||
66 | + align-items: flex-end; | ||
67 | + } | ||
68 | + | ||
69 | + .go-group-product { | ||
70 | + width: 160px; | ||
71 | + height: 60px; | ||
72 | + background: url("img/activity/group/group/go-group@3x.png") no-repeat; | ||
73 | + background-size: contain; | ||
74 | + left: -5px; | ||
75 | + } | ||
76 | + | ||
77 | + .group-free-number { | ||
78 | + display: flex; | ||
79 | + flex-direction: row; | ||
80 | + align-items: flex-start; | ||
81 | + } | ||
82 | + | ||
83 | + .new-group-number { | ||
84 | + font-family: PingFang-SC-Regular, sans-serif; | ||
85 | + letter-spacing: 0; | ||
86 | + box-sizing: border-box; | ||
87 | + height: 30px; | ||
88 | + line-height: 30px; | ||
89 | + padding-left: 20px; | ||
90 | + padding-right: 20px; | ||
91 | + border-radius: 15px; | ||
92 | + border: 0.5px #222 solid; | ||
93 | + color: #222; | ||
94 | + } | ||
95 | + | ||
96 | + .forcefontsize10 { | ||
97 | + display: inline-block; | ||
98 | + font-size: 12px; | ||
99 | + -webkit-text-size-adjust: none; | ||
100 | + transform: scale(0.83, 0.83); | ||
101 | + } | ||
102 | + | ||
103 | + .new-group-prict-bg { | ||
104 | + display: flex; | ||
105 | + flex-direction: column; | ||
106 | + font-size: 22px; | ||
107 | + } | ||
108 | + | ||
109 | + .new-group-price { | ||
110 | + display: flex; | ||
111 | + flex-direction: column; | ||
112 | + justify-content: space-between; | ||
113 | + flex-grow: 1; | ||
114 | + margin-right: 20px; | ||
115 | + } | ||
116 | + | ||
117 | + .new-group-number-price { | ||
118 | + color: #d0021b; | ||
119 | + } | ||
120 | + | ||
121 | + .new-group-price-collage { | ||
122 | + margin-left: 20px; | ||
123 | + font-size: 36px; | ||
124 | + } | ||
125 | + | ||
126 | + .new-group-price-market { | ||
127 | + font-family: PingFang-SC-Regular, sans-serif; | ||
128 | + font-size: 12px; | ||
129 | + color: #b0b0b0; | ||
130 | + } | ||
131 | + | ||
132 | + .new-group-product-left-icon { | ||
133 | + position: absolute; | ||
134 | + top: 40px; | ||
135 | + width: 88px; | ||
136 | + height: 40px; | ||
137 | + left: 0; | ||
138 | + font-size: 22px; | ||
139 | + background: url("img/activity/group/group/Rectangle@3x.png") no-repeat; | ||
140 | + background-size: contain; | ||
141 | + } | ||
142 | + | ||
143 | + .new-group-product-left-icon-number { | ||
144 | + display: inline-block; | ||
145 | + color: #fff; | ||
146 | + font-size: 22px; | ||
147 | + margin-left: 12px; | ||
148 | + margin-top: 5px; | ||
149 | + } | ||
150 | +} |
-
Please register or login to post a comment