jufubao-base 1.0.56-beta2013 → 1.0.56-beta2015

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-beta2013",
3
+ "version": "1.0.56-beta2015",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -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
  ];
@@ -88,12 +88,13 @@
88
88
  <view
89
89
  class="jfb-base-card-detail-entry__body-business-title"
90
90
  >
91
- 业务板块
91
+ 进入业务板块
92
92
  </view>
93
93
  <view style="display:flex;align-content:center;justify-content:center">
94
94
  <view class="jfb-base-card-detail-entry__body-business-content">
95
95
  <view
96
96
  class="jfb-base-card-detail-entry__body-business-content-item"
97
+ @click="handleBindLogin(item)"
97
98
  v-for="(item,index) in info.site_entry_settings"
98
99
  :key="index">
99
100
  <view><image :src="item.image_url"></image></view>
@@ -214,6 +215,7 @@ export default {
214
215
  },
215
216
  computed: {
216
217
  ...mapState(["brandInfo"]),
218
+ jfbAuthorize: (state) => state.jfbAuthorize,
217
219
  prod_bottom() {
218
220
  return this.fixedStyle({height: 0, zIndex: 111});
219
221
  },
@@ -370,6 +372,77 @@ export default {
370
372
  })
371
373
  .catch();
372
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);
373
446
  },
374
447
  handleOnClose() {
375
448
  this.editShow = false;
@@ -445,7 +518,7 @@ export default {
445
518
  },
446
519
  handleToShift() {
447
520
  this.$xdUniHelper.navigateTo({
448
- url: this.shift_url,
521
+ url: `${this.shift_url}?card_number=${this.info["card_number"]}`,
449
522
  });
450
523
  },
451
524
  onJfbBack(options) {
@@ -109,7 +109,7 @@
109
109
  class="jfb-base-card-info-entry__body-business"
110
110
  >
111
111
  <view class="jfb-base-card-info-entry__body-business-title">
112
- 业务板块
112
+ 支持业务板块
113
113
  </view>
114
114
  <view
115
115
  style="
@@ -42,7 +42,7 @@
42
42
  icon="iconzhuanhuanshitu"
43
43
  style="margin-right:10rpx"
44
44
  ></xd-font-icon>
45
- {{info.card_type_name}}
45
+ 转换的票券
46
46
  </view>
47
47
  </view>
48
48
  <view style="padding-top:40rpx" class="jfb-base-card-shift-entry__body-header-item">
@@ -107,7 +107,7 @@
107
107
  <view> {{ item.label }}: </view>
108
108
  <view :style="{color:mainColor,fontWeight:500}" v-if="item.type === 'price'">
109
109
  {{ info[item.key] }}
110
- <text>{{info.unit}}</text>
110
+ <text>点</text>
111
111
  </view>
112
112
  <view style="color: #333; font-weight: 500" v-else>
113
113
  {{ info[item.key] }}
@@ -297,7 +297,7 @@ export default {
297
297
  this.valueKey.splice(1,1);
298
298
  this.changeValueKey.splice(1,1)
299
299
  }
300
- this.headerBg = this.getCardThemes(res);
300
+ this.headerBg = this.getCardThemes(res.card_type_name);
301
301
  this.info = temp;
302
302
  })
303
303
  .catch((err) => {});
@@ -339,6 +339,7 @@ export default {
339
339
 
340
340
 
341
341
  & > view {
342
+ padding: 0 unit(80, rpx);
342
343
  font-size: unit(24, rpx);
343
344
  line-height: unit(56, rpx);
344
345
  background: rgba(102, 102, 102, 0.4);