jufubao-base 1.0.184-beta2 → 1.0.184

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-base",
3
- "version": "1.0.184-beta2",
3
+ "version": "1.0.184",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -1,6 +1,5 @@
1
1
  'use strict';
2
2
  import StyleForm from "@/utils/StyleForm";
3
- import IConList from "@/ICONS"
4
3
  let styleForm = new StyleForm(
5
4
  {border: null, shadow: null, spacing: '', bgColor:'', margin: null},
6
5
  null,
@@ -12,35 +11,6 @@ export default {
12
11
  advanced: [],
13
12
  content: (data)=>{
14
13
  return [
15
- {
16
- label: "布局样式配置",
17
- ele: "xd-radio",
18
- valueKey: "layout_style",
19
- value: data.layout_style || 'old',
20
- list: [
21
- {label: '布局1', value: 'old'},
22
- {label: '布局2', value: 'tfk'},
23
- ],
24
- groupKey: "style",
25
- },
26
- {
27
- label: "编辑图标",
28
- ele: "xd-select-list",
29
- valueKey: "edit_icon",
30
- value: data.edit_icon || 'iconbianji-01',
31
- list: IConList,
32
- className: 'input80',
33
- groupKey: "content",
34
- },
35
- {
36
- label: "删除图标",
37
- ele: "xd-select-list",
38
- valueKey: "delete_icon",
39
- value: data.delete_icon || 'iconshanchu-01',
40
- list: IConList,
41
- className: 'input80',
42
- groupKey: "content",
43
- },
44
14
  {
45
15
  label: '选取地区路径:',
46
16
  ele: 'xd-select-pages-path',
@@ -53,26 +23,7 @@ export default {
53
23
  },
54
24
  inline: false,
55
25
  },
56
- ...styleForm.getForm(data, '内容列表样式配置'),
57
- {
58
- label: "圆角设置",
59
- ele: 'xd-site-select-list',
60
- valueKey: 'cardRadius',
61
- value: data['cardRadius'] || '',
62
- groupKey:'style',
63
- placeholder: '请选择内容圆角设置',
64
- multiple: false,
65
- className: 'input80',
66
- handleCustom({ action, data }) {
67
- XdBus.getParentApi('getOptionsSettingList')({ setting_id: 'edtix_style_radius' })
68
- .then(res => {
69
- data.cb(res.list)
70
- })
71
- .catch(error => {
72
- console.error(error);
73
- });
74
- },
75
- }
26
+ ...styleForm.getForm(data, '内容列表样式配置')
76
27
  ].filter(i=>i)
77
28
  },
78
29
  }
@@ -26,108 +26,81 @@
26
26
  class="jfb-base-address__body-address"
27
27
  v-if="addressList && addressList.length > 0"
28
28
  >
29
- <template v-if="layout_style === 'old'">
30
- <view
31
- :style="{
32
- marginBottom: jfbListSpacing + 'rpx',
33
- boxShadow: jfbListShadowComputed,
34
- border: jfbListBorderComputed,
35
- backgroundColor: jfbListBgColor,
36
- borderRadius: cardRadius + 'rpx'
37
- }"
38
- class="jfb-base-address__body-address-item"
39
- v-for="(item, index) in addressList"
40
- @click="handleSelectAddress(item)"
41
- :key="index"
42
- >
43
- <view class="jfb-base-address__body-address-item-top">
44
- <view
45
- v-if="item.is_default === 'Y'"
46
- :style="{
47
- backgroundColor: mainColor,
48
- color: '#fff',
49
- fontSize: '24rpx',
50
- padding: '4rpx 10rpx',
51
- borderRadius: '4rpx',
52
- marginRight: '20rpx',
53
- }"
54
- >默认</view
55
- >
56
- <view
57
- :style="{
58
- color: '#999999',
59
- flex: 1,
60
- paddingRight: item.is_valid === 'N' ? '40rpx' : '',
61
- }"
62
- >
63
- <view>
64
- {{ item | getCodeName }}
65
- </view>
66
- </view>
67
- <view
68
- style="position: absolute; right: 40rpx; width: 50rpx"
69
- v-if="item.is_valid === 'N'"
70
- >
71
- <xd-font-icon
72
- size="32"
73
- :color="dangerColor"
74
- icon="iconmingchengtubiao"
75
- ></xd-font-icon>
76
- </view>
77
- </view>
78
- <view class="jfb-base-address__body-address-item-middle">
79
- {{ item.address_detail }} {{ item.house_number }}
80
- </view>
29
+ <view
30
+ :style="{
31
+ marginBottom: jfbListSpacing + 'rpx',
32
+ boxShadow: jfbListShadowComputed,
33
+ border: jfbListBorderComputed,
34
+ backgroundColor: jfbListBgColor,
35
+ }"
36
+ class="jfb-base-address__body-address-item"
37
+ v-for="(item, index) in addressList"
38
+ @click="handleSelectAddress(item)"
39
+ :key="index"
40
+ >
41
+ <view class="jfb-base-address__body-address-item-top">
81
42
  <view
43
+ v-if="item.is_default === 'Y'"
82
44
  :style="{
83
- backgroundColor: item.is_select === 'Y' ? mainColor : '#CCC',
45
+ backgroundColor: mainColor,
46
+ color: '#fff',
47
+ fontSize: '24rpx',
48
+ padding: '4rpx 10rpx',
49
+ borderRadius: '4rpx',
50
+ marginRight: '20rpx',
51
+ }"
52
+ >默认</view
53
+ >
54
+ <view
55
+ :style="{
56
+ color: '#999999',
57
+ flex: 1,
58
+ paddingRight: item.is_valid === 'N' ? '40rpx' : '',
84
59
  }"
85
- class="jfb-base-address__body-address-item-bottom"
86
60
  >
87
61
  <view>
88
- <view style="margin-right: 40rpx">{{ item.name }}</view>
89
- <view>{{ item.phone }}</view>
90
- </view>
91
- <view>
92
- <xd-font-icon
93
- @click.native.stop="handleEdit(item)"
94
- style="margin-right: 40rpx"
95
- icon="iconbianji-01"
96
- size="32"
97
- ></xd-font-icon>
98
- <xd-font-icon
99
- @click.native.stop="handleDel(item)"
100
- icon="iconshanchu-01"
101
- size="32"
102
- ></xd-font-icon>
62
+ {{ item | getCodeName }}
103
63
  </view>
104
64
  </view>
65
+ <view
66
+ style="position: absolute; right: 40rpx; width: 50rpx"
67
+ v-if="item.is_valid === 'N'"
68
+ >
69
+ <xd-font-icon
70
+ size="32"
71
+ :color="dangerColor"
72
+ icon="iconmingchengtubiao"
73
+ ></xd-font-icon>
74
+ </view>
75
+ </view>
76
+ <view class="jfb-base-address__body-address-item-middle">
77
+ {{ item.address_detail }} {{ item.house_number }}
105
78
  </view>
106
- </template>
107
- <template v-else>
108
79
  <view
109
80
  :style="{
110
- marginBottom: jfbListSpacing + 'rpx',
111
- boxShadow: jfbListShadowComputed,
112
- border: jfbListBorderComputed,
113
- backgroundColor: jfbListBgColor,
114
- borderRadius: cardRadius + 'rpx'
81
+ backgroundColor: item.is_select === 'Y' ? mainColor : '#CCC',
115
82
  }"
116
- v-for="(item, index) in addressList"
117
- @click="handleSelectAddress(item)"
118
- :key="index"
83
+ class="jfb-base-address__body-address-item-bottom"
119
84
  >
120
- <xd-tfk-item
121
- :edit_icon="edit_icon"
122
- :delete_icon="delete_icon"
123
- :item="item"
124
- :dangerColor="dangerColor"
125
- @editAddress="handleEdit(item)"
126
- @delAddress="handleDel(item)"
127
- @setDefault="handleSetDefault(item)"
128
- ></xd-tfk-item>
85
+ <view>
86
+ <view style="margin-right: 40rpx">{{ item.name }}</view>
87
+ <view>{{ item.phone }}</view>
88
+ </view>
89
+ <view>
90
+ <xd-font-icon
91
+ @click.native.stop="handleEdit(item)"
92
+ style="margin-right: 40rpx"
93
+ icon="iconbianji-01"
94
+ size="32"
95
+ ></xd-font-icon>
96
+ <xd-font-icon
97
+ @click.native.stop="handleDel(item)"
98
+ icon="iconshanchu-01"
99
+ size="32"
100
+ ></xd-font-icon>
101
+ </view>
129
102
  </view>
130
- </template>
103
+ </view>
131
104
  </view>
132
105
  <view class="jfb-base-address__body-empty" v-else>
133
106
  <xd-font-icon icon="iconbianzu-01" size="120"></xd-font-icon>
@@ -177,7 +150,6 @@ import componentsMixins from "@/mixins/componentsMixins";
177
150
  import extsMixins from "@/mixins/extsMixins";
178
151
  import StyleForm from "@/utils/StyleForm";
179
152
  import { getContainerPropsValue } from "@/utils/xd.base";
180
- import XdTfkItem from "./XdTfkItem"
181
153
  let styleForm = new StyleForm(
182
154
  {
183
155
  border: null,
@@ -202,7 +174,6 @@ export default {
202
174
  XdButton,
203
175
  XdDownDrawer,
204
176
  XdAddress,
205
- XdTfkItem,
206
177
  },
207
178
  mixins: [componentsMixins, extsMixins, JfbBaseAddressMixin],
208
179
  data() {
@@ -213,12 +184,7 @@ export default {
213
184
  location_url: "",
214
185
  addressList: null,
215
186
  ...styleForm.getDataItem(),
216
- version: '',
217
-
218
- layout_style: "old",
219
- edit_icon: "",
220
- delete_icon: "",
221
- cardRadius: 16,
187
+ version: ''
222
188
  };
223
189
  },
224
190
  filters: {
@@ -270,11 +236,6 @@ export default {
270
236
  { value: "" }
271
237
  ).value;
272
238
  styleForm.getInitItem(this, value);
273
- this.layout_style = getContainerPropsValue(value, "content.layout_style", "old");
274
- this.edit_icon = getContainerPropsValue(value, "content.edit_icon", "iconbianji-01");
275
- this.delete_icon = getContainerPropsValue(value, "content.delete_icon", "iconshanchu-01");
276
- this.cardRadius = getContainerPropsValue(value, "content.cardRadius", 16);
277
- console.log("edit_icon", this.edit_icon)
278
239
  },
279
240
  getList(callback) {
280
241
  this.$xdShowLoading({});
@@ -529,8 +490,7 @@ export default {
529
490
  })
530
491
  .catch(this.$xdLog.catch);
531
492
  },
532
- //接口数据接口映射到组件数据接口
533
- apiDataMapCompData(item){
493
+ handleEdit(item) {
534
494
  let city_name = [
535
495
  item["province_name"],
536
496
  item["city_name"],
@@ -543,15 +503,13 @@ export default {
543
503
  item["area_code"],
544
504
  item["street_code"],
545
505
  ];
546
- return {
506
+ this.defaultValue = {
547
507
  receipt_username: item["name"],
548
508
  receipt_address: item["address_detail"],
549
509
  receipt_phone: item["phone"],
550
510
  receipt_default: item["is_default"] === "Y" ? true : false,
551
511
  city_name: city_name,
552
512
  city_code: city_code,
553
- receipt_city_code: city_code,
554
- receipt_city_name: city_name,
555
513
  receipt_region_name: city_name.join(" "),
556
514
  city_selected_data: city_name.map((item, index) => {
557
515
  return { label: item, value: city_code[index] };
@@ -560,20 +518,11 @@ export default {
560
518
  latitude: item["latitude"] || null,
561
519
  longitude: item["longitude"] || null,
562
520
  house_number: item["house_number"],
563
- }
564
- },
565
- handleEdit(item) {
566
- this.defaultValue = this.apiDataMapCompData(item);
521
+ };
567
522
 
568
523
  console.log("handleEdit", item, this.defaultValue);
569
524
  this.showAddress = true;
570
525
  },
571
- handleSetDefault(item){
572
- let is_default = item.is_default === "Y" ? "N" : "Y";
573
- this.$set(item, 'is_default', is_default);
574
- let saveData = this.apiDataMapCompData({...item, is_default});
575
- this.handleSave(saveData);
576
- },
577
526
  handleDel(item) {
578
527
  console.log("handleDel", item);
579
528
  this.$xdConfirm({
@@ -721,10 +670,9 @@ export default {
721
670
 
722
671
  &-address {
723
672
  &-item {
724
- // border-radius: unit(16, rpx);
673
+ border-radius: unit(16, rpx);
725
674
  margin-bottom: unit(20, rpx);
726
675
  box-shadow: 0px 0px unit(20, rpx) 0px rgba(0, 0, 0, 0.1);
727
- overflow: hidden;
728
676
 
729
677
  &-top {
730
678
  display: flex;
@@ -747,7 +695,7 @@ export default {
747
695
  padding: unit(20, rpx) unit(40, rpx);
748
696
  font-size: unit(28, rpx);
749
697
  color: #fff;
750
- // border-radius: 0px 0px unit(16, rpx) unit(16, rpx);
698
+ border-radius: 0px 0px unit(16, rpx) unit(16, rpx);
751
699
 
752
700
  & > view {
753
701
  display: flex;
@@ -332,39 +332,95 @@ export default {
332
332
  notice: '间距设置,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">20</span>像素',
333
333
  },
334
334
  {
335
- label: "主体信息行间距:",
336
- ele: 'el-input',
337
- type: 'number',
338
- valueKey: 'lineHeight',
335
+ ele: 'title',
336
+ label: '投影设置',
337
+ size: 'small',
339
338
  groupKey:'style',
340
- value: data['lineHeight'] || 20,
341
- placeholder: '请输入主体信息行间距',
342
- className: 'input80',
343
339
  },
344
340
  {
345
- label: '投影设置:',
346
- ele: "xd-shadow",
347
- valueKey: "sectionShadow",
348
- value: data.sectionShadow || {},
341
+ label: '是否有投影:',
342
+ ele: 'xd-radio',
343
+ groupKey:'style',
344
+ valueKey: 'is_shadow',
345
+ value: data['is_shadow'] || 'N',
346
+ placeholder: '请选择是否投影',
347
+ multiple: false,
348
+ className: 'input80',
349
+ list: [
350
+ { label: '是', value: 'Y' },
351
+ { label: '否', value: 'N' },
352
+ ]
353
+ },
354
+ data['is_shadow'] === 'Y' && {
355
+ label: '投影颜色:',
356
+ ele: 'xd-color',
357
+ groupKey:'style',
358
+ valueKey: 'is_shadow_bg',
359
+ value: data['is_shadow_bg'] || '',
360
+ placeholder: '请选择投影颜色',
361
+ classNmae: 'input80',
362
+ },
363
+ data['is_shadow'] === 'Y' && {
364
+ label: '投影范围:',
365
+ ele: 'xd-site-select-list',
366
+ valueKey: 'is_shadow_w',
349
367
  groupKey:'style',
350
- handleCustom({action, data}) {
351
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
368
+ value: data['is_shadow_w'] || '10',
369
+ placeholder: '请选择投影范围',
370
+ multiple: false,
371
+ className: 'input80',
372
+ handleCustom({ action, data }) {
373
+ XdBus.getParentApi('getOptionsSettingList')({
374
+ setting_id: 'edtix_style_radius',
375
+ key: Date.now()
376
+ })
352
377
  .then(res => {
353
378
  data.cb(res.list)
354
379
  })
355
380
  .catch(error => {
356
381
  console.error(error);
357
- data.cb([])
358
382
  });
359
383
  },
360
384
  },
361
385
  {
362
- label: "边框设置:",
363
- ele: "xd-border",
364
- valueKey: "sectionBorder",
365
- value: data.sectionBorder || {},
386
+ ele: 'title',
387
+ label: '边框设置',
388
+ size: 'small',
366
389
  groupKey:'style',
367
390
  },
391
+ {
392
+ label: '是否有边框:',
393
+ ele: 'xd-radio',
394
+ valueKey: 'is_border',
395
+ value: data['is_border'] || 'N',
396
+ groupKey:'style',
397
+ placeholder: '请选择是否有边框',
398
+ multiple: false,
399
+ className: 'input80',
400
+ list: [
401
+ { label: '是', value: 'Y' },
402
+ { label: '否', value: 'N' },
403
+ ]
404
+ },
405
+ data['is_border'] === 'Y' && {
406
+ label: '边框颜色:',
407
+ ele: 'xd-color',
408
+ groupKey:'style',
409
+ valueKey: 'is_border_c',
410
+ value: data['is_border_c'] || '',
411
+ placeholder: '请选择边框颜色',
412
+ classNmae: 'input80',
413
+ },
414
+ data['is_border'] === 'Y' && {
415
+ label: '边框大小:',
416
+ groupKey:'style',
417
+ ele: 'el-input',
418
+ type: 'number',
419
+ valueKey: 'is_border_w',
420
+ value: data['is_border_w'] || '',
421
+ placeholder: '请输入边框颜色',
422
+ className: 'input80',
423
+ },
368
424
  {
369
425
  label: '内容圆角设置:',
370
426
  ele: 'xd-site-select-list',
@@ -129,9 +129,6 @@
129
129
  v-for="(Ditem, Dindex) in info.film_show.detail.items"
130
130
  :key="Dindex"
131
131
  class="jfb-base-order-detail__body-delivery-bottom-item"
132
- :style="{
133
- marginBottom: lineHeight + 'rpx'
134
- }"
135
132
  >
136
133
  <view style="width: 130rpx"
137
134
  >{{ Ditem.label }} <span v-if="Ditem.label">:</span>
@@ -217,9 +214,6 @@
217
214
  v-for="(Ditem, Dindex) in item.info"
218
215
  :key="Dindex"
219
216
  class="jfb-base-order-detail__body-delivery-bottom-item"
220
- :style="{
221
- marginBottom: lineHeight + 'rpx'
222
- }"
223
217
  >
224
218
  <view style="width: 130rpx;display: flex;">
225
219
  <view v-html="Ditem.label"></view>
@@ -516,9 +510,6 @@
516
510
  v-for="(item, index) in info.detail"
517
511
  :key="index"
518
512
  class="jfb-base-order-detail__body-order"
519
- :style="{
520
- marginBottom: lineHeight + 'rpx'
521
- }"
522
513
  >
523
514
  <view :style="{ fontWeight: item.style }">
524
515
  <view style="display: flex;">
@@ -550,9 +541,6 @@
550
541
  <view
551
542
  v-if="item.type !== 'line'"
552
543
  class="jfb-base-order-detail__body-price"
553
- :style="{
554
- marginBottom: lineHeight + 'rpx'
555
- }"
556
544
  >
557
545
  <view :style="{ fontWeight: item.style }">{{ item.label }}</view>
558
546
  <xd-unit
@@ -826,6 +814,15 @@ export default {
826
814
  backgroundColor: "",
827
815
  padding: 0,
828
816
 
817
+ //投影
818
+ is_shadow: "Y",
819
+ is_shadow_bg: 0,
820
+ is_shadow_w: 0,
821
+
822
+ //边框
823
+ is_border: "Y",
824
+ is_border_w: 0,
825
+ is_border_c: "",
829
826
 
830
827
  //其他
831
828
  margin: {
@@ -836,11 +833,8 @@ export default {
836
833
  },
837
834
  is_hot: "Y",
838
835
  logo: "",
839
- lineHeight: 20,
840
836
 
841
837
  noticeBgc:'',
842
- sectionShadow: "",
843
- sectionBorder: "",
844
838
  };
845
839
  },
846
840
  watch: {
@@ -879,10 +873,14 @@ export default {
879
873
  return str
880
874
  },
881
875
  shadowBox() {
882
- return this.sectionShadow;
876
+ if (this.is_shadow === "Y")
877
+ return `0 0 ${this.is_shadow_w}rpx ${this.is_shadow_bg}`;
878
+ else return "0 0 0 rgba(0,0,0,0)";
883
879
  },
884
880
  borderBox() {
885
- return this.sectionBorder;
881
+ if (this.is_border === "Y")
882
+ return `${this.is_border_w}rpx solid ${this.is_border_c}`;
883
+ else return "0";
886
884
  },
887
885
  },
888
886
  created() {
@@ -1110,19 +1108,17 @@ export default {
1110
1108
  this.brandTextColor = getContainerPropsValue(container, "content.brandTextColor", this.mainColor);
1111
1109
  this.padding = getContainerPropsValue(container, "content.padding", 20);
1112
1110
 
1111
+ this.is_shadow = getContainerPropsValue(container, "content.is_shadow", "N");
1112
+ this.is_shadow_bg = getContainerPropsValue(container, "content.is_shadow_bg", "#fff");
1113
+ this.is_shadow_w = getContainerPropsValue(container, "content.is_shadow_w", "10");
1114
+
1115
+ this.is_border = getContainerPropsValue(container, "content.is_border", "N");
1113
1116
  this.is_hot = getContainerPropsValue(container, "content.is_hot", "Y");
1117
+ this.is_border_c = getContainerPropsValue(container, "content.is_border_c", "#fff");
1118
+ this.is_border_w = getContainerPropsValue(container, "content.is_border_w", 2);
1114
1119
  this.viewStatus = getContainerPropsValue(container, "content.viewStatus", "mall");
1115
1120
  this.is_show_support_shop = getContainerPropsValue(container, "content.is_show_support_shop", "N");
1116
1121
  this.is_show_delete_order = getContainerPropsValue(container, "content.is_show_delete_order", "N");
1117
- this.lineHeight = getContainerPropsValue(container, "content.lineHeight", 20);
1118
- let sectionShadow = getContainerPropsValue(container, "content.sectionShadow", "");
1119
- if(sectionShadow.type === 'Y' && sectionShadow.value){
1120
- this.sectionShadow = `0 0 ${sectionShadow.value.width}rpx ${sectionShadow.value.color}`;
1121
- }else this.sectionShadow = '';
1122
- let sectionBorder = getContainerPropsValue(container, "content.sectionBorder", "");
1123
- if(sectionBorder.type === 'Y' && sectionBorder.value){
1124
- this.sectionBorder = `${sectionBorder.value.width}rpx solid ${sectionBorder.value.color}`;
1125
- }else this.sectionBorder = '';
1126
1122
  },
1127
1123
  getCountDown() {
1128
1124
  this.timer = setInterval(() => {
@@ -4,17 +4,6 @@ export default {
4
4
  style: [],
5
5
  content: (data)=>{
6
6
  return [
7
- {
8
- label: "布局样式配置",
9
- ele: "xd-radio",
10
- valueKey: "layout_style",
11
- value: data.layout_style || 'old',
12
- list: [
13
- {label: '布局1', value: 'old'},
14
- {label: '布局2', value: 'tfk'},
15
- ],
16
- groupKey: "style",
17
- },
18
7
  {
19
8
  label: '设置订单状态:',
20
9
  ele: 'xd-order-setting',
@@ -41,18 +30,6 @@ export default {
41
30
  {required: true, message: '设置订单配置错误!请检查配置', trigger: 'change'},
42
31
  ],
43
32
  },
44
- {
45
- label: "是否展示订单号:",
46
- ele: 'xd-radio',
47
- valueKey: 'isShowOrderNo',
48
- value: data['isShowOrderNo'] || 'Y',
49
- groupKey:'style',
50
- list: [
51
- {label: '是', value: 'Y'},
52
- {label: '否', value: 'N'},
53
- ],
54
- hidden: data.layout_style !== 'tfk'
55
- },
56
33
  {
57
34
  label: '外填充:',
58
35
  ele: 'xd-margin-padding',