jufubao-base 1.0.197-beta5 → 1.0.197-beta8

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 (34) 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 +5 -0
  7. package/src/components/JfbBaseAddress/XdTfkItem.vue +117 -0
  8. package/src/components/JfbBaseCardEntry/JfbBaseCardEntry.vue +1 -0
  9. package/src/components/JfbBaseCardEntry/XdCardNew.vue +1 -1
  10. package/src/components/JfbBaseConDialog/JfbBaseConDialog.vue +41 -13
  11. package/src/components/JfbBaseFastLink/Attr.js +24 -8
  12. package/src/components/JfbBaseFastLink/JfbBaseFastLink.vue +37 -21
  13. package/src/components/JfbBaseFooter/Attr.js +141 -75
  14. package/src/components/JfbBaseFooter/JfbBaseFooter.vue +50 -15
  15. package/src/components/JfbBaseHeader/Attr.js +8 -1
  16. package/src/components/JfbBaseHeader/JfbBaseHeader.vue +8 -5
  17. package/src/components/JfbBaseHeaderElephant/JfbBaseHeaderElephant.vue +12 -3
  18. package/src/components/JfbBaseOrderDetail/Attr.js +147 -65
  19. package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +97 -47
  20. package/src/components/JfbBaseOrderList/Attr.js +59 -2
  21. package/src/components/JfbBaseOrderList/JfbBaseOrderList.vue +139 -92
  22. package/src/components/JfbBaseOrderList/Mock.js +3 -0
  23. package/src/components/JfbBaseOrderList/XdTfkOrderItem.vue +267 -0
  24. package/src/components/JfbBasePosterBigSmall/JfbBasePosterBigSmall.vue +27 -29
  25. package/src/components/JfbBasePosterBigSmall/getWidthHeight.js +13 -9
  26. package/src/components/JfbBaseUserCenter/Attr.js +297 -52
  27. package/src/components/JfbBaseUserCenter/JfbBaseUserCenter.vue +135 -44
  28. package/src/components/JfbBaseUserInfo/Attr.js +227 -85
  29. package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +106 -86
  30. package/src/components/JfbBaseUserOrder/Attr.js +332 -30
  31. package/src/components/JfbBaseUserOrder/JfbBaseUserOrder.vue +183 -55
  32. package/src/components/JfbBaseWallet/Attr.js +376 -8
  33. package/src/components/JfbBaseWallet/JfbBaseWallet.vue +185 -49
  34. package/src/mixins/componentsMixins.js +210 -35
@@ -17,7 +17,7 @@
17
17
  <view class="x-line"></view>
18
18
  <view
19
19
  class="jfb-base-user-info__body-header"
20
- :style="[userWrapBoxStyle]"
20
+ :style="[boxStyleComp]"
21
21
  v-if="userInfo !== null"
22
22
  >
23
23
  <view
@@ -26,22 +26,23 @@
26
26
  >
27
27
  <template v-if="logined">
28
28
  <image v-if="userInfo['head_url']" :src="userInfo['head_url']"></image>
29
- <view class="no-image" :style="{borderColor: color}" v-else>
30
- <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>
31
31
  </view>
32
32
  </template>
33
- <view v-else class="no-image" :style="{borderColor: color}">
34
- <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>
35
35
  </view>
36
- <view v-if="logined && textType ==='N'"class="user_name" :style="{color:color}">{{userInfo|getName}}</view>
37
- <view class="vertical-user" v-if="logined && textType ==='Y'" :style="{color:color}" style="flex-direction: column;">
38
- <view class="user_name">{{userInfo|getName}}</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
39
  <view v-if="rightContent && rightContent.type !== 'hidden'"
40
40
  class="logout" style="margin-top: 16rpx;"
41
41
  :style="[logoutBtnStyle]"
42
42
  >
43
43
  <view v-if="rightContent && rightContent.type === 'logout'"
44
44
  class="right_cont_i"
45
+ :style="[logoutStyleComp]"
45
46
  @click="handleLogout()"
46
47
  >
47
48
  <xd-font-icon class="xd-font-icon" :icon="rightContent.icon" :size="28"></xd-font-icon>
@@ -49,23 +50,30 @@
49
50
  </view>
50
51
  <view v-if="rightContent && rightContent.type === 'addr'"
51
52
  class="right_cont_i"
53
+ :style="[logoutStyleComp]"
52
54
  @click="handleAddress()"
53
55
  >
54
56
  <xd-font-icon class="xd-font-icon" :icon="rightContent.icon" :size="28"></xd-font-icon>
55
57
  {{ rightContent.name || '地址' }}
56
58
  </view>
57
59
  </view>
58
- <view @click="handleToLink()" v-if="0">
59
- <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>
60
62
  </view>
61
63
  </view>
62
64
  </view>
63
- <view @click="handleLogout()" v-if="logined && textType ==='N'" class="logout" :style="[logoutBtnStyle]">
64
- <view v-if="rightContent && rightContent.type === 'logout'" class="right_cont_i" @click="handleLogout()">
65
+ <view v-if="logined && textType ==='N'" class="logout" :style="[logoutBtnStyle]">
66
+ <view v-if="rightContent && rightContent.type === 'logout'" class="right_cont_i"
67
+ :style="[logoutStyleComp]"
68
+ @click="handleLogout()"
69
+ >
65
70
  <xd-font-icon class="xd-font-icon" :icon="rightContent.icon" :size="28"></xd-font-icon>
66
71
  {{rightContent.name || '退出登录'}}
67
72
  </view>
68
- <view v-if="rightContent && rightContent.type === 'addr'" class="right_cont_i" @click="handleAddress()">
73
+ <view v-if="rightContent && rightContent.type === 'addr'" class="right_cont_i"
74
+ :style="[logoutStyleComp]"
75
+ @click="handleAddress()"
76
+ >
69
77
  <xd-font-icon class="xd-font-icon" :icon="rightContent.icon" :size="28"></xd-font-icon>
70
78
  {{ rightContent.name || '地址' }}
71
79
  </view>
@@ -95,49 +103,52 @@
95
103
  computed: {
96
104
  ...mapState(['jfbAuthorize']),
97
105
 
98
- outMargin() {
99
- let str = `${this.checkValue(this.margin.top, 20)}rpx`;
100
- str = `${str} ${this.checkValue(this.margin.right, 20)}rpx`;
101
- str = `${str} ${this.checkValue(this.margin.bottom, 20)}rpx`;
102
- str = `${str} ${this.checkValue(this.margin.left, 20)}rpx`;
103
- return str
104
- },
105
- outPadding() {
106
- let str = `${this.checkValue(this.padding.top, 20)}rpx`;
107
- str = `${str} ${this.checkValue(this.padding.right, 20)}rpx`;
108
- str = `${str} ${this.checkValue(this.padding.bottom, 20)}rpx`;
109
- str = `${str} ${this.checkValue(this.padding.left, 20)}rpx`;
110
- 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
+ }
111
129
  },
130
+
112
131
  shadow(){
113
132
  if(this.is_shadow === 'Y') return `0 0 ${this.is_shadow_w}rpx ${this.is_shadow_bg}`;
114
133
  else return '0 0 0 rgba(0,0,0,0)';
115
134
  },
116
135
  borderBox(){
117
- 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}`;
118
137
  else return '0';
119
138
  },
120
- userWrapBoxStyle(){
121
-
122
- let border = this.getBorderCompatibleOldStyle(this.boxBorder, {
123
- type: this.is_border,
124
- width: this.is_border_w,
125
- color: this.is_border_c
126
- })
127
- let boxShadow = this.getShadowCompatibleOldStyle(this.boxShadow, {
128
- type: this.is_shadow,
129
- width: this.is_shadow_w,
130
- color: this.is_shadow_bg
131
- })
132
139
 
140
+ nickNameStyle(){
133
141
  return {
134
- margin: this.outMargin,
135
- backgroundColor: this.backgroundColor,
136
- backgroundImage: `url(${this.bgImage})`,
137
- color: this.color,
138
- padding: this.outPadding,
139
- boxShadow: boxShadow,
140
- border: border
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'}`,
141
152
  }
142
153
  },
143
154
  logoutBtnStyle(){
@@ -147,7 +158,7 @@
147
158
  padding = `${padding} ${this.checkValue(this.rightContentPadding.left, 20)}rpx`;
148
159
  return {
149
160
  backgroundColor: this.rightContentBgColor,
150
- color: this.rightContentTextColor || this.color,
161
+ // color: this.rightContentTextColor || this.color,
151
162
  padding: padding,
152
163
  borderRadius: this.rightContentRadius + 'rpx'
153
164
  }
@@ -162,45 +173,38 @@
162
173
  return {
163
174
  logined: false,
164
175
  userInfo: null,
165
- address_url: '',
176
+ isSetting:'N',
177
+ // logoutName:'[退出登录]',
178
+ imageRadius:'50%',
166
179
 
167
180
  //基础
168
- color: '#333',
181
+ imageColor: '#333',
169
182
  backgroundColor: 'rgba(0,0,0,0)',
170
183
  textType: 'N', //默认水平
171
184
  radius: 0,
172
185
 
173
186
  //投影
174
- is_shadow: 'Y',
187
+ contShadow:{},
188
+ is_shadow: 'N',
175
189
  is_shadow_bg: 0,
176
190
  is_shadow_w: 0,
177
191
 
178
-
179
192
  //边框
180
- is_border: 'Y',
193
+ contBorder:{},
194
+ is_border: 'N',
181
195
  is_border_w: 0,
182
196
  is_border_c: '',
183
197
 
184
198
  //其他
185
- margin: {
186
- top: 0,
187
- left: 0,
188
- right: 0,
189
- bottom: 0
190
- },
191
- padding: {
192
- top: 0,
193
- left: 0,
194
- right: 0,
195
- bottom: 0
196
- },
199
+ margin: {},
200
+ padding: {},
201
+ nickStyle:{},
202
+ logoutStyle:{},
197
203
  rightContent: null,
198
- addressUrl: "",
204
+ addressUrl: '',
199
205
  bgImage: "",
200
- boxBorder: "",
201
- boxShadow: "",
202
206
  rightContentBgColor: "",
203
- rightContentTextColor: "",
207
+ // rightContentTextColor: "",
204
208
  rightContentPadding: "",
205
209
  rightContentRadius: 0
206
210
  }
@@ -275,31 +279,44 @@
275
279
  * @param container {object} 业务组件对象自己
276
280
  */
277
281
  init(container) {
278
- this.margin = getContainerPropsValue(container, 'content.margin', {top: 20, left: 20, right: 20, bottom: 20});
279
- this.padding = getContainerPropsValue(container, 'content.padding', {top: 20, left: 20, right: 20, bottom: 20});
280
- this.address_url = getContainerPropsValue(container, 'content.address_url', {value: ''});
281
- this.color = getContainerPropsValue(container, 'content.textColor', '#333');
282
+ this.margin = getContainerPropsValue(container, 'content.margin', {});
283
+ this.padding = getContainerPropsValue(container, 'content.padding', {});
282
284
  this.backgroundColor = getContainerPropsValue(container, 'content.backgroundColor', '#f8f8f8');
283
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');
284
291
 
292
+ //Shadow
285
293
  this.is_shadow = getContainerPropsValue(container, 'content.is_shadow', 'N');
286
294
  this.is_shadow_bg = getContainerPropsValue(container, 'content.is_shadow_bg', '#fff');
287
295
  this.is_shadow_w = getContainerPropsValue(container, 'content.is_shadow_w', '10');
296
+ this.contShadow = getContainerPropsValue(container, 'content.contShadow', {})
288
297
 
298
+ //边框
289
299
  this.is_border = getContainerPropsValue(container, 'content.is_border', 'N');
290
300
  this.is_border_c = getContainerPropsValue(container, 'content.is_border_c', '#fff');
291
301
  this.is_border_w = getContainerPropsValue(container, 'content.is_border_w', 0);
292
- this.radius = getContainerPropsValue(container, 'content.radius', '10');
293
- this.rightContent = getContainerPropsValue(container, 'content.rightContent', {});
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
+ });
294
313
  this.addressUrl = getContainerPropsValue(container, 'content.addressUrl', {value: ""}).value;
295
314
  this.bgImage = getServiceUrl(getContainerPropsValue(container, 'content.bgImage', '').url);
296
- this.boxBorder = getContainerPropsValue(container, 'content.boxBorder', '');
297
- this.boxShadow = getContainerPropsValue(container, 'content.boxShadow', '');
298
315
  this.rightContentBgColor = getContainerPropsValue(container, 'content.rightContentBgColor', 'transparent');
299
- this.rightContentTextColor = getContainerPropsValue(container, 'content.rightContentTextColor', '');
316
+ // this.rightContentTextColor = getContainerPropsValue(container, 'content.rightContentTextColor', '');
300
317
  this.rightContentPadding = getContainerPropsValue(container, 'content.rightContentPadding', {});
301
318
  this.rightContentRadius = getContainerPropsValue(container, 'content.rightContentRadius', 0);
302
- console.log("this.rightContentRadius", this.rightContentRadius);
319
+
303
320
  },
304
321
  handleAddress(){
305
322
  this.$xdUniHelper.navigateTo({
@@ -316,19 +333,24 @@
316
333
 
317
334
  .vertical-user {
318
335
  display: flex;
336
+ flex-direction: column;
319
337
  justify-content: center;
320
338
  align-items: center;
321
339
  & > view:nth-child(2) {
322
- 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;
323
349
  }
324
350
  }
325
351
 
326
352
  .jfb-base-user-info {
327
353
  &__body{
328
- .user_name{
329
- font-size: 40rpx;
330
- font-weight: 500;
331
- }
332
354
  &-header {
333
355
  display: flex;
334
356
  align-items: center;
@@ -336,7 +358,6 @@
336
358
  background-size: cover;
337
359
  background-repeat: no-repeat;
338
360
 
339
-
340
361
  &-left {
341
362
  display: flex;
342
363
  align-items: center;
@@ -361,8 +382,7 @@
361
382
  & > image, .no-image {
362
383
  width: unit(140, rpx);
363
384
  height: unit(140, rpx);
364
- margin-right: unit(30, rpx);
365
- border-radius: 50%;
385
+ margin-right: unit(30, rpx);;
366
386
  display: flex;
367
387
  justify-content: center;
368
388
  align-items: center;