jufubao-base 1.0.195 → 1.0.196-beta101

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 (26) 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 +153 -77
  6. package/src/components/JfbBaseAddress/XdTfkItem.vue +117 -0
  7. package/src/components/JfbBaseFastLink/Attr.js +24 -8
  8. package/src/components/JfbBaseFastLink/JfbBaseFastLink.vue +37 -21
  9. package/src/components/JfbBaseFooter/Attr.js +141 -75
  10. package/src/components/JfbBaseFooter/JfbBaseFooter.vue +50 -15
  11. package/src/components/JfbBaseOrderDetail/Attr.js +147 -65
  12. package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +96 -46
  13. package/src/components/JfbBaseOrderList/Attr.js +59 -2
  14. package/src/components/JfbBaseOrderList/JfbBaseOrderList.vue +139 -92
  15. package/src/components/JfbBaseOrderList/Mock.js +3 -0
  16. package/src/components/JfbBaseOrderList/XdTfkOrderItem.vue +267 -0
  17. package/src/components/JfbBasePoster/Attr.js +8 -0
  18. package/src/components/JfbBasePoster/JfbBasePoster.vue +3 -0
  19. package/src/components/JfbBaseUserCenter/Attr.js +308 -52
  20. package/src/components/JfbBaseUserCenter/JfbBaseUserCenter.vue +138 -31
  21. package/src/components/JfbBaseUserInfo/Attr.js +194 -33
  22. package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +80 -44
  23. package/src/components/JfbBaseUserOrder/Attr.js +322 -28
  24. package/src/components/JfbBaseUserOrder/JfbBaseUserOrder.vue +205 -54
  25. package/src/components/JfbBaseWallet/Attr.js +376 -8
  26. package/src/components/JfbBaseWallet/JfbBaseWallet.vue +185 -49
@@ -13,25 +13,29 @@
13
13
  <view class="jfb-base-user-order__edit-icon" @click="delEdit">删除</view>
14
14
  </view>
15
15
  <!-- #endif -->
16
- <view
17
- v-if="list.length > 0"
18
- class="jfb-base-user-order__body"
19
- :style="{ padding: outMargin}"
20
- >
21
- <view :style="{borderRadius: bodyRadius + 'rpx', backgroundColor:bodyBackgroundColor, padding:outPadding}">
22
- <view class="my-order__add">
23
- <view :style="{color:cardNameColor}">我的订单</view>
24
- <view @click="handleToLink(afterUrl)" :style="{borderColor:subColor || mainColor,color: subColor || mainColor}">售后订单</view>
16
+ <view class="jfb-base-user-order__body">
17
+ <view class="x-line"></view>
18
+ <view :style="[bodyStyleComp]" v-if="list.length > 0">
19
+ <view class="my-order__add" :style="[titleMarginComp]">
20
+ <view :style="[titleStyleComp]">{{myOrderName}}</view>
21
+ <view
22
+ v-if="isShowBtn === 'Y'"
23
+ @click="handleToLink(afterUrl)"
24
+ :style="[addBtnStyleComp]"
25
+ class="afterBuy"
26
+ >
27
+ <text>{{afterBuyName}}</text>
28
+ <view v-if="isShowICONBtn === 'Y'">
29
+ <xd-font-icon
30
+ icon="iconxiangyou_xian"
31
+ :color="addBtnStyleComp.color"
32
+ :size="20"
33
+ ></xd-font-icon>
34
+ </view>
35
+
36
+ </view>
25
37
  </view>
26
- <view
27
- class="my-order__content"
28
- :style="{
29
- borderRadius: radius + 'rpx',
30
- background: backgroundColor,
31
- marginTop: spacing + 'rpx',
32
- border: borderBox,
33
- }"
34
- >
38
+ <view class="my-order__content" :style="[contStyleComp]">
35
39
  <view class="my-order__content-type">
36
40
  <view
37
41
  class="my-order__content-type-item"
@@ -40,14 +44,16 @@
40
44
  @click="handleToLink(orderListUrl, item.status)"
41
45
  >
42
46
  <view class="my-order__content-type-item-icon">
47
+ <image v-if="item.image" :src="item.image"></image>
43
48
  <xd-font-icon
49
+ v-else
44
50
  :icon="item.icon"
45
51
  :color="iconColor"
46
52
  :size="item.size"
47
53
  ></xd-font-icon>
48
54
  <view
49
55
  v-if="item.num"
50
- :style="{backgroundColor: iconColor}"
56
+ :style="[popComp]"
51
57
  class="my-order__content-type-item-number"
52
58
  >{{item.num}}</view>
53
59
  </view>
@@ -67,6 +73,7 @@
67
73
  import componentsMixins from "@/mixins/componentsMixins";
68
74
  import extsMixins from "@/mixins/extsMixins"
69
75
  import { getContainerPropsValue } from "@/utils/xd.base";
76
+ import getServiceUrl from "@/common/getServiceUrl";
70
77
  export default {
71
78
  name: "JfbBaseUserOrder",
72
79
  components: {
@@ -74,23 +81,104 @@
74
81
  },
75
82
  mixins: [componentsMixins,extsMixins,JfbBaseUserOrderMixin],
76
83
  computed: {
77
- outPadding() {
78
- let str = `${this.checkValue(this.bodyPadding.top, 0)}rpx`;
79
- str = `${str} ${this.checkValue(this.bodyPadding.right, 0)}rpx`;
80
- str = `${str} ${this.checkValue(this.bodyPadding.bottom, 0)}rpx`;
81
- str = `${str} ${this.checkValue(this.bodyPadding.left, 0)}rpx`;
82
- return str
83
- },
84
- outMargin() {
85
- let str = `${this.checkValue(this.bodyMargin.top, 20)}rpx`;
86
- str = `${str} ${this.checkValue(this.bodyMargin.right, 20)}rpx`;
87
- str = `${str} ${this.checkValue(this.bodyMargin.bottom, 20)}rpx`;
88
- str = `${str} ${this.checkValue(this.bodyMargin.left, 20)}rpx`;
89
- return str
84
+ titleMarginComp(){
85
+ let padding = `${this.checkValue(this.titleMargin.top, 0)}rpx`;
86
+ padding = `${padding} ${this.checkValue(this.titleMargin.right, 0)}rpx`;
87
+ padding = `${padding} ${this.checkValue(this.titleMargin.bottom, 0)}rpx`;
88
+ padding = `${padding} ${this.checkValue(this.titleMargin.left, 0)}rpx`;
89
+ return {
90
+ padding: padding
91
+ }
90
92
  },
91
- borderBox() {
93
+ borderComp() {
92
94
  if (this.is_border === 'Y') return `${this.is_border_w}rpx solid ${this.is_border_c}`;
93
95
  else return '0';
96
+ },
97
+ titleStyleComp(){
98
+ return {
99
+ fontSize: this.titleStyle.fontSize || '28rpx',
100
+ color: `${this.titleStyle.color || this.cardNameColor ||'#333'}`,
101
+ fontWeight: `${this.titleStyle.fontWeight || 'normal'}`,
102
+ }
103
+ },
104
+ bodyStyleComp(){
105
+ let margin = `${this.checkValue(this.bodyMargin.top, 20)}rpx`;
106
+ margin = `${margin} ${this.checkValue(this.bodyMargin.right, 20)}rpx`;
107
+ margin = `${margin} ${this.checkValue(this.bodyMargin.bottom, 20)}rpx`;
108
+ margin = `${margin} ${this.checkValue(this.bodyMargin.left, 20)}rpx`;
109
+
110
+ let padding = `${this.checkValue(this.bodyPadding.top, 0)}rpx`;
111
+ padding = `${padding} ${this.checkValue(this.bodyPadding.right, 0)}rpx`;
112
+ padding = `${padding} ${this.checkValue(this.bodyPadding.bottom, 0)}rpx`;
113
+ padding = `${padding} ${this.checkValue(this.bodyPadding.left, 0)}rpx`;
114
+
115
+ return {
116
+ margin,
117
+ padding,
118
+ borderRadius: this.bodyRadius + 'rpx',
119
+ backgroundColor: this.bodyBackgroundColor,
120
+ }
121
+ },
122
+ addBtnStyleComp(){
123
+ let border = {};
124
+ if(this.addBtnBorder && this.addBtnBorder.type === 'Y') {
125
+ let value = this.addBtnBorder.value ||{};
126
+ if(value.width) border['borderWidth'] = value.width + 'rpx';
127
+ if(value.color) border['borderColor'] = value.color;
128
+ if(value.style) border['borderStyle'] = value.style;
129
+ }
130
+ let addBtnShadow = {};
131
+ if(this.addBtnShadow && this.addBtnShadow.type === 'Y') {
132
+ let value = this.addBtnShadow.value || {};
133
+ if(value.color && value.width) {
134
+ addBtnShadow['boxShadow'] = `0 0 ${value.width}rpx ${value.color}`
135
+ }
136
+ }
137
+ return {
138
+ color: this.addBtnStyle.color || this.mainColor,
139
+ fontSize: this.addBtnStyle.fontSize || '26rpx',
140
+ fontWeight: this.addBtnStyle.fontWeight || 'normal',
141
+ borderColor: this.mainColor,
142
+ borderWidth: '2rpx',
143
+ borderStyle:'solid',
144
+ backgroundColor: this.addBtnBgColor || 'rgba(0,0,0,0)',
145
+ borderRadius:this.addBtnRadius + 'rpx',
146
+ ...border,
147
+ ...addBtnShadow
148
+ }
149
+ },
150
+ popComp(){
151
+ return {
152
+ backgroundColor: this.popBgColor,
153
+ color: this.popColor || '#f00',
154
+ }
155
+ },
156
+ contStyleComp(){
157
+ let borderStyle = 'solid';
158
+ let borderWidth = 0;
159
+ let borderColor = 'rgba(0,0,0,0)';
160
+ if(this.is_border === 'Y') {
161
+ if(this.is_border_w !== undefined) borderWidth = this.is_border_w;
162
+ if(this.is_border_c !== undefined) borderColor = this.is_border_c;
163
+ }
164
+ if(this.contBorder && this.contBorder.type === 'Y') {
165
+ let value = this.contBorder.value ||{};
166
+ if(value.width) borderWidth = value.width + 'rpx';
167
+ if(value.color) borderColor = value.color;
168
+ if(value.style) borderStyle = value.style;
169
+ }
170
+ let padding = `${this.checkValue(this.contPadding.top, 40)}rpx`;
171
+ padding = `${padding} ${this.checkValue(this.contPadding.right, 20)}rpx`;
172
+ padding = `${padding} ${this.checkValue(this.contPadding.bottom, 34)}rpx`;
173
+ padding = `${padding} ${this.checkValue(this.contPadding.left, 20)}rpx`;
174
+ return {
175
+ borderRadius: this.radius + 'rpx',
176
+ backgroundColor: this.backgroundColor,
177
+ marginTop: this.spacing + 'rpx',
178
+ border: `${borderWidth} ${borderStyle} ${borderColor}`,
179
+ boxShadow: this.contShadow,
180
+ padding
181
+ }
94
182
  }
95
183
  },
96
184
  data() {
@@ -98,14 +186,43 @@
98
186
  options: {},
99
187
  list: [],
100
188
 
101
- //基础
189
+ //整体
190
+ bodyPadding: {},
191
+ bodyRadius: 0,
192
+ bodyBackgroundColor: 'rgba(0,0,0,0)',
193
+ bodyMargin: { },
194
+ spacing:20,
195
+
196
+ //内容列表
102
197
  color: '#333',
103
- backgroundColor: 'rgba(0,0,0,0)',
104
- radius: 0,
105
198
  iconColor: '',
106
- spacing:20,
107
199
 
108
- //边框
200
+ //我的标题
201
+ myOrderName: '我的订单',
202
+ cardNameColor: '#333',
203
+ titleStyle: {},
204
+ titleMargin:{},
205
+
206
+ //售后订单
207
+ isShowBtn:'Y',
208
+ afterBuyName:'售后订单',
209
+ addBtnBgColor:'rgba(0,0,0,0)',
210
+ addBtnStyle:{},
211
+ addBtnBorder:{},
212
+ addBtnShadow:{},
213
+ addBtnRadius: '40',
214
+ isShowICONBtn:'N',
215
+
216
+ //数字气泡
217
+ popColor:'#fff',
218
+ popBgColor:'#f00',
219
+
220
+ //content
221
+ backgroundColor: 'rgba(0,0,0,0)',
222
+ radius: 0,
223
+ contPadding:{},
224
+ contShadow:{},
225
+ contBorder:{},
109
226
  is_border: 'Y',
110
227
  is_border_w: 0,
111
228
  is_border_c: '',
@@ -114,13 +231,6 @@
114
231
  afterUrl: null,
115
232
  orderListUrl: null,
116
233
 
117
- //整体
118
- bodyPadding: {top: 20, left: 20, right: 20, bottom: 20},
119
- bodyRadius: 0,
120
- bodyBackgroundColor: 'rgba(0,0,0,0)',
121
- bodyMargin: {top: 0, left: 0, right: 0, bottom: 0},
122
- cardNameColor: '#333',
123
- subColor:'',
124
234
  }
125
235
  },
126
236
  watch: {
@@ -178,6 +288,25 @@
178
288
  * @param container {object} 业务组件对象自己
179
289
  */
180
290
  init(container) {
291
+ this.isShowBtn = getContainerPropsValue(container, 'content.isShowBtn', 'Y');
292
+ this.afterBuyName = getContainerPropsValue(container, 'content.afterBuyName', '售后订单');
293
+
294
+ //数字气泡
295
+ this.popColor = getContainerPropsValue(container, 'content.popColor', '#fff');
296
+ this.popBgColor = getContainerPropsValue(container, 'content.popBgColor', '#f00');
297
+
298
+
299
+ //标题
300
+ this.myOrderName = getContainerPropsValue(container, 'content.myOrderName', '我的订单')
301
+ this.titleStyle = getContainerPropsValue(container, 'content.titleStyle', {});
302
+ this.titleMargin = getContainerPropsValue(container,'content.titleMargin', {})
303
+
304
+ //添加按钮
305
+ this.addBtnBgColor = getContainerPropsValue(container, 'content.addBtnBgColor', 'rgba(0,0,0,0)');
306
+ this.addBtnStyle = getContainerPropsValue(container, 'content.addBtnStyle', {});
307
+ this.addBtnBorder = getContainerPropsValue(container, 'content.addBtnBorder', {});
308
+ this.addBtnRadius = getContainerPropsValue(container, 'content.addBtnRadius', '40');
309
+ this.addBtnShadow = getContainerPropsValue(container, 'content.addBtnShadow', {});
181
310
 
182
311
  //整体
183
312
  this.bodyMargin = getContainerPropsValue(container, 'content.bodyMargin', {top: 0, left: 0, right: 0, bottom: 0});
@@ -192,26 +321,33 @@
192
321
  this.afterUrl = getContainerPropsValue(container, 'content.after_url', {value: ''}).value;
193
322
  this.orderListUrl = getContainerPropsValue(container, 'content.order_url', {value: ''}).value;
194
323
  this.margin = getContainerPropsValue(container, 'content.margin', {top: 0, left: 0, right: 0, bottom: 0});
324
+ this.isShowICONBtn = getContainerPropsValue(container, 'content.isShowICONBtn', 'N')
195
325
 
196
326
  //基础
197
327
  this.radius = getContainerPropsValue(container, 'content.radius', 0);
198
- this.color = getContainerPropsValue(container, 'content.textColor', '#333');
199
- this.iconColor = getContainerPropsValue(container, 'content.iconColor', this.mainColor);
200
328
  this.backgroundColor = getContainerPropsValue(container, 'content.backgroundColor', '#f8f8f8');
201
-
202
- //边框
329
+ this.contPadding = getContainerPropsValue(container, 'content.contPadding', '{}')
330
+ this.contShadow = this.getXdShadow({width:20, color:'rgba(0,0,0,0)'},getContainerPropsValue(container, 'content.contShadow', {}))
331
+ this.contBorder = getContainerPropsValue(container, 'content.contBorder', {});
203
332
  this.is_border = getContainerPropsValue(container, 'content.is_border', 'N');
204
333
  this.is_border_c = getContainerPropsValue(container, 'content.is_border_c', '#f8f8f8');
205
334
  this.is_border_w = getContainerPropsValue(container, 'content.is_border_w', '2');
206
335
 
207
-
336
+ //内容列表
208
337
  this.list = getContainerPropsValue(container, 'content.orderTypeList', []).map(item=>{
338
+ let image = '';
339
+ if(this.$xdUniHelper.checkVarType(item.image) === 'object') {
340
+ image = getServiceUrl(item.image.url, 'size1');
341
+ }
209
342
  return {
210
343
  ...item,
344
+ image,
211
345
  size: Number(item.size ? item.size: 18) * 2,
212
346
  num: 0
213
347
  }
214
- })
348
+ });
349
+ this.color = getContainerPropsValue(container, 'content.textColor', '#333');
350
+ this.iconColor = getContainerPropsValue(container, 'content.iconColor', this.mainColor);
215
351
  },
216
352
 
217
353
  onJfbShow(options) {
@@ -219,6 +355,7 @@
219
355
  },
220
356
 
221
357
  handleToLink(path, type) {
358
+ if (this.$configProject['isPreview']) return;
222
359
  this.$xdUniHelper.navigateTo({
223
360
  url: type ? `${path}?type=${type}` : path
224
361
  })
@@ -234,7 +371,15 @@
234
371
 
235
372
  .jfb-base-user-order {
236
373
  &__body{
374
+ & .afterBuy {
375
+ display: flex;
376
+ justify-content: center;
377
+ align-items: center;
237
378
 
379
+ & > view {
380
+ margin-left: 10rpx;
381
+ }
382
+ }
238
383
  }
239
384
  }
240
385
 
@@ -244,6 +389,7 @@
244
389
  justify-content: space-between;
245
390
  align-items: center;
246
391
  font-size: unit(28, rpx);
392
+ min-height: 62rpx;
247
393
 
248
394
  & > view:nth-child(2) {
249
395
  width: unit(200, rpx);
@@ -255,12 +401,12 @@
255
401
  text-align: center;
256
402
  }
257
403
  }
404
+
258
405
  &__content {
259
406
  &-type {
260
407
  display: flex;
261
408
  justify-content: space-around;
262
409
  align-items: center;
263
- padding: unit(40, rpx) unit(20, rpx) unit(35, rpx);
264
410
 
265
411
  &-item {
266
412
  font-size: unit(24, rpx);
@@ -268,13 +414,18 @@
268
414
  flex: 1;
269
415
 
270
416
  &-icon {
271
- height: unit(40, rpx);
272
- width: unit(40, rpx);
417
+ height: unit(54, rpx);
418
+ width: unit(54, rpx);
273
419
  display: flex;
274
420
  justify-content: center;
275
421
  align-items: center;
276
422
  margin: 0 auto;
277
423
  position: relative;
424
+
425
+ & > image {
426
+ max-width: 100%;
427
+ max-height: 100%;
428
+ }
278
429
  }
279
430
 
280
431
  &-text {