jufubao-base 1.0.197-beta5 → 1.0.197-beta7
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/commands.js +1 -1
- package/package.json +1 -1
- package/src/ICONS.js +1128 -0
- package/src/components/JfbBaseAddress/Attr.js +109 -1
- package/src/components/JfbBaseAddress/JfbBaseAddress.vue +164 -80
- package/src/components/JfbBaseAddress/XdTfkItem.vue +117 -0
- package/src/components/JfbBaseConDialog/JfbBaseConDialog.vue +41 -13
- package/src/components/JfbBaseFastLink/Attr.js +24 -8
- package/src/components/JfbBaseFastLink/JfbBaseFastLink.vue +37 -21
- package/src/components/JfbBaseFooter/Attr.js +141 -75
- package/src/components/JfbBaseFooter/JfbBaseFooter.vue +50 -15
- package/src/components/JfbBaseHeader/Attr.js +8 -1
- package/src/components/JfbBaseHeader/JfbBaseHeader.vue +8 -5
- package/src/components/JfbBaseHeaderElephant/JfbBaseHeaderElephant.vue +12 -3
- package/src/components/JfbBaseOrderDetail/Attr.js +147 -65
- package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +97 -47
- package/src/components/JfbBaseOrderList/Attr.js +59 -2
- package/src/components/JfbBaseOrderList/JfbBaseOrderList.vue +139 -92
- package/src/components/JfbBaseOrderList/Mock.js +3 -0
- package/src/components/JfbBaseOrderList/XdTfkOrderItem.vue +267 -0
- package/src/components/JfbBasePosterBigSmall/JfbBasePosterBigSmall.vue +27 -29
- package/src/components/JfbBasePosterBigSmall/getWidthHeight.js +13 -9
- package/src/components/JfbBaseUserCenter/Attr.js +297 -52
- package/src/components/JfbBaseUserCenter/JfbBaseUserCenter.vue +135 -44
- package/src/components/JfbBaseUserInfo/Attr.js +227 -85
- package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +106 -86
- package/src/components/JfbBaseUserOrder/Attr.js +332 -30
- package/src/components/JfbBaseUserOrder/JfbBaseUserOrder.vue +183 -55
- package/src/components/JfbBaseWallet/Attr.js +376 -8
- package/src/components/JfbBaseWallet/JfbBaseWallet.vue +185 -49
- package/src/mixins/componentsMixins.js +210 -35
|
@@ -186,7 +186,7 @@ export default {
|
|
|
186
186
|
});
|
|
187
187
|
},
|
|
188
188
|
|
|
189
|
-
getResult() {
|
|
189
|
+
getResult(is_auto='N') {
|
|
190
190
|
jfbRootExec("getCouponResult", {
|
|
191
191
|
vm: this,
|
|
192
192
|
data: {
|
|
@@ -196,6 +196,16 @@ export default {
|
|
|
196
196
|
})
|
|
197
197
|
.then((res) => {
|
|
198
198
|
if (res.status_type === "success") {
|
|
199
|
+
if(is_auto==='Y') {
|
|
200
|
+
this.order_num = null;
|
|
201
|
+
this.handleCardBindClose();
|
|
202
|
+
this.$xdHideLoading();
|
|
203
|
+
if (this.timer) {
|
|
204
|
+
this.timeNum = 0;
|
|
205
|
+
clearTimeout(this.timer);
|
|
206
|
+
}
|
|
207
|
+
return
|
|
208
|
+
}
|
|
199
209
|
this.order_num = null;
|
|
200
210
|
this.$xdHideLoading();
|
|
201
211
|
this.$xdAlert({
|
|
@@ -214,6 +224,15 @@ export default {
|
|
|
214
224
|
return;
|
|
215
225
|
}
|
|
216
226
|
if (res.status_type === "error") {
|
|
227
|
+
if(is_auto==='Y') {
|
|
228
|
+
this.handleCardBindClose();
|
|
229
|
+
this.$xdHideLoading();
|
|
230
|
+
if (this.timer) {
|
|
231
|
+
this.timeNum = 0;
|
|
232
|
+
clearTimeout(this.timer);
|
|
233
|
+
}
|
|
234
|
+
return
|
|
235
|
+
}
|
|
217
236
|
this.$xdHideLoading();
|
|
218
237
|
this.$xdAlert({
|
|
219
238
|
content: res.message,
|
|
@@ -269,7 +288,6 @@ export default {
|
|
|
269
288
|
this.list[this.currentIndex].app_activity_button
|
|
270
289
|
);
|
|
271
290
|
this.activity_id = this.list[this.currentIndex].activity_id;
|
|
272
|
-
this.isAll =
|
|
273
291
|
this.handlePop();
|
|
274
292
|
})
|
|
275
293
|
.catch((err) => {
|
|
@@ -301,13 +319,17 @@ export default {
|
|
|
301
319
|
this.handleCardBindClose();
|
|
302
320
|
}
|
|
303
321
|
} else {
|
|
304
|
-
if(res.
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
322
|
+
if(res.receive_type==='auto') {
|
|
323
|
+
this.getAllCoupont('Y')
|
|
324
|
+
} else {
|
|
325
|
+
if(res.can_take === "Y"){
|
|
326
|
+
if (this.isPreview) {
|
|
327
|
+
console.log(getContainerPropsValue(value, "content.is_show_dailog", 'Y'))
|
|
328
|
+
this.isShow = getContainerPropsValue(value, "content.is_show_dailog", 'Y') === 'N';
|
|
329
|
+
}else this.isShow = true;
|
|
330
|
+
}else{
|
|
331
|
+
this.handleCardBindClose();
|
|
332
|
+
}
|
|
311
333
|
}
|
|
312
334
|
}
|
|
313
335
|
})
|
|
@@ -321,11 +343,11 @@ export default {
|
|
|
321
343
|
}
|
|
322
344
|
},
|
|
323
345
|
|
|
324
|
-
getAllCoupont(
|
|
325
|
-
this.p_getAllDialogList();
|
|
346
|
+
getAllCoupont(is_auto='N') {
|
|
347
|
+
this.p_getAllDialogList(is_auto);
|
|
326
348
|
},
|
|
327
349
|
|
|
328
|
-
p_getAllDialogList() {
|
|
350
|
+
p_getAllDialogList(is_auto='N') {
|
|
329
351
|
//getAllCoupon
|
|
330
352
|
this.$xdShowLoading({});
|
|
331
353
|
jfbRootExec("getAllCoupon", {
|
|
@@ -333,10 +355,16 @@ export default {
|
|
|
333
355
|
data: {
|
|
334
356
|
distribution_method: this.distribution_method,
|
|
335
357
|
activity_id: this.activity_id,
|
|
358
|
+
is_auto: is_auto,
|
|
336
359
|
...this.dispatchData
|
|
337
360
|
}
|
|
338
361
|
}).then(res => {
|
|
339
362
|
if (res.code === 400) {
|
|
363
|
+
if(is_auto==='Y') {
|
|
364
|
+
this.$xdHideLoading();
|
|
365
|
+
this.handleCardBindClose()
|
|
366
|
+
return
|
|
367
|
+
}
|
|
340
368
|
this.$xdHideLoading();
|
|
341
369
|
this.$xdAlert({
|
|
342
370
|
content: res.message,
|
|
@@ -351,7 +379,7 @@ export default {
|
|
|
351
379
|
}
|
|
352
380
|
this.order_num = res.tmp_order_number;
|
|
353
381
|
setTimeout(()=>{
|
|
354
|
-
this.getResult();
|
|
382
|
+
this.getResult(is_auto);
|
|
355
383
|
},1000)
|
|
356
384
|
}).catch((err) => {
|
|
357
385
|
console.log(err, "err");
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
import ICONS from '@/ICONS'
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* @description 当表单组件中有联动操作时候,使用方法进行返回
|
|
@@ -37,8 +38,8 @@ export default {
|
|
|
37
38
|
value: data['isNotExpand'] || 'Y',
|
|
38
39
|
className: 'input80',
|
|
39
40
|
list: [
|
|
40
|
-
{label: '
|
|
41
|
-
{label: '
|
|
41
|
+
{label: '收起', value: 'Y'},
|
|
42
|
+
{label: '展开', value: 'N'},
|
|
42
43
|
],
|
|
43
44
|
hidden: data['is_layout'] !=='fixed'
|
|
44
45
|
},
|
|
@@ -85,15 +86,15 @@ export default {
|
|
|
85
86
|
ele: 'el-input',
|
|
86
87
|
groupKey:'style',
|
|
87
88
|
type: 'number',
|
|
88
|
-
valueKey: '
|
|
89
|
-
value: data.
|
|
89
|
+
valueKey: 'rowSpacing',
|
|
90
|
+
value: data.rowSpacing===undefined? data.rowSpacing: '',
|
|
90
91
|
placeholder: '请输入行间距',
|
|
91
92
|
className: 'input60',
|
|
92
93
|
inline: false,
|
|
93
94
|
notice: '设置行间距,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">20</span>像素',
|
|
94
95
|
},
|
|
95
96
|
{
|
|
96
|
-
label: '
|
|
97
|
+
label: '边距设置:',
|
|
97
98
|
ele: 'xd-margin-padding',
|
|
98
99
|
groupKey:'style',
|
|
99
100
|
valueKey: 'margin',
|
|
@@ -101,9 +102,22 @@ export default {
|
|
|
101
102
|
setting: {
|
|
102
103
|
type: 'margin',
|
|
103
104
|
},
|
|
104
|
-
placeholder: '
|
|
105
|
+
placeholder: '边距设置',
|
|
105
106
|
inline: false,
|
|
106
|
-
notice: '
|
|
107
|
+
notice: '边距设置,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">0</span>像素',
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
label: '填充设置:',
|
|
111
|
+
ele: 'xd-margin-padding',
|
|
112
|
+
groupKey:'style',
|
|
113
|
+
valueKey: 'padding',
|
|
114
|
+
value: data['padding'] || null,
|
|
115
|
+
setting: {
|
|
116
|
+
type: 'padding',
|
|
117
|
+
},
|
|
118
|
+
placeholder: '填充设置',
|
|
119
|
+
inline: false,
|
|
120
|
+
notice: '填充设置,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">20</span>像素',
|
|
107
121
|
},
|
|
108
122
|
{
|
|
109
123
|
ele: 'title',
|
|
@@ -239,7 +253,9 @@ export default {
|
|
|
239
253
|
icon: true,
|
|
240
254
|
notice: false,
|
|
241
255
|
subTitle: true,
|
|
242
|
-
|
|
256
|
+
params: true,
|
|
257
|
+
},
|
|
258
|
+
icons:ICONS,
|
|
243
259
|
},
|
|
244
260
|
handleCustom({action, data}) {
|
|
245
261
|
if (action === 'number') {
|
|
@@ -16,17 +16,15 @@
|
|
|
16
16
|
<view class="jfb-base-fast-link__body">
|
|
17
17
|
<template v-if="is_layout === 'noraml'">
|
|
18
18
|
<view class="x-line"></view>
|
|
19
|
-
<view
|
|
19
|
+
<view
|
|
20
|
+
class="fast-link"
|
|
21
|
+
:style="[bodyStyle]"
|
|
22
|
+
v-if="list.length > 0">
|
|
20
23
|
<view
|
|
21
24
|
class="fast-link__item"
|
|
22
25
|
v-for="item in list"
|
|
23
26
|
:key="item.key"
|
|
24
|
-
:style="
|
|
25
|
-
background: backgroundColor,
|
|
26
|
-
border: borderBox,
|
|
27
|
-
borderRadius: radius + 'rpx',
|
|
28
|
-
marginBottom: padding + 'rpx'
|
|
29
|
-
}"
|
|
27
|
+
:style="[contStyle]"
|
|
30
28
|
@click="handleClick(item)"
|
|
31
29
|
>
|
|
32
30
|
<view class="fast-link__item-icon" v-if="item.icon">
|
|
@@ -107,7 +105,8 @@
|
|
|
107
105
|
|
|
108
106
|
//其他
|
|
109
107
|
margin: {},
|
|
110
|
-
padding:
|
|
108
|
+
padding:{},
|
|
109
|
+
rowSpacing: 20, //间距
|
|
111
110
|
}
|
|
112
111
|
},
|
|
113
112
|
watch: {
|
|
@@ -118,16 +117,32 @@
|
|
|
118
117
|
},
|
|
119
118
|
|
|
120
119
|
computed: {
|
|
121
|
-
|
|
122
|
-
let
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
120
|
+
bodyStyle(){
|
|
121
|
+
let margin = `${this.checkValue(this.margin.top, 0)}rpx`;
|
|
122
|
+
margin = `${margin} ${this.checkValue(this.margin.right, 0)}rpx`;
|
|
123
|
+
margin = `${margin} ${this.checkValue(this.margin.bottom, 0)}rpx`;
|
|
124
|
+
margin = `${margin} ${this.checkValue(this.margin.left, 0)}rpx`;
|
|
125
|
+
|
|
126
|
+
let padding = `${this.checkValue(this.padding.top, 20)}rpx`;
|
|
127
|
+
padding = `${padding} ${this.checkValue(this.padding.right, 20)}rpx`;
|
|
128
|
+
padding = `${padding} ${this.checkValue(this.padding.bottom, 20)}rpx`;
|
|
129
|
+
padding = `${padding} ${this.checkValue(this.padding.left, 20)}rpx`;
|
|
130
|
+
|
|
131
|
+
return {
|
|
132
|
+
margin,
|
|
133
|
+
padding
|
|
134
|
+
}
|
|
127
135
|
},
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
136
|
+
|
|
137
|
+
contStyle(){
|
|
138
|
+
let border = 0;
|
|
139
|
+
if (this.is_border === 'Y') border = `${this.is_border_w}rpx solid ${this.is_border_c}`;
|
|
140
|
+
return {
|
|
141
|
+
background: this.backgroundColor,
|
|
142
|
+
borderRadius: this.radius + 'rpx',
|
|
143
|
+
marginBottom: this.rowSpacing + 'rpx',
|
|
144
|
+
border
|
|
145
|
+
}
|
|
131
146
|
},
|
|
132
147
|
|
|
133
148
|
subNameSize(){
|
|
@@ -152,6 +167,7 @@
|
|
|
152
167
|
}
|
|
153
168
|
},
|
|
154
169
|
handleClick(item){
|
|
170
|
+
if (this.$configProject['isPreview']) return
|
|
155
171
|
if(item.path && item.path.value) {
|
|
156
172
|
this.$xdUniHelper.navigateTo({
|
|
157
173
|
url : `${item.path.value}`
|
|
@@ -168,9 +184,8 @@
|
|
|
168
184
|
this.fontSize = getContainerPropsValue(container, 'content.fontSize', 26);
|
|
169
185
|
this.radius = getContainerPropsValue(container, 'content.radius', 10);
|
|
170
186
|
this.iconColor = getContainerPropsValue(container, 'content.iconColor', '#999');
|
|
171
|
-
this.
|
|
187
|
+
this.rowSpacing = getContainerPropsValue(container, 'content.rowSpacing', 20);
|
|
172
188
|
this.is_layout = getContainerPropsValue(container, 'content.is_layout', 'noraml');
|
|
173
|
-
//this.fastName = getContainerPropsValue(container, 'content.fastName', '快速导航');
|
|
174
189
|
this.is_border = getContainerPropsValue(container, 'content.is_border', 'N');
|
|
175
190
|
this.is_border_c = getContainerPropsValue(container, 'content.is_border_c', '#fff');
|
|
176
191
|
this.is_border_w = getContainerPropsValue(container, 'content.is_border_w', 2);
|
|
@@ -181,7 +196,8 @@
|
|
|
181
196
|
size: item.size * this.$pxNum
|
|
182
197
|
}
|
|
183
198
|
});
|
|
184
|
-
this.margin = getContainerPropsValue(container, 'content.margin', {
|
|
199
|
+
this.margin = getContainerPropsValue(container, 'content.margin', {});
|
|
200
|
+
this.padding = getContainerPropsValue(container, 'content.padding', {})
|
|
185
201
|
this.subColor = getContainerPropsValue(container, 'content.textSubColor', '#000');
|
|
186
202
|
this.fontSubSize = getContainerPropsValue(container, 'content.fontSubSize', 24);
|
|
187
203
|
this.isNotExpand = getContainerPropsValue(container, 'content.isNotExpand', 'Y');
|
|
@@ -213,8 +229,8 @@
|
|
|
213
229
|
}).filter((item,index)=>{
|
|
214
230
|
return index < 3
|
|
215
231
|
});
|
|
216
|
-
}
|
|
217
232
|
|
|
233
|
+
}
|
|
218
234
|
},
|
|
219
235
|
}
|
|
220
236
|
}
|
|
@@ -1,86 +1,152 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
import ICONS from '@/ICONS'
|
|
3
|
+
|
|
2
4
|
export default {
|
|
3
5
|
style: [],
|
|
4
6
|
advanced: [],
|
|
5
|
-
content:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
content:(data)=>{
|
|
8
|
+
let footerSettingImage = [];
|
|
9
|
+
let footerSetting = [];
|
|
10
|
+
if(data['footerSettingImage'] && data['footerSettingImage'].length > 0 ) {
|
|
11
|
+
footerSettingImage = data['footerSettingImage'];
|
|
12
|
+
}
|
|
13
|
+
if(data['footer-setting'] && data['footer-setting'].length > 0){
|
|
14
|
+
footerSetting = data['footer-setting'];
|
|
15
|
+
footerSetting.map((item,index)=>{
|
|
16
|
+
if(!footerSettingImage[index]) footerSettingImage[index] = {};
|
|
17
|
+
footerSettingImage[index] = Object.assign({},JSON.parse(JSON.stringify(item)),footerSettingImage[index])
|
|
18
|
+
})
|
|
19
|
+
}
|
|
20
|
+
return [
|
|
21
|
+
{
|
|
22
|
+
label: '',
|
|
23
|
+
ele: 'slot',
|
|
24
|
+
slot: 'is_reference_title',
|
|
25
|
+
groupKey: 'advanced',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
label: '背景图设置:',
|
|
29
|
+
ele: 'xd-upload',
|
|
30
|
+
valueKey: 'backgroundImage',
|
|
31
|
+
groupKey:'content',
|
|
32
|
+
value: data.backgroundImage || {},
|
|
33
|
+
defaultValue: data.backgroundImage || null,
|
|
34
|
+
slot: true,
|
|
35
|
+
oneWidth: 375,
|
|
36
|
+
oneHeight: 55,
|
|
37
|
+
elinputClassName: 'input40',
|
|
38
|
+
tipsformet: '上传文件格式:@imageType@,不超过@size@MB。建议尺寸:<span style="color:red">750*110</span>像素',
|
|
39
|
+
type: ['jpg', 'png', 'jpeg'],
|
|
40
|
+
styleType: 'one',
|
|
41
|
+
uploadType: 'aliyun',
|
|
42
|
+
size: .5,
|
|
43
|
+
action: 'action',
|
|
44
|
+
sort: true,
|
|
45
|
+
maxlen: 1,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
label: '背景颜色:',
|
|
49
|
+
ele: 'xd-color',
|
|
50
|
+
valueKey: 'bgColor',
|
|
51
|
+
groupKey:'content',
|
|
52
|
+
value: data['bgColor'] || '',
|
|
53
|
+
placeholder: '请选择背景颜色',
|
|
54
|
+
setting: {
|
|
55
|
+
isAlpha: false
|
|
56
|
+
},
|
|
57
|
+
classNmae: 'input80',
|
|
21
58
|
},
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
59
|
+
{
|
|
60
|
+
label: '菜单文字颜色:',
|
|
61
|
+
ele: 'xd-color',
|
|
62
|
+
valueKey: 'color',
|
|
63
|
+
groupKey:'content',
|
|
64
|
+
value: data['color'] || '',
|
|
65
|
+
setting: {
|
|
66
|
+
isAlpha: false
|
|
67
|
+
},
|
|
68
|
+
placeholder: '请选择菜单文字颜色',
|
|
69
|
+
classNmae: 'input80',
|
|
32
70
|
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
71
|
+
{
|
|
72
|
+
label: '菜单文字选中颜色:',
|
|
73
|
+
ele: 'xd-color',
|
|
74
|
+
valueKey: 'selectedColor',
|
|
75
|
+
groupKey:'content',
|
|
76
|
+
setting: {
|
|
77
|
+
isAlpha: false
|
|
78
|
+
},
|
|
79
|
+
value:data['selectedColor'] || '',
|
|
80
|
+
placeholder: '请选择菜单文字选中颜色',
|
|
81
|
+
classNmae: 'input80',
|
|
43
82
|
},
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
83
|
+
footerSetting.length > 0 && {
|
|
84
|
+
label: '菜单图片配置:',
|
|
85
|
+
ele: 'xd-footer-setting',
|
|
86
|
+
valueKey: 'footerSettingImage',
|
|
87
|
+
groupKey:'content',
|
|
88
|
+
value: footerSettingImage,
|
|
89
|
+
setting: {
|
|
90
|
+
router: XdBus.getParentApi('getPagesTree'),
|
|
91
|
+
hideAdd: true,
|
|
92
|
+
showField: {
|
|
93
|
+
path: false,
|
|
94
|
+
icon: false,
|
|
95
|
+
notice: false,
|
|
96
|
+
image: true,
|
|
97
|
+
actImage: true
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
handleCustom({action,data}){
|
|
101
|
+
if(action === 'number') {
|
|
102
|
+
XdBus.getParentApi('getOptionsNoticeNumber')()
|
|
103
|
+
.then(res => {
|
|
104
|
+
data.cb(res.list)
|
|
105
|
+
})
|
|
106
|
+
.catch();
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
|
|
111
|
+
{
|
|
112
|
+
label: '菜单配置:',
|
|
113
|
+
ele: 'xd-footer-setting',
|
|
114
|
+
valueKey: 'footer-setting',
|
|
115
|
+
groupKey:'advanced',
|
|
116
|
+
value: footerSetting,
|
|
117
|
+
setting: {
|
|
118
|
+
router: XdBus.getParentApi('getPagesTree'),
|
|
119
|
+
icons:ICONS,
|
|
120
|
+
|
|
121
|
+
showField: {
|
|
122
|
+
path: true,
|
|
123
|
+
icon: true,
|
|
124
|
+
notice: true,
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
handleCustom({action,data}){
|
|
128
|
+
console.log(`handleCustom.${action}`, data);
|
|
129
|
+
if(action === 'number') {
|
|
130
|
+
XdBus.getParentApi('getOptionsNoticeNumber')()
|
|
131
|
+
.then(res => {
|
|
132
|
+
data.cb(res.list)
|
|
133
|
+
})
|
|
134
|
+
.catch();
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
inline: false,
|
|
138
|
+
notice: '设置底部菜单的链接地址1、标题(最多<sapn style="color: red">五个汉字</sapn>)、ICON图标(<a href="https://www.iconfont.cn/manage/index?spm=a313x.7781069.1998910419.db775f1f3&manage_type=myprojects&projectId=3378319&keyword=&project_type=&page=" style="color: blue" target="_blank">ICONFONT库</a>)、ICON大小(单位:<sapn style="color: red">像素</sapn>)和是否有消息数量显示(无数量显示可以不填写)',
|
|
139
|
+
rules: [
|
|
140
|
+
{required: true, message: '请添加内容', trigger: 'change'},
|
|
141
|
+
],
|
|
61
142
|
},
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
data.cb(res.list)
|
|
68
|
-
})
|
|
69
|
-
.catch();
|
|
70
|
-
}
|
|
143
|
+
{
|
|
144
|
+
label: '',
|
|
145
|
+
ele: 'slot',
|
|
146
|
+
slot: 'is_reference',
|
|
147
|
+
groupKey: 'advanced',
|
|
71
148
|
},
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
rules: [
|
|
75
|
-
{required: true, message: '请添加内容', trigger: 'change'},
|
|
76
|
-
],
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
label: '',
|
|
80
|
-
ele: 'slot',
|
|
81
|
-
slot: 'is_reference',
|
|
82
|
-
groupKey: 'advanced',
|
|
83
|
-
},
|
|
84
|
-
],
|
|
149
|
+
].filter(i=>i);
|
|
150
|
+
},
|
|
85
151
|
};
|
|
86
152
|
|
|
@@ -16,16 +16,19 @@
|
|
|
16
16
|
<view class="jfb-base-footer__edit-icon" @click="delEdit">删除</view>
|
|
17
17
|
</view>
|
|
18
18
|
<!-- #endif -->
|
|
19
|
-
<view class="jfb-base-footer__body"
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
<view class="jfb-base-footer__body">
|
|
20
|
+
<view :style="[bodyStyle]">
|
|
21
|
+
<xd-footer-bar
|
|
22
|
+
style="height:100%"
|
|
23
|
+
v-if="list !== null"
|
|
24
|
+
:height="height"
|
|
25
|
+
:tabbar="list"
|
|
26
|
+
:view="view"
|
|
27
|
+
:styles="styles"
|
|
28
|
+
:key="footerBarKey"
|
|
29
|
+
:base-url="baseUrl"
|
|
30
|
+
></xd-footer-bar>
|
|
31
|
+
</view>
|
|
29
32
|
</view>
|
|
30
33
|
</view>
|
|
31
34
|
</template>
|
|
@@ -42,6 +45,7 @@
|
|
|
42
45
|
getContainerPropsValue,
|
|
43
46
|
getComponentAttr
|
|
44
47
|
} from "@/utils/xd.base";
|
|
48
|
+
import getServiceUrl from "@/common/getServiceUrl";
|
|
45
49
|
|
|
46
50
|
export default {
|
|
47
51
|
name: "JfbBaseFooter",
|
|
@@ -50,6 +54,21 @@
|
|
|
50
54
|
XdFooterBar
|
|
51
55
|
},
|
|
52
56
|
mixins: [componentsMixins,extsMixins,JfbBaseFooterMixin],
|
|
57
|
+
computed:{
|
|
58
|
+
bodyStyle(){
|
|
59
|
+
let background = 'url(none)';
|
|
60
|
+
if(this.backgroundImage && this.backgroundImage.url) {
|
|
61
|
+
background = `url(${getServiceUrl(this.backgroundImage.url)})`;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
height: this.height + 'rpx',
|
|
65
|
+
backgroundImage: background,
|
|
66
|
+
backgroundSize: '100% 100%',
|
|
67
|
+
backgroundRepeat: 'no-repeat',
|
|
68
|
+
backgroundPosition: 'top center',
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
53
72
|
data() {
|
|
54
73
|
return {
|
|
55
74
|
height: 0,
|
|
@@ -58,6 +77,7 @@
|
|
|
58
77
|
numObj: {},
|
|
59
78
|
footerBarKey: 'footerBarKey', //刷新
|
|
60
79
|
baseUrl: '',
|
|
80
|
+
backgroundImage: '',
|
|
61
81
|
}
|
|
62
82
|
},
|
|
63
83
|
watch: {
|
|
@@ -73,21 +93,23 @@
|
|
|
73
93
|
created() {
|
|
74
94
|
this.view = this.$configProject.isPreview;
|
|
75
95
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
){
|
|
96
|
+
//非预览模式
|
|
97
|
+
//#ifdef H5
|
|
98
|
+
if (!this.$configProject.isPreview){
|
|
80
99
|
this.baseUrl = this.projectAttr['deploy_dir']
|
|
81
100
|
}
|
|
101
|
+
//#endif
|
|
82
102
|
|
|
83
103
|
//设置高度
|
|
84
104
|
if(this.$configProject.isPreview) {
|
|
85
|
-
this.height = getComponentAttr(this.componentAttr, 'height')
|
|
105
|
+
this.height = getComponentAttr(this.componentAttr, 'height');
|
|
86
106
|
}
|
|
87
107
|
else {
|
|
88
108
|
this.height = getComponentAttr(this.componentAttr, 'height');
|
|
89
109
|
}
|
|
90
110
|
|
|
111
|
+
this.height = Number(this.height);
|
|
112
|
+
|
|
91
113
|
this.init(this.container);
|
|
92
114
|
//监听重试消息数量
|
|
93
115
|
this.$xdRoot.$on('restFooterNumber', this.handle)
|
|
@@ -159,6 +181,13 @@
|
|
|
159
181
|
this.footerBarKey = this.$xdUniHelper.randomChar(20);
|
|
160
182
|
},
|
|
161
183
|
|
|
184
|
+
getImage(list=[],index,key){
|
|
185
|
+
if(!list[index]) return '';
|
|
186
|
+
if(list[index] && !list[index][key]) return '';
|
|
187
|
+
let item = list[index][key];
|
|
188
|
+
return getServiceUrl(item.url, 'size1');
|
|
189
|
+
},
|
|
190
|
+
|
|
162
191
|
/**
|
|
163
192
|
* @description 监听事件变化
|
|
164
193
|
* @param value {object} 业务组件对象自己
|
|
@@ -166,8 +195,11 @@
|
|
|
166
195
|
init(value) {
|
|
167
196
|
//设置底部菜单
|
|
168
197
|
let bar = getContainerPropsValue(value, 'content.footer-setting', []);
|
|
198
|
+
let imageIcons = getContainerPropsValue(value, 'content.footerSettingImage', []);
|
|
199
|
+
this.backgroundImage = getContainerPropsValue(value, 'content.backgroundImage', '');
|
|
169
200
|
this.list = {
|
|
170
201
|
bgColor: getContainerPropsValue(value, 'content.bgColor', '#fff'),
|
|
202
|
+
bodyStyle: this.bodyStyle,
|
|
171
203
|
selectedColor: getContainerPropsValue(value, 'content.selectedColor', this.mainColor),
|
|
172
204
|
color: getContainerPropsValue(value, 'content.color', '#333'),
|
|
173
205
|
list: bar.map((item,index)=>{
|
|
@@ -177,6 +209,8 @@
|
|
|
177
209
|
path: item.path.value,
|
|
178
210
|
size: item.size,
|
|
179
211
|
num: this.numObj[index] ? this.numObj[index]: 0 ,
|
|
212
|
+
image: this.getImage(imageIcons,index,'image') || this.getImage(imageIcons,index,'actImage'),
|
|
213
|
+
actImage: this.getImage(imageIcons,index,'actImage') || this.getImage(imageIcons,index,'image'),
|
|
180
214
|
}
|
|
181
215
|
}),
|
|
182
216
|
};
|
|
@@ -190,6 +224,7 @@
|
|
|
190
224
|
@import "./JfbBaseFooterLess.less";
|
|
191
225
|
|
|
192
226
|
.jfb-base-footer {
|
|
227
|
+
|
|
193
228
|
&__body{
|
|
194
229
|
box-sizing: border-box;
|
|
195
230
|
}
|
|
@@ -285,7 +285,14 @@ export default {
|
|
|
285
285
|
placeholder: '请选择输入框文字颜色',
|
|
286
286
|
className: 'input80',
|
|
287
287
|
},
|
|
288
|
-
|
|
288
|
+
{
|
|
289
|
+
label: "输入框边框设置:",
|
|
290
|
+
ele: "xd-border",
|
|
291
|
+
valueKey: "inputBorder",
|
|
292
|
+
value: data['inputBorder'] || {},
|
|
293
|
+
className: 'input80',
|
|
294
|
+
groupKey: 'style',
|
|
295
|
+
},
|
|
289
296
|
{
|
|
290
297
|
ele: 'title',
|
|
291
298
|
label: '边框设置',
|