jufubao-base 1.0.145-beta3 → 1.0.145

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.145-beta3",
3
+ "version": "1.0.145",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -18,7 +18,7 @@
18
18
  <!-- #endif -->
19
19
  <view class="jfb-base-card__body">
20
20
  <view class="jfb-base-card__body-cut">
21
- <template v-if="isQrCode">
21
+ <template v-if="isWx">
22
22
  <view
23
23
  class="jfb-base-card__body-cut-item"
24
24
  @click="handleScan"
@@ -226,11 +226,10 @@ import JfbBaseCardMixin from "./JfbBaseCardMixin";
226
226
  import componentsMixins from "@/mixins/componentsMixins";
227
227
  import extsMixins from "@/mixins/extsMixins";
228
228
  import { mapState, mapActions } from "vuex";
229
- import { getContainerPropsValue, isWechat,isQrCode } from "@/utils/xd.base";
229
+ import { getContainerPropsValue, isWechat } from "@/utils/xd.base";
230
230
  import XdNoticeBar from "@/components/XdNoticeBar/XdNoticeBar";
231
231
  import { Base64 } from "js-base64";
232
232
  const Color = require("color");
233
-
234
233
  export default {
235
234
  name: "JfbBaseCard",
236
235
  components: {
@@ -294,7 +293,7 @@ export default {
294
293
  isPreview: false,
295
294
  noticeStatus: false,
296
295
 
297
- isQrCode: true,
296
+ isWx: true,
298
297
  cutIndex: 1,
299
298
  tabIndex: 1,
300
299
  offsetIndex:0,//第几页
@@ -341,9 +340,10 @@ export default {
341
340
  this.init(this.container);
342
341
  this.noticeBackgroundColor = Color(this.warningColor).alpha(0.2).toString();
343
342
  this.isPreview = this.$configProject.isPreview;
344
- this.isQrCode = isQrCode(this);
345
343
 
346
344
  //#ifdef H5
345
+ this.isWx = this.isPreview || isWechat();
346
+
347
347
  if (!this.$configProject.isPreview) {
348
348
  jfbRootExec("getH5WxAuthorize", {
349
349
  vm: this,
@@ -21,7 +21,6 @@
21
21
  <view
22
22
  class="scan_icon"
23
23
  @click="doScanCode"
24
- v-if="isQrCode"
25
24
  >
26
25
  <xd-font-icon icon="iconsaoma1"></xd-font-icon>
27
26
  </view>
@@ -59,7 +58,7 @@
59
58
  import XdButton from "@/components/XdButton/XdButton"
60
59
  import { jfbRootExec } from "@/utils/xd.event";
61
60
  import JfbBaseCardBindV2Mixin from "./JfbBaseCardBindV2Mixin";
62
- import { getContainerPropsValue,isQrCode } from "@/utils/xd.base";
61
+ import { getContainerPropsValue } from "@/utils/xd.base";
63
62
  import componentsMixins from "@/mixins/componentsMixins";
64
63
  import extsMixins from "@/mixins/extsMixins";
65
64
  import { mapState } from "vuex"
@@ -92,7 +91,6 @@
92
91
  validImageAPIUrl: "",
93
92
  backUrl: "",
94
93
  inCallbackUrlOrg:'',//是否带有回调地址
95
- isQrCode: false,
96
94
  }
97
95
  },
98
96
  watch: {
@@ -101,7 +99,6 @@
101
99
  }
102
100
  },
103
101
  created() {
104
- this.isQrCode = isQrCode(this)
105
102
  this.init(this.container);
106
103
  this.validImageAPIUrl = this.brandInfo['api_host'] + '/common/v1/valid_code/image/show'
107
104
 
@@ -179,6 +176,7 @@
179
176
  success: res => {
180
177
  let result = res.resultStr;
181
178
  this.cardForm.card_qrcode = result;
179
+
182
180
  jfbRootExec("qrCardBind", {
183
181
  vm: this,
184
182
  data: {
@@ -18,7 +18,7 @@
18
18
  <!-- #endif -->
19
19
  <view class="jfb-base-card-entry__body">
20
20
  <view class="jfb-base-card-entry__body-cut">
21
- <template v-if="isQrCode">
21
+ <template v-if="isWx">
22
22
  <view
23
23
  class="jfb-base-card-entry__body-cut-item"
24
24
  @click="handleScan"
@@ -383,7 +383,7 @@ import extsMixins from "@/mixins/extsMixins";
383
383
  import colorCardMixins from "@/mixins/colorCardMixins";
384
384
  import cardListMixins from "@/mixins/cardListMixins";
385
385
  import { mapState, mapActions } from "vuex";
386
- import { getContainerPropsValue, isWechat,isQrCode } from "@/utils/xd.base";
386
+ import { getContainerPropsValue, isWechat } from "@/utils/xd.base";
387
387
  import XdNoticeBar from "@/components/XdNoticeBar/XdNoticeBar";
388
388
  import { Base64 } from "js-base64";
389
389
  const Color = require("color");
@@ -434,6 +434,7 @@ export default {
434
434
  noticeStatus: false,
435
435
  loadingCardList: true,
436
436
 
437
+ isWx: true,
437
438
  cutIndex: 1,
438
439
  tabIndex: 1,
439
440
  isBack: null, //是否使用返回键
@@ -453,7 +454,6 @@ export default {
453
454
  showDisabled: 'Y',
454
455
  showCardList: false,
455
456
  showIndex:false,
456
- isQrCode: false,
457
457
 
458
458
  //活动
459
459
  dialogEvent: false,
@@ -466,7 +466,7 @@ export default {
466
466
  this.isPreview = this.$configProject.isPreview;
467
467
 
468
468
  //#ifdef H5
469
- this.isQrCode = isQrCode(this);
469
+ this.isWx = this.isPreview || isWechat();
470
470
  if (!this.$configProject.isPreview) {
471
471
  jfbRootExec("getH5WxAuthorize", {
472
472
  vm: this,
@@ -30,7 +30,8 @@
30
30
  type="primary"
31
31
  radius="20rpx"
32
32
  @click="doLoginAuth"
33
- >{{h5FastLoginName}}</xd-button>
33
+ >快捷登录</xd-button
34
+ >
34
35
  <!-- #endif -->
35
36
  <!--#ifdef MP-->
36
37
  <xd-button
@@ -49,7 +50,8 @@
49
50
  type="primary"
50
51
  radius="20rpx"
51
52
  @click="doLoginAccount"
52
- >账号登录</xd-button>
53
+ >账号登录
54
+ </xd-button>
53
55
  </view>
54
56
 
55
57
  <view class="protocol">
@@ -215,9 +217,7 @@ import {
215
217
  getAllPath,
216
218
  getDomainAllPath,
217
219
  getLocalJumpOutSiteCallbackUrl,
218
- isThirdLogin
219
220
  } from "@/utils/xd.base";
220
- import icb from "@/common/ICB.SDK";
221
221
 
222
222
  export default {
223
223
  name: "JfbBaseLogin",
@@ -236,7 +236,6 @@ export default {
236
236
  //体验模式
237
237
  dialogPreview: false,
238
238
  previewAccout: '',
239
- h5FastLoginName:'快捷登录',
240
239
 
241
240
  showStep: 1,
242
241
  panel_1_checked: "",
@@ -317,7 +316,7 @@ export default {
317
316
  this.init(this.container);
318
317
  this.base = this.jfbAuthorize.getBasePath(this);
319
318
  this.site_logo = getServiceUrl(this.projectAttr["site_logo"]);
320
- this.$xdLog.setProject('JfbBaseLogin', 'JfbBaseLogin.create.done');
319
+ this.$xdLog.setProject('JfbBaseLogin', 'JfbBaseLogin.create.done')
321
320
  },
322
321
 
323
322
  methods: {
@@ -377,6 +376,21 @@ export default {
377
376
  this.$xdLog.setARMSError(error);
378
377
  }
379
378
  //#endif
379
+
380
+ // if (options.isDebug === "1") {
381
+ // getAllPath(this, "main/play/index");
382
+ // getDomainAllPath(this, "main/play/index");
383
+ // getLocalJumpOutSiteCallbackUrl(
384
+ // this,
385
+ // { customParams: 1 },
386
+ // false,
387
+ // "main/play/index"
388
+ // );
389
+ //
390
+ // getAllPath(this);
391
+ // getDomainAllPath(this);
392
+ // getLocalJumpOutSiteCallbackUrl(this, { customParams: 1 }, false);
393
+ // }
380
394
  },
381
395
 
382
396
  /**
@@ -422,11 +436,6 @@ export default {
422
436
  }
423
437
  });
424
438
  if (!this.phoneLogin) this.accountLoginType = "pwd";
425
- };
426
-
427
- //工行处理
428
- if(isThirdLogin().isThird) {
429
- this.hasAuthLogin = true;
430
439
  }
431
440
  },
432
441
 
@@ -476,7 +485,8 @@ export default {
476
485
  //需要授权操作
477
486
  if (res.auth_code) {
478
487
  let { redirect_url, callback_url } = this;
479
- if (redirect_url) redirect_url = redirect_url;
488
+ if (redirect_url)
489
+ redirect_url = redirect_url;
480
490
  let url = Base64.encodeURI(
481
491
  redirect_url || callback_url || this.settings.index
482
492
  );
@@ -540,6 +550,7 @@ export default {
540
550
  };
541
551
 
542
552
  this.$xdLog.setProject('JfbBaseLogin', 'JfbBaseLogin.onJfbLoad.loading..');
553
+
543
554
  jfbRootExec("listSiteProvider", {
544
555
  vm: this,
545
556
  data: params,
@@ -592,29 +603,11 @@ export default {
592
603
  setAccountLoginType(type) {
593
604
  this.accountLoginType = type;
594
605
  },
595
-
596
606
  //h5授权登录
597
607
  doLoginAuth() {
598
608
  if(this.isFastLoginStatus) return;
599
609
  this.isFastLoginStatus = true;
600
-
601
- //工行处理
602
- if(isThirdLogin().isThird){
603
- // const icb = require('@/common/ICB.SDK');
604
- // icb.qrCode((res)=>{
605
- // console.log(res)
606
- // })
607
-
608
- // const icb = require('@/common/ICB.SDK')
609
- // icb.login((res)=>{
610
- // alert(JSON.stringify(res))
611
- // console.log(res);
612
- // debugger
613
- // })
614
- return;
615
- }
616
-
617
- const { redirect_url } = this.quickLogin;
610
+ const { provider_id, login_platform_code, is_redirect, redirect_url } = this.quickLogin;
618
611
  location.href = redirect_url;
619
612
  },
620
613
 
@@ -1,78 +0,0 @@
1
- 'use strict';
2
-
3
- const ICB_SDK = require('@/common/paysdk/ICB.SDK');
4
-
5
- class ICB {
6
- constructor() {
7
- this.ICB_APP = ICB_SDK;
8
- this.fail(false)
9
- }
10
-
11
- /**
12
- * @description 获取版本号
13
- * @return {*}
14
- */
15
- version(){
16
- return this.ICB_APP.elifeVer()
17
- }
18
-
19
- fail(notExc=true){
20
- // if(typeof window.WebViewJavascriptBridge === "undefined"){
21
- // console.warn('初始化工商银行e生活SDK失败');
22
- // if(notExc) throw new Error('初始化工商银行e生活SDK失败');
23
- // }
24
- }
25
-
26
- /**
27
- * @description 获取用户登录方式
28
- * @param callback {Function} 成功回调函数
29
- */
30
- login(callback){
31
- this.fail();
32
-
33
- this.ICB_APP.merLogin(callback)
34
- }
35
-
36
- /**
37
- * @description 第三方显示或隐藏tabBar
38
- * @param show 默认值:true
39
- */
40
- showBar(show = true){
41
- this.fail();
42
- this.ICB_APP.showToolBar(show);
43
- }
44
-
45
- /**
46
- * @description 第三方返回APP
47
- */
48
- back(){
49
- this.fail();
50
- this.ICB_APP.back();
51
- }
52
-
53
- /**
54
- * @description 拨打电话
55
- * @param tel 电话号码
56
- */
57
- callPhone(tel){
58
- if(!tel){
59
- console.warn(`拨打电话号码不能为空,电话号码:${tel}`);
60
- throw new Error('拨打电话号码不能为空');
61
- }
62
- this.fail();
63
- this.ICB_APP.callPhoneNumber(tel);
64
- }
65
-
66
- /**
67
- * @description 是否隐藏第三方的头
68
- * @param show
69
- */
70
- showThirdNavigation(show = true){
71
- this.fail();
72
- if(show) this.ICB_APP.showThirdWebviewNavigation()
73
- else this.ICB_APP.hideThirdWebviewNavigation()
74
- }
75
-
76
- }
77
-
78
- module.exports = new ICB();