jufubao-base 1.0.203 → 1.0.204
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/JfbBaseAddress/XdAddress.vue +12 -6
- package/src/components/JfbBaseCardEntry/Attr.js +472 -443
- package/src/components/JfbBaseCardEntry/JfbBaseCardEntry.vue +124 -98
- package/src/components/JfbBaseCardEntry/Mock.js +1 -0
- package/src/components/JfbBaseCardEntry/XdCardNew.vue +135 -0
- package/src/components/JfbBaseHeader/Attr.js +134 -51
- package/src/components/JfbBaseHeader/JfbBaseHeader.vue +118 -31
- package/src/components/JfbBaseHeaderElephant/Api.js +22 -0
- package/src/components/JfbBaseHeaderElephant/Attr.js +510 -0
- package/src/components/JfbBaseHeaderElephant/JfbBaseHeaderElephant.vue +464 -0
- package/src/components/JfbBaseHeaderElephant/JfbBaseHeaderElephantLess.less +79 -0
- package/src/components/JfbBaseHeaderElephant/JfbBaseHeaderElephantMixin.js +30 -0
- package/src/components/JfbBaseHeaderElephant/Mock.js +5 -0
- package/src/components/JfbBaseNotice/Attr.js +26 -0
- package/src/components/JfbBaseNotice/JfbBaseNotice.vue +13 -1
- package/src/components/JfbBaseUserInfo/Attr.js +134 -33
- package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +89 -8
|
@@ -0,0 +1,464 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view
|
|
3
|
+
class="jfb-base-header-elephant"
|
|
4
|
+
@click="handleEditxSelect"
|
|
5
|
+
:class="{ editx : isEditx && active }"
|
|
6
|
+
>
|
|
7
|
+
<!--#ifdef H5-->
|
|
8
|
+
<view
|
|
9
|
+
class="jfb-base-header-elephant__edit"
|
|
10
|
+
:class="{ editx : isEditx && active }"
|
|
11
|
+
v-if="isEditx && active"
|
|
12
|
+
>
|
|
13
|
+
<view class="jfb-base-header-elephant__edit-icon" @click="delEdit">删除</view>
|
|
14
|
+
</view>
|
|
15
|
+
<!-- #endif -->
|
|
16
|
+
<view class="jfb-base-header-elephant__body">
|
|
17
|
+
<view class="box_wrap">
|
|
18
|
+
<view class="box_cont" :style="[boxContStyle]">
|
|
19
|
+
<view class="box_l">
|
|
20
|
+
<view class="box_logo">
|
|
21
|
+
<image v-if="showLogoType==='self' && selfLogo" :src="selfLogo" mode="heightFix" />
|
|
22
|
+
<image v-if="showLogoType==='default'" :src="site_logo" mode="heightFix" />
|
|
23
|
+
</view>
|
|
24
|
+
<view v-if="showSiteName==='Y'"
|
|
25
|
+
class="box_site_name"
|
|
26
|
+
:style="[siteNameFont]"
|
|
27
|
+
>{{ site_name }}</view>
|
|
28
|
+
</view>
|
|
29
|
+
<view v-if="showCategory === 'Y'" class="box_r" @click="isExtendCate=!isExtendCate">
|
|
30
|
+
<xd-font-icon :icon=" categoryIcon || 'iconfenlei1'" :color="siteNameFont.color"></xd-font-icon>
|
|
31
|
+
</view>
|
|
32
|
+
</view>
|
|
33
|
+
<view v-if="isExtendCate && showCategory==='Y'" class="cate_pop" :style="[catePopBoxStyle]">
|
|
34
|
+
<view class="cate_list" :style="[cateListBoxStyle]">
|
|
35
|
+
<view class="cate_item"
|
|
36
|
+
v-for="(item, i) in cateList" :key="i"
|
|
37
|
+
:style="[cateItemBoxStyle]"
|
|
38
|
+
@click="handleClick(item)"
|
|
39
|
+
>
|
|
40
|
+
<view class="cate_img" :style=[cateIconStyle]>
|
|
41
|
+
<image :src="item.image_url" mode="aspectFill" />
|
|
42
|
+
</view>
|
|
43
|
+
<view class="cate_name">{{item.content_name}}</view>
|
|
44
|
+
</view>
|
|
45
|
+
</view>
|
|
46
|
+
</view>
|
|
47
|
+
|
|
48
|
+
</view>
|
|
49
|
+
<view v-if="isExtendCate && showCategory==='Y'" class="_modal"
|
|
50
|
+
@click="isExtendCate=false"
|
|
51
|
+
@touchmove.stop.prevent="moveHandle"
|
|
52
|
+
></view>
|
|
53
|
+
</view>
|
|
54
|
+
</view>
|
|
55
|
+
</template>
|
|
56
|
+
|
|
57
|
+
<script>
|
|
58
|
+
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
59
|
+
import { jfbRootExec } from "@/utils/xd.event";
|
|
60
|
+
import JfbBaseHeaderElephantMixin from "./JfbBaseHeaderElephantMixin";
|
|
61
|
+
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
62
|
+
import componentsMixins from "@/mixins/componentsMixins";
|
|
63
|
+
import extsMixins from "@/mixins/extsMixins";
|
|
64
|
+
import getServiceUrl from '@/common/getServiceUrl'
|
|
65
|
+
export default {
|
|
66
|
+
name: "JfbBaseHeaderElephant",
|
|
67
|
+
components: {
|
|
68
|
+
XdFontIcon
|
|
69
|
+
},
|
|
70
|
+
mixins: [
|
|
71
|
+
componentsMixins, extsMixins, JfbBaseHeaderElephantMixin
|
|
72
|
+
],
|
|
73
|
+
data() {
|
|
74
|
+
return {
|
|
75
|
+
useNumber: 24,
|
|
76
|
+
cateList: [],
|
|
77
|
+
previewCateList: [],
|
|
78
|
+
site_logo: "",
|
|
79
|
+
site_name: "",
|
|
80
|
+
isPreview: false,
|
|
81
|
+
isExtendCate: false,
|
|
82
|
+
//todo
|
|
83
|
+
|
|
84
|
+
showLogoType: "default",
|
|
85
|
+
selfLogo: "",
|
|
86
|
+
showSiteName: "",
|
|
87
|
+
showCategory: "",
|
|
88
|
+
categoryIcon: "",
|
|
89
|
+
bgColor: "",
|
|
90
|
+
siteNameFont: {},
|
|
91
|
+
navColumn: "",
|
|
92
|
+
navRow: "",
|
|
93
|
+
navPadding: "",
|
|
94
|
+
iconWidth: "",
|
|
95
|
+
iconHeight: "",
|
|
96
|
+
navBgColor: "",
|
|
97
|
+
navFontColor: "",
|
|
98
|
+
navColumnGap: "",
|
|
99
|
+
navRowGap: "",
|
|
100
|
+
navExpand: "",
|
|
101
|
+
iconMargin: "",
|
|
102
|
+
navRadius: "",
|
|
103
|
+
navShadow: "",
|
|
104
|
+
navCount: "",
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
computed: {
|
|
108
|
+
boxContStyle(){
|
|
109
|
+
return {
|
|
110
|
+
backgroundColor: this.bgColor,
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
cateListBoxStyle(){
|
|
114
|
+
let padding = `${this.checkValue(this.navPadding.top, 20)}rpx`;
|
|
115
|
+
padding = `${padding} ${this.checkValue(this.navPadding.right, 20)}rpx`;
|
|
116
|
+
padding = `${padding} ${this.checkValue(this.navPadding.bottom, 20)}rpx`;
|
|
117
|
+
padding = `${padding} ${this.checkValue(this.navPadding.left, 20)}rpx`;
|
|
118
|
+
return {
|
|
119
|
+
gridTemplateColumns: `repeat(${this.navColumn}, 1fr)`,
|
|
120
|
+
columnGap: `${this.navColumnGap}rpx`,
|
|
121
|
+
rowGap: `${this.navRowGap}rpx`,
|
|
122
|
+
padding: padding
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
cateItemBoxStyle(){
|
|
126
|
+
return {
|
|
127
|
+
backgroundColor: this.navBgColor,
|
|
128
|
+
color: this.navFontColor
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
cateIconStyle(){
|
|
132
|
+
let margin = `${this.checkValue(this.iconMargin.top, 0)}rpx`;
|
|
133
|
+
margin = `${margin} ${this.checkValue(this.iconMargin.right, 0)}rpx`;
|
|
134
|
+
margin = `${margin} ${this.checkValue(this.iconMargin.bottom, 0)}rpx`;
|
|
135
|
+
margin = `${margin} ${this.checkValue(this.iconMargin.left, 0)}rpx`;
|
|
136
|
+
return {
|
|
137
|
+
width: `${this.checkValue(this.iconWidth, 100)}rpx`,
|
|
138
|
+
height: `${this.checkValue(this.iconHeight, 100)}rpx`,
|
|
139
|
+
margin: margin,
|
|
140
|
+
borderRadius: this.navRadius + 'rpx',
|
|
141
|
+
boxShadow: this.navShadow
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
catePopBoxStyle(){
|
|
145
|
+
let position = 'absolute';
|
|
146
|
+
if(this.isPreview) position = 'relative';
|
|
147
|
+
return {
|
|
148
|
+
position: position,
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
watch: {
|
|
153
|
+
container(value, oldValue) {
|
|
154
|
+
if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
|
|
155
|
+
if (this.$configProject['isPreview']) this.init(value)
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
created() {
|
|
159
|
+
this.init(this.container);
|
|
160
|
+
this.site_logo = getServiceUrl(this.projectAttr["site_logo"], "size3");
|
|
161
|
+
this.site_name = this.projectAttr["site_name"];
|
|
162
|
+
this.isPreview = this.$configProject['isPreview'];
|
|
163
|
+
//todo
|
|
164
|
+
},
|
|
165
|
+
methods: {
|
|
166
|
+
onJfbLoad(options) {
|
|
167
|
+
|
|
168
|
+
jfbRootExec('getListPosterContent', {
|
|
169
|
+
vm: this,
|
|
170
|
+
data: {
|
|
171
|
+
page_id: this.pageAttr['page_id'], //页面ID
|
|
172
|
+
container_id: this.containerId, //组件ID
|
|
173
|
+
page_size: this.useNumber //可以不传
|
|
174
|
+
},
|
|
175
|
+
}).then(res => {
|
|
176
|
+
this.previewCateList = res.list;
|
|
177
|
+
if(res.list.length === 0 && this.isPreview) {
|
|
178
|
+
res.list = this.getTestData();
|
|
179
|
+
}
|
|
180
|
+
this.handleOne(res.list);
|
|
181
|
+
})
|
|
182
|
+
},
|
|
183
|
+
/**
|
|
184
|
+
* @description 监听事件变化
|
|
185
|
+
* @param container {object} 业务组件对象自己
|
|
186
|
+
*/
|
|
187
|
+
init(container) {
|
|
188
|
+
this.showLogoType = getContainerPropsValue(container, 'content.showLogoType', 'default');
|
|
189
|
+
this.selfLogo = getServiceUrl(getContainerPropsValue(container, 'content.selfLogo', {url: ""}).url);
|
|
190
|
+
this.showSiteName = getContainerPropsValue(container, 'content.showSiteName', 'Y');
|
|
191
|
+
this.showCategory = getContainerPropsValue(container, 'content.showCategory', 'Y');
|
|
192
|
+
this.categoryIcon = getContainerPropsValue(container, 'content.categoryIcon', '');
|
|
193
|
+
this.bgColor = getContainerPropsValue(container, 'content.bgColor', '');
|
|
194
|
+
this.siteNameFont = getContainerPropsValue(container, 'content.siteNameFont', {});
|
|
195
|
+
this.navColumn = getContainerPropsValue(container, 'content.navColumn', 4);
|
|
196
|
+
this.navPadding = getContainerPropsValue(container, 'content.navPadding', {});
|
|
197
|
+
this.navRow = getContainerPropsValue(container, 'content.navRow', 2);
|
|
198
|
+
this.iconWidth = getContainerPropsValue(container, 'content.iconWidth', 100);
|
|
199
|
+
this.iconHeight = getContainerPropsValue(container, 'content.iconHeight', 100);
|
|
200
|
+
this.navBgColor = getContainerPropsValue(container, 'content.navBgColor', '');
|
|
201
|
+
this.navFontColor = getContainerPropsValue(container, 'content.navFontColor', '');
|
|
202
|
+
this.navColumnGap = getContainerPropsValue(container, 'content.navColumnGap', 10);
|
|
203
|
+
this.navRowGap = getContainerPropsValue(container, 'content.navRowGap', 10);
|
|
204
|
+
this.navExpand = getContainerPropsValue(container, 'content.navExpand', '');
|
|
205
|
+
this.iconMargin = getContainerPropsValue(container, 'content.iconMargin', {});
|
|
206
|
+
this.navRadius = getContainerPropsValue(container, 'content.navRadius', 0);
|
|
207
|
+
this.navCount = getContainerPropsValue(container, 'content.navCount', 0);
|
|
208
|
+
let navShadow = getContainerPropsValue(container, 'content.navShadow', '');
|
|
209
|
+
if(navShadow.type === "Y" && navShadow.value){
|
|
210
|
+
this.navShadow = `0 0 ${navShadow.value.width}rpx ${navShadow.value.color}`;
|
|
211
|
+
}else{
|
|
212
|
+
this.navShadow = 'none';
|
|
213
|
+
}
|
|
214
|
+
console.log("navShadow", this.navShadow);
|
|
215
|
+
|
|
216
|
+
this.useNumber = this.navCount || this.navRow * this.navColumn;
|
|
217
|
+
if(this.isPreview){
|
|
218
|
+
let testData = this.getTestData();
|
|
219
|
+
testData.unshift(...this.previewCateList);
|
|
220
|
+
//从数组testData中取useNumber个数据
|
|
221
|
+
this.handleOne(testData.slice(0, this.useNumber));
|
|
222
|
+
this.isExtendCate = this.navExpand === 'Y' ? true : false;
|
|
223
|
+
if(this.isExtendCate){
|
|
224
|
+
document.querySelector('.xd-Layout__top').style.zIndex = 149099;
|
|
225
|
+
}else{
|
|
226
|
+
document.querySelector('.xd-Layout__top').style.zIndex = 1490;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
moveHandle(){},
|
|
231
|
+
handleClick(item) {
|
|
232
|
+
if(!item.redirect_data) {
|
|
233
|
+
console.warn(`未配置链接地址: ${item.redirect_data}`);
|
|
234
|
+
console.error(`未配置链接地址: ${item.redirect_data}`);
|
|
235
|
+
return
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
//内部链接跳转地址
|
|
239
|
+
if (item.redirect_type === 'INN') {
|
|
240
|
+
try {
|
|
241
|
+
let url = JSON.parse(item.redirect_data);
|
|
242
|
+
let params = '';
|
|
243
|
+
if(url.page) {
|
|
244
|
+
if (item['redirect_params']) params = `?${item['redirect_params']}`;
|
|
245
|
+
this.$xdUniHelper.navigateTo({url: url.page + params})
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
console.error(`应用链接配置错误: ${url.page}`)
|
|
249
|
+
}
|
|
250
|
+
} catch (e) {
|
|
251
|
+
console.error(`应用链接配置错误: ${item.redirect_data}`)
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
//外部链接
|
|
256
|
+
if (item.redirect_type === 'URL') {
|
|
257
|
+
let reg = /^(http:\/\/|https:\/\/|\/\/)+.+$/;
|
|
258
|
+
let spReg = /(-apiuri\/v)/;
|
|
259
|
+
//#ifdef MP-WEIXIN
|
|
260
|
+
try {
|
|
261
|
+
let url = JSON.parse(item.redirect_data);
|
|
262
|
+
if (reg.test(url.url) || spReg.test(url.url)) {
|
|
263
|
+
console.warn(`广告跳转外站: ${url.url}`)
|
|
264
|
+
this.$xdUniHelper.navigateTo(url);
|
|
265
|
+
} else {
|
|
266
|
+
console.error(`广告跳转外站配置错误: ${url.url}`)
|
|
267
|
+
}
|
|
268
|
+
} catch (e) {
|
|
269
|
+
console.error(`广告跳转外站配置错误: ${item.redirect_data}`)
|
|
270
|
+
}
|
|
271
|
+
//#endif
|
|
272
|
+
//#ifdef H5
|
|
273
|
+
try {
|
|
274
|
+
let url = JSON.parse(item.redirect_data);
|
|
275
|
+
console.warn(`广告跳转外站: ${url.url}`);
|
|
276
|
+
this.$xdUniHelper.redirectTo(url, false)
|
|
277
|
+
} catch (e) {
|
|
278
|
+
console.error(`广告跳转外站配置错误: ${item.redirect_data}`)
|
|
279
|
+
}
|
|
280
|
+
//#endif
|
|
281
|
+
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
//无跳转地址
|
|
285
|
+
if(item.redirect_type === 'EMP') {
|
|
286
|
+
console.warn(`无跳转地址`);
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
handleImage(list){
|
|
290
|
+
list = this.filterItem(list);
|
|
291
|
+
|
|
292
|
+
return list.map((item,index) => {
|
|
293
|
+
return {
|
|
294
|
+
...item,
|
|
295
|
+
image_background_url: item.image_background_url?getServiceUrl(item.image_background_url):'',
|
|
296
|
+
image_url: item.image_url?getServiceUrl(item.image_url):''
|
|
297
|
+
}
|
|
298
|
+
})
|
|
299
|
+
},
|
|
300
|
+
handleOne(list){
|
|
301
|
+
this.cateList = this.handleImage(list);
|
|
302
|
+
|
|
303
|
+
//轮播图记录为0条处理
|
|
304
|
+
if( this.cateList.length === 0) return
|
|
305
|
+
let current = this.current || 0;
|
|
306
|
+
this.currentImage = this.cateList[current]['image_background_url']
|
|
307
|
+
},
|
|
308
|
+
getTestData(){
|
|
309
|
+
let temp = [];
|
|
310
|
+
for (let i = 0; i< this.useNumber; i++) {
|
|
311
|
+
let item = this.$xdUniHelper.cloneDeep(this['posterTest']);
|
|
312
|
+
item.content_id = i;
|
|
313
|
+
item.content_name = item.content_name + i;
|
|
314
|
+
item.image_url = `//dummyimage.com/${this.iconWidth}x${this.iconHeight}`;
|
|
315
|
+
temp.push(item)
|
|
316
|
+
}
|
|
317
|
+
return temp
|
|
318
|
+
},
|
|
319
|
+
/**
|
|
320
|
+
* @description 过滤不可以用
|
|
321
|
+
* 当前项目未H5时,过滤所有小程序应用
|
|
322
|
+
* 当前项目未小程序时,过滤所有非当前小程序应用
|
|
323
|
+
* 站外地址直接返回
|
|
324
|
+
* 站内地址未选值直接返回
|
|
325
|
+
* 预览模式全过
|
|
326
|
+
*/
|
|
327
|
+
filterItem(list){
|
|
328
|
+
let content = list.filter(item=>{
|
|
329
|
+
//预览模式
|
|
330
|
+
if( this.$configProject.isPreview) return true;
|
|
331
|
+
|
|
332
|
+
//非内部应用
|
|
333
|
+
if(item.redirect_type !== 'INN') return true
|
|
334
|
+
|
|
335
|
+
//没有配置链接
|
|
336
|
+
if(!item.redirect_data) return true;
|
|
337
|
+
|
|
338
|
+
//内部应用
|
|
339
|
+
else {
|
|
340
|
+
let redirect_data;
|
|
341
|
+
try {
|
|
342
|
+
redirect_data = JSON.parse(item.redirect_data);
|
|
343
|
+
if(!item['app_type']) item['app_type']= 'h5';
|
|
344
|
+
|
|
345
|
+
//#ifdef H5
|
|
346
|
+
return item['app_type'] !== 'wxmp';
|
|
347
|
+
//#endif
|
|
348
|
+
|
|
349
|
+
//#ifdef MP-WEIXIN
|
|
350
|
+
let actDir = this.$parent.projectAttr.deploy_dir;
|
|
351
|
+
let dir = this.getPathDir(redirect_data.page);
|
|
352
|
+
if(item['app_type'] === 'wxmp'){
|
|
353
|
+
return actDir === dir;
|
|
354
|
+
}
|
|
355
|
+
else if(item['app_type'] === 'h5') return true;
|
|
356
|
+
else return true
|
|
357
|
+
//#endif
|
|
358
|
+
}
|
|
359
|
+
catch (e) {
|
|
360
|
+
return true
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
});
|
|
364
|
+
console.warn(`PostersList:${JSON.stringify(content.map(item=>`${item.app_type}:${item.content_name}:${item.redirect_data}`), null,2)}`)
|
|
365
|
+
return content;
|
|
366
|
+
|
|
367
|
+
},
|
|
368
|
+
onJfbScroll(options) {
|
|
369
|
+
// console.log('event.onJfbScroll', options)
|
|
370
|
+
},
|
|
371
|
+
onJfbReachBottom(options) {
|
|
372
|
+
console.log('event.onJfbReachBottom', options)
|
|
373
|
+
},
|
|
374
|
+
onJfbShow(options) {
|
|
375
|
+
console.log('event.onJfbShow', options)
|
|
376
|
+
this.onJfbLoad(options);
|
|
377
|
+
},
|
|
378
|
+
onJfbHide(options) {
|
|
379
|
+
console.log('event.onJfbHide', options)
|
|
380
|
+
},
|
|
381
|
+
onJfbBack(options) {
|
|
382
|
+
console.log('event.onJfbBack', options)
|
|
383
|
+
},
|
|
384
|
+
onJfbUpdate(...data) {
|
|
385
|
+
console.log('event.onJfbUpdate', data)
|
|
386
|
+
},
|
|
387
|
+
onJfbCustomEvent(options) {
|
|
388
|
+
console.log('event.onJfbReachBottom', options)
|
|
389
|
+
},
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
</script>
|
|
394
|
+
|
|
395
|
+
<style scoped lang="less">
|
|
396
|
+
@import "./JfbBaseHeaderElephantLess.less";
|
|
397
|
+
|
|
398
|
+
.jfb-base-header-elephant {
|
|
399
|
+
&__body{
|
|
400
|
+
overflow: initial !important;
|
|
401
|
+
._modal{
|
|
402
|
+
position: fixed;
|
|
403
|
+
top: 0;
|
|
404
|
+
left: 0;
|
|
405
|
+
width: 100vh;
|
|
406
|
+
height: 100vh;
|
|
407
|
+
background: rgba(0, 0, 0, .5);
|
|
408
|
+
z-index: 999;
|
|
409
|
+
}
|
|
410
|
+
.box_wrap{
|
|
411
|
+
position: relative;
|
|
412
|
+
z-index: 1000;
|
|
413
|
+
.cate_pop{
|
|
414
|
+
top: 100%;
|
|
415
|
+
left: 0;
|
|
416
|
+
width: 100%;
|
|
417
|
+
z-index: 11;
|
|
418
|
+
background: #FFFFFF;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
.box_cont{
|
|
422
|
+
display: flex;
|
|
423
|
+
align-items: center;
|
|
424
|
+
justify-content: space-between;
|
|
425
|
+
padding: 20rpx;
|
|
426
|
+
.box_l{
|
|
427
|
+
display: flex;
|
|
428
|
+
align-items: center;
|
|
429
|
+
}
|
|
430
|
+
.box_logo{
|
|
431
|
+
//width: 72rpx;
|
|
432
|
+
height: 72rpx;
|
|
433
|
+
image{
|
|
434
|
+
// width: 100%;
|
|
435
|
+
height: 100%;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
.box_site_name{
|
|
439
|
+
margin-left: 20rpx;
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
.cate_list{
|
|
443
|
+
display: grid;
|
|
444
|
+
justify-items: center;
|
|
445
|
+
.cate_item{
|
|
446
|
+
width: 100%;
|
|
447
|
+
display: flex;
|
|
448
|
+
flex-direction: column;
|
|
449
|
+
align-items: center;
|
|
450
|
+
justify-content: center;
|
|
451
|
+
.cate_img{
|
|
452
|
+
width: 100rpx;
|
|
453
|
+
height: 100rpx;
|
|
454
|
+
overflow: hidden;
|
|
455
|
+
image{
|
|
456
|
+
width: 100%;
|
|
457
|
+
height: 100%;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
</style>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @desc 获取绝对路径完整地址
|
|
3
|
+
* @param @path
|
|
4
|
+
**/
|
|
5
|
+
//例如:https://image.jufubao.cn/20220501010108/image/bg/default_gonghui_bg.png
|
|
6
|
+
@basePath: 'business/';
|
|
7
|
+
@doMain: '//sandbox-img.jufubao.cn/';
|
|
8
|
+
|
|
9
|
+
.getBusinessImageUrl(@path, @size: 'size8') {
|
|
10
|
+
@url: "@{doMain}@{basePath}@{path}?x-oss-process=style/@{size}";
|
|
11
|
+
background-image: url(@url);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//start
|
|
15
|
+
.jfb-base-header-elephant {
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
|
|
18
|
+
&__body{
|
|
19
|
+
position: relative;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
z-index: 2
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&.editx,&.editx:hover {
|
|
25
|
+
position: relative;
|
|
26
|
+
min-height: unit(100, rpx);
|
|
27
|
+
z-index: 3;
|
|
28
|
+
&::after {
|
|
29
|
+
border: 2rpx dashed blue;
|
|
30
|
+
content: " ";
|
|
31
|
+
position: absolute;
|
|
32
|
+
top:0;
|
|
33
|
+
left:0;
|
|
34
|
+
bottom:0;
|
|
35
|
+
right:0;
|
|
36
|
+
z-index: 4;
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
&__edit {
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
position: absolute;
|
|
46
|
+
right: unit(0, rpx);
|
|
47
|
+
top: unit(-52, rpx);
|
|
48
|
+
height: unit(50, rpx);
|
|
49
|
+
line-height: unit(50, rpx);
|
|
50
|
+
display: flex;
|
|
51
|
+
justify-content: center;
|
|
52
|
+
align-items: center;
|
|
53
|
+
background: rgba(0, 0, 0, .6);
|
|
54
|
+
border-radius: unit(10, rpx);
|
|
55
|
+
box-shadow: 0 0 10px rbga(0, 0, 0, 0.3);
|
|
56
|
+
color: #fff;
|
|
57
|
+
font-size: unit(22, rpx);
|
|
58
|
+
|
|
59
|
+
&-icon{
|
|
60
|
+
padding: 0 unit(20, rpx);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&.editx {
|
|
64
|
+
box-sizing: border-box;
|
|
65
|
+
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
//end
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
/**notPreview**/
|
|
73
|
+
.jfb-base-header-elephant {
|
|
74
|
+
//&:before {
|
|
75
|
+
//content: " ";
|
|
76
|
+
//display: table;
|
|
77
|
+
//}
|
|
78
|
+
}
|
|
79
|
+
/**endNotPreview**/
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
//@AttrImport
|
|
5
|
+
import Attr from "./Attr";
|
|
6
|
+
//@EndAttrImport
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
data() {
|
|
11
|
+
return {
|
|
12
|
+
//#ifdef H5
|
|
13
|
+
|
|
14
|
+
//@AttrData
|
|
15
|
+
Attr:{}, //对外开发编辑属性
|
|
16
|
+
//@EndAttrData
|
|
17
|
+
|
|
18
|
+
// #endif
|
|
19
|
+
cssRoot: 'jfb-base-header-elephant'
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
created() {
|
|
23
|
+
|
|
24
|
+
//@AttrDataCreated
|
|
25
|
+
this.Attr = this.$xdUniHelper.customClone(Attr);
|
|
26
|
+
//@EndAttrDataCreated
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
},
|
|
30
|
+
}
|
|
@@ -275,6 +275,32 @@ export default {
|
|
|
275
275
|
{ label: '否', value: 'N' },
|
|
276
276
|
]
|
|
277
277
|
},
|
|
278
|
+
{
|
|
279
|
+
label: "按钮长度:",
|
|
280
|
+
ele: "el-input",
|
|
281
|
+
valueKey: "btnConfirmWidth",
|
|
282
|
+
value: data['btnConfirmWidth'] || '',
|
|
283
|
+
placeholder: '请输入按钮长度',
|
|
284
|
+
className: 'input60',
|
|
285
|
+
groupKey: "content",
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
label: "按钮背景颜色:",
|
|
289
|
+
ele: "xd-color",
|
|
290
|
+
valueKey: "btnConfirmBgColor",
|
|
291
|
+
groupKey:'content',
|
|
292
|
+
value: data['btnConfirmBgColor'] || '',
|
|
293
|
+
placeholder: '请选择按钮背景颜色',
|
|
294
|
+
groupKey: "content",
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
label: "按钮文字颜色:",
|
|
298
|
+
ele: "xd-color",
|
|
299
|
+
valueKey: "btnConfirmTextColor",
|
|
300
|
+
groupKey:'content',
|
|
301
|
+
value: data['btnConfirmTextColor'] || '',
|
|
302
|
+
placeholder: '请选择按钮文字颜色',
|
|
303
|
+
},
|
|
278
304
|
{
|
|
279
305
|
ele: 'title',
|
|
280
306
|
label: '静态显示',
|
|
@@ -220,7 +220,11 @@
|
|
|
220
220
|
backgroundColor: '',
|
|
221
221
|
is_hide_dailog:'N',
|
|
222
222
|
|
|
223
|
-
isMp:false
|
|
223
|
+
isMp:false,
|
|
224
|
+
|
|
225
|
+
btnConfirmWidth: "",
|
|
226
|
+
btnConfirmBgColor: "",
|
|
227
|
+
btnConfirmTextColor: "",
|
|
224
228
|
}
|
|
225
229
|
},
|
|
226
230
|
watch: {
|
|
@@ -330,11 +334,16 @@
|
|
|
330
334
|
this.scrollMargin = getContainerPropsValue(container, 'content.scrollMargin', {});
|
|
331
335
|
this.radius = getContainerPropsValue(container, 'content.radius', 0);
|
|
332
336
|
this.fontSize = Number(getContainerPropsValue(container, 'content.fontSize', '20'));
|
|
337
|
+
this.btnConfirmWidth = getContainerPropsValue(container, 'content.btnConfirmWidth', '');
|
|
338
|
+
this.btnConfirmBgColor = getContainerPropsValue(container, 'content.btnConfirmBgColor', '');
|
|
339
|
+
this.btnConfirmTextColor = getContainerPropsValue(container, 'content.btnConfirmTextColor', '');
|
|
333
340
|
if (this.fontSize === 20) this.titleFontSize = 28;
|
|
334
341
|
if (this.fontSize === 26) this.titleFontSize = 36;
|
|
335
342
|
if (this.fontSize === 36) this.titleFontSize = 44;
|
|
336
343
|
this.isTitle = getContainerPropsValue(container, 'content.isTitle', false);
|
|
337
344
|
|
|
345
|
+
console.log("this.btnConfirmTextColor", this.btnConfirmTextColor);
|
|
346
|
+
|
|
338
347
|
if(this.style === '2') {
|
|
339
348
|
this.num = getContainerPropsValue(container, 'content.num', 1);
|
|
340
349
|
//#ifdef H5
|
|
@@ -358,6 +367,9 @@
|
|
|
358
367
|
isHtml: true,
|
|
359
368
|
zIndex: 2000,
|
|
360
369
|
cancel: false,
|
|
370
|
+
btnConfirmWidth: this.btnConfirmWidth,
|
|
371
|
+
btnConfirmBgColor: this.btnConfirmBgColor,
|
|
372
|
+
btnConfirmTextColor: this.btnConfirmTextColor,
|
|
361
373
|
});
|
|
362
374
|
},
|
|
363
375
|
|