jufubao-base 1.0.197-beta4 → 1.0.197-beta7

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 (37) 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/XdTfkItem.vue +117 -0
  7. package/src/components/JfbBaseCardEntry/JfbBaseCardEntry.vue +2 -0
  8. package/src/components/JfbBaseCardEntry/Mock.js +1 -0
  9. package/src/components/JfbBaseCardEntry/XdCardNew.vue +21 -4
  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 +20 -51
  16. package/src/components/JfbBaseHeader/JfbBaseHeader.vue +23 -28
  17. package/src/components/JfbBaseHeaderElephant/Attr.js +8 -0
  18. package/src/components/JfbBaseHeaderElephant/JfbBaseHeaderElephant.vue +33 -5
  19. package/src/components/JfbBaseNotice/Attr.js +26 -0
  20. package/src/components/JfbBaseNotice/JfbBaseNotice.vue +13 -1
  21. package/src/components/JfbBaseOrderDetail/Attr.js +147 -65
  22. package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +97 -47
  23. package/src/components/JfbBaseOrderList/Attr.js +59 -2
  24. package/src/components/JfbBaseOrderList/JfbBaseOrderList.vue +139 -92
  25. package/src/components/JfbBaseOrderList/Mock.js +3 -0
  26. package/src/components/JfbBaseOrderList/XdTfkOrderItem.vue +267 -0
  27. package/src/components/JfbBasePosterBigSmall/JfbBasePosterBigSmall.vue +27 -29
  28. package/src/components/JfbBasePosterBigSmall/getWidthHeight.js +13 -9
  29. package/src/components/JfbBaseUserCenter/Attr.js +297 -52
  30. package/src/components/JfbBaseUserCenter/JfbBaseUserCenter.vue +135 -44
  31. package/src/components/JfbBaseUserInfo/Attr.js +227 -88
  32. package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +106 -86
  33. package/src/components/JfbBaseUserOrder/Attr.js +332 -30
  34. package/src/components/JfbBaseUserOrder/JfbBaseUserOrder.vue +183 -55
  35. package/src/components/JfbBaseWallet/Attr.js +376 -8
  36. package/src/components/JfbBaseWallet/JfbBaseWallet.vue +185 -49
  37. package/src/mixins/componentsMixins.js +210 -35
@@ -14,21 +14,29 @@
14
14
  </view>
15
15
  <!-- #endif -->
16
16
  <view class="jfb-base-wallet__body">
17
+ <view class="x-line"></view>
17
18
  <template v-if="showContent">
18
- <view class="jfb-base-wallet__body-title">我的账户</view>
19
- <view class="jfb-base-wallet__body-type" v-if="showType.length > 0">
20
- <view
21
- :style="{marginRight: index === showType.length - 1 ? '0' : '36rpx',}"
22
- v-for="(item, index) in showType"
23
- @click="handleJumpTo(item)"
24
- :key="index"
25
- class="jfb-base-wallet__body-type-item"
26
- >
27
- <XdFontIcon :icon="item.icon"></XdFontIcon>
28
- <view>{{ item.label }}</view>
19
+ <view :style="[{
20
+ margin:marginComp,
21
+ padding:paddingComp,
22
+ backgroundColor:bodyBgColor,
23
+ borderRadius:bodyRadius+'rpx'
24
+ }]">
25
+ <view class="jfb-base-wallet__body-title" :style="[titleStyleComp]">{{accountName}}</view>
26
+ <view class="jfb-base-wallet__body-type" :style="[contStyleComp]" v-if="showType.length > 0">
27
+ <view
28
+ :style="[itemStyleComp]"
29
+ v-for="(item, index) in showType"
30
+ @click="handleJumpTo(item)"
31
+ :key="index"
32
+ class="jfb-base-wallet__body-type-item"
33
+ >
34
+ <xd-font-icon :icon="item.icon" :color="iconColor"></xd-font-icon>
35
+ <view>{{ item.label }}</view>
36
+ </view>
29
37
  </view>
38
+ <view v-else class="jfb-base-wallet__body-type notice" :style="{backgroundColor:backgroundColor, color:warningColor}">我的账户无配置数据,在正式环境将不显示改模块</view>
30
39
  </view>
31
- <view v-else class="jfb-base-wallet__body-type notice" :style="{backgroundColor:backgroundColor, color:warningColor}">我的账户无配置数据,在正式环境将不显示改模块</view>
32
40
  </template>
33
41
  </view>
34
42
  </view>
@@ -72,6 +80,38 @@ export default {
72
80
  isCard: "Y",
73
81
  isYuanbao: "Y",
74
82
  isIntegral: "Y",
83
+ accountName:'我的账户',
84
+
85
+ //标题
86
+ titleStyle:{},
87
+ titleMargin:{},
88
+
89
+ //轮廓
90
+ bodyRadius:'0',
91
+ bodyMargin:{},
92
+ bodyPadding:{},
93
+ rowSpacing:10,
94
+ columnSpacing:36,
95
+ bodyBgColor:'rgba(0,0,0,0)',
96
+
97
+ //content
98
+ contPadding:{},
99
+ contBgColor:'rgba(0,0,0,0)',
100
+ contRadius:'10',
101
+ contShadow:'0 0 0 rgba(0,0,0,0)',
102
+ contBorder:{},
103
+
104
+ //item
105
+ itemPadding:{},
106
+ itemBgColor:'rgba(0,0,0,0)',
107
+ itemRadius:'10',
108
+ itemShadow: '0 0 0 rgba(0,0,0,0)',
109
+ itemBorder:{},
110
+ itemPStyle:{},
111
+ iconColor: '#333',
112
+
113
+
114
+ //高级
75
115
  cardPath: "",
76
116
  yuanbaoPath: "",
77
117
  integralPath: "",
@@ -163,6 +203,15 @@ export default {
163
203
  },
164
204
  },
165
205
  computed: {
206
+ titleMarginComp(){
207
+ let str = `${this.checkValue(this.titleMargin.top, 0)}rpx`;
208
+ str = `${str} ${this.checkValue(this.titleMargin.right, 0)}rpx`;
209
+ str = `${str} ${this.checkValue(this.titleMargin.bottom, 0)}rpx`;
210
+ str = `${str} ${this.checkValue(this.titleMargin.left, 0)}rpx`;
211
+ return {
212
+ padding: str
213
+ }
214
+ },
166
215
  showType() {
167
216
  this.typeList.forEach((item1, index) => {
168
217
  const item2 = this.newLabel.find((item) => item.value === item1.value);
@@ -177,7 +226,90 @@ export default {
177
226
  showContent(){
178
227
  if(this.$configProject.isPreview) return true;
179
228
  return this.showType.length > 0;
180
- }
229
+ },
230
+
231
+ titleStyleComp(){
232
+ return {
233
+ fontSize: this.titleStyle.fontSize || '28rpx',
234
+ color: `${this.titleStyle.color || '#333'}`,
235
+ fontWeight: `${this.titleStyle.fontWeight || 'normal'}`,
236
+ marginBottom: `${this.rowSpacing}rpx`,
237
+ ...this.titleMarginComp
238
+ }
239
+ },
240
+
241
+ marginComp() {
242
+ let str = `${this.checkValue(this.bodyMargin.top, 0)}rpx`;
243
+ str = `${str} ${this.checkValue(this.bodyMargin.right, 0)}rpx`;
244
+ str = `${str} ${this.checkValue(this.bodyMargin.bottom, 0)}rpx`;
245
+ str = `${str} ${this.checkValue(this.bodyMargin.left, 0)}rpx`;
246
+ return str
247
+ },
248
+
249
+ paddingComp() {
250
+ let str = `${this.checkValue(this.bodyPadding.top, 20)}rpx`;
251
+ str = `${str} ${this.checkValue(this.bodyPadding.right, 20)}rpx`;
252
+ str = `${str} ${this.checkValue(this.bodyPadding.bottom, 20)}rpx`;
253
+ str = `${str} ${this.checkValue(this.bodyPadding.left, 20)}rpx`;
254
+ return str
255
+ },
256
+
257
+ contStyleComp(){
258
+ let str = `${this.checkValue(this.contPadding.top, 32)}rpx`;
259
+ str = `${str} ${this.checkValue(this.contPadding.right, 48)}rpx`;
260
+ str = `${str} ${this.checkValue(this.contPadding.bottom, 32)}rpx`;
261
+ str = `${str} ${this.checkValue(this.contPadding.left, 48)}rpx`;
262
+ let border = {
263
+ borderWidth: '2rpx',
264
+ borderStyle: 'solid',
265
+ borderColor: '#eee',
266
+ }
267
+ if(this.contBorder && this.contBorder.type === 'Y') {
268
+ let value = this.contBorder.value || {};
269
+ if(value.color) border.borderColor = value.color;
270
+ if(value.style) border.borderStyle = value.style;
271
+ if(value.width) border.borderWidth = value.width + 'rpx';
272
+ }
273
+
274
+ return {
275
+ padding: str,
276
+ backgroundColor: this.contBgColor,
277
+ borderRadius: this.contRadius + 'rpx',
278
+ boxShadow: this.contShadow,
279
+ ...border,
280
+ }
281
+ },
282
+
283
+ itemStyleComp(){
284
+ let str = `${this.checkValue(this.itemPadding.top, 20)}rpx`;
285
+ str = `${str} ${this.checkValue(this.itemPadding.right, 0)}rpx`;
286
+ str = `${str} ${this.checkValue(this.itemPadding.bottom, 20)}rpx`;
287
+ str = `${str} ${this.checkValue(this.itemPadding.left, 0)}rpx`;
288
+
289
+ let border = {
290
+ borderWidth: '2rpx',
291
+ borderStyle: 'solid',
292
+ borderColor: '#eee',
293
+ }
294
+ if(this.itemBorder && this.itemBorder.type === 'Y') {
295
+ let value = this.itemBorder.value || {};
296
+ if(value.color) border.borderColor = value.color;
297
+ if(value.style) border.borderStyle = value.style;
298
+ if(value.width) border.borderWidth = value.width + 'rpx';
299
+ }
300
+ if(this.itemPStyle.color !== undefined) this.iconColor =this.itemPStyle.color
301
+ return {
302
+ padding: str,
303
+ backgroundColor: this.itemBgColor,
304
+ borderRadius: this.itemRadius + 'rpx',
305
+ marginRight: this.columnSpacing + 'rpx',
306
+ boxShadow: this.itemShadow,
307
+ fontSize: this.itemPStyle.fontSize || '28rpx',
308
+ color: `${this.itemPStyle.color || '#333'}`,
309
+ fontWeight: `${this.itemPStyle.fontWeight || 'normal'}`,
310
+ ...border
311
+ }
312
+ },
181
313
  },
182
314
  created() {
183
315
  this.backgroundColor = Color(this.warningColor).alpha(0.2).toString();
@@ -196,34 +328,43 @@ export default {
196
328
  init(container) {
197
329
  this.newLabel = getContainerPropsValue(container, "content.newLabel", []);
198
330
  this.isCard = getContainerPropsValue(container, "content.isCard", "Y");
199
- this.isYuanbao = getContainerPropsValue(
200
- container,
201
- "content.isYuanbao",
202
- "Y"
203
- );
204
- this.isIntegral = getContainerPropsValue(
205
- container,
206
- "content.isIntegral",
207
- "Y"
208
- );
209
- this.cardPath = getContainerPropsValue(container, "content.cardPath", {
210
- value: "",
211
- }).value;
212
-
213
- this.yuanbaoPath = getContainerPropsValue(
214
- container,
215
- "content.yuanbaoPath",
216
- { value: "" }
217
- ).value;
218
-
219
- this.integralPath = getContainerPropsValue(
220
- container,
221
- "content.integralPath",
222
- { value: "" }
223
- ).value;
331
+ this.isYuanbao = getContainerPropsValue(container, "content.isYuanbao", "Y");
332
+ this.isIntegral = getContainerPropsValue(container, "content.isIntegral", "Y");
333
+ this.accountName = getContainerPropsValue(container, "content.accountName", "我的账户");
334
+ this.rowSpacing = Number(getContainerPropsValue(container, "content.rowSpacing", 10));
335
+ this.columnSpacing = Number(getContainerPropsValue(container, "content.columnSpacing", 36));
336
+ this.bodyBgColor = getContainerPropsValue(container, "content.bodyBgColor", 'rgba(0,0,0,0)');
337
+ this.bodyPadding = getContainerPropsValue(container, "content.bodyPadding", {});
338
+ this.bodyMargin = getContainerPropsValue(container, "content.bodyMargin", {});
339
+ this.bodyRadius = getContainerPropsValue(container, "content.bodyRadius", '0');
340
+
341
+ //标题
342
+ this.titleStyle = getContainerPropsValue(container, 'content.titleStyle', {});
343
+ this.titleMargin = getContainerPropsValue(container, 'content.titleMargin', {})
344
+
345
+ //content
346
+ this.contPadding = getContainerPropsValue(container, "content.contPadding", {});
347
+ this.contBgColor = getContainerPropsValue(container, "content.contBgColor", 'rgba(0,0,0,0)');
348
+ this.contRadius = getContainerPropsValue(container, "content.contRadius", '10');
349
+ this.contBorder = getContainerPropsValue(container, "content.contBorder", {});
350
+ this.contShadow = this.getXdShadow({width:20, color:'rgba(0,0,0,.3)'},getContainerPropsValue(container, 'content.contShadow', {}))
351
+
352
+
353
+ //item
354
+ this.itemPadding = getContainerPropsValue(container, 'content.itemPadding', {});
355
+ this.itemBgColor = getContainerPropsValue(container, 'content.itemBgColor', 'rgba(0,0,0,0)');
356
+ this.itemRadius = getContainerPropsValue(container, 'content.itemRadius', '10');
357
+ this.itemShadow = this.getXdShadow({width:20, color:'rgba(0,0,0,.3)'},getContainerPropsValue(container, 'content.itemShadow', {}))
358
+ this.itemBorder = getContainerPropsValue(container, "content.itemBorder", {});
359
+ this.itemPStyle = getContainerPropsValue(container, "content.itemStyle", {});
360
+
361
+ //高级
362
+ this.cardPath = getContainerPropsValue(container, "content.cardPath", {value: "",}).value;
363
+ this.yuanbaoPath = getContainerPropsValue(container, "content.yuanbaoPath", { value: "" }).value;
364
+ this.integralPath = getContainerPropsValue(container, "content.integralPath", { value: "" }).value;
224
365
  },
225
366
  handleJumpTo(item) {
226
- console.log(item, "ppppp");
367
+ if(this.$configProject.isPreview) return;
227
368
  switch (item.value) {
228
369
  case "card":
229
370
  this.$xdUniHelper.navigateTo({
@@ -257,22 +398,20 @@ export default {
257
398
  .jfb-base-wallet {
258
399
  &__body {
259
400
  &-title {
260
- padding: 20rpx;
401
+ min-height: 64rpx;
402
+ line-height: 64rpx;
261
403
  }
262
404
  &-type {
263
405
  display: flex;
264
406
  border-radius: 20rpx;
265
407
  background: rgba(255, 255, 255, 1);
266
408
  border: 1rpx solid rgba(238, 238, 238, 1);
267
- padding: 32rpx 48rpx 32rpx 48rpx;
268
- margin: 0 20rpx 0;
269
409
 
270
410
  &.notice {
271
411
  font-size: 26rpx;
272
412
  }
273
413
 
274
414
  &-item {
275
- color: #999999;
276
415
  flex: 1;
277
416
  display: flex;
278
417
  flex-direction: column;
@@ -280,12 +419,9 @@ export default {
280
419
  justify-content: center;
281
420
  font-size: 24rpx;
282
421
  border: 2rpx solid #eeeeee;
283
- border-radius: 16rpx;
284
- background: #ffffff;
285
- padding: 16rpx 0;
286
- margin-right: 36rpx;
287
- & > view:nth-child(2) {
288
- margin-top: 12rpx;
422
+
423
+ &:last-child{
424
+ margin-right: 0!important;
289
425
  }
290
426
  }
291
427
  }
@@ -171,7 +171,6 @@ export default {
171
171
  }
172
172
 
173
173
  //保存到vuex
174
- console.log('setStyleCommon',this)
175
174
  this.setStyleCommon(this.styles);
176
175
 
177
176
  //初始化风格
@@ -207,24 +206,53 @@ export default {
207
206
  mounted() {
208
207
  let that = this;
209
208
  this.autoHideMask();
209
+
210
+ //调试模式设置值
211
+ let zIndex = 4;
212
+ if( this['hideMask'] === true) zIndex = -1;
213
+ if(this['closeMask'] === true) zIndex = -1;
214
+ if(this['closeMask'] === false) zIndex = 4;
215
+ document.querySelector(':root').style.setProperty('--preview-z-index', zIndex);
216
+
217
+ //生产元素
218
+ if(this.$configProject.isPreview) {
219
+ if(zIndex ===-1) {
220
+ let parentRoot = document.querySelector(`.${this.cssRoot}`);
221
+ for(let i=0; i < 4;i++) {
222
+ let span = document.createElement('span');
223
+ span.className = 'xd-preview-line xd-preview-line-' + i;
224
+ parentRoot.appendChild(span);
225
+ }
226
+ }
227
+
228
+ }
229
+
210
230
  if (this.$configProject.isPreview && this.selfMask !== true ) {
211
- this.$nextTick(()=>{
212
- function handle() {
213
- let elx = that.$el.getElementsByClassName(`${that.cssRoot}__body`);
214
- if (elx.length === 0) {
215
- setTimeout(() => {
216
- handle()
217
- }, 50)
218
- } else {
219
- let len = elx.length;
220
- for (let i = 0; i < len; i++) {
221
- if (!elx.item(i).classList.contains('isGPreview')) {
222
- elx.item(i).classList.add("isGPreview");
223
- }
231
+ //启动关闭
232
+ if(this['closeMask'] === true) {
233
+ return;
234
+ }
235
+
236
+ function handle() {
237
+ let elx = that.$el.getElementsByClassName(`${that.cssRoot}__body`);
238
+ if (elx.length === 0) {
239
+ setTimeout(() => {
240
+ handle()
241
+ }, 50)
242
+ }
243
+ else {
244
+ let len = elx.length;
245
+ for (let i = 0; i < len; i++) {
246
+ if (!elx.item(i).classList.contains('isGPreview')) {
247
+ elx.item(i).classList.add("isGPreview");
224
248
  }
225
249
  }
226
250
  }
227
- handle();
251
+ }
252
+ this.$nextTick(()=>{
253
+ setTimeout(()=>{
254
+ handle();
255
+ },200)
228
256
  });
229
257
  }
230
258
 
@@ -261,10 +289,13 @@ export default {
261
289
  autoHideMask(){
262
290
  if(this.$configProject.isPreview && this.hideMask === true){
263
291
  this.$nextTick(()=>{
264
- let className = this.$el.classList;
265
- if(!className.contains('gHideMask')) {
266
- className.add("gHideMask")
267
- }
292
+ setTimeout(()=>{
293
+ let className = this.$el.classList;
294
+ if(!className.contains('gHideMask')) {
295
+ className.add("gHideMask")
296
+ }
297
+ },200)
298
+
268
299
  })
269
300
  }
270
301
  },
@@ -459,26 +490,171 @@ export default {
459
490
  return Number(value || 0);
460
491
  },
461
492
 
493
+ /**
494
+ * @description 获取图片链接
495
+ * @param image
496
+ * @return {string}
497
+ */
498
+ getBgImage(image = {}){
499
+ let bg = 'none';
500
+ if(this.$xdUniHelper.checkVarType(image) === 'object') {
501
+ if(!this.$xdUniHelper.isEmpty(image)) {
502
+ return `url(${getServiceUrl(image.url)})`
503
+ }
504
+ }
505
+ return bg
506
+ },
507
+
508
+ //阴影样式生成
462
509
  getXdShadow(defaultObj, newObj){
463
510
  if(newObj.type === 'N' || this.$xdUniHelper.isEmpty(newObj)) return `0 0 0 rgba(0,0,0,0)`;
511
+ return this.getXdBorder(defaultObj,newObj,'shadow')
512
+ },
513
+
514
+ //边框样式生成
515
+ getXdBorder(defaultObj, newObj, type='border'){
516
+ if(newObj.type === 'N' || this.$xdUniHelper.isEmpty(newObj)) return `0`;
464
517
  let width = defaultObj.width;
465
518
  let color = defaultObj.color;
466
- if(newObj.value !== null) {
467
- if(newObj.value.width) width = newObj.value.width;
468
- if(newObj.value.color) color = newObj.value.color
469
- }
519
+ let style = defaultObj.style || 'solid';
520
+ let value = newObj.value || {};
521
+ if(value.width) width = value.width;
522
+ if(value.color) color = value.color;
523
+ if(value.style) style = value.style;
524
+ if(type === 'border') return `${width}rpx ${style} ${color}`
470
525
  return `0 0 ${width}rpx ${color}`;
471
526
  },
472
527
 
473
- getXdBorder(defaultObj, newObj){
474
- if(newObj.type === 'N' || this.$xdUniHelper.isEmpty(newObj)) return `0`
475
- let width = defaultObj.width;
476
- let color = defaultObj.color;
477
- if(newObj.value !== null) {
478
- if(newObj.value.width) width = newObj.value.width
479
- if(newObj.value.color) color = newObj.value.color
528
+ getBorderCompatibleOldStyle(newObj={}, oldObj={}, type='border'){
529
+ let contWidth = 0;
530
+ let contColor = 'rgba(0.0.0.0)';
531
+ let contrStyle = 'solid';
532
+
533
+ if(oldObj.type === 'Y') {
534
+ if(oldObj.width !== undefined) contWidth = oldObj.width;
535
+ if(oldObj.color !== undefined) contColor = oldObj.color;
536
+ }
537
+ if(newObj.type === 'Y') {
538
+ let value = newObj.value || {};
539
+ if(value.color) contColor = value.color;
540
+ if(value.style) contrStyle = value.style;
541
+ if(value.width) contWidth = value.width;
542
+ }
543
+
544
+ if(type === 'border'){
545
+ if(oldObj.type === 'N' && newObj.type === 'N') return 0;
546
+ return `${contWidth}rpx ${contrStyle} ${contColor}`
547
+ }
548
+ return `0 0 ${contWidth}rpx ${contColor}` ;
549
+ },
550
+
551
+ getShadowCompatibleOldStyle(newShadow={},oldShadow={}){
552
+ return this.getBorderCompatibleOldStyle(newShadow,oldShadow, 'shadow')
553
+ },
554
+
555
+ /**
556
+ * @description 获取边框或投影宽度值
557
+ * @param newObj {Object} border|shadow
558
+ * @param width {number|string} 老模式宽
559
+ * @param type {string} 老模式宽是否启用 Y/N
560
+ * @return {number}
561
+ */
562
+ getBorOrShWidth(newObj={}, {width, type}) {
563
+ let tempWidth = 0;
564
+ if(type === 'Y' && width !== undefined) tempWidth = width;
565
+ if(newObj.type === 'Y') {
566
+ let value = newObj.value || {};
567
+ if(value.width !== undefined) tempWidth = value.width;
568
+ }
569
+ return Number(tempWidth);
570
+ },
571
+
572
+ /**
573
+ * @description 解析切换元素属性方法
574
+ * @param newObj
575
+ * @param fontSize {String} 默认字体大小, 格式:24rpx
576
+ * @param lineHeight {Number} 默认行高 格式:30
577
+ * @param color {String} 默认颜色
578
+ * @param bgColor {String} 默认背景色
579
+ * @param fontWeight {String} 字体粗线
580
+ * @param gradientColor {String} 渐变色 参考:https://www.colorzilla.com/gradient-editor/
581
+ * @param type {String} 获取样式类型: ''=>获取普通样式 act=>获取选中样式
582
+ * @return {{}}
583
+ */
584
+ getFontAndBgcStyle(newObj, {fontSize, lineHeight, color, bgColor, fontWeight,gradientColor},type='' ){
585
+ let temp = {};
586
+ let colorKey = 'color',
587
+ fontSizeKey='fontSize',
588
+ lineHeightKey = 'lineHeight',
589
+ fontWeightKey = 'fontWeight',
590
+ bgColorKey = 'bgColor',
591
+ gradientColorKey = 'gradientColor';
592
+ if(type === 'act') {
593
+ colorKey = `actColor`;
594
+ fontSizeKey='actFontSize';
595
+ lineHeightKey = 'actLineHeight';
596
+ fontWeightKey = 'actFontWeight';
597
+ bgColorKey = 'actBgColor';
598
+ gradientColorKey = 'actGradientColor';
599
+ }
600
+ if(newObj[colorKey] || color) temp['color'] = newObj[colorKey] || color;
601
+ if(newObj[fontSizeKey] || color) temp['fontSize'] = newObj[fontSizeKey] || fontSize;
602
+ if(newObj[lineHeightKey] || lineHeight) temp['lineHeight'] = (newObj[lineHeightKey] || lineHeight) + 'rpx';
603
+ if(newObj[fontWeightKey] || fontWeight) temp['fontWeight'] = newObj[fontWeightKey] || fontWeight;
604
+ if(newObj[bgColorKey] || bgColor) temp['backgroundColor'] = newObj[bgColorKey] || bgColor;
605
+ if(newObj[gradientColorKey] || gradientColor) temp['backgroundImage'] = newObj[gradientColorKey] || gradientColor;
606
+ return temp;
607
+
608
+ },
609
+
610
+ /**
611
+ * @description 数据
612
+ * @param marAndPadding {Object}
613
+ * @param defVale {Object|number}
614
+ */
615
+ getMarginAndPadding(marAndPadding, defVale){
616
+ let top = 0, left=0,bottom=0,right=0;
617
+ if(typeof defVale === 'number') {
618
+ top=defVale;
619
+ left=defVale;
620
+ bottom=defVale;
621
+ right=defVale;
622
+ }
623
+ if(this.$xdUniHelper.checkVarType(defVale) === 'object') {
624
+ if(defVale.top !== undefined) top = defVale.top;
625
+ if(defVale.right !== undefined) right = defVale.right;
626
+ if(defVale.bottom !== undefined) bottom = defVale.bottom;
627
+ if(defVale.left !== undefined) left = defVale.left;
628
+ }
629
+ let str = `${this.checkValue(marAndPadding.top, top)}rpx`;
630
+ str = `${str} ${this.checkValue(marAndPadding.right, right)}rpx`;
631
+ str = `${str} ${this.checkValue(marAndPadding.bottom, bottom)}rpx`;
632
+ str = `${str} ${this.checkValue(marAndPadding.left, left)}rpx`;
633
+ return str
634
+ },
635
+
636
+ /**
637
+ * @description 获取商品显示规则
638
+ * @param container
639
+ * @return {{isAddCart: *, isShowDiscount: *, isPrice: *, is_show_brand: *, showActivityPrice: *, isShowTag: *, differ: *}}
640
+ */
641
+ getProductConfig(container){
642
+ let is_show_brand = getContainerPropsValue(container, "content.is_show_brand", "N");
643
+ let isPrice = getContainerPropsValue(container, "content.isPrice", "Y");
644
+ let isShowDiscount = getContainerPropsValue(container, "content.isShowDiscount", "Y");
645
+ let differ = getContainerPropsValue(container, "content.differ", 1);
646
+ let showActivityPrice = getContainerPropsValue(container, "content.showActivityPrice", "N");
647
+ let isShowTag = getContainerPropsValue(container, "content.isShowTag", "Y");
648
+ let isAddCart = getContainerPropsValue(container, "content.isAddCart", "N");
649
+ return {
650
+ isShowDiscount: isShowDiscount,
651
+ isPrice: isPrice,
652
+ isAddCart: isAddCart,
653
+ is_show_brand: is_show_brand,
654
+ showActivityPrice:showActivityPrice,
655
+ isShowTag : isShowTag,
656
+ differ: differ,
480
657
  }
481
- return `${width}rpx solid ${color}`;
482
658
  },
483
659
 
484
660
  getUrlCallback(path){
@@ -591,21 +767,20 @@ export default {
591
767
  return redirect_data.path
592
768
  }
593
769
  else {
594
- return `//${projectAttr.host}/${redirect_data.frontPath}`
770
+ return `//${projectAttr.host}${redirect_data.frontPath}`
595
771
  }
596
772
 
597
773
  }
598
774
  //#endif
599
775
 
600
776
  //#ifdef MP-WEIXIN
601
-
602
- let dir = this.getUrlHasSpStrDIR(redirect_data.path);
777
+ let dir = redirect_data.dir;
603
778
  if(redirect_data['appType'] === 'wxmp'){
604
779
  if(projectAttr.deploy_dir === dir) return redirect_data.path;
605
780
  else return null;
606
781
  }
607
782
  else if(redirect_data['appType'] === 'h5'){
608
-
783
+ return `https://${projectAttr.host}${redirect_data.frontPath}`
609
784
  }
610
785
  else return null;
611
786
  //#endif