jufubao-mall 2.0.21 → 2.0.23-beta1
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 +1 -1
- package/src/components/JfbMallBrandWall/Attr.js +10 -449
- package/src/components/JfbMallBrandWall/JfbMallBrandWall.vue +783 -308
- package/src/components/JfbMallBrandWall/cusAttr/advanced.js +61 -0
- package/src/components/JfbMallBrandWall/cusAttr/brand.js +341 -0
- package/src/components/JfbMallBrandWall/cusAttr/content.js +251 -0
- package/src/components/JfbMallBrandWall/cusAttr/style.js +252 -0
- package/src/components/JfbMallBrandWall/cusAttr/tab.js +471 -0
- package/src/components/JfbMallHomeProductList/JfbMallHomeProductList.vue +3 -1
- package/src/components/JfbMallHomeProductList/cusAttr/content.js +1 -2
- package/src/components/JfbMallNetworkMedia/Api.js +58 -0
- package/src/components/JfbMallNetworkMedia/Attr.js +20 -0
- package/src/components/JfbMallNetworkMedia/JfbMallNetworkMedia.vue +84 -0
- package/src/components/JfbMallNetworkMedia/JfbMallNetworkMediaLess.less +80 -0
- package/src/components/JfbMallNetworkMedia/JfbMallNetworkMediaMixin.js +30 -0
- package/src/components/JfbMallNetworkMedia/Mock.js +13 -0
- package/src/components/JfbMallNetworkMedia/cusAttr/advanced.js +60 -0
- package/src/components/JfbMallNetworkMedia/cusAttr/content.js +125 -0
- package/src/components/JfbMallNetworkMedia/cusAttr/filter.js +333 -0
- package/src/components/JfbMallNetworkMedia/cusAttr/font.js +114 -0
- package/src/components/JfbMallNetworkMedia/cusAttr/icon.js +298 -0
- package/src/components/{JfbMallProductList → JfbMallNetworkMedia/cusAttr}/style.js +15 -50
- package/src/components/JfbMallProductInfo/JfbMallProductInfo.vue +27 -23
- package/src/components/JfbMallProductInfo/cusAttr/content.js +1 -1
- package/src/components/JfbMallProductInfoV2/Api.js +1 -1
- package/src/components/JfbMallProductInfoV2/Attr.js +134 -41
- package/src/components/JfbMallProductInfoV2/JfbMallProductInfoV2.vue +136 -127
- package/src/components/JfbMallProductInfoV2/Mock.js +38 -10
- package/src/components/JfbMallProductList/Api.js +7 -7
- package/src/components/JfbMallProductList/Attr.js +7 -762
- package/src/components/JfbMallProductList/ComFilterQuery.vue +950 -0
- package/src/components/JfbMallProductList/JfbMallProductList.vue +807 -792
- package/src/components/JfbMallProductList/Mock.js +168 -255
- package/src/components/JfbMallProductList/XdCateV1.vue +335 -122
- package/src/components/JfbMallProductList/XdCateV2.vue +144 -76
- package/src/components/JfbMallProductList/XdQueryCommon.vue +189 -0
- package/src/components/JfbMallProductList/XdQueryFilter.vue +94 -76
- package/src/components/JfbMallProductList/XdQuerySort.vue +100 -109
- package/src/components/JfbMallProductList/cateMixins.js +103 -0
- package/src/components/JfbMallProductList/{advanced.js → cusAttr/advanced.js} +12 -4
- package/src/components/JfbMallProductList/cusAttr/content.js +465 -0
- package/src/components/JfbMallProductList/cusAttr/filter.js +333 -0
- package/src/components/JfbMallProductList/cusAttr/font.js +114 -0
- package/src/components/JfbMallProductList/cusAttr/icon.js +298 -0
- package/src/components/JfbMallProductList/cusAttr/style.js +91 -0
- package/src/components/JfbMallRecommendProduct/Attr.js +8 -366
- package/src/components/JfbMallRecommendProduct/JfbMallRecommendProduct.vue +218 -187
- package/src/components/JfbMallRecommendProduct/Mock.js +236 -693
- package/src/components/JfbMallRecommendProduct/cusAttr/advanced.js +79 -0
- package/src/components/JfbMallRecommendProduct/cusAttr/content.js +202 -0
- package/src/components/JfbMallRecommendProduct/cusAttr/style.js +594 -0
- package/src/components/JfbMallResourceShopList/Mock.js +4 -6
- package/src/components/JfbMallTestNormal/JfbMallTestNormal.vue +23 -2
- package/src/components/JfbMallTestNormal/data.js +152 -0
- package/src/mixins/componentsMixins.js +1 -0
- package/src/mixins/productCompMixins.js +29 -19
- package/src/components/JfbMallProductList/PosterAttr.js +0 -327
- package/src/components/JfbMallProductList/ProductAttr.js +0 -164
- package/src/components/JfbMallProductList/XdQueryBrand.vue +0 -150
|
@@ -16,103 +16,133 @@
|
|
|
16
16
|
</view>
|
|
17
17
|
<!-- #endif -->
|
|
18
18
|
<view class="jfb-mall-brand-wall__body" >
|
|
19
|
-
<view
|
|
20
|
-
|
|
21
|
-
:style="
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
">
|
|
30
|
-
<scroll-view scroll-x="true">
|
|
31
|
-
<view
|
|
32
|
-
class="tab_list"
|
|
33
|
-
v-if="loaded"
|
|
34
|
-
:style="{
|
|
35
|
-
background: titleBgc,
|
|
36
|
-
boxShadow: titleBoxShadow,
|
|
37
|
-
borderBottom: titleBoxBorder,
|
|
38
|
-
marginBottom: titleBoxPadding + 'rpx',
|
|
39
|
-
justifyContent: showTabs.length>2?'space-between':'flex-start',
|
|
40
|
-
padding: tabPadding + 'rpx'
|
|
41
|
-
}"
|
|
42
|
-
>
|
|
43
|
-
<view
|
|
44
|
-
class="tab_item"
|
|
45
|
-
v-for="(tab, i) in showTabs"
|
|
46
|
-
:key="tab.value"
|
|
47
|
-
:style="{
|
|
48
|
-
background: i === tabIndex? titleBgcActColor: titleBgcColor,
|
|
49
|
-
color: i === tabIndex? titleActColor : titleColor,
|
|
50
|
-
}"
|
|
51
|
-
@click="switchTab(i)"
|
|
52
|
-
>{{tab.label}}</view>
|
|
53
|
-
</view>
|
|
54
|
-
<view v-else class="tab_list skeleton-wrap" :style="{
|
|
55
|
-
background: titleBgc,
|
|
56
|
-
boxShadow: titleBoxShadow,
|
|
57
|
-
borderBottom: titleBoxBorder,
|
|
58
|
-
marginBottom: titleBoxPadding + 'rpx'
|
|
59
|
-
}"
|
|
60
|
-
>
|
|
61
|
-
<view class="tab_item" v-for="i in 4" :key="i"></view>
|
|
62
|
-
</view>
|
|
63
|
-
</scroll-view>
|
|
64
|
-
|
|
65
|
-
<view v-if="loaded" class="brand_list-box">
|
|
66
|
-
<view class="brand_list" :class="{isPreview: isPreview}">
|
|
19
|
+
<view class="x-line"></view>
|
|
20
|
+
<view class="brand_wall_wrap" :style="[boxStyleComp]">
|
|
21
|
+
<view id="elx-tab" class="brand-wall-tab" :style="[tabStyleComp]">
|
|
22
|
+
<scroll-view
|
|
23
|
+
:scroll-x="layout==='v1'"
|
|
24
|
+
:scroll-y="layout==='v2'"
|
|
25
|
+
:style="{height:layout==='v2'? tabStyleComp.height:'auto'}"
|
|
26
|
+
:class="{'tab-linex':layout==='v1' && hStyle ==='v3'}"
|
|
27
|
+
>
|
|
67
28
|
<view
|
|
68
|
-
class="
|
|
69
|
-
:
|
|
70
|
-
|
|
71
|
-
|
|
29
|
+
class="tab_list"
|
|
30
|
+
:class="{hStyle: layout === 'v1'}"
|
|
31
|
+
:style="[tabListComp]"
|
|
32
|
+
v-if="loaded"
|
|
72
33
|
>
|
|
73
34
|
<view
|
|
74
|
-
class="
|
|
75
|
-
:class="{
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
<
|
|
35
|
+
class="tab_item"
|
|
36
|
+
:class="{
|
|
37
|
+
'tab_item-lineY':layout === 'v2' && ['v1','v3','v4'].includes(vStyle),
|
|
38
|
+
'tab_item-lineX':layout === 'v1'&& ['v2','v3'].includes(hStyle),
|
|
39
|
+
}"
|
|
40
|
+
v-for="(tab, i) in showTabs"
|
|
41
|
+
:key="tab.value"
|
|
42
|
+
:style="[i === tabIndex?tabActItemStyleComp:tabItemStyleComp]"
|
|
43
|
+
@click="switchTab(i)"
|
|
44
|
+
>
|
|
45
|
+
<view
|
|
46
|
+
v-if="(layout === 'v2' && ['v1','v3','v4'].includes(vStyle))
|
|
47
|
+
|| (layout === 'v1' && ['v2','v3'].includes(hStyle))"
|
|
48
|
+
class="lineCom"
|
|
49
|
+
:class="{lineSmall: ['v3'].includes(hStyle)}"
|
|
50
|
+
:style="{backgroundColor: i === tabIndex?tabActItemNameStyle.color:'rgba(0,0,0,0)'}"
|
|
51
|
+
></view>
|
|
52
|
+
<view :style="[i === tabIndex?tabActItemNameStyle:tabItemNameStyle]">{{tab.input}}</view>
|
|
85
53
|
</view>
|
|
54
|
+
</view>
|
|
55
|
+
<view
|
|
56
|
+
v-else
|
|
57
|
+
class="tab_list skeleton-wrap"
|
|
58
|
+
:class="{hStyle: layout === 'v1'}"
|
|
59
|
+
:style="{
|
|
60
|
+
background: titleBgc,
|
|
61
|
+
boxShadow: titleShadow,
|
|
62
|
+
}"
|
|
63
|
+
>
|
|
86
64
|
<view
|
|
87
|
-
class="
|
|
88
|
-
|
|
89
|
-
:class="{
|
|
90
|
-
|
|
65
|
+
class="tab_item"
|
|
66
|
+
v-for="i in 4" :key="i"
|
|
67
|
+
:class="{
|
|
68
|
+
'tab_item-lineY':layout === 'v2' && ['v1','v3','v4'].includes(vStyle),
|
|
69
|
+
'tab_item-lineX':layout === 'v1'&& ['v2','v3'].includes(hStyle),
|
|
70
|
+
}"
|
|
71
|
+
:style="[skeletonStyle]"
|
|
72
|
+
></view>
|
|
91
73
|
</view>
|
|
92
|
-
|
|
93
|
-
</view>
|
|
74
|
+
</scroll-view>
|
|
94
75
|
</view>
|
|
95
|
-
<view v-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
v-for="i in 16" :key="i"
|
|
100
|
-
>
|
|
76
|
+
<view v-if="!isPreview && layout === 'v1'" :style="{height: hMaskHeigh + 'rpx'}"></view>
|
|
77
|
+
<view class="brand-wall-content" :style="[contStyleComp,minContentHeight]">
|
|
78
|
+
<view v-if="loaded" class="brand_list-box">
|
|
79
|
+
<view class="brand_list">
|
|
101
80
|
<view
|
|
102
|
-
class="
|
|
103
|
-
:
|
|
104
|
-
:
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
81
|
+
class="brand_item"
|
|
82
|
+
:style="[brandItemStyles]"
|
|
83
|
+
:class="{
|
|
84
|
+
'n3': contentCell === 3,
|
|
85
|
+
'n4': contentCell === 4,
|
|
86
|
+
'n5': contentCell === 5,
|
|
87
|
+
}"
|
|
88
|
+
v-for="brand in brandList"
|
|
89
|
+
:key="brand.brand_id"
|
|
90
|
+
@click="toBrand(brand)"
|
|
91
|
+
>
|
|
92
|
+
<template v-if="brand.isEmpty === undefined">
|
|
93
|
+
<view
|
|
94
|
+
class="brand_icon"
|
|
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
|
+
}"
|
|
100
|
+
:style="[brandItemIconStyle]
|
|
101
|
+
">
|
|
102
|
+
<image v-if="brand.status===true" @error="brand.status = false" :src="brand.brand_icon" mode="aspectFill"></image>
|
|
103
|
+
<image v-if="brand.status===false" :src="errorShopUrl" mode="aspectFill"></image>
|
|
104
|
+
</view>
|
|
105
|
+
<view
|
|
106
|
+
class="brand_name"
|
|
107
|
+
:style="[brandStyle]"
|
|
108
|
+
:class="{brand_name3: contentCell === 3,brand_name4: contentCell === 4,brand_name5: contentCell === 5}"
|
|
109
|
+
>{{brand.brand_name}}</view>
|
|
110
|
+
</template>
|
|
111
111
|
</view>
|
|
112
|
+
</view>
|
|
113
|
+
<xd-no-data
|
|
114
|
+
:scale-size="2"
|
|
115
|
+
v-if="brandList && brandList.length === 0"
|
|
116
|
+
icon-type="empty"
|
|
117
|
+
>暂无品牌数据</xd-no-data>
|
|
118
|
+
</view>
|
|
119
|
+
<view v-else class="brand_list-box">
|
|
120
|
+
<view class="brand_list">
|
|
112
121
|
<view
|
|
113
|
-
class="
|
|
114
|
-
:
|
|
115
|
-
|
|
122
|
+
class="brand_item skeleton-wrap"
|
|
123
|
+
:style="[brandItemStyles]"
|
|
124
|
+
v-for="i in skeletonNum"
|
|
125
|
+
:key="i"
|
|
126
|
+
:class="{
|
|
127
|
+
'n3': contentCell === 3,
|
|
128
|
+
'n4': contentCell === 4,
|
|
129
|
+
'n5': contentCell === 5,
|
|
130
|
+
}"
|
|
131
|
+
>
|
|
132
|
+
<view
|
|
133
|
+
class="brand_icon"
|
|
134
|
+
:class="{brand_icon3: contentCell === 3,brand_icon4: contentCell === 4,brand_icon5: contentCell === 5}"
|
|
135
|
+
:style="{
|
|
136
|
+
width: getItemWH,
|
|
137
|
+
height:getItemWH,
|
|
138
|
+
borderRadius: radius + 'rpx',
|
|
139
|
+
}"
|
|
140
|
+
><view></view></view>
|
|
141
|
+
<view
|
|
142
|
+
class="brand_name"
|
|
143
|
+
:class="{brand_name3: contentCell === 3,brand_name4: contentCell === 4,brand_name5: contentCell === 5}"
|
|
144
|
+
><view></view></view>
|
|
145
|
+
</view>
|
|
116
146
|
</view>
|
|
117
147
|
</view>
|
|
118
148
|
</view>
|
|
@@ -125,15 +155,18 @@
|
|
|
125
155
|
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
126
156
|
import { jfbRootExec } from "@/utils/xd.event";
|
|
127
157
|
import JfbMallBrandWallMixin from "./JfbMallBrandWallMixin";
|
|
128
|
-
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
158
|
+
import { getContainerPropsValue,gCPVal } from "@/utils/xd.base";
|
|
129
159
|
import componentsMixins from "@/mixins/componentsMixins";
|
|
130
160
|
import extsMixins from "@/mixins/extsMixins";
|
|
131
161
|
import getServiceUrl from "@/common/getServiceUrl"
|
|
162
|
+
import XdNoData from "@/components/XdNoData/XdNoData.vue";
|
|
132
163
|
import { mapState } from "vuex"
|
|
164
|
+
|
|
133
165
|
export default {
|
|
134
166
|
name: "JfbMallBrandWall",
|
|
135
167
|
components: {
|
|
136
|
-
XdFontIcon
|
|
168
|
+
XdFontIcon,
|
|
169
|
+
XdNoData
|
|
137
170
|
},
|
|
138
171
|
mixins: [
|
|
139
172
|
componentsMixins, extsMixins, JfbMallBrandWallMixin
|
|
@@ -142,59 +175,62 @@
|
|
|
142
175
|
return {
|
|
143
176
|
isPreview: false,
|
|
144
177
|
loaded: false,
|
|
145
|
-
|
|
146
|
-
{label: "全部", value: "all",sort:1,isShow: true},
|
|
147
|
-
{label: "线下", value: "sell",sort:2, isShow: true},
|
|
148
|
-
{label: "电子码", value: "code",sort:3, isShow: true},
|
|
149
|
-
{label: '线上-线上', sort:4, value: 'stod',isShow: true},
|
|
150
|
-
{label: '线上-同城配送', sort:5, value: 'stod-samecity',isShow: false},
|
|
151
|
-
{label: '线上-快递配送',sort:6, value: 'stod-logistics',isShow: false},
|
|
152
|
-
{label: '线上-门店自提',sort:7, value: 'stod-takeout',isShow: false},
|
|
153
|
-
],
|
|
178
|
+
closeMask: true,
|
|
154
179
|
has_sell: true,
|
|
155
180
|
tabIndex: 0,
|
|
156
181
|
brandList: [],
|
|
157
182
|
loadIndex: 0,
|
|
158
|
-
brandNumber: 300,
|
|
159
183
|
|
|
160
|
-
|
|
184
|
+
//基础
|
|
185
|
+
skeletonNum: 0,
|
|
186
|
+
brandNumber: 300,
|
|
161
187
|
xnamespace: "",
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
188
|
+
category_ids: [],
|
|
189
|
+
layout:'v1', //v2=>左右 v1=>上下
|
|
190
|
+
vStyle:'v2',//左右结构样式变量
|
|
191
|
+
hStyle:'v1', //上下结构样式变量
|
|
192
|
+
hMaskHeigh: 110,
|
|
167
193
|
|
|
168
|
-
|
|
169
|
-
|
|
194
|
+
//常规
|
|
195
|
+
bodyPadding:{},
|
|
196
|
+
|
|
197
|
+
//内容区域
|
|
170
198
|
contentBoxBgc: '',
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
isContBorder: '',
|
|
177
|
-
isContBorderW: '',
|
|
178
|
-
isContBorderColor: '',
|
|
179
|
-
radius: 0,
|
|
199
|
+
background: '',
|
|
200
|
+
contentBgc: '',
|
|
201
|
+
listMargin:{},
|
|
202
|
+
listPadding:{},
|
|
203
|
+
contRadius:0,
|
|
180
204
|
|
|
181
|
-
|
|
205
|
+
//选项卡信息
|
|
182
206
|
titleBgc: '',
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
isTitleBorderW: '',
|
|
190
|
-
isTitleBorderColor:'',
|
|
191
|
-
titlePadding: '',
|
|
192
|
-
newLabel: [],
|
|
193
|
-
titleBgcColor:'',
|
|
207
|
+
tabPadding:{},//选项卡填充
|
|
208
|
+
titleStyle:{},
|
|
209
|
+
titleRadius:0,
|
|
210
|
+
titleShadow:'',
|
|
211
|
+
titleBorder:0,
|
|
212
|
+
titleBorderWidth:0,
|
|
194
213
|
titleBgcActColor:'',
|
|
195
|
-
|
|
196
|
-
|
|
214
|
+
titlePadding: 0, //内容与选项卡填充
|
|
215
|
+
titleSp: 0, //选项卡间距
|
|
216
|
+
|
|
197
217
|
|
|
218
|
+
//内容
|
|
219
|
+
bindSize:32,
|
|
220
|
+
contentCell: 4,
|
|
221
|
+
brandShadow: 'none',
|
|
222
|
+
brandBorder:0,
|
|
223
|
+
radius: 0,
|
|
224
|
+
brandStyle:{},
|
|
225
|
+
newLabel: [],
|
|
226
|
+
|
|
227
|
+
errorShopUrl: getServiceUrl('/common/empty/shop.png','size2'),
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
//高级
|
|
231
|
+
onlineBrandPath: "", //线上品牌跳转地址
|
|
232
|
+
offlineBrandPath: "", //线下品牌跳转地址
|
|
233
|
+
isCityFilter: "N", //是否开启城市筛选
|
|
198
234
|
|
|
199
235
|
}
|
|
200
236
|
},
|
|
@@ -202,75 +238,307 @@
|
|
|
202
238
|
...mapState({
|
|
203
239
|
stateCity: state => state.cityLocation.city
|
|
204
240
|
}),
|
|
205
|
-
showTabs(){
|
|
206
|
-
console.log(this.tabs,'showTabs');
|
|
207
241
|
|
|
208
|
-
|
|
209
|
-
|
|
242
|
+
minContentHeight(){
|
|
243
|
+
if(this.layout === 'v1'){
|
|
244
|
+
return {
|
|
245
|
+
minHeight: (this.layoutInfo.bodyMinHeightRpx - this.hMaskHeigh - this.getPMValue(this.listPadding, 'TB',0)) + 'rpx'
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
return {}
|
|
249
|
+
},
|
|
210
250
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
251
|
+
skeletonStyle(){
|
|
252
|
+
let margin = 0;
|
|
253
|
+
if(this.layout === 'v1') {
|
|
254
|
+
margin = '0rpx 24rpx 0rpx 0';
|
|
255
|
+
}
|
|
256
|
+
if(this.layout === 'v2') {
|
|
257
|
+
margin = '12rpx'
|
|
258
|
+
}
|
|
259
|
+
return {
|
|
260
|
+
"color": "#999",
|
|
261
|
+
"fontSize": "32rpx",
|
|
262
|
+
"fontWeight": "400",
|
|
263
|
+
"height": this.layout === 'v1' ?"60rpx":'90rpx',
|
|
264
|
+
"minWidth": this.layout === 'v1'?'132rpx':'10rpx',
|
|
265
|
+
"padding": this.layout === 'v1'?"0 16rpx":0,
|
|
266
|
+
"marginRight": this.layout === 'v1'?"20rpx":0,
|
|
267
|
+
"margin": margin,
|
|
268
|
+
"borderRadius": this.layout === 'v1'?"30rpx": this.radius + 'rpx'
|
|
215
269
|
}
|
|
270
|
+
},
|
|
271
|
+
showTabs(){
|
|
272
|
+
let tabs = this.$xdUniHelper.cloneDeep(this.newLabel).filter(item=>{
|
|
273
|
+
return item.check === true
|
|
216
274
|
});
|
|
217
|
-
this.tabs = this.tabs.filter(item =>{
|
|
218
|
-
if(item.label.includes('线上')){
|
|
219
|
-
item.label = item.label.replace('线上-','')
|
|
220
|
-
}
|
|
221
|
-
if(typeof item.isShow!=='boolean') {
|
|
222
|
-
return true
|
|
223
|
-
}
|
|
224
|
-
return item.isShow
|
|
225
|
-
})
|
|
226
275
|
|
|
227
|
-
this.tabs.sort((a,b)=>a.sort - b.sort)
|
|
228
|
-
console.log(this.tabs,this.has_sell,'pappapp');
|
|
229
276
|
//线下签是否展示通过后台控制
|
|
230
|
-
if(this.has_sell) return
|
|
231
|
-
else return
|
|
277
|
+
if(this.has_sell) return tabs;
|
|
278
|
+
else return tabs.filter(item => item.value !== 'sell');
|
|
279
|
+
},
|
|
280
|
+
|
|
281
|
+
//列表
|
|
282
|
+
getItemWH(){
|
|
283
|
+
let outWdith = 0;
|
|
284
|
+
if(this.layout === 'v2') {
|
|
285
|
+
outWdith += 172;
|
|
286
|
+
if(this.titleBorderWidth) outWdith += this.titleBorderWidth * 2;
|
|
287
|
+
if(this.titleBorderWidth === 0 && this.vStyle === 'v1') outWdith +=2
|
|
288
|
+
}
|
|
289
|
+
outWdith += this.getPMValue(this.listMargin, 'RL',0);
|
|
290
|
+
outWdith += this.getPMValue(this.listPadding, 'RL',0);
|
|
291
|
+
outWdith += this.getPMValue(this.bodyPadding, 'RL',0);
|
|
292
|
+
outWdith += (this.contentCell -1) * this.bindSize;
|
|
293
|
+
return (750 - outWdith)/this.contentCell + 'rpx'
|
|
232
294
|
},
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
295
|
+
brandItemStyles(){
|
|
296
|
+
return {
|
|
297
|
+
width: this.getItemWH,
|
|
298
|
+
marginRight: this.bindSize + 'rpx',
|
|
299
|
+
marginTop: this.bindSize + 'rpx'
|
|
300
|
+
}
|
|
236
301
|
},
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
302
|
+
brandItemIconStyle(){
|
|
303
|
+
return {
|
|
304
|
+
width: this.getItemWH,
|
|
305
|
+
height:this.getItemWH,
|
|
306
|
+
borderRadius: this.radius + 'rpx',
|
|
307
|
+
overflow:'hidden',
|
|
308
|
+
backgroundColor: this.contentBgc,
|
|
309
|
+
border: this.brandBorder,
|
|
310
|
+
boxShadow: this.brandShadow
|
|
311
|
+
}
|
|
240
312
|
},
|
|
313
|
+
//列表
|
|
314
|
+
|
|
315
|
+
boxStyleComp(){
|
|
316
|
+
let url = 'none';
|
|
317
|
+
if(this.background) url = getServiceUrl(this.background);
|
|
318
|
+
let tb = this.getPMValue(this.bodyPadding, 'TB', 0) * this.$rpxNum;
|
|
319
|
+
let css = {
|
|
320
|
+
minHeight: `calc(${ this.layoutInfo.bodyMinHeightPx}px - ${tb}px)`,
|
|
321
|
+
backgroundImage: `url(${url})`,
|
|
322
|
+
backgroundSize: '100% auto',
|
|
323
|
+
backgroundRepeat: 'no-repeat',
|
|
324
|
+
backgroundPosition:'top left',
|
|
325
|
+
backgroundColor:this.contentBoxBgc,
|
|
326
|
+
padding: this.getMarginAndPadding(this.bodyPadding,0)
|
|
327
|
+
}
|
|
241
328
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
329
|
+
if(this.layout === 'v2') {
|
|
330
|
+
css['display'] = 'flex';
|
|
331
|
+
css['justifyContent'] = 'flex-start';
|
|
332
|
+
css['alignItems'] = 'flex-start';
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
return css
|
|
245
336
|
},
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
337
|
+
|
|
338
|
+
//content
|
|
339
|
+
contStyleComp(){
|
|
340
|
+
let style = {
|
|
341
|
+
backgroundColor: this.contBgColor,
|
|
342
|
+
padding: this.getMarginAndPadding(this.listPadding, 0),
|
|
343
|
+
margin: this.getMarginAndPadding(this.listMargin, 0),
|
|
344
|
+
borderRadius: this.contRadius + 'rpx'
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
if(this.layout === 'v2'){
|
|
348
|
+
let outHeight = 0;
|
|
349
|
+
outHeight += this.getPMValue(this.listMargin, 'TB',0);
|
|
350
|
+
outHeight += this.getPMValue(this.listPadding, 'TB',0);
|
|
351
|
+
outHeight += this.getPMValue(this.bodyPadding, 'TB',0);
|
|
352
|
+
outHeight = outHeight * this.$rpxNum
|
|
353
|
+
if(['v1', 'v2'].includes(this.vStyle)) {
|
|
354
|
+
style['height'] = `${this.layoutInfo.bodyMinHeightPx - outHeight}px`;
|
|
355
|
+
}
|
|
356
|
+
style['overflowY'] = 'auto';
|
|
357
|
+
style['overflowX'] = 'hidden';
|
|
358
|
+
}
|
|
359
|
+
return style
|
|
249
360
|
},
|
|
361
|
+
//content
|
|
362
|
+
|
|
363
|
+
//tab
|
|
364
|
+
getTabHeight(){
|
|
365
|
+
let style = {}
|
|
366
|
+
//上下结构
|
|
367
|
+
if(this.layout === 'v1') {
|
|
368
|
+
|
|
369
|
+
if(!this.isPreview) {
|
|
370
|
+
style['position'] = 'fixed';
|
|
371
|
+
style['zIndex'] = '10';
|
|
372
|
+
style['top'] = this.layoutInfo.top + 'rpx';
|
|
373
|
+
style['width'] = '100%';
|
|
374
|
+
}
|
|
375
|
+
}
|
|
250
376
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
377
|
+
//左右结构
|
|
378
|
+
if(this.layout === 'v2') {
|
|
379
|
+
style['width'] = '172rpx';
|
|
380
|
+
style['flexShrink'] = 0;
|
|
381
|
+
style['overflow'] = 'hidden';
|
|
382
|
+
style['padding'] = 0;
|
|
383
|
+
|
|
384
|
+
if(['v1', 'v2'].includes(this.vStyle)) {
|
|
385
|
+
let tb = this.getPMValue(this.bodyPadding, 'TB', 0) * this.$rpxNum + this.titleBorderWidth * 2 *this.$rpxNum;
|
|
386
|
+
style['height'] = `calc(${ this.layoutInfo.bodyMinHeightPx}px - ${tb}px)`;
|
|
387
|
+
style['borderRadius'] = `0 ${this.titleRadius}rpx ${this.titleRadius}rpx 0`;
|
|
388
|
+
}
|
|
255
389
|
}
|
|
256
|
-
return
|
|
390
|
+
return style;
|
|
257
391
|
},
|
|
392
|
+
tabListComp(){
|
|
393
|
+
let temp = {};
|
|
394
|
+
if(['v1','v2'].includes(this.layout)) {
|
|
395
|
+
temp['paddingLeft'] = (this.tabPadding.left || 0) + 'rpx';
|
|
396
|
+
temp['paddingRight'] = (this.tabPadding.right || 0) + 'rpx';
|
|
397
|
+
temp['paddingBottom'] = (this.tabPadding.bottom || 0) + 'rpx';
|
|
398
|
+
temp['paddingTop'] = (this.tabPadding.top || 0) + 'rpx';
|
|
399
|
+
}
|
|
400
|
+
return temp
|
|
401
|
+
},
|
|
402
|
+
tabStyleComp(){
|
|
403
|
+
let border = {};
|
|
404
|
+
if(this.layout === 'v2') border = {border: this.titleBorder}
|
|
405
|
+
else border = {borderBottom: this.titleBorder}
|
|
406
|
+
return {
|
|
407
|
+
boxShadow: this.titleShadow,
|
|
408
|
+
...border,
|
|
409
|
+
backgroundColor: this.titleBgc,
|
|
410
|
+
//在模版二不使用内容与选项卡直接间距
|
|
411
|
+
marginBottom: this.layout === 'v2'?0:this.titlePadding + 'rpx',
|
|
412
|
+
...this.getTabHeight,
|
|
413
|
+
};
|
|
414
|
+
},
|
|
415
|
+
getTabItemHeight(){
|
|
416
|
+
if(this.layout === 'v1'){
|
|
417
|
+
return {
|
|
418
|
+
height: '60rpx',
|
|
419
|
+
lineHeight:'60rpx',
|
|
420
|
+
marginRight: this.titleSp + 'rpx',
|
|
421
|
+
minWidth: '80rpx'
|
|
422
|
+
}
|
|
423
|
+
}
|
|
258
424
|
|
|
425
|
+
if(this.layout === 'v2'){
|
|
426
|
+
return {
|
|
427
|
+
height: '100rpx',
|
|
428
|
+
lineHeight: '100rpx',
|
|
429
|
+
borderRadius:'0',
|
|
430
|
+
fontSize:'24rpx',
|
|
431
|
+
marginBottom: this.titleSp + 'rpx'
|
|
432
|
+
}
|
|
433
|
+
}
|
|
259
434
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
let
|
|
263
|
-
|
|
435
|
+
},
|
|
436
|
+
tabItemStyleComp(){
|
|
437
|
+
let style = {
|
|
438
|
+
color: this.titleStyle.color,
|
|
439
|
+
fontWeight: this.titleStyle.fontWeight,
|
|
440
|
+
};
|
|
441
|
+
if(this.layout === 'v2') {
|
|
442
|
+
style['fontSize'] = '24rpx';
|
|
443
|
+
style = {...style,...this.getTabItemHeight}
|
|
444
|
+
if(['v2'].includes(this.vStyle)) {
|
|
445
|
+
style['backgroundColor'] = this.titleStyle.bgColor;
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
if(this.layout === 'v1') {
|
|
449
|
+
style['fontSize'] = parseInt(this.titleStyle.actFontSize) + 'rpx';
|
|
450
|
+
style = {...style,...this.getTabItemHeight}
|
|
451
|
+
}
|
|
452
|
+
return style
|
|
453
|
+
},
|
|
454
|
+
tabActItemStyleComp(){
|
|
455
|
+
let style = {
|
|
456
|
+
color: this.titleStyle.actColor,
|
|
457
|
+
fontWeight: this.titleStyle.actFontWeight,
|
|
458
|
+
};
|
|
459
|
+
if(this.layout === 'v2') {
|
|
460
|
+
style = {...style,...this.getTabItemHeight}
|
|
461
|
+
if(['v2'].includes(this.vStyle)) {
|
|
462
|
+
if(this.titleStyle.actBgColor) style['backgroundColor'] = this.titleStyle.actBgColor;
|
|
463
|
+
else {
|
|
464
|
+
if(this.mainGradient && this.mainGradient.indexOf('gradient') !== -1){
|
|
465
|
+
style['backgroundImage'] = this.mainGradient;
|
|
466
|
+
}
|
|
467
|
+
else style['backgroundColor'] = this.mainColor;
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
if(this.layout === 'v1') {
|
|
472
|
+
style['fontSize'] = parseInt(this.titleStyle.actFontSize) + 'rpx';
|
|
473
|
+
style = {...style,...this.getTabItemHeight}
|
|
474
|
+
}
|
|
475
|
+
return style
|
|
264
476
|
},
|
|
265
477
|
|
|
266
|
-
|
|
267
|
-
|
|
478
|
+
tabItemNameStyle(){
|
|
479
|
+
if(this.layout === 'v2') return {
|
|
480
|
+
fontSize: parseInt(this.titleStyle.fontSize) + 'rpx',
|
|
481
|
+
fontWeight: this.titleStyle.fontWeight,
|
|
482
|
+
color: this.titleStyle.color,
|
|
483
|
+
}
|
|
268
484
|
return {
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
485
|
+
borderRadius:['v1'].includes(this.hStyle)?'60rpx': 0,
|
|
486
|
+
backgroundColor: ['v1'].includes(this.hStyle) ? this.titleStyle.bgColor:'',
|
|
487
|
+
color: this.titleStyle.color,
|
|
488
|
+
padding:'0 32rpx',
|
|
489
|
+
fontSize: parseInt(this.titleStyle.fontSize) + 'rpx',
|
|
490
|
+
fontWeight: this.titleStyle.fontWeight,
|
|
491
|
+
}
|
|
492
|
+
},
|
|
493
|
+
tabActItemNameStyle(){
|
|
494
|
+
let bgColor = '';
|
|
495
|
+
let bgImage = 'none';
|
|
496
|
+
let color = this.mainColor;
|
|
497
|
+
if(this.layout === 'v2') {
|
|
498
|
+
if(['v2'].includes(this.vStyle)) {
|
|
499
|
+
//选项卡标签文字颜色
|
|
500
|
+
if(this.titleStyle.actColor) color = this.titleStyle.actColor;
|
|
501
|
+
else color = '#fff';
|
|
502
|
+
|
|
503
|
+
//选项卡标签背景颜色
|
|
504
|
+
if(this.titleStyle.actBgColor) bgColor = this.titleStyle.actBgColor;
|
|
505
|
+
else {
|
|
506
|
+
if(this.mainGradient && this.mainGradient.indexOf('gradient') !== -1) bgImage = this.mainGradient;
|
|
507
|
+
else bgColor = this.mainColor;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
return {
|
|
512
|
+
backgroundColor: bgColor,
|
|
513
|
+
color: color,
|
|
514
|
+
fontSize: parseInt(this.titleStyle.actFontSize) + 'rpx',
|
|
515
|
+
fontWeight: this.titleStyle.actFontWeight,
|
|
516
|
+
}
|
|
272
517
|
}
|
|
273
|
-
|
|
518
|
+
|
|
519
|
+
if(['v1'].includes(this.hStyle)) {
|
|
520
|
+
//选项卡标签文字颜色
|
|
521
|
+
if(this.titleStyle.actColor) color = this.titleStyle.actColor;
|
|
522
|
+
else color = '#fff';
|
|
523
|
+
|
|
524
|
+
//选项卡标签背景颜色
|
|
525
|
+
if(this.titleStyle.actBgColor) bgColor = this.titleStyle.actBgColor;
|
|
526
|
+
else {
|
|
527
|
+
if(this.mainGradient && this.mainGradient.indexOf('gradient') !== -1) bgImage = this.mainGradient;
|
|
528
|
+
else bgColor = this.mainColor;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
return {
|
|
532
|
+
borderRadius:['v1'].includes(this.hStyle)?'60rpx': 0,
|
|
533
|
+
backgroundColor: bgColor,
|
|
534
|
+
backgroundImage: bgImage,
|
|
535
|
+
padding: '0 32rpx',
|
|
536
|
+
color: color,
|
|
537
|
+
fontSize: parseInt(this.titleStyle.actFontSize) + 'rpx',
|
|
538
|
+
fontWeight: this.titleStyle.actFontWeight,
|
|
539
|
+
}
|
|
540
|
+
},
|
|
541
|
+
//tab
|
|
274
542
|
|
|
275
543
|
|
|
276
544
|
},
|
|
@@ -278,33 +546,20 @@
|
|
|
278
546
|
container(value,oldValue) {
|
|
279
547
|
if(JSON.stringify(value) === JSON.stringify(oldValue)) return;
|
|
280
548
|
if (this.$configProject['isPreview']) this.init(value)
|
|
281
|
-
},
|
|
282
|
-
newLabel: {
|
|
283
|
-
deep:true,
|
|
284
|
-
handler(n,o) {
|
|
285
|
-
if(this.isPreview) {
|
|
286
|
-
n = n.map(item=>{
|
|
287
|
-
if(!('isShow' in item)) {
|
|
288
|
-
item.isShow = true
|
|
289
|
-
}
|
|
290
|
-
return item;
|
|
291
|
-
})
|
|
292
|
-
n = n.filter(item => item.isShow)
|
|
293
|
-
this.tabs = n
|
|
294
|
-
this.tabs.sort((a,b)=>a.sort - b.sort)
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
549
|
}
|
|
298
550
|
},
|
|
551
|
+
|
|
299
552
|
created() {
|
|
300
|
-
this.init(this.container);
|
|
301
553
|
this.isPreview = this.$configProject.isPreview;
|
|
554
|
+
this.init(this.container);
|
|
555
|
+
},
|
|
556
|
+
mounted() {
|
|
557
|
+
this.$nextTick()
|
|
302
558
|
},
|
|
303
559
|
methods: {
|
|
304
560
|
onJfbLoad(options) {
|
|
305
561
|
//设置业务请求代码
|
|
306
562
|
this.setNameSpace(options);
|
|
307
|
-
|
|
308
563
|
this.getList();
|
|
309
564
|
},
|
|
310
565
|
/**
|
|
@@ -312,87 +567,264 @@
|
|
|
312
567
|
* @param container {object} 业务组件对象自己
|
|
313
568
|
*/
|
|
314
569
|
init(container) {
|
|
315
|
-
|
|
316
|
-
this.
|
|
317
|
-
this.
|
|
318
|
-
this.
|
|
319
|
-
this.
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
this.
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
this.
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
this.
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
570
|
+
//基础
|
|
571
|
+
this.xnamespace = gCPVal(container, 'xnamespace', this.projectAttr.business_code||this.xnamespace);
|
|
572
|
+
this.category_ids = gCPVal(container, 'category_ids', []);
|
|
573
|
+
this.brandNumber = gCPVal(container, 'brandNumber', 300);
|
|
574
|
+
this.layout = gCPVal(container, 'layout', 'v1');
|
|
575
|
+
let vStyle = gCPVal(container, 'vStyle', 'v1'); //左右接口布局
|
|
576
|
+
if(['v3', 'v4'].includes(vStyle)) vStyle = 'v1';
|
|
577
|
+
this.vStyle = vStyle;
|
|
578
|
+
|
|
579
|
+
let hStyle = gCPVal(container, 'hStyle', 'v1'); //上下接口布局
|
|
580
|
+
if(['v2'].includes(hStyle)) hStyle = 'v1';
|
|
581
|
+
this.hStyle = hStyle;
|
|
582
|
+
|
|
583
|
+
|
|
584
|
+
if( this.layout === 'v1') {
|
|
585
|
+
this.contentCell = gCPVal(container, 'contentCell', 4);
|
|
586
|
+
this.skeletonNum = this.contentCell * 6;
|
|
587
|
+
}
|
|
588
|
+
if( this.layout === 'v2') {
|
|
589
|
+
this.contentCell = 3;
|
|
590
|
+
this.skeletonNum = 18;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
//数据内容
|
|
594
|
+
let defNewLabel = [
|
|
595
|
+
{value:'all', label: '全部',input:'全部',check: true,},
|
|
596
|
+
{value:'sell', label: '线下',input:'线下',check: true},
|
|
597
|
+
{value:'code', label: '电子码',input:'电子码',check: true},
|
|
598
|
+
{value:'stod', label: '线上',input:'线上',check: true},
|
|
599
|
+
{value:'stod-samecity', label: '同城配送',input:'',check: false},
|
|
600
|
+
{value:'stod-logistics', label: '快递配送',input:'',check: false},
|
|
601
|
+
{value:'stod-takeout', label: '门店自提',input:'',check: false},
|
|
602
|
+
]
|
|
603
|
+
let newLabel = this.$xdUniHelper.cloneDeep(gCPVal(container, 'newLabel', []))
|
|
604
|
+
.filter(item=>{
|
|
605
|
+
//更古老数据,相对新数据
|
|
606
|
+
return item['isShow'] === undefined || item['isShow'] === true
|
|
607
|
+
})
|
|
608
|
+
.sort((a,b)=>Number(a.sort)-Number(b.sort))
|
|
609
|
+
.map(item=>{
|
|
610
|
+
item['placeholder'] = '自定义名称';
|
|
611
|
+
delete item['sort'];
|
|
612
|
+
if(item['isShow'] !== undefined) {
|
|
613
|
+
item['check'] = item['isShow'];
|
|
614
|
+
delete item['isShow'];
|
|
615
|
+
}
|
|
616
|
+
else item['check'] = true;
|
|
617
|
+
if(item['newLabel'] !== undefined || item['label'] !== undefined) {
|
|
618
|
+
item['input'] = item['newLabel'] || item['label'];
|
|
619
|
+
delete item['newLabel'];
|
|
620
|
+
delete item['label'];
|
|
621
|
+
}
|
|
622
|
+
return item
|
|
623
|
+
});
|
|
624
|
+
let defValues = {
|
|
625
|
+
all: '全部',
|
|
626
|
+
sell:'线下',
|
|
627
|
+
code:'电子码',
|
|
628
|
+
stod:'线上',
|
|
629
|
+
'stod-samecity':'同城配送',
|
|
630
|
+
"stod-logistics":'快递配送',
|
|
631
|
+
'stod-takeout':'门店自提'
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
this.newLabel = gCPVal(container, 'tabContent', newLabel.length > 0 ? newLabel: defNewLabel).map(item=>{
|
|
635
|
+
if(item.input === '') item.input = defValues[item.value];
|
|
636
|
+
return item
|
|
637
|
+
});
|
|
638
|
+
|
|
639
|
+
//常规
|
|
640
|
+
let defBodyPadding= 0;
|
|
641
|
+
if(this.layout === 'v2') {
|
|
642
|
+
if(['v1','v2'].includes(this.vStyle)) defBodyPadding = 0;
|
|
643
|
+
if(['v3'].includes(this.vStyle)) defBodyPadding = {top:24,left:0, right:24, bottom:0};
|
|
644
|
+
if(['v4'].includes(this.vStyle)) defBodyPadding = {top:24,left:24, right:24, bottom:0};
|
|
645
|
+
}
|
|
646
|
+
this.bodyPadding = gCPVal(container, 'bodyPadding', [defBodyPadding,0], {sKey: 'bodyPaddingStatus', fields: ['bodyPadding'], isPMR: true});
|
|
647
|
+
let defContentBoxBgc = '#fff';
|
|
648
|
+
if(this.layout === 'v2'){
|
|
649
|
+
if(['v2','v3', 'v4'].includes(this.vStyle))defContentBoxBgc = '#f8f8f8'
|
|
650
|
+
}
|
|
651
|
+
if(this.layout === 'v1') defContentBoxBgc = '#f8f8f8'
|
|
652
|
+
this.contentBoxBgc = gCPVal(container, 'contentBoxBgc', [defContentBoxBgc,'rgba(0,0,0,0)'], {sKey: 'contentStyleStatus', fields: ['contentBoxBgc','background']});
|
|
653
|
+
this.background = gCPVal(container, 'background', [{url:''}], {sKey: 'contentStyleStatus', fields: ['contentBoxBgc','background']}).url;
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
//内容区域
|
|
657
|
+
let defContBgColor = '';
|
|
658
|
+
if(this.layout === 'v2'){
|
|
659
|
+
if(['v2','v3', 'v4'].includes(this.vStyle)) defContBgColor = '#fff'
|
|
660
|
+
}
|
|
661
|
+
if(this.layout === 'v1') defContBgColor = '#f8f8f8';
|
|
662
|
+
this.contBgColor = gCPVal(container, 'contBgColor', [defContBgColor,'rgba(0,0,0,0)'], {sKey: 'contBgColorStatus', fields: ['contBgColor']});
|
|
663
|
+
let defListPadding = {top:48,left:48, right:48, bottom:48};
|
|
664
|
+
|
|
665
|
+
if(this.layout === 'v2'){
|
|
666
|
+
if(['v2'].includes(this.vStyle)) defListPadding = {top:40,left:40, right:40, bottom:40};
|
|
667
|
+
}
|
|
668
|
+
if(this.layout === 'v1'){
|
|
669
|
+
if(this.contentCell === 3) defListPadding = {top:48,left:48, right:48, bottom:48};
|
|
670
|
+
else defListPadding = {top:40,left:40, right:40, bottom:40};
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
let defListMargin = 0;
|
|
674
|
+
if(this.layout === 'v2' && this.vStyle === 'v2') defListMargin = 24;
|
|
675
|
+
|
|
676
|
+
this.listPadding = gCPVal(container, 'listPadding', [defListPadding,24], {sKey: 'listPaddingStatus', fields: ['listPadding'], isPMR: true});
|
|
677
|
+
this.listMargin = gCPVal(container, 'listMargin', [defListMargin,0], {sKey: 'listMarginStatus', fields: ['listMargin'], isPMR: true});
|
|
678
|
+
this.contRadius = gCPVal(container, 'contRadius', [this.gStyleValue.radius,0],{sKey: 'contRadiusStatus', fields: ['contRadius']})||0;
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
//选项卡
|
|
682
|
+
let defTitleBgc = '#fff';
|
|
683
|
+
let defTabPadding = 0;
|
|
684
|
+
let oldTabPadding = 0;
|
|
685
|
+
if(this.layout === 'v2') {
|
|
686
|
+
if(['v1'].includes(this.vStyle)) defTitleBgc = '#f8f8f8';
|
|
687
|
+
}
|
|
688
|
+
if(this.layout === 'v1') {
|
|
689
|
+
defTabPadding = {top:24,left:32, right:32, bottom:24};
|
|
690
|
+
oldTabPadding = {top:40,left:40, right:40, bottom:40};
|
|
691
|
+
}
|
|
692
|
+
this.tabPadding = gCPVal(container, 'tabPadding', [defTabPadding,oldTabPadding], {sKey: 'tabPaddingStatus', fields: ['tabPadding'], isPMR: true});
|
|
693
|
+
this.titleBgc = gCPVal(container, 'titleBgc', [defTitleBgc,'#fff'],{sKey: 'titleBgcStatus', fields: ['titleBgc']});
|
|
694
|
+
let titleColor = gCPVal(container, 'titleColor', '');
|
|
695
|
+
let titleActColor = gCPVal(container, 'titleActColor', '');
|
|
696
|
+
let titleBgcColor = gCPVal(container, 'titleBgcColor', '');
|
|
697
|
+
this.titleBgcActColor = gCPVal(container, 'titleBgcActColor', '');
|
|
698
|
+
let titleStyleStatus = gCPVal(container, 'titleStyleStatus', '');
|
|
699
|
+
if(titleStyleStatus === 'D') titleActColor = '';
|
|
700
|
+
let mainColor = titleActColor || this.mainColor;
|
|
701
|
+
//if(this.layout === 'v1' && this.hStyle === 'v1') mainColor = '#fff';
|
|
702
|
+
if(this.layout === 'v2' && this.vStyle === 'v2') mainColor = '#fff';
|
|
703
|
+
this.titleStyle = gCPVal(
|
|
704
|
+
container,
|
|
705
|
+
"titleStyle",
|
|
706
|
+
[{
|
|
707
|
+
color: titleColor || '#333',
|
|
708
|
+
bgColor: titleBgcColor || '#fff' ,
|
|
709
|
+
fontSize: this.layout === 'v2' ?'24':'32',
|
|
710
|
+
fontWeight: '400',
|
|
711
|
+
actColor: titleActColor || '',
|
|
712
|
+
actFontWeight: '500',
|
|
713
|
+
actFontSize: this.layout === 'v2' ?'24':'32',
|
|
714
|
+
actBgColor:this.titleBgcActColor || '',
|
|
715
|
+
}],
|
|
716
|
+
{sKey:'titleStyleStatus',fields:['titleStyle'],isMerge: true},
|
|
717
|
+
);
|
|
718
|
+
this.titleShadow = gCPVal(container, 'titleShadow', [this.gStyleValue.shadow , 'none'], {isShadow:true, bsOld:['isTitleShadow','isTitleShadowBgcW','isTitleShadowBgc']});
|
|
719
|
+
this.titleBorder = gCPVal(container, 'titleBorder', [{color: '#eee', width: '0', style: 'solid'},{color: '#eee', width: '0', style: 'solid'}], {isBorder:true, bsOld:['isTitleBorder','isTitleBorderW','isTitleBorderColor']});
|
|
720
|
+
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']});
|
|
721
|
+
|
|
722
|
+
let defTitleRadius = null;
|
|
723
|
+
if(this.layout === 'v2'){
|
|
724
|
+
if(['v1','v2'].includes(this.vStyle)) defTitleRadius = '0';
|
|
725
|
+
}
|
|
726
|
+
this.titleRadius = gCPVal(container, 'titleRadius', [defTitleRadius,this.gStyleValue.radius,'0'],{sKey: 'titleRadiusStatus', fields: ['titleRadius']})||0;
|
|
727
|
+
this.titlePadding = gCPVal(container, 'titlePadding', 0,{sKey: 'titlePaddingStatus', fields: ['titlePadding']});
|
|
728
|
+
this.titleSp = gCPVal(container, 'titleSp', [(this.layout === 'v2'?0:48), 20],{sKey: 'titleSpStatus', fields: ['titleSp']});
|
|
338
729
|
|
|
339
730
|
//内容
|
|
340
|
-
this.
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
if(this.contentCell ===
|
|
344
|
-
if
|
|
345
|
-
this.
|
|
346
|
-
this.
|
|
347
|
-
this.
|
|
348
|
-
this.
|
|
349
|
-
this.
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
{
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
this.
|
|
364
|
-
|
|
731
|
+
this.contentBgc = gCPVal(container, 'contentBgc', '#fff',{sKey: 'contentBgcStatus', fields: ['contentBgc']} );
|
|
732
|
+
let contentPadding = gCPVal(container, 'contentPadding',''), bindSize = 68;
|
|
733
|
+
if(this.layout === 'v1' && this.contentCell === 3) bindSize = 28;
|
|
734
|
+
if(this.layout === 'v1' && this.contentCell === 5) bindSize = 60;
|
|
735
|
+
if(contentPadding) bindSize = 112 - Number(contentPadding);
|
|
736
|
+
this.bindSize = 112 - Number(gCPVal(container, 'bindSize', [bindSize,68],{sKey: 'bindSizeStatus', fields: ['bindSize']}));
|
|
737
|
+
this.radius = gCPVal(container, 'radius', [this.gStyleValue.radius,0],{sKey: 'radiusStatus', fields: ['radius']})||0;
|
|
738
|
+
this.brandShadow = gCPVal(container, 'brandShadow', [this.gStyleValue.shadow,'none'], {isShadow:true, bsOld:['isContShadow','isContShadowBgcW','isContShadowBgc']});
|
|
739
|
+
this.brandBorder = gCPVal(container, 'brandBorder', [{color: '#f8f8f8', width: '2', style: 'solid'},{color: '#eee', width: '0', style: 'solid'}], {isBorder:true, bsOld:['isContBorder','isContBorderW','isContBorderColor']});
|
|
740
|
+
this.brandStyle = gCPVal(
|
|
741
|
+
container,
|
|
742
|
+
"brandStyle",
|
|
743
|
+
[{
|
|
744
|
+
color: gCPVal(container, 'brandNameColor', '') || '#666',
|
|
745
|
+
fontSize: '28rpx',
|
|
746
|
+
fontWeight: '400',
|
|
747
|
+
}],
|
|
748
|
+
{sKey:'brandStyleStatus',fields:['brandStyle'],isMerge: true},
|
|
749
|
+
);
|
|
750
|
+
|
|
751
|
+
|
|
752
|
+
//高级
|
|
753
|
+
this.onlineBrandPath = gCPVal(container, "onlineBrandPath", {value: ""}).value;
|
|
754
|
+
this.offlineBrandPath = gCPVal(container, "offlineBrandPath", {value: ""}).value;
|
|
755
|
+
this.isCityFilter = gCPVal(container, 'isCityFilter', 'N');
|
|
756
|
+
|
|
757
|
+
if(this.isPreview) {
|
|
758
|
+
this.compTabHeight();
|
|
759
|
+
}
|
|
365
760
|
},
|
|
761
|
+
|
|
762
|
+
/**
|
|
763
|
+
* @description 计算tab高度
|
|
764
|
+
*/
|
|
765
|
+
compTabHeight(){
|
|
766
|
+
this.$xdUniHelper.getWindowHeight(['#elx-tab'], this)
|
|
767
|
+
.then(res => {
|
|
768
|
+
let tab = res['#elx-tab'];
|
|
769
|
+
if(tab && tab.height) {
|
|
770
|
+
this.hMaskHeigh = tab.height * this.$pxNum
|
|
771
|
+
}
|
|
772
|
+
})
|
|
773
|
+
.catch()
|
|
774
|
+
},
|
|
775
|
+
|
|
366
776
|
switchTab(i){
|
|
367
777
|
this.tabIndex = i;
|
|
778
|
+
this.brandList = null
|
|
368
779
|
this.getList();
|
|
369
780
|
},
|
|
781
|
+
|
|
370
782
|
getList(){
|
|
371
783
|
this.$xdShowLoading({});
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
784
|
+
let params = {
|
|
785
|
+
page_size: this.brandNumber,
|
|
786
|
+
tab: this.showTabs[this.tabIndex].value,
|
|
787
|
+
}
|
|
788
|
+
if(this.xnamespace) params['znamespace'] = this.xnamespace;
|
|
789
|
+
if(this.isCityFilter === "Y") params['city_code'] = this.stateCity.city_code;
|
|
790
|
+
else params['city_code'] = '';
|
|
791
|
+
if(this.category_ids && this.category_ids.length > 0) params['category_ids'] = this.category_ids.join(",");
|
|
792
|
+
|
|
793
|
+
jfbRootExec("getNewBrandWallList", {vm: this,data: params}).then(res => {
|
|
794
|
+
this.$xdHideLoading();
|
|
795
|
+
let brandList = res.items.map(item => {
|
|
384
796
|
item['brand_icon'] = item.brand_icon ? getServiceUrl(item.brand_icon, "size2") : "";
|
|
797
|
+
item['status'] = true;
|
|
385
798
|
return item;
|
|
386
799
|
});
|
|
800
|
+
|
|
801
|
+
//补缺
|
|
802
|
+
if(brandList.length >0) {
|
|
803
|
+
let differences = 0;
|
|
804
|
+
if( brandList.length % this.contentCell > 0) {
|
|
805
|
+
differences = this.contentCell - brandList.length % this.contentCell
|
|
806
|
+
}
|
|
807
|
+
for(let i =0; i < differences; i++) {
|
|
808
|
+
brandList.push({isEmpty: true});
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
this.brandList = brandList;
|
|
813
|
+
|
|
387
814
|
//只限制第一次加载时设置
|
|
388
815
|
if(this.loadIndex++ == 0){
|
|
389
816
|
this.has_sell = res.has_sell;
|
|
390
817
|
}
|
|
391
818
|
this.loaded = true;
|
|
392
|
-
|
|
819
|
+
|
|
820
|
+
this.$nextTick(()=>{
|
|
821
|
+
this.compTabHeight()
|
|
822
|
+
})
|
|
393
823
|
})
|
|
394
824
|
},
|
|
825
|
+
|
|
395
826
|
toBrand(brand){
|
|
827
|
+
if(this.isPreview) return;
|
|
396
828
|
let { params , brand_id} = brand;
|
|
397
829
|
let pa = Object.assign({brand_id}, params || {}) , otherP = '';
|
|
398
830
|
if(!this.$xdUniHelper.isEmpty(pa)) otherP = `&${this.$xdUniHelper.jsonToParams(pa)}`
|
|
@@ -411,13 +843,11 @@
|
|
|
411
843
|
},
|
|
412
844
|
}
|
|
413
845
|
}
|
|
414
|
-
|
|
415
846
|
</script>
|
|
416
847
|
|
|
417
848
|
<style scoped lang="less">
|
|
418
849
|
@import "./JfbMallBrandWallLess.less";
|
|
419
850
|
.brand_list-box {
|
|
420
|
-
width: 100vw;
|
|
421
851
|
|
|
422
852
|
& > .brand_list {
|
|
423
853
|
width: 100%;
|
|
@@ -427,39 +857,73 @@
|
|
|
427
857
|
min-height: 100%;
|
|
428
858
|
&__body{
|
|
429
859
|
.brand_wall_wrap{
|
|
430
|
-
.tab_list{
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
860
|
+
& .tab_list{
|
|
861
|
+
|
|
862
|
+
&.hStyle {
|
|
863
|
+
width: 100%;
|
|
864
|
+
display: flex;
|
|
865
|
+
justify-content: space-between;
|
|
866
|
+
white-space: nowrap;
|
|
867
|
+
min-width: fit-content;
|
|
868
|
+
box-sizing: border-box;
|
|
869
|
+
}
|
|
870
|
+
|
|
438
871
|
&.skeleton-wrap{
|
|
439
872
|
.tab_item{
|
|
440
873
|
background: @xd-skeleton-color;
|
|
441
874
|
}
|
|
442
875
|
}
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
876
|
+
|
|
877
|
+
|
|
878
|
+
& .tab_item{
|
|
879
|
+
text-align: center;
|
|
880
|
+
&-lineY {
|
|
881
|
+
display: flex;
|
|
882
|
+
justify-content: flex-start;
|
|
883
|
+
align-items: center;
|
|
884
|
+
flex-flow: nowrap;
|
|
885
|
+
position: relative;
|
|
886
|
+
& > view {
|
|
887
|
+
text-align: center;
|
|
888
|
+
&.lineCom {
|
|
889
|
+
position: absolute;
|
|
890
|
+
left:0;
|
|
891
|
+
top:50%;
|
|
892
|
+
transform: translateY(-50%);
|
|
893
|
+
width: 6rpx;
|
|
894
|
+
height: 46rpx;
|
|
895
|
+
border-radius: 4rpx;
|
|
896
|
+
}
|
|
897
|
+
&:last-child {
|
|
898
|
+
flex: 1;
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
&-lineX {
|
|
903
|
+
position: relative;
|
|
904
|
+
& > view {
|
|
905
|
+
&.lineCom {
|
|
906
|
+
position: absolute;
|
|
907
|
+
left: 50%;
|
|
908
|
+
width: 64rpx;
|
|
909
|
+
transform: translateX(-50%);
|
|
910
|
+
bottom: -16rpx;
|
|
911
|
+
height: 6rpx;
|
|
912
|
+
border-radius: 4rpx;
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
}
|
|
454
917
|
}
|
|
455
|
-
.tab_item:last-child {
|
|
918
|
+
& .tab_item:last-child {
|
|
456
919
|
margin-right: 0;
|
|
920
|
+
margin-bottom: 0;
|
|
457
921
|
}
|
|
458
922
|
}
|
|
459
923
|
|
|
460
924
|
.brand_list{
|
|
461
925
|
display: flex;
|
|
462
|
-
justify-content:
|
|
926
|
+
justify-content: center;
|
|
463
927
|
align-items: center;
|
|
464
928
|
flex-flow: wrap;
|
|
465
929
|
|
|
@@ -472,14 +936,48 @@
|
|
|
472
936
|
flex-shrink: 0;
|
|
473
937
|
&.skeleton-wrap{
|
|
474
938
|
.brand_icon{
|
|
475
|
-
|
|
939
|
+
width: 100%;
|
|
940
|
+
height: 100%;
|
|
941
|
+
& > view {
|
|
942
|
+
width: 70%;
|
|
943
|
+
height: 70%;
|
|
944
|
+
background: @xd-skeleton-color;
|
|
945
|
+
border-radius: 20rpx;
|
|
946
|
+
}
|
|
476
947
|
}
|
|
477
948
|
.brand_name{
|
|
949
|
+
|
|
478
950
|
.skeleton-item;
|
|
951
|
+
margin: 0 15%;
|
|
952
|
+
width: auto;
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
&.n3 {
|
|
956
|
+
&:nth-child(3n) {
|
|
957
|
+
margin-right: 0!important;
|
|
958
|
+
}
|
|
959
|
+
&:nth-child(1),&:nth-child(2),&:nth-child(3) {
|
|
960
|
+
margin-top: 0!important;
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
&.n4 {
|
|
964
|
+
&:nth-child(4n) {
|
|
965
|
+
margin-right: 0!important;
|
|
966
|
+
}
|
|
967
|
+
&:nth-child(1),&:nth-child(2),&:nth-child(3),&:nth-child(4) {
|
|
968
|
+
margin-top: 0!important;
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
&.n5 {
|
|
972
|
+
&:nth-child(5n) {
|
|
973
|
+
margin-right: 0!important;
|
|
974
|
+
}
|
|
975
|
+
&:nth-child(1),&:nth-child(2),&:nth-child(3),&:nth-child(4),&:nth-child(5) {
|
|
976
|
+
margin-top: 0!important;
|
|
479
977
|
}
|
|
480
978
|
}
|
|
481
979
|
|
|
482
|
-
.brand_icon{
|
|
980
|
+
& .brand_icon{
|
|
483
981
|
box-sizing: border-box;
|
|
484
982
|
display: flex;
|
|
485
983
|
justify-content: center;
|
|
@@ -505,39 +1003,16 @@
|
|
|
505
1003
|
max-height: 70%;
|
|
506
1004
|
}
|
|
507
1005
|
}
|
|
508
|
-
|
|
509
1006
|
}
|
|
510
|
-
.brand_name{
|
|
511
|
-
font-size:
|
|
512
|
-
color: #666666;
|
|
1007
|
+
& .brand_name{
|
|
1008
|
+
font-size: 24rpx;
|
|
513
1009
|
text-align: center;
|
|
514
1010
|
line-height: unit(40, rpx);
|
|
515
1011
|
.uni-max-cut(1, 40);
|
|
516
|
-
margin:
|
|
517
|
-
|
|
518
|
-
&.brand_name4 {
|
|
519
|
-
font-size: unit(26, rpx);
|
|
520
|
-
line-height: unit(50, rpx);
|
|
521
|
-
.uni-max-cut(1, 50);
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
&.brand_name3 {
|
|
525
|
-
font-size: unit(28, rpx);
|
|
526
|
-
line-height: unit(60, rpx);
|
|
527
|
-
.uni-max-cut(1, 60);
|
|
528
|
-
margin-bottom: unit(10, rpx);
|
|
529
|
-
}
|
|
1012
|
+
margin: 10rpx 0 0;
|
|
530
1013
|
}
|
|
531
1014
|
}
|
|
532
1015
|
|
|
533
|
-
|
|
534
|
-
& .brand_item_preview {
|
|
535
|
-
position: absolute;
|
|
536
|
-
top: 0;
|
|
537
|
-
left: 0;
|
|
538
|
-
right: 0;
|
|
539
|
-
bottom: 0
|
|
540
|
-
}
|
|
541
1016
|
}
|
|
542
1017
|
}
|
|
543
1018
|
}
|