jufubao-base 1.0.197-beta1 → 1.0.197-beta11

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 (39) 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 +164 -80
  6. package/src/components/JfbBaseAddress/XdAddress.vue +12 -6
  7. package/src/components/JfbBaseAddress/XdTfkItem.vue +117 -0
  8. package/src/components/JfbBaseCardEntry/Attr.js +472 -443
  9. package/src/components/JfbBaseCardEntry/JfbBaseCardEntry.vue +124 -98
  10. package/src/components/JfbBaseCardEntry/Mock.js +1 -0
  11. package/src/components/JfbBaseCardEntry/XdCardNew.vue +135 -0
  12. package/src/components/JfbBaseConDialog/JfbBaseConDialog.vue +41 -13
  13. package/src/components/JfbBaseFastLink/Attr.js +24 -8
  14. package/src/components/JfbBaseFastLink/JfbBaseFastLink.vue +37 -21
  15. package/src/components/JfbBaseFooter/Attr.js +141 -75
  16. package/src/components/JfbBaseFooter/JfbBaseFooter.vue +50 -15
  17. package/src/components/JfbBaseHeader/Attr.js +134 -51
  18. package/src/components/JfbBaseHeader/JfbBaseHeader.vue +118 -31
  19. package/src/components/JfbBaseHeaderElephant/Attr.js +496 -0
  20. package/src/components/JfbBaseHeaderElephant/JfbBaseHeaderElephant.vue +272 -15
  21. package/src/components/JfbBaseNotice/Attr.js +26 -0
  22. package/src/components/JfbBaseNotice/JfbBaseNotice.vue +13 -1
  23. package/src/components/JfbBaseOrderDetail/Attr.js +147 -65
  24. package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +97 -47
  25. package/src/components/JfbBaseOrderList/Attr.js +59 -2
  26. package/src/components/JfbBaseOrderList/JfbBaseOrderList.vue +139 -92
  27. package/src/components/JfbBaseOrderList/Mock.js +3 -0
  28. package/src/components/JfbBaseOrderList/XdTfkOrderItem.vue +267 -0
  29. package/src/components/JfbBasePosterBigSmall/JfbBasePosterBigSmall.vue +27 -29
  30. package/src/components/JfbBasePosterBigSmall/getWidthHeight.js +13 -9
  31. package/src/components/JfbBaseUserCenter/Attr.js +297 -52
  32. package/src/components/JfbBaseUserCenter/JfbBaseUserCenter.vue +135 -44
  33. package/src/components/JfbBaseUserInfo/Attr.js +313 -37
  34. package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +173 -63
  35. package/src/components/JfbBaseUserOrder/Attr.js +332 -30
  36. package/src/components/JfbBaseUserOrder/JfbBaseUserOrder.vue +183 -55
  37. package/src/components/JfbBaseWallet/Attr.js +376 -8
  38. package/src/components/JfbBaseWallet/JfbBaseWallet.vue +185 -49
  39. package/src/mixins/componentsMixins.js +210 -35
@@ -17,15 +17,7 @@
17
17
  <view class="x-line"></view>
18
18
  <view
19
19
  class="jfb-base-user-info__body-header"
20
- :style="{
21
- margin: outMargin,
22
- background:backgroundColor,
23
- color: color,
24
- padding: outPadding,
25
- boxShadow: shadow,
26
- borderRadius: radius + 'rpx',
27
- border: borderBox
28
- }"
20
+ :style="[boxStyleComp]"
29
21
  v-if="userInfo !== null"
30
22
  >
31
23
  <view
@@ -34,26 +26,57 @@
34
26
  >
35
27
  <template v-if="logined">
36
28
  <image v-if="userInfo['head_url']" :src="userInfo['head_url']"></image>
37
- <view class="no-image" :style="{borderColor: color}" v-else>
38
- <xd-font-icon :color="color" icon="iconwode_mian" size="100"></xd-font-icon>
29
+ <view class="no-image" :style="{borderColor: imageColor, borderRadius:imageRadius}" v-else>
30
+ <xd-font-icon :color="imageColor" icon="iconwode_mian" size="100"></xd-font-icon>
39
31
  </view>
40
32
  </template>
41
- <view v-else class="no-image" :style="{borderColor: color}">
42
- <xd-font-icon :color="color" icon="iconwode_mian" size="90"></xd-font-icon>
33
+ <view v-else class="no-image" :style="{borderColor: imageColor, borderRadius:imageRadius}">
34
+ <xd-font-icon :color="imageColor" icon="iconwode_mian" size="90"></xd-font-icon>
43
35
  </view>
44
- <view v-if="logined && textType ==='N'" :style="{color:color}">{{userInfo|getName}}</view>
45
- <view class="vertical-user" v-if="logined && textType ==='Y'" :style="{color:color}">
46
- <view>{{userInfo|getName}}</view>
47
- <view class="logout" @click="handleLogout()">
48
- <view :style="{color:color}">[退出登录]</view>
36
+ <view v-if="logined && textType ==='N'" :style="[nickNameStyle]">{{userInfo|getName}}</view>
37
+ <view class="vertical-user" v-if="logined && textType ==='Y'">
38
+ <view :style="[nickNameStyle]">{{userInfo|getName}}</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>
49
59
  </view>
50
- <view @click="handleToLink()" v-if="0">
51
- <xd-font-icon :color="color" size="40" icon="iconshezhi_mian"></xd-font-icon>
60
+ <view @click="handleToLink()" v-if="isSetting === 'Y'">
61
+ <xd-font-icon size="26" icon="iconshezhi_mian"></xd-font-icon>
52
62
  </view>
53
63
  </view>
54
64
  </view>
55
- <view @click="handleLogout()" v-if="logined && textType ==='N'" class="logout">
56
- <view :style="{color:color}">[退出登录]</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>
57
80
  </view>
58
81
  </view>
59
82
  </view>
@@ -70,6 +93,7 @@
70
93
  import { getContainerPropsValue } from "@/utils/xd.base";
71
94
  import {mapState} from 'vuex';
72
95
  import store from "@/store";
96
+ import getServiceUrl from "@/common/getServiceUrl";
73
97
  export default {
74
98
  name: "JfbBaseUserInfo",
75
99
  components: {
@@ -79,27 +103,65 @@
79
103
  computed: {
80
104
  ...mapState(['jfbAuthorize']),
81
105
 
82
- outMargin() {
83
- let str = `${this.checkValue(this.margin.top, 20)}rpx`;
84
- str = `${str} ${this.checkValue(this.margin.right, 20)}rpx`;
85
- str = `${str} ${this.checkValue(this.margin.bottom, 20)}rpx`;
86
- str = `${str} ${this.checkValue(this.margin.left, 20)}rpx`;
87
- return str
88
- },
89
- outPadding() {
90
- let str = `${this.checkValue(this.padding.top, 20)}rpx`;
91
- str = `${str} ${this.checkValue(this.padding.right, 20)}rpx`;
92
- str = `${str} ${this.checkValue(this.padding.bottom, 20)}rpx`;
93
- str = `${str} ${this.checkValue(this.padding.left, 20)}rpx`;
94
- return str
106
+ boxStyleComp(){
107
+ let border = this.getBorderCompatibleOldStyle(this.contBorder, {
108
+ color: this.is_border_c,
109
+ width: this.is_border_w,
110
+ type: this.is_border,
111
+ style: 'solid'
112
+ })
113
+
114
+ let shadow = this.getShadowCompatibleOldStyle(this.contShadow, {
115
+ color: this.is_shadow_bg,
116
+ width: this.is_shadow_w,
117
+ type: this.is_shadow,
118
+ })
119
+ return {
120
+ margin: this.getMarginAndPadding(this.margin, 20),
121
+ backgroundColor : this.backgroundColor,
122
+ backgroundImage: `url(${this.bgImage})`,
123
+ padding: this.getMarginAndPadding(this.padding, 20),
124
+ boxShadow: shadow,
125
+ borderRadius: this.radius + 'rpx',
126
+ border: border,
127
+
128
+ }
95
129
  },
130
+
96
131
  shadow(){
97
132
  if(this.is_shadow === 'Y') return `0 0 ${this.is_shadow_w}rpx ${this.is_shadow_bg}`;
98
133
  else return '0 0 0 rgba(0,0,0,0)';
99
134
  },
100
135
  borderBox(){
101
- if (this.is_border === 'Y') return `${this.is_border_w}rpx solid ${this.is_border_c}`;
136
+ if (this.is_border === 'Y') return `${this.is_border_w}rpx ${this.is_border_s} ${this.is_border_c}`;
102
137
  else return '0';
138
+ },
139
+
140
+ nickNameStyle(){
141
+ return {
142
+ fontSize: this.nickStyle.fontSize || '32rpx',
143
+ color: `${this.nickStyle.color || '#333'}`,
144
+ fontWeight: `${this.nickStyle.fontWeight || 'normal'}`,
145
+ }
146
+ },
147
+ logoutStyleComp(){
148
+ return {
149
+ fontSize: this.logoutStyle.fontSize || '20rpx',
150
+ color: `${this.logoutStyle.color || '#333'}`,
151
+ fontWeight: `${this.logoutStyle.fontWeight || 'normal'}`,
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
+ }
103
165
  }
104
166
  },
105
167
  filters:{
@@ -111,39 +173,40 @@
111
173
  return {
112
174
  logined: false,
113
175
  userInfo: null,
114
- address_url: '',
176
+ isSetting:'N',
177
+ // logoutName:'[退出登录]',
178
+ imageRadius:'50%',
115
179
 
116
180
  //基础
117
- color: '#333',
181
+ imageColor: '#333',
118
182
  backgroundColor: 'rgba(0,0,0,0)',
119
183
  textType: 'N', //默认水平
120
184
  radius: 0,
121
185
 
122
186
  //投影
123
- is_shadow: 'Y',
187
+ contShadow:{},
188
+ is_shadow: 'N',
124
189
  is_shadow_bg: 0,
125
190
  is_shadow_w: 0,
126
191
 
127
-
128
192
  //边框
129
- is_border: 'Y',
193
+ contBorder:{},
194
+ is_border: 'N',
130
195
  is_border_w: 0,
131
196
  is_border_c: '',
132
197
 
133
198
  //其他
134
- margin: {
135
- top: 0,
136
- left: 0,
137
- right: 0,
138
- bottom: 0
139
- },
140
- padding: {
141
- top: 0,
142
- left: 0,
143
- right: 0,
144
- bottom: 0
145
- },
146
-
199
+ margin: {},
200
+ padding: {},
201
+ nickStyle:{},
202
+ logoutStyle:{},
203
+ rightContent: null,
204
+ addressUrl: '',
205
+ bgImage: "",
206
+ rightContentBgColor: "",
207
+ // rightContentTextColor: "",
208
+ rightContentPadding: "",
209
+ rightContentRadius: 0
147
210
  }
148
211
  },
149
212
  watch: {
@@ -216,22 +279,50 @@
216
279
  * @param container {object} 业务组件对象自己
217
280
  */
218
281
  init(container) {
219
- this.margin = getContainerPropsValue(container, 'content.margin', {top: 20, left: 20, right: 20, bottom: 20});
220
- this.padding = getContainerPropsValue(container, 'content.padding', {top: 20, left: 20, right: 20, bottom: 20});
221
- this.address_url = getContainerPropsValue(container, 'content.address_url', {value: ''});
222
- this.color = getContainerPropsValue(container, 'content.textColor', '#333');
282
+ this.margin = getContainerPropsValue(container, 'content.margin', {});
283
+ this.padding = getContainerPropsValue(container, 'content.padding', {});
223
284
  this.backgroundColor = getContainerPropsValue(container, 'content.backgroundColor', '#f8f8f8');
224
285
  this.textType = getContainerPropsValue(container, 'content.text_type', 'N');
286
+ this.radius = getContainerPropsValue(container, 'content.radius', '10');
287
+ this.isSetting = getContainerPropsValue(container, 'content.isSetting', 'N');
288
+ // this.logoutName = getContainerPropsValue(container, 'content.logoutName', '[退出登录]');
289
+ this.imageRadius = getContainerPropsValue(container, 'content.imageRadius', '50%');
290
+ this.imageColor = getContainerPropsValue(container, 'content.imageColor', '#333');
225
291
 
292
+ //Shadow
226
293
  this.is_shadow = getContainerPropsValue(container, 'content.is_shadow', 'N');
227
294
  this.is_shadow_bg = getContainerPropsValue(container, 'content.is_shadow_bg', '#fff');
228
295
  this.is_shadow_w = getContainerPropsValue(container, 'content.is_shadow_w', '10');
296
+ this.contShadow = getContainerPropsValue(container, 'content.contShadow', {})
229
297
 
298
+ //边框
230
299
  this.is_border = getContainerPropsValue(container, 'content.is_border', 'N');
231
300
  this.is_border_c = getContainerPropsValue(container, 'content.is_border_c', '#fff');
232
301
  this.is_border_w = getContainerPropsValue(container, 'content.is_border_w', 0);
233
- this.radius = getContainerPropsValue(container, 'content.radius', '10');
302
+ this.contBorder = getContainerPropsValue(container, 'content.contBorder', {});
303
+
304
+
305
+ this.nickStyle = getContainerPropsValue(container, 'content.nickStyle', {});
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);
319
+
234
320
  },
321
+ handleAddress(){
322
+ this.$xdUniHelper.navigateTo({
323
+ url: this.addressUrl
324
+ })
325
+ }
235
326
  }
236
327
  }
237
328
 
@@ -242,10 +333,19 @@
242
333
 
243
334
  .vertical-user {
244
335
  display: flex;
336
+ flex-direction: column;
245
337
  justify-content: center;
246
338
  align-items: center;
247
339
  & > view:nth-child(2) {
248
- margin-left: unit(10, rpx);
340
+ margin-left: unit(15, rpx);
341
+ }
342
+ & > view:nth-child(3) {
343
+ width: 26rpx;
344
+ height: 26rpx;
345
+ margin-left: unit(15, rpx);
346
+ display: flex;
347
+ justify-content: center;
348
+ align-items: center;
249
349
  }
250
350
  }
251
351
 
@@ -255,7 +355,8 @@
255
355
  display: flex;
256
356
  align-items: center;
257
357
  justify-content: flex-start;
258
-
358
+ background-size: cover;
359
+ background-repeat: no-repeat;
259
360
 
260
361
  &-left {
261
362
  display: flex;
@@ -281,8 +382,7 @@
281
382
  & > image, .no-image {
282
383
  width: unit(140, rpx);
283
384
  height: unit(140, rpx);
284
- margin-right: unit(30, rpx);
285
- border-radius: 50%;
385
+ margin-right: unit(30, rpx);;
286
386
  display: flex;
287
387
  justify-content: center;
288
388
  align-items: center;
@@ -308,6 +408,16 @@
308
408
 
309
409
  .logout {
310
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
+ }
311
421
  & > view {
312
422
  cursor: pointer;
313
423
  }