jufubao-mall 2.0.20-beta4 → 2.0.20-beta6
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/JfbMallBrandWall/JfbMallBrandWall.vue +19 -16
- package/src/components/JfbMallBrandWall/cusAttr/tab.js +1 -2
- package/src/components/JfbMallProductInfoV2/JfbMallProductInfoV2.vue +1 -1
- package/src/components/JfbMallProductList/Api.js +4 -4
- package/src/components/JfbMallProductList/ComFilterQuery.vue +12 -7
- package/src/components/JfbMallProductList/JfbMallProductList.vue +57 -19
- package/src/components/JfbMallProductList/XdCateV1.vue +45 -22
- package/src/components/JfbMallProductList/XdCateV2.vue +8 -3
- package/src/components/JfbMallProductList/cateMixins.js +15 -2
- package/src/components/JfbMallProductList/cusAttr/content.js +34 -3
- package/src/components/JfbMallProductList/cusAttr/filter.js +6 -3
- package/src/components/JfbMallProductList/cusAttr/icon.js +35 -4
- package/src/components/JfbMallRecommendProduct/cusAttr/style.js +4 -1
package/package.json
CHANGED
|
@@ -92,7 +92,11 @@
|
|
|
92
92
|
<template v-if="brand.isEmpty === undefined">
|
|
93
93
|
<view
|
|
94
94
|
class="brand_icon"
|
|
95
|
-
:class="
|
|
95
|
+
:class="{
|
|
96
|
+
'brand_icon3': (layout === 'v1' && contentCell===3) || layout === 'v2',
|
|
97
|
+
'brand_icon4': layout === 'v1' && contentCell===4,
|
|
98
|
+
'brand_icon5': layout === 'v1' && contentCell===5 ,
|
|
99
|
+
}"
|
|
96
100
|
:style="[brandItemIconStyle]
|
|
97
101
|
">
|
|
98
102
|
<image v-if="brand.status===true" @error="brand.status = false" :src="brand.brand_icon" mode="aspectFill"></image>
|
|
@@ -281,7 +285,6 @@
|
|
|
281
285
|
outWdith += 172;
|
|
282
286
|
if(this.titleBorderWidth) outWdith += this.titleBorderWidth * 2;
|
|
283
287
|
if(this.titleBorderWidth === 0 && this.vStyle === 'v1') outWdith +=2
|
|
284
|
-
outWdith += this.getPMValue(this.tabPadding, 'RL', 0);
|
|
285
288
|
}
|
|
286
289
|
outWdith += this.getPMValue(this.listMargin, 'RL',0);
|
|
287
290
|
outWdith += this.getPMValue(this.listPadding, 'RL',0);
|
|
@@ -296,12 +299,6 @@
|
|
|
296
299
|
marginTop: this.bindSize + 'rpx'
|
|
297
300
|
}
|
|
298
301
|
},
|
|
299
|
-
brandIconClass(){
|
|
300
|
-
let cssName = {};
|
|
301
|
-
if(this.layout === 'v1') cssName = {brand_icon3: this.contentCell === 3,brand_icon4: this.contentCell === 4,brand_icon5: this.contentCell === 5};
|
|
302
|
-
if(this.layout === 'v2') cssName = {brand_icon5: true}
|
|
303
|
-
return cssName
|
|
304
|
-
},
|
|
305
302
|
brandItemIconStyle(){
|
|
306
303
|
return {
|
|
307
304
|
width: this.getItemWH,
|
|
@@ -394,7 +391,7 @@
|
|
|
394
391
|
},
|
|
395
392
|
tabListComp(){
|
|
396
393
|
let temp = {};
|
|
397
|
-
if(this.layout
|
|
394
|
+
if(['v1','v2'].includes(this.layout)) {
|
|
398
395
|
temp['paddingLeft'] = (this.tabPadding.left || 0) + 'rpx';
|
|
399
396
|
temp['paddingRight'] = (this.tabPadding.right || 0) + 'rpx';
|
|
400
397
|
temp['paddingBottom'] = (this.tabPadding.bottom || 0) + 'rpx';
|
|
@@ -480,13 +477,17 @@
|
|
|
480
477
|
return style
|
|
481
478
|
},
|
|
482
479
|
tabItemNameStyle(){
|
|
483
|
-
if(this.layout === 'v2') return {
|
|
480
|
+
if(this.layout === 'v2') return {
|
|
481
|
+
fontSize: parseInt(this.titleStyle.fontSize) + 'rpx',
|
|
482
|
+
fontWeight: this.titleStyle.fontWeight,
|
|
483
|
+
color: this.titleStyle.color,
|
|
484
|
+
}
|
|
484
485
|
return {
|
|
485
486
|
borderRadius:['v1'].includes(this.hStyle)?'60rpx': 0,
|
|
486
487
|
backgroundColor: ['v1'].includes(this.hStyle) ? this.titleStyle.bgColor:'',
|
|
487
488
|
color: this.titleStyle.color,
|
|
488
489
|
padding:'0 32rpx',
|
|
489
|
-
fontSize: this.titleStyle.fontSize + 'rpx',
|
|
490
|
+
fontSize: parseInt(this.titleStyle.fontSize) + 'rpx',
|
|
490
491
|
fontWeight: this.titleStyle.fontWeight,
|
|
491
492
|
}
|
|
492
493
|
},
|
|
@@ -511,6 +512,8 @@
|
|
|
511
512
|
return {
|
|
512
513
|
backgroundColor: bgColor,
|
|
513
514
|
color: color,
|
|
515
|
+
fontSize: parseInt(this.titleStyle.actFontSize) + 'rpx',
|
|
516
|
+
fontWeight: this.titleStyle.actFontWeight,
|
|
514
517
|
}
|
|
515
518
|
}
|
|
516
519
|
|
|
@@ -532,7 +535,7 @@
|
|
|
532
535
|
backgroundImage: bgImage,
|
|
533
536
|
padding: '0 32rpx',
|
|
534
537
|
color: color,
|
|
535
|
-
fontSize:
|
|
538
|
+
fontSize: parseInt(this.titleStyle.actFontSize) + 'rpx',
|
|
536
539
|
fontWeight: this.titleStyle.actFontWeight,
|
|
537
540
|
}
|
|
538
541
|
},
|
|
@@ -704,16 +707,16 @@
|
|
|
704
707
|
[{
|
|
705
708
|
color: titleColor || '#333',
|
|
706
709
|
bgColor: titleBgcColor || '#fff' ,
|
|
707
|
-
fontSize: '32',
|
|
710
|
+
fontSize: this.layout === 'v2' ?'24':'32',
|
|
708
711
|
fontWeight: '400',
|
|
709
712
|
actColor: titleActColor || '',
|
|
710
|
-
actFontWeight: '
|
|
711
|
-
actFontSize: '32',
|
|
713
|
+
actFontWeight: '500',
|
|
714
|
+
actFontSize: this.layout === 'v2' ?'24':'32',
|
|
712
715
|
actBgColor:this.titleBgcActColor || '',
|
|
713
716
|
}],
|
|
714
717
|
{sKey:'titleStyleStatus',fields:['titleStyle'],isMerge: true},
|
|
715
718
|
);
|
|
716
|
-
this.titleShadow = gCPVal(container, 'titleShadow', [this.gStyleValue.shadow,'none'], {isShadow:true, bsOld:['isTitleShadow','isTitleShadowBgcW','isTitleShadowBgc']});
|
|
719
|
+
this.titleShadow = gCPVal(container, 'titleShadow', [this.gStyleValue.shadow , 'none'], {isShadow:true, bsOld:['isTitleShadow','isTitleShadowBgcW','isTitleShadowBgc']});
|
|
717
720
|
this.titleBorder = gCPVal(container, 'titleBorder', [{color: '#eee', width: '0', style: 'solid'},{color: '#eee', width: '0', style: 'solid'}], {isBorder:true, bsOld:['isTitleBorder','isTitleBorderW','isTitleBorderColor']});
|
|
718
721
|
this.titleBorderWidth = gCPVal(container, 'titleBorder', [{color: '#eee', width: '0', style: 'solid'},{color: '#eee', width: '0', style: 'solid'}], {isBorder:true,isBsWidth: true, bsOld:['isTitleBorder','isTitleBorderW','isTitleBorderColor']});
|
|
719
722
|
|
|
@@ -4,7 +4,6 @@ import {dataVal, statusDataVal, statusShow, clone, cRaBorShadow,isDefStatus} fro
|
|
|
4
4
|
|
|
5
5
|
export default (datas, gValue, gColor, oldData={})=>{
|
|
6
6
|
let data = clone(datas);
|
|
7
|
-
debugger
|
|
8
7
|
if(typeof data['tabPadding'] === 'string' && data['tabPadding'] ) {
|
|
9
8
|
data['tabPadding'] = {
|
|
10
9
|
top: Number(data['tabPadding']),
|
|
@@ -100,7 +99,7 @@ export default (datas, gValue, gColor, oldData={})=>{
|
|
|
100
99
|
fontSize:'32',
|
|
101
100
|
fontWeight: '400',
|
|
102
101
|
actFontSize:'32',
|
|
103
|
-
actFontWeight: '
|
|
102
|
+
actFontWeight: '500',
|
|
104
103
|
actColor: data['titleActColor'] || gValue.mainColor,
|
|
105
104
|
actBgColor: data['titleBgcActColor'] || ''
|
|
106
105
|
},
|
|
@@ -33,14 +33,14 @@ module.exports = [
|
|
|
33
33
|
disabled: true,
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
|
-
mapFnName: '
|
|
36
|
+
mapFnName: 'getNewMallCategoryTree',
|
|
37
37
|
title: '分类 - 树列表',
|
|
38
|
-
path: '/product/v1/:xnamespace/category/
|
|
38
|
+
path: '/product/v1/:xnamespace/category/tree',
|
|
39
39
|
isRule: false,
|
|
40
40
|
params: {
|
|
41
41
|
xnamespace: ['xnamespace', 'String', '必选'],
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
level: ['获取几层数据,默认:2', 'Number', '必选', 2],
|
|
43
|
+
root_category_id: ['父级分类,默认:0', 'Number', '必选', 0],
|
|
44
44
|
},
|
|
45
45
|
isConsole: true,
|
|
46
46
|
disabled: true,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view class="jfb-filter" v-if="showQuery === 'Y'" :style="[cssStyle]">
|
|
3
|
+
|
|
3
4
|
<view class="jfb-filter-placeholder" :style="[placeholderStyleComp]"></view>
|
|
4
5
|
<view class="jfb-filter-menu" :style="[cusMenuStyle,menuStyleTopComp]">
|
|
5
6
|
<template v-if="sortList.length > 0">
|
|
@@ -95,7 +96,7 @@
|
|
|
95
96
|
:class="{
|
|
96
97
|
active: isOtherActive(tab, item.value),
|
|
97
98
|
noMarginRigth: i%column === (column-1),
|
|
98
|
-
noMarginTop: i/column
|
|
99
|
+
noMarginTop: i/column < 1
|
|
99
100
|
}"
|
|
100
101
|
@click="setOhterChooseTag(tab, item)"
|
|
101
102
|
>{{item.label}}</view>
|
|
@@ -252,19 +253,19 @@ export default {
|
|
|
252
253
|
return {
|
|
253
254
|
zIndex: this.showQueryModal ? 1002 : 1,
|
|
254
255
|
position:this.$configProject.isPreview?'absolute':'fixed',
|
|
255
|
-
top: this.$configProject.isPreview ? 0 : this.queryMaskComp.top
|
|
256
|
+
top: this.$configProject.isPreview ? 0 : (parseInt(this.queryMaskComp.top) - 2) + 'rpx',
|
|
256
257
|
}
|
|
257
258
|
},
|
|
258
259
|
queryTopComp(){
|
|
259
260
|
let {paddingTb} = this.cusMenuStyle;
|
|
260
261
|
let height = 48;//默认90高,填充0
|
|
261
262
|
return {
|
|
262
|
-
top: this.topHeight + this.layoutInfo.top + (height + paddingTb -
|
|
263
|
+
top: this.topHeight + this.layoutInfo.top + (height + paddingTb - 2) + 'rpx'
|
|
263
264
|
}
|
|
264
265
|
},
|
|
265
266
|
menuTextColorComp(){
|
|
266
267
|
return {
|
|
267
|
-
color: this.cusMenuStyle.color || '#
|
|
268
|
+
color: this.cusMenuStyle.color || '#999'
|
|
268
269
|
}
|
|
269
270
|
},
|
|
270
271
|
|
|
@@ -331,7 +332,7 @@ export default {
|
|
|
331
332
|
if(this.menuAct !== 'common') {
|
|
332
333
|
params = {
|
|
333
334
|
...params,
|
|
334
|
-
borderColor: Color(font.color).alpha(0.
|
|
335
|
+
borderColor: Color(font.color).alpha(0.2).toString(),
|
|
335
336
|
backgroundColor: Color(font.color).alpha(0.1).toString(),
|
|
336
337
|
}
|
|
337
338
|
}
|
|
@@ -776,7 +777,8 @@ export default {
|
|
|
776
777
|
border-top: 1px solid var(--com-menu-border);
|
|
777
778
|
display: flex;
|
|
778
779
|
justify-content: space-around;
|
|
779
|
-
height:
|
|
780
|
+
height: 49rpx;
|
|
781
|
+
|
|
780
782
|
|
|
781
783
|
&-item {
|
|
782
784
|
display: flex;
|
|
@@ -893,7 +895,7 @@ export default {
|
|
|
893
895
|
|
|
894
896
|
& > ._tag {
|
|
895
897
|
text-align: center;
|
|
896
|
-
line-height:
|
|
898
|
+
line-height: 62rpx;
|
|
897
899
|
border-radius: 4rpx;
|
|
898
900
|
font-size: 24rpx;
|
|
899
901
|
color: #666;
|
|
@@ -902,6 +904,9 @@ export default {
|
|
|
902
904
|
white-space: nowrap;
|
|
903
905
|
box-sizing: border-box;
|
|
904
906
|
background-color: #f8f8f8;
|
|
907
|
+
border-width: 2rpx;
|
|
908
|
+
border-style: solid;
|
|
909
|
+
padding: 0 10rpx;
|
|
905
910
|
|
|
906
911
|
&.noMarginRigth{
|
|
907
912
|
margin-right: 0!important;
|
|
@@ -24,7 +24,6 @@
|
|
|
24
24
|
<view v-if="!loaded" class="skeleton-cate">
|
|
25
25
|
<view class="cate_tab" v-if="showCategory === 'Y'">
|
|
26
26
|
<view class="cate_tab_item" v-for="i in 5" :key="i"></view>
|
|
27
|
-
|
|
28
27
|
</view>
|
|
29
28
|
<view class="sub_cate" v-if="showCategory === 'Y'">
|
|
30
29
|
<view class="sub_cate_item" v-for="i in 5" :key="i">
|
|
@@ -449,6 +448,12 @@
|
|
|
449
448
|
if(this.initStatus && this.onLoadStatus) this.handleInit();
|
|
450
449
|
},
|
|
451
450
|
|
|
451
|
+
filterModeData(){
|
|
452
|
+
if(this.$configProject.isPreview) {
|
|
453
|
+
this.$refs['filter-query'].hideSelectMenu();//隐藏菜单
|
|
454
|
+
}
|
|
455
|
+
},
|
|
456
|
+
|
|
452
457
|
},
|
|
453
458
|
created() {
|
|
454
459
|
this.isPreview = this.$configProject.isPreview;
|
|
@@ -607,6 +612,13 @@
|
|
|
607
612
|
|
|
608
613
|
//==过滤区域============
|
|
609
614
|
let categoryLayout = gCPVal(container, "categoryLayout", "v1");
|
|
615
|
+
let categoryLayout1ShowType = gCPVal(container, "categoryLayout1ShowType", "all");
|
|
616
|
+
let showCategory = gCPVal(container, 'showCategory', "Y");
|
|
617
|
+
//数据兼容处理
|
|
618
|
+
if(categoryLayout && categoryLayout === 'v1') {
|
|
619
|
+
if(categoryLayout1ShowType === 'child') categoryLayout = 'v3'
|
|
620
|
+
}
|
|
621
|
+
if(showCategory === 'N') categoryLayout = 'none';
|
|
610
622
|
let category = gCPVal(container, 'category',categoryLayout);
|
|
611
623
|
|
|
612
624
|
//是否显示过滤菜单
|
|
@@ -618,7 +630,6 @@
|
|
|
618
630
|
else this.isFilterMenuForFilterFields = [];
|
|
619
631
|
//是否显示品牌菜单
|
|
620
632
|
let showBrandFilter = gCPVal(container, "showBrandFilter", "in");
|
|
621
|
-
let filterModeSort = ['common','price','host','brand','delivery_method','filter'];
|
|
622
633
|
//菜单设置
|
|
623
634
|
let filterMode = [];
|
|
624
635
|
if(showQuery === 'Y') {
|
|
@@ -657,7 +668,7 @@
|
|
|
657
668
|
let defFilterBgcColor = '#fff';
|
|
658
669
|
if( category ==='v4') defFilterBgcColor = this.pageAttr.background;
|
|
659
670
|
this.filterBgcColor = gCPVal(container, 'filterBgcColor', [defFilterBgcColor,'#fff'], {sKey: 'filterBgcColorStatus',fields:['filterBgcColor']});
|
|
660
|
-
this.filterColor = gCPVal(container, 'filterColor', ['#
|
|
671
|
+
this.filterColor = gCPVal(container, 'filterColor', ['#333'], {sKey: 'filterColorStatus',fields:['filterColor']});
|
|
661
672
|
this.filterTopBorder = gCPVal(container, 'filterTopBorder', [{ color: '#f8f8f8', width: '2', style: 'solid'},{ color: '#f8f8f8', width: '0', style: 'solid'}], {isBorder:true});
|
|
662
673
|
this.filterTopBorderWidth = gCPVal(container, 'filterTopBorder', [{ color: '#f8f8f8', width: '2', style: 'solid'},{ color: '#f8f8f8', width: '0', style: 'solid'}], {isBorder:true, isBsWidth: true});
|
|
663
674
|
|
|
@@ -700,9 +711,32 @@
|
|
|
700
711
|
this.allIcon = gCPVal(container, "allIcon", {});
|
|
701
712
|
this.allIconSize = 128 - Number(gCPVal(container, "iconWdith", 128));
|
|
702
713
|
|
|
714
|
+
//兼容数据
|
|
715
|
+
|
|
716
|
+
|
|
717
|
+
|
|
718
|
+
// //兼容分类操作
|
|
719
|
+
// let category = 'v1';
|
|
720
|
+
// //老数据已设置
|
|
721
|
+
// if(data['categoryLayout']) {
|
|
722
|
+
// category = data['categoryLayout'];
|
|
723
|
+
// //设置v1项
|
|
724
|
+
// if(data['categoryLayout'] === 'v1') {
|
|
725
|
+
// if(data['categoryLayout1ShowType'] === 'child') {
|
|
726
|
+
// category = 'v3';
|
|
727
|
+
// }
|
|
728
|
+
// }
|
|
729
|
+
// }
|
|
730
|
+
// //分类已设置隐藏(设置隐藏项)
|
|
731
|
+
// if(data['showCategory'] === 'N') {
|
|
732
|
+
// category = 'none';
|
|
733
|
+
// }
|
|
734
|
+
// //新数据已设置值
|
|
735
|
+
// if(data['category'] !== undefined) {
|
|
736
|
+
// category = data['category'] ;
|
|
737
|
+
// }
|
|
738
|
+
|
|
703
739
|
//分类 - 功能设置
|
|
704
|
-
let showCategory = gCPVal(container, 'showCategory', "Y");
|
|
705
|
-
let categoryLayout1ShowType = gCPVal(container, "categoryLayout1ShowType", "all");
|
|
706
740
|
if(category) {
|
|
707
741
|
if(category === 'none'){
|
|
708
742
|
showCategory = 'N';
|
|
@@ -780,29 +814,33 @@
|
|
|
780
814
|
|
|
781
815
|
//二级导航文字颜色
|
|
782
816
|
this.level2BgcColor = gCPVal(container, 'level2BgcColor', ['#fff','#f8f8f8'],{sKey:'level2BgcColorStatus', fields:['level2BgcColor']});
|
|
817
|
+
|
|
818
|
+
let color = gCPVal(container, 'level2Color', '') || '#333',
|
|
819
|
+
actColoor= this.mainColor , bgColor='',bgActColor='';
|
|
820
|
+
if(categoryLayout1ShowType === 'parentNew') {
|
|
821
|
+
actColoor = '#fff';
|
|
822
|
+
bgActColor = this.mainColor;
|
|
823
|
+
}
|
|
824
|
+
|
|
783
825
|
const level2Name = gCPVal(container, 'level2Name', {
|
|
784
826
|
fontSize: '24',
|
|
785
827
|
actFontSize: '24',
|
|
786
|
-
color:
|
|
787
|
-
actColor:
|
|
788
|
-
bgColor:
|
|
789
|
-
actBgColor:
|
|
828
|
+
color: color,
|
|
829
|
+
actColor:actColoor,
|
|
830
|
+
bgColor:bgColor,
|
|
831
|
+
actBgColor:bgActColor,
|
|
790
832
|
fontWeight: 'normal',
|
|
791
833
|
actFontWeight: 'normal',
|
|
792
|
-
borderStyle:'solid',
|
|
793
|
-
borderColor: 'rgba(0,0,0,0)',
|
|
794
|
-
borderWidth: 0,
|
|
795
|
-
borderActStyle:'solid',
|
|
796
|
-
borderActColor: 'rgba(0,0,0,0)',
|
|
797
|
-
borderActWidth:0,
|
|
798
834
|
},{sKey:'level2NameStatus', fields:['level2Name','level2Color'],isMerge: true});
|
|
835
|
+
debugger
|
|
799
836
|
|
|
800
837
|
const subTitleRadius = gCPVal(container, 'subTitleRadius', ['40rpx'],{sKey:'subTitleRadiusStatus', fields:['subTitleRadius']})||0;
|
|
801
838
|
const subTitleIconShadow = gCPVal(container, 'subTitleIconShadow', [this.gStyleValue.shadow,'none'], {isShadow:true});
|
|
802
839
|
const subTitleIconBorder = gCPVal(container, 'subTitleIconBorder', [{style:'solid', width: '2', color: this.mainColor},'0'], {isBorder:true});
|
|
803
840
|
let navStyle = gCPVal(container, 'navStyle', 'line-6-8-s');
|
|
804
841
|
if(navStyle.indexOf('line-') === 0) navStyle = 'line-6-8-s';
|
|
805
|
-
const iconWdith = gCPVal(container, 'iconWdith', [
|
|
842
|
+
const iconWdith = gCPVal(container, 'iconWdith', [96],{sKey:'iconWdithStatus', fields:['iconWdith']});
|
|
843
|
+
const iconImageSp = gCPVal(container, 'iconImageSp', [16],{sKey:'iconImageSpStatus', fields:['iconImageSp']});
|
|
806
844
|
const iconBgColor = gCPVal(container, 'iconBgColor', [100],{sKey:'iconBgColorStatus', fields:['iconBgColor']});
|
|
807
845
|
|
|
808
846
|
this.tabStyle = {
|
|
@@ -816,6 +854,7 @@
|
|
|
816
854
|
subTitleIconShadow,
|
|
817
855
|
subTitleIconBorder,
|
|
818
856
|
iconWdith,
|
|
857
|
+
iconImageSp,
|
|
819
858
|
iconBgColor,
|
|
820
859
|
titleBgColor,
|
|
821
860
|
titleActBgColor,
|
|
@@ -1016,13 +1055,12 @@
|
|
|
1016
1055
|
getCategoryList(){
|
|
1017
1056
|
return new Promise((resolve)=>{
|
|
1018
1057
|
if(this.showCategory==="Y") {
|
|
1019
|
-
jfbRootExec("
|
|
1058
|
+
jfbRootExec("getNewMallCategoryTree", {
|
|
1020
1059
|
vm: this,
|
|
1021
1060
|
data: {
|
|
1022
1061
|
xnamespace: this.xnamespace,
|
|
1023
|
-
|
|
1062
|
+
root_category_id: Number(this.parentId),
|
|
1024
1063
|
level: 2,
|
|
1025
|
-
need_rec: this.options.need_rec
|
|
1026
1064
|
}
|
|
1027
1065
|
})
|
|
1028
1066
|
.then(res => {
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
class="category_wraper"
|
|
6
6
|
:style="[categoryWaperComp]"
|
|
7
7
|
>
|
|
8
|
+
<!--文字导航菜单区域-->
|
|
8
9
|
<view v-if="showParent && isShowCategory" >
|
|
9
10
|
<view class="tab_wrap" :style="[{backgroundColor:titleBgcColor}]">
|
|
10
11
|
<cus-tab
|
|
@@ -28,6 +29,8 @@
|
|
|
28
29
|
></cus-tab>
|
|
29
30
|
</view>
|
|
30
31
|
</view>
|
|
32
|
+
<!--文字导航菜单区域-->
|
|
33
|
+
<!--图片导航菜单区域-->
|
|
31
34
|
<view
|
|
32
35
|
v-if="imageIconList.length"
|
|
33
36
|
class="sub_category_list-box"
|
|
@@ -44,6 +47,7 @@
|
|
|
44
47
|
<view
|
|
45
48
|
:id="'cate-scroll__index-'+i"
|
|
46
49
|
@click="handleCateClick(sub, 1)"
|
|
50
|
+
:style="[{width: subTitleInIcon.width}]"
|
|
47
51
|
>
|
|
48
52
|
<view
|
|
49
53
|
:style="[sub.category_id === (['child','parentNew'].includes(showType)? uiPid:uiCateId )?subActTitleIcon:subTitleIcon,subTitleInIcon]"
|
|
@@ -53,6 +57,7 @@
|
|
|
53
57
|
<image :src="sub.category_icon" style="width:100%;height:100%"/>
|
|
54
58
|
</view>
|
|
55
59
|
</view>
|
|
60
|
+
<view style="margin-top: 8rpx; height: 36rpx"></view>
|
|
56
61
|
<view
|
|
57
62
|
class="sub_name"
|
|
58
63
|
:style="[sub.category_id === (['child','parentNew'].includes(showType)? uiPid:uiCateId )?level2ActNameComp:level2NameComp]"
|
|
@@ -61,6 +66,7 @@
|
|
|
61
66
|
</view>
|
|
62
67
|
</scroll-view>
|
|
63
68
|
</view>
|
|
69
|
+
<!--图片导航菜单区域-->
|
|
64
70
|
<!--parentNew-->
|
|
65
71
|
<view
|
|
66
72
|
class="cate_child"
|
|
@@ -227,23 +233,30 @@ export default {
|
|
|
227
233
|
}
|
|
228
234
|
},
|
|
229
235
|
computed: {
|
|
236
|
+
getImageHeightComp(){
|
|
237
|
+
let {iconWdith} = this.tabStyle
|
|
238
|
+
let iconOther = 76;
|
|
239
|
+
|
|
240
|
+
//图片最大高度为100
|
|
241
|
+
return iconOther + Number(iconWdith);
|
|
242
|
+
},
|
|
230
243
|
categoryWarperMaskComp(){
|
|
231
244
|
let height = 0;
|
|
232
245
|
switch(this.showType){
|
|
233
246
|
case 'all' :
|
|
234
247
|
height += 88; //一级菜单
|
|
235
|
-
if(this.imageIconList.length > 0) height = height +
|
|
248
|
+
if(this.imageIconList.length > 0) height = height + this.getImageHeightComp //二级菜单
|
|
236
249
|
//语句
|
|
237
250
|
break;
|
|
238
251
|
case 'parent' :
|
|
239
252
|
height = 88;
|
|
240
253
|
break;
|
|
241
254
|
case 'parentNew' :
|
|
242
|
-
height +=
|
|
255
|
+
height += this.getImageHeightComp; //一级菜单
|
|
243
256
|
if(this.subCategory.length > 0) height = height + 92 //二级菜单
|
|
244
257
|
break;
|
|
245
258
|
case 'child' :
|
|
246
|
-
height =
|
|
259
|
+
height = this.getImageHeightComp
|
|
247
260
|
break;
|
|
248
261
|
default:
|
|
249
262
|
height = 88
|
|
@@ -320,13 +333,14 @@ export default {
|
|
|
320
333
|
|
|
321
334
|
methods: {
|
|
322
335
|
init(navList, pid){
|
|
336
|
+
debugger
|
|
323
337
|
if(navList.length === 0) return;
|
|
324
338
|
|
|
325
339
|
//预览模式生效
|
|
326
340
|
if(this.isPreview) {
|
|
327
341
|
navList = navList.filter(item=>{
|
|
328
342
|
//显示父级显示全部分类
|
|
329
|
-
if(['all', 'parent','parentNew'].includes(this.showType)) return true
|
|
343
|
+
if(['all', 'parent','parentNew','child'].includes(this.showType)) return true
|
|
330
344
|
//只显示子级去掉全部分类
|
|
331
345
|
else return item.category_id !== -1
|
|
332
346
|
});
|
|
@@ -341,6 +355,14 @@ export default {
|
|
|
341
355
|
this.subCategory = navList[this.tabIndex].children;
|
|
342
356
|
}
|
|
343
357
|
|
|
358
|
+
//图片样式作为一级显示时候(预览模式)
|
|
359
|
+
if(['child','parentNew'].includes(this.showType)) {
|
|
360
|
+
if(this.pid === '') {
|
|
361
|
+
this.uiPid = -1;
|
|
362
|
+
this.initPid = -1;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
|
|
344
366
|
this.transformNavList = navList;
|
|
345
367
|
this.refreshNav = Date.now()
|
|
346
368
|
|
|
@@ -482,19 +504,27 @@ export default {
|
|
|
482
504
|
border-left-width: 0!important;
|
|
483
505
|
border-right-width: 0!important;
|
|
484
506
|
border-bottom-width: 0!important;
|
|
485
|
-
height: 176rpx;
|
|
507
|
+
max-height: 176rpx;
|
|
486
508
|
|
|
487
509
|
.sub_category_list {
|
|
488
510
|
white-space: nowrap;
|
|
489
511
|
height: 100%;
|
|
512
|
+
display: flex;
|
|
513
|
+
justify-content: flex-start;
|
|
514
|
+
align-content: center;
|
|
515
|
+
flex-flow: nowrap;
|
|
516
|
+
|
|
490
517
|
|
|
491
518
|
.sub_cate {
|
|
492
519
|
display: inline-block;
|
|
493
|
-
margin: 16rpx
|
|
520
|
+
margin: 16rpx var(--sub-icon-right-sp) 16rpx 0;
|
|
521
|
+
padding: 0 16rpx;
|
|
494
522
|
text-align: center;
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
523
|
+
|
|
524
|
+
& > view {
|
|
525
|
+
position: relative;
|
|
526
|
+
}
|
|
527
|
+
|
|
498
528
|
&:last-child {
|
|
499
529
|
margin-right: 32rpx;
|
|
500
530
|
}
|
|
@@ -502,20 +532,8 @@ export default {
|
|
|
502
532
|
margin-left: 32rpx;
|
|
503
533
|
}
|
|
504
534
|
|
|
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
535
|
|
|
515
536
|
.sub_icon {
|
|
516
|
-
width: 96rpx;
|
|
517
|
-
height: 96rpx;
|
|
518
|
-
margin: 0 auto;
|
|
519
537
|
overflow: hidden;
|
|
520
538
|
box-sizing: border-box;
|
|
521
539
|
display: flex;
|
|
@@ -532,11 +550,16 @@ export default {
|
|
|
532
550
|
}
|
|
533
551
|
|
|
534
552
|
.sub_name {
|
|
553
|
+
width: 100%;
|
|
535
554
|
font-size: 24rpx;
|
|
536
555
|
color: #333333;
|
|
537
556
|
margin-top: 8rpx;
|
|
538
|
-
|
|
557
|
+
overflow: hidden;
|
|
558
|
+
white-space: wrap;
|
|
559
|
+
box-sizing: border-box;
|
|
560
|
+
word-break: break-all;
|
|
539
561
|
line-height: 36rpx;
|
|
562
|
+
height: 36rpx;
|
|
540
563
|
}
|
|
541
564
|
}
|
|
542
565
|
}
|
|
@@ -160,14 +160,19 @@ export default {
|
|
|
160
160
|
},
|
|
161
161
|
cateBarStyleRLComp(){
|
|
162
162
|
return {
|
|
163
|
-
backgroundColor: Color( this.styleConfig.backgroundColor).lighten(.2).hex().toString()
|
|
163
|
+
backgroundColor: Color( this.styleConfig.backgroundColor).lighten(.2).hex().toString(),
|
|
164
164
|
}
|
|
165
165
|
},
|
|
166
166
|
cateBarStyleComp(){
|
|
167
|
+
let orderColor = '';
|
|
168
|
+
let {backgroundColor} = this.styleConfig;
|
|
169
|
+
if(Color(backgroundColor).isDark()) orderColor = Color(backgroundColor).lighten(0.8).toString();
|
|
170
|
+
else if(Color(backgroundColor).isLight()) orderColor = Color(backgroundColor).darken(0.05).toString();
|
|
171
|
+
|
|
167
172
|
return {
|
|
168
173
|
top: this.$configProject.isPreview?0:(this.layoutInfo.top) + 'rpx',
|
|
169
174
|
backgroundColor: this.styleConfig.backgroundColor,
|
|
170
|
-
'--border-color':
|
|
175
|
+
'--border-color': orderColor,
|
|
171
176
|
position: this.$configProject.isPreview?'absolute':'fixed',
|
|
172
177
|
};
|
|
173
178
|
},
|
|
@@ -362,7 +367,7 @@ export default {
|
|
|
362
367
|
display: flex;
|
|
363
368
|
justify-content: center;
|
|
364
369
|
align-items: center;
|
|
365
|
-
border-left:
|
|
370
|
+
border-left: 4rpx solid var(--border-color);
|
|
366
371
|
background: #FFFFFF;
|
|
367
372
|
z-index: 1;
|
|
368
373
|
flex-shrink: 0;
|
|
@@ -25,9 +25,20 @@ export default {
|
|
|
25
25
|
borderWidth:level2Name.borderWidth + 'rpx',
|
|
26
26
|
borderColor:level2Name.borderColor,
|
|
27
27
|
padding: padding,
|
|
28
|
-
borderRadius: radius
|
|
28
|
+
borderRadius: radius,
|
|
29
|
+
...this.parentNewComp,
|
|
29
30
|
}
|
|
30
31
|
},
|
|
32
|
+
|
|
33
|
+
parentNewComp(){
|
|
34
|
+
return {
|
|
35
|
+
position: 'absolute',
|
|
36
|
+
bottom: '0',
|
|
37
|
+
left: '-16rpx',
|
|
38
|
+
width: `calc(100% + 32rpx)`
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
|
|
31
42
|
level2ActNameComp(){
|
|
32
43
|
if(this.$xdUniHelper.isEmpty(this.tabStyle)) return {}
|
|
33
44
|
if(this.$xdUniHelper.isEmpty(this.tabStyle['level2Name'])) return {}
|
|
@@ -48,7 +59,8 @@ export default {
|
|
|
48
59
|
borderWidth:level2Name.borderActWidth + 'rpx',
|
|
49
60
|
borderColor:level2Name.borderActColor,
|
|
50
61
|
padding: padding,
|
|
51
|
-
borderRadius: radius
|
|
62
|
+
borderRadius: radius,
|
|
63
|
+
...this.parentNewComp,
|
|
52
64
|
}
|
|
53
65
|
},
|
|
54
66
|
|
|
@@ -56,6 +68,7 @@ export default {
|
|
|
56
68
|
return {
|
|
57
69
|
'--sub-icon-border' : (parseInt(this.tabStyle['subTitleIconBorder'].split(' ')[0]) * this.$rpxNum) + 'px',
|
|
58
70
|
'--sub-icon-w-radius': this.tabStyle['subTitleRadius'],
|
|
71
|
+
'--sub-icon-right-sp': (this.tabStyle['iconImageSp'] || 16) * this.$rpxNum + 'px',
|
|
59
72
|
backgroundColor: this.titleBgcColor,
|
|
60
73
|
}
|
|
61
74
|
},
|
|
@@ -6,7 +6,8 @@ import {
|
|
|
6
6
|
customVal,
|
|
7
7
|
cusDisabled ,
|
|
8
8
|
getCustomAttr,
|
|
9
|
-
isArray
|
|
9
|
+
isArray,
|
|
10
|
+
isObject
|
|
10
11
|
} from "@/utils/AttrTools";
|
|
11
12
|
import PosterAttr from "@/utils/Attr/PosterAttr";
|
|
12
13
|
import ProductAttr from "@/utils/Attr/ProductAttr";
|
|
@@ -172,7 +173,23 @@ export default (data, gValue,gColor,oldData)=>{
|
|
|
172
173
|
inline:false,
|
|
173
174
|
notice:'建议尺寸:128*128像素',
|
|
174
175
|
rules: [
|
|
175
|
-
{
|
|
176
|
+
{
|
|
177
|
+
validator: (rule, value, callback) => {
|
|
178
|
+
if(!value) callback('请上传全部图片图片');
|
|
179
|
+
else {
|
|
180
|
+
if(!isObject(value)){
|
|
181
|
+
callback('请上传全部图片图片');
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
if(!value.url)callback('请上传全部图片图片');
|
|
185
|
+
else callback()
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
message: '请上传全部图片图片',
|
|
190
|
+
trigger: ['blur', 'change'],
|
|
191
|
+
required: true,
|
|
192
|
+
}
|
|
176
193
|
],
|
|
177
194
|
},
|
|
178
195
|
{
|
|
@@ -203,6 +220,20 @@ export default (data, gValue,gColor,oldData)=>{
|
|
|
203
220
|
groupKey:'content',
|
|
204
221
|
className: 'input100',
|
|
205
222
|
hidden: categoryParentType === 'root',
|
|
223
|
+
rules: [
|
|
224
|
+
{
|
|
225
|
+
validator: (rule, value, callback) => {
|
|
226
|
+
if(categoryParentType === 'root') callback();
|
|
227
|
+
else {
|
|
228
|
+
if(!value) callback('请输入父级分类ID');
|
|
229
|
+
else callback()
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
message: '请输入父级分类ID',
|
|
233
|
+
trigger: ['blur', 'change'],
|
|
234
|
+
required: true,
|
|
235
|
+
}
|
|
236
|
+
],
|
|
206
237
|
},
|
|
207
238
|
{ele: 'group_end'},
|
|
208
239
|
{
|
|
@@ -390,7 +421,7 @@ export default (data, gValue,gColor,oldData)=>{
|
|
|
390
421
|
groupKey:'content',
|
|
391
422
|
ele: "xd-style-image",
|
|
392
423
|
valueKey: "categoryLayout",
|
|
393
|
-
value: data['categoryLayout'] || '
|
|
424
|
+
value: data['categoryLayout'] || '',
|
|
394
425
|
hidden: true,
|
|
395
426
|
handleCustom({action, data}) {
|
|
396
427
|
data.cb([
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
import {cRaBorShadow, dataVal, statusDataVal, statusShow} from "@/utils/AttrTools";
|
|
4
|
-
const Color = require('color');
|
|
5
4
|
|
|
6
5
|
export default (data, gValue, gColor, oldData)=>{
|
|
7
6
|
let filterTopBorder = cRaBorShadow(data , 'filterTopBorder',{dValue:'D'}, gValue)
|
|
7
|
+
let filterBgcColor = '#fff';
|
|
8
|
+
if(gValue.isAdd && gValue.isFirst) {
|
|
9
|
+
if(data['category'] === 'v4') filterBgcColor = '#f8f8f8';
|
|
10
|
+
}
|
|
8
11
|
return [
|
|
9
12
|
{
|
|
10
13
|
ele: 'title',
|
|
@@ -70,7 +73,7 @@ export default (data, gValue, gColor, oldData)=>{
|
|
|
70
73
|
ele: 'xd-color',
|
|
71
74
|
valueKey: 'filterBgcColor',
|
|
72
75
|
groupKey:'style',
|
|
73
|
-
value: dataVal({data, key:'filterBgcColor', dValue:
|
|
76
|
+
value: dataVal({data, key:'filterBgcColor', dValue:filterBgcColor, gValue}),
|
|
74
77
|
hidden: !statusShow({data, key: 'filterBgcColorStatus', fields:['filterBgcColor'], gValue}),
|
|
75
78
|
classNmae: 'input80',
|
|
76
79
|
setting: {
|
|
@@ -97,7 +100,7 @@ export default (data, gValue, gColor, oldData)=>{
|
|
|
97
100
|
ele: 'xd-color',
|
|
98
101
|
valueKey: 'filterColor',
|
|
99
102
|
groupKey:'style',
|
|
100
|
-
value: dataVal({data, key:'filterColor', dValue:'#
|
|
103
|
+
value: dataVal({data, key:'filterColor', dValue:'#333', gValue}),
|
|
101
104
|
hidden: !statusShow({data, key: 'filterColorStatus', fields:['filterColor'], gValue}),
|
|
102
105
|
classNmae: 'input80',
|
|
103
106
|
setting: {
|
|
@@ -159,13 +159,44 @@ export default (data, gValue, gColor, oldData)=>{
|
|
|
159
159
|
groupKey: 'style',
|
|
160
160
|
ele: 'xd-slider',
|
|
161
161
|
valueKey: "iconWdith",
|
|
162
|
-
value: dataVal({data, key:'iconWdith', dValue:
|
|
162
|
+
value: dataVal({data, key:'iconWdith', dValue:96, gValue}),
|
|
163
163
|
hidden: !statusShow({data, key: 'iconWdithStatus', fields:['iconWdith'], gValue}),
|
|
164
164
|
className: "input80",
|
|
165
165
|
labelInline: true,
|
|
166
166
|
setting:{
|
|
167
167
|
min: 50,//最小值
|
|
168
|
-
max:
|
|
168
|
+
max: 96, //最小值
|
|
169
|
+
step:1, //步长
|
|
170
|
+
showStops:false,//显示间断点
|
|
171
|
+
showInput:false,//显示输入框
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
{ele: 'group_end'},
|
|
175
|
+
{
|
|
176
|
+
label: '图标间距',
|
|
177
|
+
ele: 'xd-radio',
|
|
178
|
+
groupKey: 'style',
|
|
179
|
+
valueKey: 'iconImageSpStatus',
|
|
180
|
+
value: statusDataVal({data, key:'iconImageSpStatus', fields:['iconImageSp'],gValue}),
|
|
181
|
+
labelInline:true,
|
|
182
|
+
list: [
|
|
183
|
+
{label: '默认', value: 'D'},
|
|
184
|
+
{label: '自定义', value: 'C'},
|
|
185
|
+
]
|
|
186
|
+
},
|
|
187
|
+
{ele: 'group_start'},
|
|
188
|
+
{
|
|
189
|
+
label: "",
|
|
190
|
+
groupKey: 'style',
|
|
191
|
+
ele: 'xd-slider',
|
|
192
|
+
valueKey: "iconImageSp",
|
|
193
|
+
value: dataVal({data, key:'iconImageSp', dValue:16, gValue}),
|
|
194
|
+
hidden: !statusShow({data, key: 'iconImageSpStatus', fields:['iconImageSp'], gValue}),
|
|
195
|
+
className: "input80",
|
|
196
|
+
labelInline: true,
|
|
197
|
+
setting:{
|
|
198
|
+
min: 1,//最小值
|
|
199
|
+
max: 64, //最小值
|
|
169
200
|
step:1, //步长
|
|
170
201
|
showStops:false,//显示间断点
|
|
171
202
|
showInput:false,//显示输入框
|
|
@@ -222,10 +253,10 @@ export default (data, gValue, gColor, oldData)=>{
|
|
|
222
253
|
hidden: !statusShow({data, key: 'level2NameStatus', fields:['level2Name','level2Color'], gValue}) || disabled,
|
|
223
254
|
setting: {
|
|
224
255
|
fontSize: true,
|
|
225
|
-
weight:
|
|
256
|
+
weight:false,
|
|
226
257
|
bgColor:true,
|
|
227
258
|
selected:true,
|
|
228
|
-
isBorder:
|
|
259
|
+
isBorder:false,
|
|
229
260
|
default: level2Name
|
|
230
261
|
},
|
|
231
262
|
handleCustom({action, data}) {
|
|
@@ -200,6 +200,7 @@ export default (data, gValue, gColor, oldData={})=>{
|
|
|
200
200
|
hidden: !statusShow({data, key: 'titleRadiusStatus', fields:['titleRadius'], gValue}),
|
|
201
201
|
placeholder: '请选择商品是否设置圆角',
|
|
202
202
|
multiple: false,
|
|
203
|
+
isBackNotValue: true,
|
|
203
204
|
className: 'input80',
|
|
204
205
|
groupKey:'style',
|
|
205
206
|
handleCustom({action, data}) {
|
|
@@ -409,7 +410,7 @@ export default (data, gValue, gColor, oldData={})=>{
|
|
|
409
410
|
ele: 'xd-radio',
|
|
410
411
|
groupKey: 'style',
|
|
411
412
|
valueKey: 'contRadiusStatus',
|
|
412
|
-
value: statusDataVal({data,
|
|
413
|
+
value: statusDataVal({data,key:'contRadiusStatus',cValue:'N', fields:['contRadius'],gValue}),
|
|
413
414
|
labelInline:true,
|
|
414
415
|
list: [
|
|
415
416
|
{label: '默认', value: 'D'},
|
|
@@ -428,6 +429,7 @@ export default (data, gValue, gColor, oldData={})=>{
|
|
|
428
429
|
placeholder: '请选择商品是否设置圆角',
|
|
429
430
|
multiple: false,
|
|
430
431
|
className: 'input80',
|
|
432
|
+
isBackNotValue: true,
|
|
431
433
|
groupKey:'style',
|
|
432
434
|
handleCustom({action, data}) {
|
|
433
435
|
XdBus.getParentApi('getOptionsSettingList')({
|
|
@@ -469,6 +471,7 @@ export default (data, gValue, gColor, oldData={})=>{
|
|
|
469
471
|
placeholder: '请选择商品图圆角是否设置圆角',
|
|
470
472
|
multiple: false,
|
|
471
473
|
className: 'input80',
|
|
474
|
+
isBackNotValue: true,
|
|
472
475
|
value: dataVal({data, key:'imageRadius', dValue:'10', gValue}),
|
|
473
476
|
hidden: !statusShow({data, key: 'imageRadiusStatus', fields:['imageRadius'], gValue}),
|
|
474
477
|
handleCustom({action, data}) {
|