jufubao-mall 2.0.20-beta4 → 2.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/CusProduct/CusProduct.vue +0 -1
- package/src/components/JfbMallBrandHome/JfbMallBrandHome.vue +19 -15
- package/src/components/JfbMallBrandWall/Attr.js +449 -10
- package/src/components/JfbMallBrandWall/JfbMallBrandWall.vue +308 -775
- package/src/components/JfbMallHomeProductList/JfbMallHomeProductList.vue +1 -3
- package/src/components/JfbMallHomeProductList/cusAttr/content.js +2 -1
- package/src/components/JfbMallProductInfo/cusAttr/content.js +1 -1
- package/src/components/JfbMallProductInfoV2/Api.js +1 -1
- package/src/components/JfbMallProductInfoV2/Attr.js +41 -134
- package/src/components/JfbMallProductInfoV2/JfbMallProductInfoV2.vue +126 -135
- package/src/components/JfbMallProductInfoV2/Mock.js +10 -38
- package/src/components/JfbMallProductList/Attr.js +762 -7
- package/src/components/JfbMallProductList/JfbMallProductList.vue +793 -750
- package/src/components/JfbMallProductList/Mock.js +133 -165
- package/src/components/JfbMallProductList/PosterAttr.js +327 -0
- package/src/components/JfbMallProductList/ProductAttr.js +164 -0
- package/src/components/JfbMallProductList/XdCateV1.vue +120 -308
- package/src/components/JfbMallProductList/XdCateV2.vue +73 -122
- package/src/components/JfbMallProductList/XdQueryBrand.vue +150 -0
- package/src/components/JfbMallProductList/XdQueryFilter.vue +76 -94
- package/src/components/JfbMallProductList/XdQuerySort.vue +109 -100
- package/src/components/JfbMallProductList/{cusAttr/advanced.js → advanced.js} +4 -12
- package/src/components/JfbMallProductList/{cusAttr/style.js → style.js} +50 -15
- package/src/components/JfbMallRecommendProduct/Attr.js +366 -8
- package/src/components/JfbMallRecommendProduct/JfbMallRecommendProduct.vue +187 -218
- package/src/components/JfbMallRecommendProduct/Mock.js +693 -236
- package/src/components/JfbMallResourceShopList/Mock.js +6 -4
- package/src/components/JfbMallTestNormal/JfbMallTestNormal.vue +2 -23
- package/src/mixins/componentsMixins.js +0 -1
- package/src/mixins/productCompMixins.js +19 -29
- package/src/components/JfbMallBrandWall/cusAttr/advanced.js +0 -61
- package/src/components/JfbMallBrandWall/cusAttr/brand.js +0 -341
- package/src/components/JfbMallBrandWall/cusAttr/content.js +0 -251
- package/src/components/JfbMallBrandWall/cusAttr/style.js +0 -252
- package/src/components/JfbMallBrandWall/cusAttr/tab.js +0 -472
- package/src/components/JfbMallProductList/ComFilterQuery.vue +0 -945
- package/src/components/JfbMallProductList/XdQueryCommon.vue +0 -189
- package/src/components/JfbMallProductList/cateMixins.js +0 -84
- package/src/components/JfbMallProductList/cusAttr/content.js +0 -434
- package/src/components/JfbMallProductList/cusAttr/filter.js +0 -330
- package/src/components/JfbMallProductList/cusAttr/font.js +0 -114
- package/src/components/JfbMallProductList/cusAttr/icon.js +0 -267
- package/src/components/JfbMallRecommendProduct/cusAttr/advanced.js +0 -79
- package/src/components/JfbMallRecommendProduct/cusAttr/content.js +0 -202
- package/src/components/JfbMallRecommendProduct/cusAttr/style.js +0 -591
- package/src/components/JfbMallTestNormal/data.js +0 -152
|
@@ -1,102 +1,67 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="xd-cate_v1" id="xd-cate_v1"
|
|
3
|
-
<view v-if="!
|
|
2
|
+
<view class="xd-cate_v1" id="xd-cate_v1">
|
|
3
|
+
<view v-if="!isPreview && isShowCategory && showParent" class="category_wrap-mask" :style="{height: '110rpx'}" ></view>
|
|
4
4
|
<view
|
|
5
|
-
|
|
6
|
-
:
|
|
7
|
-
|
|
8
|
-
<view v-if="showParent && isShowCategory" >
|
|
9
|
-
<view class="tab_wrap" :style="[{backgroundColor:titleBgcColor}]">
|
|
10
|
-
<cus-tab
|
|
11
|
-
class="xd-tab"
|
|
12
|
-
v-if="transformNavList.length"
|
|
13
|
-
:height="88"
|
|
14
|
-
:bg-color="titleBgcColor"
|
|
15
|
-
:line-bottom="12"
|
|
16
|
-
:spacing="40"
|
|
17
|
-
:tabIndex="tabIndex"
|
|
18
|
-
:footer-style="tabStyle['navStyle']"
|
|
19
|
-
:list="transformNavList"
|
|
20
|
-
:color="tabStyle['titleColor']"
|
|
21
|
-
:act-color="tabStyle['titleActColor']"
|
|
22
|
-
:font-size="tabStyle['titleFontSize']"
|
|
23
|
-
:act-font-size="tabStyle['titleActFontSize']"
|
|
24
|
-
:font-weight="tabStyle['titleFontWeight']"
|
|
25
|
-
:act-font-weight="tabStyle['titleActFontWeight']"
|
|
26
|
-
:no-border="false"
|
|
27
|
-
@onTab="handleTab"
|
|
28
|
-
></cus-tab>
|
|
29
|
-
</view>
|
|
30
|
-
</view>
|
|
5
|
+
v-if="showParent && isShowCategory"
|
|
6
|
+
:class="{category_wrap: !isPreview, category_wrap_preview: isPreview}"
|
|
7
|
+
:style="{top:(layoutInfo.top) + 'rpx'}">
|
|
31
8
|
<view
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
:style="[subCategoryStyleComp]"
|
|
9
|
+
class="tab_wrap"
|
|
10
|
+
:style="{background: titleBgcColor,borderBottom: boxTitleBorder}"
|
|
35
11
|
>
|
|
36
|
-
<
|
|
37
|
-
:
|
|
38
|
-
:
|
|
39
|
-
|
|
40
|
-
:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
<image :src="sub.category_icon" style="width:100%;height:100%"/>
|
|
54
|
-
</view>
|
|
55
|
-
</view>
|
|
56
|
-
<view
|
|
57
|
-
class="sub_name"
|
|
58
|
-
:style="[sub.category_id === (['child','parentNew'].includes(showType)? uiPid:uiCateId )?level2ActNameComp:level2NameComp]"
|
|
59
|
-
>{{sub.category_name}}</view>
|
|
60
|
-
</view>
|
|
61
|
-
</view>
|
|
62
|
-
</scroll-view>
|
|
12
|
+
<xd-tab
|
|
13
|
+
:key="refreshNav"
|
|
14
|
+
:height="110"
|
|
15
|
+
:tabIndex="tabIndex"
|
|
16
|
+
:list="transformNavList"
|
|
17
|
+
showFooterLine
|
|
18
|
+
class="tab-box"
|
|
19
|
+
:color="tabStyle['titleColor']"
|
|
20
|
+
:act-color="tabStyle['titleActColor']"
|
|
21
|
+
:font-size="tabStyle['titleFontSize']"
|
|
22
|
+
:act-font-size="tabStyle['titleActFontSize']"
|
|
23
|
+
:font-weight="tabStyle['titleFontWeight']"
|
|
24
|
+
:act-font-weight="tabStyle['titleActFontWeight']"
|
|
25
|
+
:no-border="false"
|
|
26
|
+
:bg-color="titleBgcColor"
|
|
27
|
+
@onTab="(item,index) => handleTab(item,index, 'onTab')"
|
|
28
|
+
></xd-tab>
|
|
63
29
|
</view>
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
30
|
+
</view>
|
|
31
|
+
<view
|
|
32
|
+
class="sub_category_list-box"
|
|
33
|
+
:style="[subCategoryStyleComp]"
|
|
34
|
+
>
|
|
35
|
+
<scroll-view
|
|
36
|
+
v-if="subCategory.length"
|
|
37
|
+
:scroll-into-view="toView"
|
|
38
|
+
:scroll-with-animation="true"
|
|
39
|
+
scroll-x="true"
|
|
40
|
+
:key="sub_category_list"
|
|
41
|
+
class="sub_category_list"
|
|
69
42
|
>
|
|
70
|
-
<
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
@click="handleCateClick(item, 2)"
|
|
82
|
-
><view :style="[uiCateId == item.category_id?compActSubStyle: compSubStyle]">{{item.category_name|fCutLen}}</view></view>
|
|
83
|
-
</scroll-view>
|
|
84
|
-
</view>
|
|
85
|
-
<!--parentNew-->
|
|
43
|
+
<view v-for="(sub,i) in subCategory" :key="sub.category_id" class="sub_cate">
|
|
44
|
+
<view :id="'cate-scroll__index-'+i" @click="handleCateClick(sub)">
|
|
45
|
+
<view :style="[subTitleIcon]" class="sub_icon">
|
|
46
|
+
<image :src="sub.category_icon" style="width:100%;height:100%"/>
|
|
47
|
+
</view>
|
|
48
|
+
<view class="sub_name" :style="{color: sub.category_id == uiCateId ?mainColor:level2Color}">
|
|
49
|
+
{{sub.category_name}}
|
|
50
|
+
</view>
|
|
51
|
+
</view>
|
|
52
|
+
</view>
|
|
53
|
+
</scroll-view>
|
|
86
54
|
</view>
|
|
87
55
|
</view>
|
|
88
56
|
</template>
|
|
89
57
|
|
|
90
58
|
<script>
|
|
91
|
-
import
|
|
59
|
+
import XdTab from "@/components/XdTab/XdTab.vue"
|
|
92
60
|
import getServiceUrl from "@/common/getServiceUrl";
|
|
93
|
-
import cateMixins from "./cateMixins";
|
|
94
|
-
import Color from "color";
|
|
95
61
|
export default {
|
|
96
62
|
components: {
|
|
97
|
-
|
|
63
|
+
XdTab
|
|
98
64
|
},
|
|
99
|
-
mixins:[cateMixins],
|
|
100
65
|
props: {
|
|
101
66
|
layoutInfo: {
|
|
102
67
|
type: Object,
|
|
@@ -131,8 +96,8 @@ export default {
|
|
|
131
96
|
default: '#fff'
|
|
132
97
|
},
|
|
133
98
|
boxTitleBorder: {
|
|
134
|
-
type: String
|
|
135
|
-
default: '
|
|
99
|
+
type: String,
|
|
100
|
+
default: '1px solid #e5e5e5'
|
|
136
101
|
},
|
|
137
102
|
level2BgcColor: {
|
|
138
103
|
type: String,
|
|
@@ -178,20 +143,15 @@ export default {
|
|
|
178
143
|
orgNavList:[], //元素数据(包含全部分类)
|
|
179
144
|
refreshNav:'refreshNav',
|
|
180
145
|
|
|
146
|
+
childHeight: 0,
|
|
181
147
|
uiPid: "",
|
|
182
148
|
uiCateId: "",
|
|
183
149
|
uiIsFixed: false,
|
|
184
|
-
fixedTop: 0,
|
|
150
|
+
fixedTop: 0,
|
|
185
151
|
|
|
186
152
|
initPid: "",
|
|
187
153
|
}
|
|
188
154
|
},
|
|
189
|
-
filters:{
|
|
190
|
-
fCutLen(str){
|
|
191
|
-
if(str.length > 5) return str.substring(0,5) + '...'
|
|
192
|
-
return str
|
|
193
|
-
}
|
|
194
|
-
},
|
|
195
155
|
watch: {
|
|
196
156
|
isFixed(value){
|
|
197
157
|
this.uiIsFixed = value;
|
|
@@ -227,84 +187,28 @@ export default {
|
|
|
227
187
|
}
|
|
228
188
|
},
|
|
229
189
|
computed: {
|
|
230
|
-
categoryWarperMaskComp(){
|
|
231
|
-
let height = 0;
|
|
232
|
-
switch(this.showType){
|
|
233
|
-
case 'all' :
|
|
234
|
-
height += 88; //一级菜单
|
|
235
|
-
if(this.imageIconList.length > 0) height = height + 176 //二级菜单
|
|
236
|
-
//语句
|
|
237
|
-
break;
|
|
238
|
-
case 'parent' :
|
|
239
|
-
height = 88;
|
|
240
|
-
break;
|
|
241
|
-
case 'parentNew' :
|
|
242
|
-
height += 176; //一级菜单
|
|
243
|
-
if(this.subCategory.length > 0) height = height + 92 //二级菜单
|
|
244
|
-
break;
|
|
245
|
-
case 'child' :
|
|
246
|
-
height = 176
|
|
247
|
-
break;
|
|
248
|
-
default:
|
|
249
|
-
height = 88
|
|
250
|
-
}
|
|
251
|
-
this.fixedTop = height;
|
|
252
|
-
this.$emit('update:fixedTop',height)
|
|
253
|
-
return {height: height + 'rpx'}
|
|
254
|
-
},
|
|
255
|
-
subTitleInIcon(){
|
|
256
|
-
let {iconWdith, iconBgColor} = this.tabStyle
|
|
257
|
-
return {
|
|
258
|
-
width: iconWdith + 'rpx',
|
|
259
|
-
height: iconWdith + 'rpx',
|
|
260
|
-
backgroundColor: iconBgColor
|
|
261
|
-
}
|
|
262
|
-
},
|
|
263
190
|
//是否展示父级分类
|
|
264
191
|
showParent(){
|
|
265
|
-
|
|
266
|
-
|
|
192
|
+
if(this.showType === 'all') return true;
|
|
193
|
+
else{//只展示子级
|
|
194
|
+
if(this.isPreview) return false;
|
|
195
|
+
//有父级,则只展示子级
|
|
196
|
+
return !this.initPid;
|
|
197
|
+
}
|
|
267
198
|
},
|
|
268
199
|
subCategoryStyleComp(){
|
|
269
|
-
|
|
200
|
+
return {
|
|
270
201
|
backgroundColor: this.level2BgcColor,
|
|
271
202
|
color: this.level2Color,
|
|
203
|
+
border: this.tabStyle.titleBorder,
|
|
272
204
|
}
|
|
273
|
-
|
|
274
|
-
let level2BgcColor = this.level2BgcColor || '#fff';
|
|
275
|
-
if(Color(level2BgcColor).isDark()) level2BgcColor = Color(level2BgcColor).lighten(0.8).toString();
|
|
276
|
-
else if(Color(level2BgcColor).isLight()) level2BgcColor = Color(level2BgcColor).darken(0.03).toString();
|
|
277
|
-
|
|
278
|
-
if(this.showParent && this.isShowCategory){
|
|
279
|
-
temp = Object.assign({},temp, {
|
|
280
|
-
borderTop:`2rpx solid ${level2BgcColor}`,
|
|
281
|
-
boxSizing: 'border-box'
|
|
282
|
-
})
|
|
283
|
-
}
|
|
284
|
-
return temp
|
|
285
205
|
},
|
|
286
|
-
|
|
287
|
-
if(['child','parentNew'].includes(this.showType)) return this.transformNavList;
|
|
288
|
-
else return this.subCategory;
|
|
289
|
-
},
|
|
290
|
-
compSubStyle(){
|
|
291
|
-
if(this.$xdUniHelper.isEmpty(this.tabStyle)) return {}
|
|
206
|
+
subTitleIcon(){
|
|
292
207
|
return {
|
|
293
|
-
|
|
208
|
+
borderRadius: this.tabStyle.subTitleRadius,
|
|
294
209
|
backgroundColor: '#fff',
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
compActSubStyle(){
|
|
298
|
-
if(this.$xdUniHelper.isEmpty(this.tabStyle)) return {}
|
|
299
|
-
return {
|
|
300
|
-
color: this.tabStyle.titleActColor,
|
|
301
|
-
backgroundColor: this.tabStyle.titleActBgColor,
|
|
302
|
-
}
|
|
303
|
-
},
|
|
304
|
-
categoryWaperComp(){
|
|
305
|
-
return {
|
|
306
|
-
position:this.$configProject.isPreview?'absolute':'fixed',
|
|
307
|
-
top: this.$configProject.isPreview ? 0 : (this.layoutInfo.top + 'rpx')
|
|
210
|
+
border: this.tabStyle.subTitleIconBorder,
|
|
211
|
+
boxShadow:this.tabStyle.subTitleIconShadow
|
|
308
212
|
}
|
|
309
213
|
}
|
|
310
214
|
},
|
|
@@ -317,7 +221,9 @@ export default {
|
|
|
317
221
|
this.orgNavList = this.$xdUniHelper.cloneDeep(this.navList);
|
|
318
222
|
this.init(this.$xdUniHelper.cloneDeep(this.orgNavList),this.uiPid);
|
|
319
223
|
},
|
|
320
|
-
|
|
224
|
+
mounted(){
|
|
225
|
+
this.getChildHeight();
|
|
226
|
+
},
|
|
321
227
|
methods: {
|
|
322
228
|
init(navList, pid){
|
|
323
229
|
if(navList.length === 0) return;
|
|
@@ -325,66 +231,49 @@ export default {
|
|
|
325
231
|
//预览模式生效
|
|
326
232
|
if(this.isPreview) {
|
|
327
233
|
navList = navList.filter(item=>{
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
234
|
+
if(this.showType === 'all') return true
|
|
235
|
+
else {
|
|
236
|
+
return item.category_id !== -1
|
|
237
|
+
}
|
|
332
238
|
});
|
|
333
239
|
}
|
|
334
240
|
|
|
335
241
|
let tabIndex = -1;
|
|
336
242
|
if(pid) tabIndex = navList.findIndex(item => Number(item.category_id) === Number(pid));
|
|
337
243
|
this.tabIndex = tabIndex === -1 ? 0 : tabIndex;
|
|
338
|
-
|
|
339
|
-
//需要显示二级菜单操作
|
|
340
|
-
if(['all', 'child','parentNew'].includes(this.showType)) {
|
|
341
|
-
this.subCategory = navList[this.tabIndex].children;
|
|
342
|
-
}
|
|
343
|
-
|
|
244
|
+
this.subCategory = navList[this.tabIndex].children;
|
|
344
245
|
this.transformNavList = navList;
|
|
345
246
|
this.refreshNav = Date.now()
|
|
346
247
|
|
|
347
248
|
//设置选中
|
|
348
249
|
this.$nextTick(() => {
|
|
349
250
|
if(this.uiCateId){
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
if(cateIndex !== -1) this.toView = `cate-scroll__index-${cateIndex}`;
|
|
353
|
-
}
|
|
354
|
-
else if(this.showType === 'parentNew') {
|
|
355
|
-
let cateItem = this.subCategory.find(item => Number(item.category_id) === Number(this.uiCateId));
|
|
356
|
-
if(cateItem) this.toView = `cate-scroll__index-${cateItem.category_id}`;
|
|
357
|
-
}
|
|
251
|
+
let cateIndex = this.subCategory.findIndex(item => Number(item.category_id) === Number(this.uiCateId));
|
|
252
|
+
this.toView = `cate-scroll__index-${cateIndex}`;
|
|
358
253
|
}
|
|
359
254
|
})
|
|
255
|
+
this.getFixedTop();
|
|
360
256
|
},
|
|
361
257
|
|
|
362
258
|
async handleTab(item,index, name){
|
|
363
|
-
//选择当前分类处理
|
|
364
|
-
if(index === this.tabIndex) return;
|
|
365
259
|
this.tabIndex = index;
|
|
366
|
-
|
|
367
|
-
//展示所有功能
|
|
368
260
|
if(index > -1){
|
|
369
261
|
if(Number(this.uiPid) === Number(item.category_id)) {
|
|
370
262
|
return false;
|
|
371
263
|
}
|
|
372
264
|
else{
|
|
373
265
|
this.uiPid = item.category_id;
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
if(['all', 'child'].includes(this.showType)) {
|
|
377
|
-
await this.handleSubNavList(item);
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
this.$emit("onCateChange", {
|
|
381
|
-
pid: this.uiPid,
|
|
382
|
-
});
|
|
266
|
+
await this.handleSubNavList(item);
|
|
267
|
+
this.getFixedTop();
|
|
383
268
|
}
|
|
384
269
|
}
|
|
270
|
+
if(name === 'onTab') {
|
|
271
|
+
this.$emit("onCateChange", {
|
|
272
|
+
pid: this.uiPid,
|
|
273
|
+
});
|
|
274
|
+
}
|
|
385
275
|
|
|
386
|
-
this.sub_category_list = Date.now()
|
|
387
|
-
|
|
276
|
+
this.sub_category_list = Date.now()
|
|
388
277
|
},
|
|
389
278
|
|
|
390
279
|
handleSubNavList(parent) {
|
|
@@ -410,54 +299,35 @@ export default {
|
|
|
410
299
|
})
|
|
411
300
|
},
|
|
412
301
|
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
if(this.showType === 'all') this.clickClidItem(sub);
|
|
422
|
-
|
|
423
|
-
//当前布局为v3时候
|
|
424
|
-
if(this.showType === 'child') this.clickParentItem(sub, false);
|
|
425
|
-
|
|
426
|
-
//当前布局为v4时候
|
|
427
|
-
if(this.showType === 'parentNew') {
|
|
428
|
-
//点击父级分类
|
|
429
|
-
if(type === 1) this.clickParentItem(sub);
|
|
430
|
-
//点击子类操作
|
|
431
|
-
if(type === 2) this.clickClidItem(sub);
|
|
432
|
-
}
|
|
302
|
+
getFixedTop(){
|
|
303
|
+
this.$nextTick(() => {
|
|
304
|
+
this.$xdUniHelper.getWindowHeight(['.sub_category_list-box'], this)
|
|
305
|
+
.then(res => {
|
|
306
|
+
this.fixedTop = res['.sub_category_list-box'].height;
|
|
307
|
+
})
|
|
308
|
+
.catch()
|
|
309
|
+
})
|
|
433
310
|
},
|
|
434
311
|
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
}
|
|
441
|
-
else {
|
|
442
|
-
this.uiPid = sub.category_id;
|
|
443
|
-
if(isLoadTwo) await this.handleSubNavList(sub);
|
|
312
|
+
handleCateClick(sub){
|
|
313
|
+
if(Number(this.uiCateId) === Number(sub.category_id)){
|
|
314
|
+
this.uiCateId = "";
|
|
315
|
+
}else{
|
|
316
|
+
this.uiCateId = sub.category_id;
|
|
444
317
|
}
|
|
445
|
-
|
|
446
318
|
this.$emit("onCateChange", {
|
|
447
319
|
pid: this.uiPid,
|
|
320
|
+
cateId: this.uiCateId
|
|
448
321
|
});
|
|
449
322
|
},
|
|
450
323
|
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
pid: this.uiPid,
|
|
459
|
-
cateId: this.uiCateId
|
|
460
|
-
});
|
|
324
|
+
getChildHeight(){
|
|
325
|
+
|
|
326
|
+
this.$xdUniHelper.getWindowHeight(['.xd-cate_v1'], this)
|
|
327
|
+
.then(res => {
|
|
328
|
+
this.childHeight = res['.xd-cate_v1'].height / this.$rpxNum;
|
|
329
|
+
})
|
|
330
|
+
.catch()
|
|
461
331
|
}
|
|
462
332
|
}
|
|
463
333
|
}
|
|
@@ -465,11 +335,6 @@ export default {
|
|
|
465
335
|
|
|
466
336
|
<style lang="less" scoped>
|
|
467
337
|
.xd-cate_v1 {
|
|
468
|
-
.category_wraper {
|
|
469
|
-
position: fixed;
|
|
470
|
-
left:0;
|
|
471
|
-
right: 0;
|
|
472
|
-
}
|
|
473
338
|
.tab_wrap{
|
|
474
339
|
height: 100%;
|
|
475
340
|
|
|
@@ -477,63 +342,42 @@ export default {
|
|
|
477
342
|
height: 100%;
|
|
478
343
|
}
|
|
479
344
|
}
|
|
345
|
+
.category_wrap{
|
|
346
|
+
position: fixed;
|
|
347
|
+
left:0;
|
|
348
|
+
right: 0;
|
|
349
|
+
height: 110rpx;
|
|
350
|
+
z-index: 800;
|
|
351
|
+
}
|
|
352
|
+
.category_wrap_preview {
|
|
353
|
+
height: 110rpx;
|
|
354
|
+
}
|
|
480
355
|
|
|
481
356
|
.sub_category_list-box {
|
|
482
357
|
border-left-width: 0!important;
|
|
483
358
|
border-right-width: 0!important;
|
|
484
359
|
border-bottom-width: 0!important;
|
|
485
|
-
height: 176rpx;
|
|
486
360
|
|
|
487
361
|
.sub_category_list {
|
|
488
362
|
white-space: nowrap;
|
|
489
|
-
height: 100%;
|
|
490
363
|
|
|
491
364
|
.sub_cate {
|
|
492
365
|
display: inline-block;
|
|
493
|
-
margin:
|
|
366
|
+
margin: 20rpx;
|
|
494
367
|
text-align: center;
|
|
495
|
-
width:
|
|
496
|
-
height: 144rpx;
|
|
368
|
+
max-width: 130rpx;
|
|
497
369
|
flex-shrink: 0;
|
|
498
|
-
&:last-child {
|
|
499
|
-
margin-right: 32rpx;
|
|
500
|
-
}
|
|
501
|
-
&:first-child {
|
|
502
|
-
margin-left: 32rpx;
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
&.icon > view {
|
|
506
|
-
display: flex;
|
|
507
|
-
justify-content: center;
|
|
508
|
-
align-content: space-between;
|
|
509
|
-
height: 100%;
|
|
510
|
-
width: 100%;
|
|
511
|
-
flex-flow: wrap;
|
|
512
|
-
|
|
513
|
-
}
|
|
514
370
|
|
|
515
371
|
.sub_icon {
|
|
516
|
-
width:
|
|
517
|
-
height:
|
|
518
|
-
margin: 0 auto;
|
|
372
|
+
width: 120rpx;
|
|
373
|
+
height: 120rpx;
|
|
519
374
|
overflow: hidden;
|
|
520
|
-
box-sizing: border-box;
|
|
521
|
-
display: flex;
|
|
522
|
-
justify-content: center;
|
|
523
|
-
align-items: center;
|
|
524
|
-
& > view {
|
|
525
|
-
background-color: #fff;
|
|
526
|
-
width: calc(100% - var(--sub-icon-border)*2);
|
|
527
|
-
height: calc(100% - var(--sub-icon-border)*2);
|
|
528
|
-
border: var(--sub-icon-border) solid #fff;
|
|
529
|
-
border-radius: var(--sub-icon-w-radius);
|
|
530
|
-
overflow: hidden;
|
|
531
|
-
}
|
|
532
375
|
}
|
|
533
376
|
|
|
534
377
|
.sub_name {
|
|
535
378
|
font-size: 24rpx;
|
|
536
379
|
color: #333333;
|
|
380
|
+
font-weight: 400;
|
|
537
381
|
margin-top: 8rpx;
|
|
538
382
|
.uni-one-cut(36);
|
|
539
383
|
line-height: 36rpx;
|
|
@@ -541,37 +385,5 @@ export default {
|
|
|
541
385
|
}
|
|
542
386
|
}
|
|
543
387
|
}
|
|
544
|
-
|
|
545
|
-
.cate_child{
|
|
546
|
-
width: 100%;
|
|
547
|
-
box-sizing: border-box;
|
|
548
|
-
padding: 24rpx 0 8rpx 0;
|
|
549
|
-
.sub_cate_scroll{
|
|
550
|
-
white-space: nowrap;
|
|
551
|
-
width: 100%;
|
|
552
|
-
|
|
553
|
-
.sub_cate{
|
|
554
|
-
background-color: #fff;
|
|
555
|
-
height: 60rpx;
|
|
556
|
-
line-height: 60rpx;
|
|
557
|
-
display: inline-block;
|
|
558
|
-
border-radius: 30rpx;
|
|
559
|
-
margin: 0 0 0 32rpx;
|
|
560
|
-
&:last-child {
|
|
561
|
-
margin-right: 32rpx;
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
& > view {
|
|
565
|
-
padding: 0 24rpx;
|
|
566
|
-
font-size: 24rpx;
|
|
567
|
-
font-weight: 400;
|
|
568
|
-
border-radius: 30rpx;
|
|
569
|
-
color: #666;
|
|
570
|
-
min-width: 90rpx;
|
|
571
|
-
text-align: center;
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
388
|
}
|
|
577
389
|
</style>
|