jufubao-base 1.0.190 → 1.0.192-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 (33) hide show
  1. package/commands.js +1 -1
  2. package/get.package.path.js +2 -2
  3. package/package.json +1 -1
  4. package/src/ICONS.js +1128 -0
  5. package/src/components/JfbBaseAddress/Attr.js +109 -1
  6. package/src/components/JfbBaseAddress/JfbBaseAddress.vue +153 -77
  7. package/src/components/JfbBaseAddress/XdTfkItem.vue +117 -0
  8. package/src/components/JfbBaseFastLink/Attr.js +22 -6
  9. package/src/components/JfbBaseFastLink/JfbBaseFastLink.vue +35 -20
  10. package/src/components/JfbBaseFooter/Attr.js +141 -75
  11. package/src/components/JfbBaseFooter/JfbBaseFooter.vue +50 -15
  12. package/src/components/JfbBaseLogin/Attr.js +3 -9
  13. package/src/components/JfbBaseOrderDetail/Api.js +1 -0
  14. package/src/components/JfbBaseOrderDetail/Attr.js +201 -65
  15. package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +168 -57
  16. package/src/components/JfbBaseOrderList/Attr.js +59 -2
  17. package/src/components/JfbBaseOrderList/JfbBaseOrderList.vue +139 -92
  18. package/src/components/JfbBaseOrderList/Mock.js +3 -0
  19. package/src/components/JfbBaseOrderList/XdTfkOrderItem.vue +267 -0
  20. package/src/components/JfbBasePhoneCollect/Attr.js +933 -411
  21. package/src/components/JfbBasePhoneCollect/JfbBasePhoneCollect.vue +307 -27
  22. package/src/components/JfbBasePhoneLogin/Attr.js +882 -405
  23. package/src/components/JfbBasePhoneLogin/JfbBasePhoneLogin.vue +609 -253
  24. package/src/components/JfbBaseSuccess/Attr.js +1 -1
  25. package/src/components/JfbBaseTfkCardLogin/JfbBaseTfkCardLogin.vue +0 -1
  26. package/src/components/JfbBaseUserCenter/Attr.js +240 -48
  27. package/src/components/JfbBaseUserCenter/JfbBaseUserCenter.vue +101 -30
  28. package/src/components/JfbBaseUserInfo/Attr.js +179 -30
  29. package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +80 -44
  30. package/src/components/JfbBaseUserOrder/Attr.js +291 -25
  31. package/src/components/JfbBaseUserOrder/JfbBaseUserOrder.vue +172 -54
  32. package/src/components/JfbBaseWallet/Attr.js +344 -3
  33. package/src/components/JfbBaseWallet/JfbBaseWallet.vue +173 -49
@@ -13,25 +13,18 @@
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}">
16
+ <view class="jfb-base-user-order__body">
17
+ <view class="x-line"></view>
18
+ <view :style="[bodyStyleComp]" v-if="list.length > 0">
22
19
  <view class="my-order__add">
23
- <view :style="{color:cardNameColor}">我的订单</view>
24
- <view @click="handleToLink(afterUrl)" :style="{borderColor:subColor || mainColor,color: subColor || mainColor}">售后订单</view>
20
+ <view :style="[titleStyleComp]">{{myOrderName}}</view>
21
+ <view
22
+ v-if="isShowBtn === 'Y'"
23
+ @click="handleToLink(afterUrl)"
24
+ :style="[addBtnStyleComp]"
25
+ >{{afterBuyName}}</view>
25
26
  </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
- >
27
+ <view class="my-order__content" :style="[contStyleComp]">
35
28
  <view class="my-order__content-type">
36
29
  <view
37
30
  class="my-order__content-type-item"
@@ -40,14 +33,16 @@
40
33
  @click="handleToLink(orderListUrl, item.status)"
41
34
  >
42
35
  <view class="my-order__content-type-item-icon">
36
+ <image v-if="item.image" :src="item.image"></image>
43
37
  <xd-font-icon
38
+ v-else
44
39
  :icon="item.icon"
45
40
  :color="iconColor"
46
41
  :size="item.size"
47
42
  ></xd-font-icon>
48
43
  <view
49
44
  v-if="item.num"
50
- :style="{backgroundColor: iconColor}"
45
+ :style="[popComp]"
51
46
  class="my-order__content-type-item-number"
52
47
  >{{item.num}}</view>
53
48
  </view>
@@ -67,6 +62,7 @@
67
62
  import componentsMixins from "@/mixins/componentsMixins";
68
63
  import extsMixins from "@/mixins/extsMixins"
69
64
  import { getContainerPropsValue } from "@/utils/xd.base";
65
+ import getServiceUrl from "@/common/getServiceUrl";
70
66
  export default {
71
67
  name: "JfbBaseUserOrder",
72
68
  components: {
@@ -74,23 +70,95 @@
74
70
  },
75
71
  mixins: [componentsMixins,extsMixins,JfbBaseUserOrderMixin],
76
72
  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
90
- },
91
- borderBox() {
73
+ borderComp() {
92
74
  if (this.is_border === 'Y') return `${this.is_border_w}rpx solid ${this.is_border_c}`;
93
75
  else return '0';
76
+ },
77
+ titleStyleComp(){
78
+ return {
79
+ fontSize: this.titleStyle.fontSize || '28rpx',
80
+ color: `${this.titleStyle.color || this.cardNameColor ||'#333'}`,
81
+ fontWeight: `${this.titleStyle.fontWeight || 'normal'}`,
82
+ }
83
+ },
84
+ bodyStyleComp(){
85
+ let margin = `${this.checkValue(this.bodyMargin.top, 20)}rpx`;
86
+ margin = `${margin} ${this.checkValue(this.bodyMargin.right, 20)}rpx`;
87
+ margin = `${margin} ${this.checkValue(this.bodyMargin.bottom, 20)}rpx`;
88
+ margin = `${margin} ${this.checkValue(this.bodyMargin.left, 20)}rpx`;
89
+
90
+ let padding = `${this.checkValue(this.bodyPadding.top, 0)}rpx`;
91
+ padding = `${padding} ${this.checkValue(this.bodyPadding.right, 0)}rpx`;
92
+ padding = `${padding} ${this.checkValue(this.bodyPadding.bottom, 0)}rpx`;
93
+ padding = `${padding} ${this.checkValue(this.bodyPadding.left, 0)}rpx`;
94
+
95
+ return {
96
+ margin,
97
+ padding,
98
+ borderRadius: this.bodyRadius + 'rpx',
99
+ backgroundColor: this.bodyBackgroundColor,
100
+ }
101
+ },
102
+ addBtnStyleComp(){
103
+ let border = {};
104
+ if(this.addBtnBorder && this.addBtnBorder.type === 'Y') {
105
+ let value = this.addBtnBorder.value ||{};
106
+ if(value.width) border['borderWidth'] = value.width + 'rpx';
107
+ if(value.color) border['borderColor'] = value.color;
108
+ if(value.style) border['borderStyle'] = value.style;
109
+ }
110
+ let addBtnShadow = {};
111
+ if(this.addBtnShadow && this.addBtnShadow.type === 'Y') {
112
+ let value = this.addBtnShadow.value || {};
113
+ if(value.color && value.width) {
114
+ addBtnShadow['boxShadow'] = `0 0 ${value.width}rpx ${value.color}`
115
+ }
116
+ }
117
+ return {
118
+ color: this.addBtnStyle.color || this.mainColor,
119
+ fontSize: this.addBtnStyle.fontSize || '26rpx',
120
+ fontWeight: this.addBtnStyle.fontWeight || 'normal',
121
+ borderColor: this.mainColor,
122
+ borderWidth: '2rpx',
123
+ borderStyle:'solid',
124
+ backgroundColor: this.addBtnBgColor || 'rgba(0,0,0,0)',
125
+ borderRadius:this.addBtnRadius + 'rpx',
126
+ ...border,
127
+ ...addBtnShadow
128
+ }
129
+ },
130
+ popComp(){
131
+ return {
132
+ backgroundColor: this.popBgColor,
133
+ color: this.popColor || '#f00',
134
+ }
135
+ },
136
+ contStyleComp(){
137
+ let borderStyle = 'solid';
138
+ let borderWidth = 0;
139
+ let borderColor = 'rgba(0,0,0,0)';
140
+ if(this.is_border === 'Y') {
141
+ if(this.is_border_w !== undefined) borderWidth = this.is_border_w;
142
+ if(this.is_border_c !== undefined) borderColor = this.is_border_c;
143
+ }
144
+ if(this.contBorder && this.contBorder.type === 'Y') {
145
+ let value = this.contBorder.value ||{};
146
+ if(value.width) borderWidth = value.width + 'rpx';
147
+ if(value.color) borderColor = value.color;
148
+ if(value.style) borderStyle = value.style;
149
+ }
150
+ let padding = `${this.checkValue(this.contPadding.top, 40)}rpx`;
151
+ padding = `${padding} ${this.checkValue(this.contPadding.right, 20)}rpx`;
152
+ padding = `${padding} ${this.checkValue(this.contPadding.bottom, 34)}rpx`;
153
+ padding = `${padding} ${this.checkValue(this.contPadding.left, 20)}rpx`;
154
+ return {
155
+ borderRadius: this.radius + 'rpx',
156
+ backgroundColor: this.backgroundColor,
157
+ marginTop: this.spacing + 'rpx',
158
+ border: `${borderWidth} ${borderStyle} ${borderColor}`,
159
+ boxShadow: this.contShadow,
160
+ padding
161
+ }
94
162
  }
95
163
  },
96
164
  data() {
@@ -98,14 +166,41 @@
98
166
  options: {},
99
167
  list: [],
100
168
 
101
- //基础
169
+ //整体
170
+ bodyPadding: {},
171
+ bodyRadius: 0,
172
+ bodyBackgroundColor: 'rgba(0,0,0,0)',
173
+ bodyMargin: { },
174
+ spacing:20,
175
+
176
+ //内容列表
102
177
  color: '#333',
103
- backgroundColor: 'rgba(0,0,0,0)',
104
- radius: 0,
105
178
  iconColor: '',
106
- spacing:20,
107
179
 
108
- //边框
180
+ //我的标题
181
+ myOrderName: '我的订单',
182
+ cardNameColor: '#333',
183
+ titleStyle: {},
184
+
185
+ //售后订单
186
+ isShowBtn:'Y',
187
+ afterBuyName:'售后订单',
188
+ addBtnBgColor:'rgba(0,0,0,0)',
189
+ addBtnStyle:{},
190
+ addBtnBorder:{},
191
+ addBtnShadow:{},
192
+ addBtnRadius: '40',
193
+
194
+ //数字气泡
195
+ popColor:'#fff',
196
+ popBgColor:'#f00',
197
+
198
+ //content
199
+ backgroundColor: 'rgba(0,0,0,0)',
200
+ radius: 0,
201
+ contPadding:{},
202
+ contShadow:{},
203
+ contBorder:{},
109
204
  is_border: 'Y',
110
205
  is_border_w: 0,
111
206
  is_border_c: '',
@@ -114,13 +209,6 @@
114
209
  afterUrl: null,
115
210
  orderListUrl: null,
116
211
 
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
212
  }
125
213
  },
126
214
  watch: {
@@ -178,6 +266,24 @@
178
266
  * @param container {object} 业务组件对象自己
179
267
  */
180
268
  init(container) {
269
+ this.isShowBtn = getContainerPropsValue(container, 'content.isShowBtn', 'Y');
270
+ this.afterBuyName = getContainerPropsValue(container, 'content.afterBuyName', '售后订单');
271
+
272
+ //数字气泡
273
+ this.popColor = getContainerPropsValue(container, 'content.popColor', '#fff');
274
+ this.popBgColor = getContainerPropsValue(container, 'content.popBgColor', '#f00');
275
+
276
+
277
+ //标题
278
+ this.myOrderName = getContainerPropsValue(container, 'content.myOrderName', '我的订单')
279
+ this.titleStyle = getContainerPropsValue(container, 'content.titleStyle', {});
280
+
281
+ //添加按钮
282
+ this.addBtnBgColor = getContainerPropsValue(container, 'content.addBtnBgColor', 'rgba(0,0,0,0)');
283
+ this.addBtnStyle = getContainerPropsValue(container, 'content.addBtnStyle', {});
284
+ this.addBtnBorder = getContainerPropsValue(container, 'content.addBtnBorder', {});
285
+ this.addBtnRadius = getContainerPropsValue(container, 'content.addBtnRadius', '40');
286
+ this.addBtnShadow = getContainerPropsValue(container, 'content.addBtnShadow', {});
181
287
 
182
288
  //整体
183
289
  this.bodyMargin = getContainerPropsValue(container, 'content.bodyMargin', {top: 0, left: 0, right: 0, bottom: 0});
@@ -195,23 +301,29 @@
195
301
 
196
302
  //基础
197
303
  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
304
  this.backgroundColor = getContainerPropsValue(container, 'content.backgroundColor', '#f8f8f8');
201
-
202
- //边框
305
+ this.contPadding = getContainerPropsValue(container, 'content.contPadding', '{}')
306
+ this.contShadow = this.getXdShadow({width:20, color:'rgba(0,0,0,0)'},getContainerPropsValue(container, 'content.contShadow', {}))
307
+ this.contBorder = getContainerPropsValue(container, 'content.contBorder', {});
203
308
  this.is_border = getContainerPropsValue(container, 'content.is_border', 'N');
204
309
  this.is_border_c = getContainerPropsValue(container, 'content.is_border_c', '#f8f8f8');
205
310
  this.is_border_w = getContainerPropsValue(container, 'content.is_border_w', '2');
206
311
 
207
-
312
+ //内容列表
208
313
  this.list = getContainerPropsValue(container, 'content.orderTypeList', []).map(item=>{
314
+ let image = '';
315
+ if(this.$xdUniHelper.checkVarType(item.image) === 'object') {
316
+ image = getServiceUrl(item.image.url, 'size1');
317
+ }
209
318
  return {
210
319
  ...item,
320
+ image,
211
321
  size: Number(item.size ? item.size: 18) * 2,
212
322
  num: 0
213
323
  }
214
- })
324
+ });
325
+ this.color = getContainerPropsValue(container, 'content.textColor', '#333');
326
+ this.iconColor = getContainerPropsValue(container, 'content.iconColor', this.mainColor);
215
327
  },
216
328
 
217
329
  onJfbShow(options) {
@@ -219,6 +331,7 @@
219
331
  },
220
332
 
221
333
  handleToLink(path, type) {
334
+ if (this.$configProject['isPreview']) return;
222
335
  this.$xdUniHelper.navigateTo({
223
336
  url: type ? `${path}?type=${type}` : path
224
337
  })
@@ -244,6 +357,7 @@
244
357
  justify-content: space-between;
245
358
  align-items: center;
246
359
  font-size: unit(28, rpx);
360
+ min-height: 62rpx;
247
361
 
248
362
  & > view:nth-child(2) {
249
363
  width: unit(200, rpx);
@@ -260,7 +374,6 @@
260
374
  display: flex;
261
375
  justify-content: space-around;
262
376
  align-items: center;
263
- padding: unit(40, rpx) unit(20, rpx) unit(35, rpx);
264
377
 
265
378
  &-item {
266
379
  font-size: unit(24, rpx);
@@ -268,13 +381,18 @@
268
381
  flex: 1;
269
382
 
270
383
  &-icon {
271
- height: unit(40, rpx);
272
- width: unit(40, rpx);
384
+ height: unit(54, rpx);
385
+ width: unit(54, rpx);
273
386
  display: flex;
274
387
  justify-content: center;
275
388
  align-items: center;
276
389
  margin: 0 auto;
277
390
  position: relative;
391
+
392
+ & > image {
393
+ max-width: 100%;
394
+ max-height: 100%;
395
+ }
278
396
  }
279
397
 
280
398
  &-text {