jufubao-base 1.0.203 → 1.0.205-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 (27) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbBaseAddress/XdAddress.vue +12 -6
  3. package/src/components/JfbBaseBackground/JfbBaseBackground.vue +6 -2
  4. package/src/components/JfbBaseCardEntry/Attr.js +472 -443
  5. package/src/components/JfbBaseCardEntry/JfbBaseCardEntry.vue +124 -98
  6. package/src/components/JfbBaseCardEntry/Mock.js +1 -0
  7. package/src/components/JfbBaseCardEntry/XdCardNew.vue +135 -0
  8. package/src/components/JfbBaseEntry/JfbBaseEntry.vue +49 -38
  9. package/src/components/JfbBaseFastLink/JfbBaseFastLink.vue +2 -4
  10. package/src/components/JfbBaseHeader/Attr.js +134 -51
  11. package/src/components/JfbBaseHeader/JfbBaseHeader.vue +118 -31
  12. package/src/components/JfbBaseHeaderElephant/Api.js +22 -0
  13. package/src/components/JfbBaseHeaderElephant/Attr.js +510 -0
  14. package/src/components/JfbBaseHeaderElephant/JfbBaseHeaderElephant.vue +464 -0
  15. package/src/components/JfbBaseHeaderElephant/JfbBaseHeaderElephantLess.less +79 -0
  16. package/src/components/JfbBaseHeaderElephant/JfbBaseHeaderElephantMixin.js +30 -0
  17. package/src/components/JfbBaseHeaderElephant/Mock.js +5 -0
  18. package/src/components/JfbBaseNotice/Attr.js +26 -0
  19. package/src/components/JfbBaseNotice/JfbBaseNotice.vue +13 -1
  20. package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +11 -4
  21. package/src/components/JfbBasePoster/JfbBasePoster.vue +11 -2
  22. package/src/components/JfbBasePosterType/Attr.js +199 -81
  23. package/src/components/JfbBasePosterType/FourScreen.vue +115 -233
  24. package/src/components/JfbBasePosterType/JfbBasePosterType.vue +161 -80
  25. package/src/components/JfbBaseUserInfo/Attr.js +134 -33
  26. package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +89 -8
  27. package/src/mixins/componentsMixins.js +51 -47
@@ -15,16 +15,12 @@
15
15
  <!-- #endif -->
16
16
  <view class="jfb-base-poster-type__body" v-if="noData">
17
17
  <view class="x-line"></view>
18
- <view
19
- class="jfb-base-poster-cont"
20
- :style="{
21
- margin: margin,
22
- padding:contentPaddingOut,
23
- backgroundColor: bgColor,
24
- borderRadius: bgRadius + 'rpx'
25
- }"
26
- >
27
- <four-screen style="width: 100%;" :config="getConfig" :content="info"></four-screen>
18
+ <view class="jfb-base-poster-cont" :style="[bodyStyleComp]">
19
+ <four-screen
20
+ style="width: 100%;"
21
+ :config="getConfig"
22
+ :content="info"
23
+ ></four-screen>
28
24
  </view>
29
25
 
30
26
  </view>
@@ -56,7 +52,13 @@
56
52
  mixins: [componentsMixins,extsMixins,JfbBasePosterTypeMixin],
57
53
  data() {
58
54
  return {
55
+ //closeMask: true,
59
56
  params: {},
57
+ noData:false,
58
+ timer: null,
59
+ info: [],
60
+ isPreview: false,
61
+
60
62
  //Swiper 配置
61
63
  posterPosition: null,
62
64
  current: 0,
@@ -64,76 +66,134 @@
64
66
  isCarousel: true, //是否轮播图
65
67
  carouselTime: 5,//轮播图轮播周期
66
68
  useNumber: null, //广告使用张数
67
- padding: 0, //广告内容之间间距
68
- jdRows: 1, //行
69
- cells: 4, //列
70
- shadow: false, //是否设置阴影
71
- shadowColor:'rgba(0,0,0,.3)',
69
+ mode:'round',//索引样式
70
+ row: 1, //行
71
+ column: 4, //列
72
+ columnSpacing:0,
73
+
74
+ //icon样式设置
75
+ contShadow:{},
72
76
  radius: '20', //10/20/40 , 小/中/大
73
- timer: null,
74
- info: [],
75
- mS: {},
76
- iconPadding:{},
77
- contentPadding:{},
78
- isPreview: false,
79
- noData:false,
77
+ iconMargin:20,
78
+ titleStyle:{},
80
79
 
81
80
  //颜色设置
82
- textColor: '#333',
81
+ margin: {},
82
+ contentPadding:{},
83
83
  bgColor:'rgba(0,0,0,0)',
84
84
  bgRadius: 0,
85
85
  }
86
86
  },
87
87
  computed: {
88
+ dotStyleData(){
89
+ return this.dotStyleDataConf[this.mode];
90
+ },
91
+ dotStyleDataConf(){
92
+ let alpha = 0.6;
93
+ let selectedColor = `rgba(${color(this.mainColor).alpha(alpha).array().join(',')})`;
94
+ let textColor = `rgba(${color(this.mainColor).alpha(0.2).array().join(',')})`;
95
+ return {
96
+ dot: {
97
+ backgroundColor: 'rgba(166,166,166,.5)',
98
+ border: '0px rgba(166,166,166,.5) solid',
99
+ color: '#fff',
100
+ selectedBackgroundColor: selectedColor,
101
+ selectedBorder: `0px this.mainColor solid`
102
+ },
103
+ default: {
104
+ width: 16,
105
+ backgroundColor: 'rgba(200,200,200,.45)',
106
+ border: '1px rgba(200,200,200,.45) solid',
107
+ color: '#fff',
108
+ selectedBackgroundColor: selectedColor,
109
+ selectedBorder: `1px this.mainColor solid`
110
+ },
111
+ round: {
112
+ backgroundColor: 'rgba(166,166,166,.5)',
113
+ border: '0px rgba(166,166,166,.5) solid',
114
+ color: '#fff',
115
+ selectedBackgroundColor: selectedColor,
116
+ selectedBorder: `0px this.mainColor solid`
117
+ },
118
+ nav: {
119
+ backgroundColor: selectedColor,
120
+ border: '1px rgba(0,0,0,.2) solid',
121
+ color: '#fff',
122
+ selectedBackgroundColor: selectedColor,
123
+ selectedBorder: '1px rgba(255, 255, 255 1) solid'
124
+ },
125
+ indexes: {
126
+ backgroundColor: textColor,
127
+ border: '0px rgba(0,0,0,.2) solid',
128
+ color: '#fff',
129
+ selectedBackgroundColor: selectedColor,
130
+ selectedBorder: '0px rgba(0,0,0,.8) solid',
131
+ selectedColor: '#fff',
132
+ }
133
+ }
134
+ },
88
135
  getConfig(){
89
- let width = uni.getSystemInfoSync().safeArea.width -
90
- (this.checkValue(this.mS.left, 0) + this.checkValue(this.mS.right, 0)) * this.$rpxNum;
91
- width = width -
92
- (this.checkValue(this.contentPadding.left, 0) + this.checkValue(this.contentPadding.right, 0)) * this.$rpxNum;
93
136
  return {
94
- mode: 'normal',
95
- dotStyleData: this.dotStyleData,
96
- poster: this.poster,
97
- showType: this.showType,
98
- isCarousel: this.isCarousel,
99
- carouselTime: this.carouselTime,
100
- height: width / this.cells,
101
- width: width / this.cells,
102
- radius: this.radius,
103
- padding: this.padding,
104
- jdRows: this.jdRows,
105
- cells: this.cells,
106
- shadow: this.shadow,
107
- shadowColor: this.shadowColor,
108
- textColor: this.textColor,
109
- iconPadding:this.iconCPadding,
137
+ mode:this.mode,
138
+ isCarousel: this.isCarousel, //焦点图|轮播
139
+ carouselTime: this.carouselTime, //轮播周期速度
140
+ row: this.row,
141
+ isPreview: this.isPreview,
142
+ column: this.column,
143
+ iconStyleComp: this.iconStyleComp,
144
+ iconItemStyleComp: this.iconItemStyleComp,
145
+ iconItemBoxStyleComp: this.iconItemBoxStyleComp,
146
+ height: this.iconWH.height,
147
+ width: this.iconWH.width,
148
+ titleStyle: this.titleStyle,
149
+ dotStyleData: this.dotStyleData
110
150
  }
111
151
  },
112
- iconCPadding(){
113
- let defaultPadding = 20;
114
- if(this.cells === 4) defaultPadding = 25
115
- let str = `${this.checkValue(this.iconPadding.top, defaultPadding)}rpx`;
116
- str = `${str} ${this.checkValue(this.iconPadding.right, defaultPadding)}rpx`;
117
- str = `${str} ${this.checkValue(this.iconPadding.bottom, defaultPadding)}rpx`;
118
- str = `${str} ${this.checkValue(this.iconPadding.left, defaultPadding)}rpx`;
119
- return str
152
+ iconItemStyleComp(){
153
+ return {
154
+ height: this.iconWH.height + 'px',
155
+ width: this.iconWH.width + 'px',
156
+ marginRight: this.columnSpacing + 'rpx'
157
+ }
120
158
  },
121
- margin(){
122
- let str = `${this.checkValue(this.mS.top, 0)}rpx`;
123
- str = `${str} ${this.checkValue(this.mS.right, 0)}rpx`;
124
- str = `${str} ${this.checkValue(this.mS.bottom, 0)}rpx`;
125
- str = `${str} ${this.checkValue(this.mS.left, 0)}rpx`;
126
- return str
127
- },
128
- contentPaddingOut(){
129
- let str = `${this.checkValue(this.contentPadding.top, 0)}rpx`;
130
- str = `${str} ${this.checkValue(this.contentPadding.right, 0)}rpx`;
131
- str = `${str} ${this.checkValue(this.contentPadding.bottom, 0)}rpx`;
132
- str = `${str} ${this.checkValue(this.contentPadding.left, 0)}rpx`;
133
- return str
159
+ iconItemBoxStyleComp(){
160
+ return {
161
+ height: this.iconWH.width + 'px',
162
+ width: this.iconWH.width + 'px',
163
+ marginRight: this.columnSpacing + 'rpx',
164
+ padding: this.iconMargin + 'rpx',
165
+ boxSizing: 'border-box'
166
+ }
134
167
  },
135
- dotStyleData() {
136
- return {}
168
+ iconWH(){
169
+ //宽高
170
+ let outWidth = uni.getSystemInfoSync().safeArea.width;
171
+ let marginRL = this.getPMValue(this.margin, 'RL', 0) * this.$rpxNum;
172
+ let contentPaddingRL = this.getPMValue(this.contentPadding, 'RL', 0) * this.$rpxNum;
173
+ let columnSpacings = this.columnSpacing * (this.column -1)* this.$rpxNum
174
+ let width = (outWidth - (marginRL + contentPaddingRL + columnSpacings))/ this.column;
175
+ let textHeight = 40;
176
+ if(this.titleStyle.lineHeight) textHeight = parseInt(this.titleStyle.lineHeight);
177
+
178
+ return {
179
+ width,
180
+ height: width + textHeight * this.$rpxNum
181
+ }
182
+ },
183
+ iconStyleComp(){
184
+ return {
185
+ boxShadow: this.contShadow,
186
+ borderRadius: this.radius + 'rpx',
187
+ }
188
+ },
189
+
190
+ bodyStyleComp(){
191
+ return {
192
+ margin: this.getMarginAndPadding(this.margin, 0),
193
+ padding:this.getMarginAndPadding(this.contentPadding, 0),
194
+ backgroundColor: this.bgColor,
195
+ borderRadius: this.bgRadius + 'rpx'
196
+ }
137
197
  }
138
198
  },
139
199
  watch: {
@@ -151,9 +211,7 @@
151
211
  this.isPreview = this.$configProject.isPreview;
152
212
  },
153
213
  methods: {
154
- handleAnimationfinish(e) {
155
- this.current = e.detail.current;
156
- },
214
+
157
215
  handleImage(list){
158
216
  return list.map(item => {
159
217
  return {
@@ -176,25 +234,48 @@
176
234
  if (this.poster.position) {
177
235
  this.posterPosition = this.poster.position
178
236
  }
179
- this.jdRows = getContainerPropsValue(container, 'content.jdRows', 1);
180
- this.cells = getContainerPropsValue(container, 'content.cells', 4);
237
+ this.row = getContainerPropsValue(container, 'content.jdRows', 1);
238
+ this.column = getContainerPropsValue(container, 'content.cells', 4);
239
+ this.columnSpacing = getContainerPropsValue(container, 'columnSpacing', 0)
181
240
 
182
241
  //content
183
- this.mode = getContainerPropsValue(container, 'content.dot_type', 'dot');
242
+ this.mode = getContainerPropsValue(container, 'content.dot_type', 'round');
184
243
  this.isCarousel = getContainerPropsValue(container, 'content.isCarousel', 1) === 2;
185
244
  this.carouselTime = Number(getContainerPropsValue(container, 'content.carouselTime', 5)) * 1000;
186
- this.useNumber = getContainerPropsValue(container, 'content.number', 1);
187
- this.shadow = getContainerPropsValue(container, 'content.shadow', 2);
188
- this.shadowColor = getContainerPropsValue(container, 'content.shadowColor', 'rgba(0,0,0,.3)');
189
- this.mS = getContainerPropsValue(container, 'content.margin', {});
190
- this.iconPadding = getContainerPropsValue(container, 'content.iconPadding', {});
191
- this.contentPadding = getContainerPropsValue(container, 'content.contentPadding', {});
245
+ let useNumberDefault = 20;
246
+ if(this.isCarousel === false) useNumberDefault = this.row * this.column;
247
+ this.useNumber = getContainerPropsValue(container, 'content.number', useNumberDefault);
248
+
249
+ //icon样式设置
250
+ let shadow = getContainerPropsValue(container, 'content.shadow', 2);
251
+ let shadowColor = getContainerPropsValue(container, 'content.shadowColor', 'rgba(0,0,0,0)');
252
+ let defaultPadding = 20;
253
+ if(this.column === 4) defaultPadding = 25
254
+ this.iconMargin = getContainerPropsValue(container, 'content.iconMargin', defaultPadding);
255
+ this.contShadow = this.getShadowCompatibleOldStyle(getContainerPropsValue(container, 'content.iconShadow', {}),{
256
+ type: shadow ===1?'Y':'N',
257
+ width: '10',
258
+ color: shadowColor|| 'rgba(0,0,0,0)'
259
+ })
260
+ let textColor = getContainerPropsValue(container, 'content.textColor', '#333');
261
+ let iconSetBaseStyle = getContainerPropsValue(container, 'content.iconSetBaseStyle', 'Y');
262
+ if(iconSetBaseStyle === 'N') {
263
+ shadow = 'N';
264
+ textColor = '#333';
265
+ }
266
+ let titleStyle = getContainerPropsValue(container,'content.titleStyle', {});
267
+ if(!titleStyle.color) titleStyle.color = textColor || '#333';
268
+ if(!titleStyle.lineHeight) titleStyle.lineHeight = '36rpx';
269
+ if(!titleStyle.fontWeight) titleStyle.fontWeight = 'normal';
270
+ if(!titleStyle.fontSize) titleStyle.fontSize = '24rpx';
271
+ if(!titleStyle.textDecoration) titleStyle.textDecoration = 'none';
272
+ this.titleStyle = titleStyle;
192
273
 
193
274
  //样式设置
194
- this.textColor = getContainerPropsValue(container, 'content.textColor', '#333');
195
275
  this.bgColor = getContainerPropsValue(container, 'content.bgColor','rgba(0,0,0,0)');
196
276
  this.bgRadius = getContainerPropsValue(container, 'content.bgRadius', '0');
197
-
277
+ this.contentPadding = getContainerPropsValue(container, 'content.contentPadding', {});
278
+ this.margin = getContainerPropsValue(container, 'content.margin', {});
198
279
 
199
280
  },
200
281
 
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
2
  import {oldTonNewBorAndSha, checkValue} from '@/utils/AttrTools'
3
+ import ICONS from "@/ICONS.js"
3
4
 
4
5
  /**
5
6
  * @description 当表单组件中有联动操作时候,使用方法进行返回
@@ -33,16 +34,31 @@ export default {
33
34
  ]
34
35
  },
35
36
  {
36
- label: '退出登录自定义名称:',
37
- ele: 'el-input',
38
- type: 'text',
39
- groupKey:'content',
40
- valueKey: 'logoutName',
41
- value: data['logoutName'] || '',
42
- notice: '退出登录自定义名称设置,默认值:<span style="color:red">[退出登录]</span>',
43
- inline: false,
44
- className: 'input60',
37
+ label: "头像右侧内容:",
38
+ ele: "xd-radio-self",
39
+ valueKey: "rightContent",
40
+ value: data.rightContent || {
41
+ type: "logout",
42
+ name: "退出登录",
43
+ icon: "",
44
+ iconName: "",
45
+ },
46
+ groupKey: "content",
47
+ setting: {
48
+ icons: ICONS
49
+ }
45
50
  },
51
+ // {
52
+ // label: '退出登录自定义名称:',
53
+ // ele: 'el-input',
54
+ // type: 'text',
55
+ // groupKey:'content',
56
+ // valueKey: 'logoutName',
57
+ // value: data['logoutName'] || '',
58
+ // notice: '退出登录自定义名称设置,默认值:<span style="color:red">[退出登录]</span>',
59
+ // inline: false,
60
+ // className: 'input60',
61
+ // },
46
62
 
47
63
  {
48
64
  ele: 'title',
@@ -85,6 +101,26 @@ export default {
85
101
  placeholder: '请选择背景颜色',
86
102
  classNmae: 'input80',
87
103
  },
104
+ {
105
+ label: '内容背景图片:', //label
106
+ ele: 'xd-upload', //package 名称
107
+ valueKey: 'bgImage', //form[valueKey]
108
+ value: data.bgImage || null, //v-model
109
+ defaultValue: data.bgImage || null, //默认图片对象
110
+ groupKey: "style",
111
+ slot: true, //按钮是否使用slot
112
+ oneWidth: 200, //单个图片显示宽度
113
+ oneHeight: 100, //单个图片显示高度
114
+ elinputClassName: 'input40',
115
+ tipsformet: '上传文件格式:@imageType@,不超过@size@MB.',
116
+ type: ['jpg', 'png', 'jpeg'],
117
+ styleType: 'one', //其值:one=>单文件上传 auth=>证件正反面上传 list=>多文件上传
118
+ uploadType: 'aliyun', //''=>API服务上传 qiniu=>七牛云OSS上传 aliyun=> 阿里云OSS上传
119
+ size: 5, //5M
120
+ action: 'aliyun',
121
+ sort: true, //当上传图片列表时候,是否启用排序
122
+ maxlen: 100, //当上传图片列表时候,最大数量数量
123
+ },
88
124
  {
89
125
  label: '圆角设置:',
90
126
  ele: 'xd-site-select-list',
@@ -164,30 +200,6 @@ export default {
164
200
  });
165
201
  },
166
202
  },
167
- {
168
- label: "退出字体样式设置",
169
- ele: "xd-text-and-bgc",
170
- groupKey:'style',
171
- valueKey: 'logoutStyle',
172
- value: data['logoutStyle'] || null,
173
- setting: {
174
- fontSize: true,
175
- color: true,
176
- bgColor: false,
177
- weight: true,
178
- selected:false
179
- },
180
- handleCustom({action, data}) {
181
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_font_size'})
182
- .then(res => {
183
- data.cb(res.list)
184
- })
185
- .catch(error => {
186
- console.error(error);
187
- data.cb([])
188
- });
189
- },
190
- },
191
203
 
192
204
  {
193
205
  ele: 'title',
@@ -351,6 +363,95 @@ export default {
351
363
  {label: '显示', value: 'Y'},
352
364
  ]
353
365
  },
366
+ {
367
+ label: "头像右侧内容配置",
368
+ ele: "title",
369
+ size: "small",
370
+ groupKey: "style"
371
+ },
372
+ {
373
+ label: "头像右侧内容背景颜色:",
374
+ ele: "xd-color",
375
+ valueKey: "rightContentBgColor",
376
+ value: data.rightContentBgColor || '',
377
+ placeholder: '请选择头像右侧内容背景颜色',
378
+ groupKey: "style",
379
+ },
380
+ {
381
+ label: "头像右侧内容文字颜色",
382
+ ele: "xd-text-and-bgc",
383
+ groupKey:'style',
384
+ valueKey: 'logoutStyle',
385
+ value: data['logoutStyle'] || null,
386
+ setting: {
387
+ fontSize: true,
388
+ color: true,
389
+ bgColor: false,
390
+ weight: true,
391
+ selected:false
392
+ },
393
+ handleCustom({action, data}) {
394
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_font_size'})
395
+ .then(res => {
396
+ data.cb(res.list)
397
+ })
398
+ .catch(error => {
399
+ console.error(error);
400
+ data.cb([])
401
+ });
402
+ },
403
+ },
404
+ // {
405
+ // label: "头像右侧内容文字颜色:",
406
+ // ele: "xd-color",
407
+ // valueKey: "rightContentTextColor",
408
+ // value: data.rightContentTextColor || '',
409
+ // placeholder: '请选择头像右侧内容文字颜色',
410
+ // groupKey: "style",
411
+ // },
412
+ {
413
+ label: "头像右侧内容内边距配置:",
414
+ ele: 'xd-margin-padding',
415
+ valueKey: 'rightContentPadding',
416
+ groupKey: "style",
417
+ value: data.rightContentPadding || {},
418
+ setting: {
419
+ type: 'padding',
420
+ },
421
+ inline: false,
422
+ notice: '设置外填充,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">20</span>像素',
423
+ },
424
+ {
425
+ label: "头像右侧内容圆角:",
426
+ ele: 'xd-site-select-list',
427
+ valueKey: 'rightContentRadius',
428
+ value: data['rightContentRadius'] || '',
429
+ groupKey:'style',
430
+ placeholder: '请选择内容圆角设置',
431
+ multiple: false,
432
+ className: 'input80',
433
+ handleCustom({ action, data }) {
434
+ XdBus.getParentApi('getOptionsSettingList')({ setting_id: 'edtix_style_radius' })
435
+ .then(res => {
436
+ data.cb(res.list)
437
+ })
438
+ .catch(error => {
439
+ console.error(error);
440
+ });
441
+ },
442
+ },
443
+ {
444
+ label: '编辑地址路径:',
445
+ ele: 'xd-select-pages-path',
446
+ valueKey: 'addressUrl',
447
+ groupKey:'advanced',
448
+ placeholder: '请选择编辑地址路径',
449
+ value: data['addressUrl'] || null,
450
+ setting: {
451
+ router: XdBus.getParentApi('getPagesTree'),
452
+ },
453
+ inline: false,
454
+ },
354
455
  {
355
456
  label: '',
356
457
  ele: 'slot',
@@ -36,16 +36,47 @@
36
36
  <view v-if="logined && textType ==='N'" :style="[nickNameStyle]">{{userInfo|getName}}</view>
37
37
  <view class="vertical-user" v-if="logined && textType ==='Y'">
38
38
  <view :style="[nickNameStyle]">{{userInfo|getName}}</view>
39
- <view class="logout" @click="handleLogout()">
40
- <view :style="[logoutStyleComp]">{{logoutName}}</view>
39
+ <view v-if="rightContent && rightContent.type !== 'hidden'"
40
+ class="logout" style="margin-top: 16rpx;"
41
+ :style="[logoutBtnStyle]"
42
+ >
43
+ <view v-if="rightContent && rightContent.type === 'logout'"
44
+ class="right_cont_i"
45
+ :style="[logoutStyleComp]"
46
+ @click="handleLogout()"
47
+ >
48
+ <xd-font-icon v-if="rightContent.icon" class="xd-font-icon" :icon="rightContent.icon" :size="28"></xd-font-icon>
49
+ {{rightContent.name || '退出登录'}}
50
+ </view>
51
+ <view v-if="rightContent && rightContent.type === 'addr'"
52
+ class="right_cont_i"
53
+ :style="[logoutStyleComp]"
54
+ @click="handleAddress()"
55
+ >
56
+ <xd-font-icon v-if="rightContent.icon" class="xd-font-icon" :icon="rightContent.icon" :size="28"></xd-font-icon>
57
+ {{ rightContent.name || '地址' }}
58
+ </view>
41
59
  </view>
42
60
  <view @click="handleToLink()" v-if="isSetting === 'Y'">
43
61
  <xd-font-icon size="26" icon="iconshezhi_mian"></xd-font-icon>
44
62
  </view>
45
63
  </view>
46
64
  </view>
47
- <view @click="handleLogout()" v-if="logined && textType ==='N'" class="logout">
48
- <view :style="[logoutStyleComp]">{{logoutName}}</view>
65
+ <view v-if="logined && textType ==='N' && rightContent && rightContent.type !== 'hidden'" class="logout" :style="[logoutBtnStyle]">
66
+ <view v-if="rightContent && rightContent.type === 'logout'" class="right_cont_i"
67
+ :style="[logoutStyleComp]"
68
+ @click="handleLogout()"
69
+ >
70
+ <xd-font-icon v-if="rightContent.icon" class="xd-font-icon" :icon="rightContent.icon" :size="28"></xd-font-icon>
71
+ {{rightContent.name || '退出登录'}}
72
+ </view>
73
+ <view v-if="rightContent && rightContent.type === 'addr'" class="right_cont_i"
74
+ :style="[logoutStyleComp]"
75
+ @click="handleAddress()"
76
+ >
77
+ <xd-font-icon v-if="rightContent.icon"class="xd-font-icon" :icon="rightContent.icon" :size="28"></xd-font-icon>
78
+ {{ rightContent.name || '地址' }}
79
+ </view>
49
80
  </view>
50
81
  </view>
51
82
  </view>
@@ -62,6 +93,7 @@
62
93
  import { getContainerPropsValue } from "@/utils/xd.base";
63
94
  import {mapState} from 'vuex';
64
95
  import store from "@/store";
96
+ import getServiceUrl from "@/common/getServiceUrl";
65
97
  export default {
66
98
  name: "JfbBaseUserInfo",
67
99
  components: {
@@ -86,7 +118,8 @@
86
118
  })
87
119
  return {
88
120
  margin: this.getMarginAndPadding(this.margin, 20),
89
- background : this.backgroundColor,
121
+ backgroundColor : this.backgroundColor,
122
+ backgroundImage: `url(${this.bgImage})`,
90
123
  padding: this.getMarginAndPadding(this.padding, 20),
91
124
  boxShadow: shadow,
92
125
  borderRadius: this.radius + 'rpx',
@@ -117,6 +150,18 @@
117
150
  color: `${this.logoutStyle.color || '#333'}`,
118
151
  fontWeight: `${this.logoutStyle.fontWeight || 'normal'}`,
119
152
  }
153
+ },
154
+ logoutBtnStyle(){
155
+ let padding = `${this.checkValue(this.rightContentPadding.top, 20)}rpx`;
156
+ padding = `${padding} ${this.checkValue(this.rightContentPadding.right, 20)}rpx`;
157
+ padding = `${padding} ${this.checkValue(this.rightContentPadding.bottom, 20)}rpx`;
158
+ padding = `${padding} ${this.checkValue(this.rightContentPadding.left, 20)}rpx`;
159
+ return {
160
+ backgroundColor: this.rightContentBgColor,
161
+ // color: this.rightContentTextColor || this.color,
162
+ padding: padding,
163
+ borderRadius: this.rightContentRadius + 'rpx'
164
+ }
120
165
  }
121
166
  },
122
167
  filters:{
@@ -129,7 +174,7 @@
129
174
  logined: false,
130
175
  userInfo: null,
131
176
  isSetting:'N',
132
- logoutName:'[退出登录]',
177
+ // logoutName:'[退出登录]',
133
178
  imageRadius:'50%',
134
179
 
135
180
  //基础
@@ -155,6 +200,13 @@
155
200
  padding: {},
156
201
  nickStyle:{},
157
202
  logoutStyle:{},
203
+ rightContent: null,
204
+ addressUrl: '',
205
+ bgImage: "",
206
+ rightContentBgColor: "",
207
+ // rightContentTextColor: "",
208
+ rightContentPadding: "",
209
+ rightContentRadius: 0
158
210
  }
159
211
  },
160
212
  watch: {
@@ -233,7 +285,7 @@
233
285
  this.textType = getContainerPropsValue(container, 'content.text_type', 'N');
234
286
  this.radius = getContainerPropsValue(container, 'content.radius', '10');
235
287
  this.isSetting = getContainerPropsValue(container, 'content.isSetting', 'N');
236
- this.logoutName = getContainerPropsValue(container, 'content.logoutName', '[退出登录]');
288
+ // this.logoutName = getContainerPropsValue(container, 'content.logoutName', '[退出登录]');
237
289
  this.imageRadius = getContainerPropsValue(container, 'content.imageRadius', '50%');
238
290
  this.imageColor = getContainerPropsValue(container, 'content.imageColor', '#333');
239
291
 
@@ -252,8 +304,25 @@
252
304
 
253
305
  this.nickStyle = getContainerPropsValue(container, 'content.nickStyle', {});
254
306
  this.logoutStyle = getContainerPropsValue(container, 'content.logoutStyle', {});
307
+ this.rightContent = getContainerPropsValue(container, 'content.rightContent', {
308
+ type: "logout",
309
+ name: "退出登录",
310
+ icon: "",
311
+ iconName: "",
312
+ });
313
+ this.addressUrl = getContainerPropsValue(container, 'content.addressUrl', {value: ""}).value;
314
+ this.bgImage = getServiceUrl(getContainerPropsValue(container, 'content.bgImage', '').url);
315
+ this.rightContentBgColor = getContainerPropsValue(container, 'content.rightContentBgColor', 'transparent');
316
+ // this.rightContentTextColor = getContainerPropsValue(container, 'content.rightContentTextColor', '');
317
+ this.rightContentPadding = getContainerPropsValue(container, 'content.rightContentPadding', {});
318
+ this.rightContentRadius = getContainerPropsValue(container, 'content.rightContentRadius', 0);
255
319
 
256
320
  },
321
+ handleAddress(){
322
+ this.$xdUniHelper.navigateTo({
323
+ url: this.addressUrl
324
+ })
325
+ }
257
326
  }
258
327
  }
259
328
 
@@ -264,6 +333,7 @@
264
333
 
265
334
  .vertical-user {
266
335
  display: flex;
336
+ flex-direction: column;
267
337
  justify-content: center;
268
338
  align-items: center;
269
339
  & > view:nth-child(2) {
@@ -285,7 +355,8 @@
285
355
  display: flex;
286
356
  align-items: center;
287
357
  justify-content: flex-start;
288
-
358
+ background-size: cover;
359
+ background-repeat: no-repeat;
289
360
 
290
361
  &-left {
291
362
  display: flex;
@@ -337,6 +408,16 @@
337
408
 
338
409
  .logout {
339
410
  font-size: unit(24, rpx);
411
+ .right_cont_i{
412
+ display: flex;
413
+ align-items: center;
414
+ font-size: 28rpx;
415
+ color: inherit;
416
+ font-weight: 400;
417
+ .xd-font-icon{
418
+ margin-right:8rpx;
419
+ }
420
+ }
340
421
  & > view {
341
422
  cursor: pointer;
342
423
  }