jufubao-base 1.0.56-beta2012 → 1.0.56-beta2014

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-base",
3
- "version": "1.0.56-beta2012",
3
+ "version": "1.0.56-beta2014",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -50,7 +50,7 @@
50
50
  "core-js": "^2.6.5",
51
51
  "flyio": "^0.6.2",
52
52
  "gxd-commands-bussiness": "^1.0.12",
53
- "gxd-uni-library-editx": "1.0.13-beta5",
53
+ "gxd-uni-library-editx": "1.0.13-beta7",
54
54
  "jweixin-module": "^1.6.0",
55
55
  "md5": "^2.3.0",
56
56
  "path-to-regexp": "^6.2.1",
@@ -44,4 +44,15 @@ module.exports = [
44
44
  },
45
45
  disabled: true,
46
46
  },
47
+ {
48
+ mapFnName: 'detailLoginEntryCardBind',
49
+ isRule: false,
50
+ title: '登录卡',
51
+ prefix: 'login',
52
+ path: '/card/v1/card-bind/login-card',
53
+ data: {
54
+ card_number: ['卡号', 'String', '必选'],
55
+ },
56
+ disabled: true,
57
+ },
47
58
  ];
@@ -55,9 +55,7 @@
55
55
  :key="index"
56
56
  >
57
57
  <view> {{ item.label }}: </view>
58
- <xd-unit v-if="item.type === 'price'&&info.unit==='点'" fontSize="28" :price="info[item.key]">
59
- </xd-unit>
60
- <view :style="{color:mainColor,fontWeight:500}" v-else-if="item.type === 'price'&&info.unit==='次'">
58
+ <view :style="{color:mainColor,fontWeight:500}" v-if="item.type === 'price'">
61
59
  {{ info[item.key] }}
62
60
  <text>{{info.unit}}</text>
63
61
  </view>
@@ -90,12 +88,13 @@
90
88
  <view
91
89
  class="jfb-base-card-detail-entry__body-business-title"
92
90
  >
93
- 业务板块
91
+ 进入业务板块
94
92
  </view>
95
93
  <view style="display:flex;align-content:center;justify-content:center">
96
94
  <view class="jfb-base-card-detail-entry__body-business-content">
97
95
  <view
98
96
  class="jfb-base-card-detail-entry__body-business-content-item"
97
+ @click="handleBindLogin(item)"
99
98
  v-for="(item,index) in info.site_entry_settings"
100
99
  :key="index">
101
100
  <view><image :src="item.image_url"></image></view>
@@ -216,6 +215,7 @@ export default {
216
215
  },
217
216
  computed: {
218
217
  ...mapState(["brandInfo"]),
218
+ jfbAuthorize: (state) => state.jfbAuthorize,
219
219
  prod_bottom() {
220
220
  return this.fixedStyle({height: 0, zIndex: 111});
221
221
  },
@@ -308,6 +308,9 @@ export default {
308
308
  return item
309
309
  })
310
310
  }
311
+ if(res.other_card_point===0 || res.card_point_type === 1) {
312
+ this.valueKey.splice(1,1)
313
+ }
311
314
  this.info = res;
312
315
  if(!this.$configProject.isPreview) {
313
316
  this.setInval(this.info.card_qrcode_expire);
@@ -369,6 +372,77 @@ export default {
369
372
  })
370
373
  .catch();
371
374
  }, time);
375
+ },
376
+ /**
377
+ * @description 已绑定卡登录
378
+ * @param item
379
+ */
380
+ handleBindLogin(entry) {
381
+ //卡券登陆
382
+ this.$xdShowLoading({});
383
+ jfbRootExec("detailLoginEntryCardBind", {
384
+ vm: this,
385
+ data: { card_number: this.info["card_number"] },
386
+ })
387
+ .then((res) => {
388
+ this.$xdHideLoading();
389
+ //#ifdef MP-WEIXIN
390
+ if (this.jfbAuthorize !== null) {
391
+ this.jfbAuthorize.setToken("card", res["card_token"], {
392
+ expires: res["card_expire_in"] / 60 / 60,
393
+ });
394
+ this.handleToApp(entry);
395
+ }
396
+ //#endif
397
+ if (this.$configProject.isPreview) {
398
+ console.log("handleBindLogin", "预览模式不跳转", this.inCallback);
399
+ }
400
+
401
+ else {
402
+ this.handleToApp(entry);
403
+ }
404
+ })
405
+ .catch((res) => {
406
+ this.$xdHideLoading();
407
+ });
408
+ },
409
+ toApp(url){
410
+ this.$xdUniHelper.redirectTo({
411
+ url
412
+ })
413
+ },
414
+ handleToApp(entry){
415
+ let item, redirectUrl;
416
+ try{
417
+ item = JSON.parse(entry['redirect_data']);
418
+ }catch (e) {
419
+ return;
420
+ }
421
+ const {dir, path, host} = item;
422
+ let nsp = Base64.encodeURI(JSON.stringify({business_code: entry['business_code']}));
423
+
424
+ //外站配置地址
425
+ if (entry.redirect_type === 'URL') {
426
+ if (item['path'].indexOf('?') === -1) {
427
+ redirectUrl = `${item['path']}?x-common=${nsp}&vs=${new Date().getTime()}`
428
+ } else redirectUrl = `${item['path']}&x-common=${nsp}&vs=${new Date().getTime()}`;
429
+ this.toApp(redirectUrl);
430
+ return;
431
+ }
432
+
433
+ //站内转换
434
+ let jumpUrl = item.path;
435
+ //#ifdef H5
436
+ jumpUrl = `//${host}/${dir}${path}`;
437
+ //#endif
438
+
439
+ if (item['fixed_business_code'] === '') {
440
+ redirectUrl = `${jumpUrl}?x-common=${nsp}&vs=${new Date().getTime()}`
441
+ }
442
+ else {
443
+ redirectUrl = `${jumpUrl}?x-common=${nsp}&vs=${new Date().getTime()}`
444
+ }
445
+ this.toApp(redirectUrl);
372
446
  },
373
447
  handleOnClose() {
374
448
  this.editShow = false;
@@ -542,13 +616,13 @@ export default {
542
616
  font-weight: 700;
543
617
  color: #fff;
544
618
  position: relative;
545
- height: unit(260,rpx);
619
+ min-height: unit(260,rpx);
546
620
 
547
621
  &-wrap {
548
622
  width: unit(700, rpx);
549
623
  border-radius: unit(16, rpx);
550
624
  background-size: 100%;
551
- height: 100%;
625
+ min-height: unit(260,rpx);
552
626
  display: flex;
553
627
  flex-direction: column;
554
628
  justify-content: center;
@@ -560,6 +634,11 @@ export default {
560
634
  align-content: center;
561
635
  padding-bottom: unit(32, rpx);
562
636
  padding-left: unit(40,rpx);
637
+
638
+ & > view:first-child {
639
+ flex-basis: unit(120,rpx);
640
+ flex-shrink: 0;
641
+ }
563
642
  }
564
643
  }
565
644
 
@@ -94,9 +94,7 @@
94
94
  :key="index"
95
95
  >
96
96
  <view> {{ item.label }}: </view>
97
- <xd-unit v-if="item.type === 'price'&&info.unit==='点'" fontSize="28" :price="info[item.key]">
98
- </xd-unit>
99
- <view :style="{color:mainColor,fontWeight:500}" v-else-if="item.type === 'price'&&info.unit==='次'">
97
+ <view :style="{color:mainColor,fontWeight:500}" v-if="item.type === 'price'">
100
98
  {{ info[item.key] }}
101
99
  <text>{{info.unit}}</text>
102
100
  </view>
@@ -111,7 +109,7 @@
111
109
  class="jfb-base-card-info-entry__body-business"
112
110
  >
113
111
  <view class="jfb-base-card-info-entry__body-business-title">
114
- 业务板块
112
+ 支持业务板块
115
113
  </view>
116
114
  <view
117
115
  style="
@@ -216,7 +214,23 @@ export default {
216
214
  },
217
215
  created() {},
218
216
  methods: {
219
- handleToLink(path) {
217
+ handleToLink() {
218
+ if(this.info.card_point===0) {
219
+ this.$xdConfirm({
220
+ $vm: this,
221
+ content: "票券余额为0,是否确认绑定?",
222
+ width: "80%",
223
+ success: (res) => {
224
+ if (res.confirm) {
225
+ this.handleToBind()
226
+ }
227
+ },
228
+ });
229
+ return
230
+ }
231
+ this.handleToBind()
232
+ },
233
+ handleToBind() {
220
234
  if (this.qrcode) {
221
235
  jfbRootExec("qrCardBindEntry", {
222
236
  vm: this,
@@ -318,6 +332,9 @@ export default {
318
332
  item['image_url'] = getServiceUrl(item['image_url'])
319
333
  return item
320
334
  })
335
+ }
336
+ if(res.other_card_point===0 || res.card_point_type === 1) {
337
+ this.valueKey.splice(1,1);
321
338
  }
322
339
  this.headerBg = this.getCardThemes(res.card_type_name);
323
340
  this.showInfo = true;
@@ -355,6 +372,9 @@ export default {
355
372
  return item
356
373
  })
357
374
  }
375
+ if(res.other_card_point===0 || res.card_point_type === 1) {
376
+ this.valueKey.splice(1,1);
377
+ }
358
378
  this.headerBg = this.getCardThemes(res.card_type_name);
359
379
  this.showInfo = true;
360
380
  this.showForm = false;
@@ -446,13 +466,13 @@ export default {
446
466
  font-weight: 700;
447
467
  color: #fff;
448
468
  position: relative;
449
- height: unit(260,rpx);
469
+ min-height: unit(260,rpx);
450
470
 
451
471
  &-wrap {
452
472
  width: unit(700, rpx);
453
473
  border-radius: unit(16, rpx);
454
474
  background-size: 100%;
455
- height: 100%;
475
+ min-height: unit(260,rpx);
456
476
  display: flex;
457
477
  flex-direction: column;
458
478
  justify-content: center;
@@ -464,6 +484,11 @@ export default {
464
484
  align-content: center;
465
485
  padding-bottom: unit(32, rpx);
466
486
  padding-left: unit(40,rpx);
487
+
488
+ & > view:first-child {
489
+ flex-basis: unit(120,rpx);
490
+ flex-shrink: 0;
491
+ }
467
492
  }
468
493
  }
469
494
 
@@ -16,7 +16,7 @@ export default {
16
16
  //@EndAttrData
17
17
 
18
18
  // #endif
19
- cssRoot: ''
19
+ cssRoot: 'jfb-base-card-info-entry'
20
20
  }
21
21
  },
22
22
  created() {
@@ -10,21 +10,21 @@ export default {
10
10
  data() {
11
11
  return {
12
12
  //#ifdef H5
13
-
13
+
14
14
  //@AttrData
15
15
  Attr:{}, //对外开发编辑属性
16
16
  //@EndAttrData
17
-
17
+
18
18
  // #endif
19
19
  cssRoot: 'jfb-base-card-merge-entry'
20
20
  }
21
21
  },
22
22
  created() {
23
-
23
+
24
24
  //@AttrDataCreated
25
25
  this.Attr = this.$xdUniHelper.customClone(Attr);
26
26
  //@EndAttrDataCreated
27
-
27
+
28
28
 
29
29
  },
30
30
  }
@@ -50,7 +50,7 @@
50
50
  <view>{{info.card_type_name}}</view>
51
51
  </view>
52
52
  <view
53
- style="padding-bottom: 0px"
53
+ style="padding-bottom: 20rpx"
54
54
  class="jfb-base-card-shift-entry__body-header-item"
55
55
  >
56
56
  <view>券号:</view>
@@ -71,10 +71,8 @@
71
71
  v-for="(item, index) in valueKey"
72
72
  :key="index"
73
73
  >
74
- <view> {{ item.label }}: </view>
75
- <xd-unit v-if="item.type === 'price'&&info.unit==='点'" fontSize="28" :price="info[item.key]">
76
- </xd-unit>
77
- <view :style="{color:mainColor,fontWeight:500}" v-else-if="item.type === 'price'&&info.unit==='次'">
74
+ <view> {{ item.label }}: </view>
75
+ <view :style="{color:mainColor,fontWeight:500}" v-if="item.type === 'price'">
78
76
  {{ info[item.key] }}
79
77
  <text>{{info.unit}}</text>
80
78
  </view>
@@ -106,10 +104,8 @@
106
104
  v-for="(item, index) in changeValueKey"
107
105
  :key="index"
108
106
  >
109
- <view> {{ item.label }}: </view>
110
- <xd-unit v-if="item.type === 'price'&&info.unit==='点'" fontSize="28" :price="info[item.key]">
111
- </xd-unit>
112
- <view :style="{color:mainColor,fontWeight:500}" v-else-if="item.type === 'price'&&info.unit==='次'">
107
+ <view> {{ item.label }}: </view>
108
+ <view :style="{color:mainColor,fontWeight:500}" v-if="item.type === 'price'">
113
109
  {{ info[item.key] }}
114
110
  <text>{{info.unit}}</text>
115
111
  </view>
@@ -297,6 +293,10 @@ export default {
297
293
  temp[key] = res[key];
298
294
  }
299
295
  });
296
+ if(res.other_card_point===0 || res.card_point_type === 1) {
297
+ this.valueKey.splice(1,1);
298
+ this.changeValueKey.splice(1,1)
299
+ }
300
300
  this.headerBg = this.getCardThemes(res);
301
301
  this.info = temp;
302
302
  })
@@ -329,19 +329,16 @@ export default {
329
329
  font-weight: 700;
330
330
  color: #fff;
331
331
  position: relative;
332
- height: unit(260,rpx);
332
+ min-height: unit(260,rpx);
333
333
 
334
334
  &__title {
335
335
  height: unit(56, rpx);
336
336
  display: flex;
337
337
  justify-content: flex-start;
338
338
  align-items: center;
339
- position: absolute;
340
- top: 0;
341
- left: 0;
339
+
342
340
 
343
341
  & > view {
344
- padding: 0 unit(80, rpx);
345
342
  font-size: unit(24, rpx);
346
343
  line-height: unit(56, rpx);
347
344
  background: rgba(102, 102, 102, 0.4);
@@ -356,7 +353,7 @@ export default {
356
353
  width: unit(700, rpx);
357
354
  border-radius: unit(16, rpx);
358
355
  background-size: 100%;
359
- height: 100%;
356
+ min-height: 100%;
360
357
  display: flex;
361
358
  flex-direction: column;
362
359
  justify-content: center;
@@ -368,6 +365,11 @@ export default {
368
365
  align-content: center;
369
366
  padding-bottom: unit(32, rpx);
370
367
  padding-left: unit(40,rpx);
368
+
369
+ & > view:first-child {
370
+ flex-basis: unit(120,rpx);
371
+ flex-shrink: 0;
372
+ }
371
373
  }
372
374
  }
373
375
 
@@ -10,21 +10,21 @@ export default {
10
10
  data() {
11
11
  return {
12
12
  //#ifdef H5
13
-
13
+
14
14
  //@AttrData
15
15
  Attr:{}, //对外开发编辑属性
16
16
  //@EndAttrData
17
-
17
+
18
18
  // #endif
19
19
  cssRoot: 'jfb-base-card-shift-entry'
20
20
  }
21
21
  },
22
22
  created() {
23
-
23
+
24
24
  //@AttrDataCreated
25
25
  this.Attr = this.$xdUniHelper.customClone(Attr);
26
26
  //@EndAttrDataCreated
27
-
27
+
28
28
 
29
29
  },
30
30
  }