jufubao-base 1.0.198-beta1 → 1.0.200-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.
Files changed (28) hide show
  1. package/commands.js +1 -1
  2. package/package.json +1 -1
  3. package/src/ICONS.js +1128 -0
  4. package/src/components/JfbBaseAddress/Attr.js +109 -1
  5. package/src/components/JfbBaseAddress/JfbBaseAddress.vue +152 -77
  6. package/src/components/JfbBaseAddress/XdTfkItem.vue +117 -0
  7. package/src/components/JfbBaseConDialog/JfbBaseConDialog.vue +13 -41
  8. package/src/components/JfbBaseFastLink/Attr.js +24 -8
  9. package/src/components/JfbBaseFastLink/JfbBaseFastLink.vue +37 -21
  10. package/src/components/JfbBaseFooter/Attr.js +141 -75
  11. package/src/components/JfbBaseFooter/JfbBaseFooter.vue +50 -15
  12. package/src/components/JfbBaseOrderDetail/Attr.js +147 -65
  13. package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +96 -46
  14. package/src/components/JfbBaseOrderList/Attr.js +59 -2
  15. package/src/components/JfbBaseOrderList/JfbBaseOrderList.vue +139 -92
  16. package/src/components/JfbBaseOrderList/Mock.js +3 -0
  17. package/src/components/JfbBaseOrderList/XdTfkOrderItem.vue +267 -0
  18. package/src/components/JfbBasePosterBigSmall/JfbBasePosterBigSmall.vue +14 -13
  19. package/src/components/JfbBasePosterBigSmall/getWidthHeight.js +6 -8
  20. package/src/components/JfbBaseUserCenter/Attr.js +297 -52
  21. package/src/components/JfbBaseUserCenter/JfbBaseUserCenter.vue +135 -44
  22. package/src/components/JfbBaseUserInfo/Attr.js +212 -37
  23. package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +89 -60
  24. package/src/components/JfbBaseUserOrder/Attr.js +332 -30
  25. package/src/components/JfbBaseUserOrder/JfbBaseUserOrder.vue +183 -55
  26. package/src/components/JfbBaseWallet/Attr.js +376 -8
  27. package/src/components/JfbBaseWallet/JfbBaseWallet.vue +185 -49
  28. package/src/mixins/componentsMixins.js +210 -35
@@ -186,7 +186,7 @@ export default {
186
186
  });
187
187
  },
188
188
 
189
- getResult(is_auto='N') {
189
+ getResult() {
190
190
  jfbRootExec("getCouponResult", {
191
191
  vm: this,
192
192
  data: {
@@ -196,16 +196,6 @@ 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
- }
209
199
  this.order_num = null;
210
200
  this.$xdHideLoading();
211
201
  this.$xdAlert({
@@ -224,15 +214,6 @@ export default {
224
214
  return;
225
215
  }
226
216
  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
- }
236
217
  this.$xdHideLoading();
237
218
  this.$xdAlert({
238
219
  content: res.message,
@@ -288,6 +269,7 @@ export default {
288
269
  this.list[this.currentIndex].app_activity_button
289
270
  );
290
271
  this.activity_id = this.list[this.currentIndex].activity_id;
272
+ this.isAll =
291
273
  this.handlePop();
292
274
  })
293
275
  .catch((err) => {
@@ -319,17 +301,13 @@ export default {
319
301
  this.handleCardBindClose();
320
302
  }
321
303
  } else {
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
- }
304
+ if(res.can_take === "Y"){
305
+ if (this.isPreview) {
306
+ console.log(getContainerPropsValue(value, "content.is_show_dailog", 'Y'))
307
+ this.isShow = getContainerPropsValue(value, "content.is_show_dailog", 'Y') === 'N';
308
+ }else this.isShow = true;
309
+ }else{
310
+ this.handleCardBindClose();
333
311
  }
334
312
  }
335
313
  })
@@ -343,11 +321,11 @@ export default {
343
321
  }
344
322
  },
345
323
 
346
- getAllCoupont(is_auto='N') {
347
- this.p_getAllDialogList(is_auto);
324
+ getAllCoupont(info) {
325
+ this.p_getAllDialogList();
348
326
  },
349
327
 
350
- p_getAllDialogList(is_auto='N') {
328
+ p_getAllDialogList() {
351
329
  //getAllCoupon
352
330
  this.$xdShowLoading({});
353
331
  jfbRootExec("getAllCoupon", {
@@ -355,16 +333,10 @@ export default {
355
333
  data: {
356
334
  distribution_method: this.distribution_method,
357
335
  activity_id: this.activity_id,
358
- is_auto: is_auto,
359
336
  ...this.dispatchData
360
337
  }
361
338
  }).then(res => {
362
339
  if (res.code === 400) {
363
- if(is_auto==='Y') {
364
- this.$xdHideLoading();
365
- this.handleCardBindClose()
366
- return
367
- }
368
340
  this.$xdHideLoading();
369
341
  this.$xdAlert({
370
342
  content: res.message,
@@ -379,7 +351,7 @@ export default {
379
351
  }
380
352
  this.order_num = res.tmp_order_number;
381
353
  setTimeout(()=>{
382
- this.getResult(is_auto);
354
+ this.getResult();
383
355
  },1000)
384
356
  }).catch((err) => {
385
357
  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: '', value: 'Y'},
41
- {label: '', value: 'N'},
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: 'padding',
89
- value: data.padding===undefined? data.padding: '',
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: '内容边距设置,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">20</span>像素',
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 class="fast-link" :style="{ margin: outMargin}" v-if="list.length > 0">
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: 20, //间距
108
+ padding:{},
109
+ rowSpacing: 20, //间距
111
110
  }
112
111
  },
113
112
  watch: {
@@ -118,16 +117,32 @@
118
117
  },
119
118
 
120
119
  computed: {
121
- outMargin(){
122
- let str = `${this.checkValue(this.margin.top, 20)}rpx`;
123
- str = `${str} ${this.checkValue(this.margin.right, 20)}rpx`;
124
- str = `${str} ${this.checkValue(this.margin.bottom, 20)}rpx`;
125
- str = `${str} ${this.checkValue(this.margin.left, 20)}rpx`;
126
- return str
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
- borderBox() {
129
- if (this.is_border === 'Y') return `${this.is_border_w}rpx solid ${this.is_border_c}`;
130
- else return '0';
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.padding = getContainerPropsValue(container, 'content.padding', 20);
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', {top: 0, left: 0, right: 0, bottom: 0});
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
- label: '',
8
- ele: 'slot',
9
- slot: 'is_reference_title',
10
- groupKey: 'advanced',
11
- },
12
- {
13
- label: '背景颜色:',
14
- ele: 'xd-color',
15
- valueKey: 'bgColor',
16
- groupKey:'style',
17
- value: '',
18
- placeholder: '请选择背景颜色',
19
- setting: {
20
- isAlpha: false
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
- classNmae: 'input80',
23
- },
24
- {
25
- label: '菜单文字颜色:',
26
- ele: 'xd-color',
27
- valueKey: 'color',
28
- groupKey:'style',
29
- value: '',
30
- setting: {
31
- isAlpha: false
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
- placeholder: '请选择菜单文字颜色',
34
- classNmae: 'input80',
35
- },
36
- {
37
- label: '菜单文字选中颜色:',
38
- ele: 'xd-color',
39
- valueKey: 'selectedColor',
40
- groupKey:'style',
41
- setting: {
42
- isAlpha: false
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
- value: '',
45
- placeholder: '请选择菜单文字选中颜色',
46
- classNmae: 'input80',
47
- },
48
- {
49
- label: '菜单配置:',
50
- ele: 'xd-footer-setting',
51
- valueKey: 'footer-setting',
52
- groupKey:'advanced',
53
- value: [],
54
- setting: {
55
- router: XdBus.getParentApi('getPagesTree'),
56
- showField: {
57
- path: true,
58
- icon: true,
59
- notice: true
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
- handleCustom({action,data}){
63
- console.log(`handleCustom.${action}`, data);
64
- if(action === 'number') {
65
- XdBus.getParentApi('getOptionsNoticeNumber')()
66
- .then(res => {
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
- inline: false,
73
- 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>)和是否有消息数量显示(无数量显示可以不填写)',
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" :style="{height:height + 'rpx'}">
20
- <xd-footer-bar
21
- v-if="list !== null"
22
- :height="height"
23
- :tabbar="list"
24
- :view="view"
25
- :styles="styles"
26
- :key="footerBarKey"
27
- :base-url="baseUrl"
28
- ></xd-footer-bar>
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
- if (this.$configProject.UNI_PLATFORM === 'h5'
78
- && this.$configProject.NODE_ENV === 'production'
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') - 4;
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
  }