jufubao-base 1.0.145-beta2 → 1.0.145-beta3
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 +1 -1
- package/src/common/ICB.SDK.js +78 -0
- package/src/components/JfbBaseCard/JfbBaseCard.vue +5 -5
- package/src/components/JfbBaseCardBindV2/JfbBaseCardBindV2.vue +4 -2
- package/src/components/JfbBaseCardEntry/JfbBaseCardEntry.vue +4 -4
- package/src/components/JfbBaseLogin/JfbBaseLogin.vue +31 -24
package/package.json
CHANGED
|
@@ -0,0 +1,78 @@
|
|
|
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();
|
|
@@ -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="
|
|
21
|
+
<template v-if="isQrCode">
|
|
22
22
|
<view
|
|
23
23
|
class="jfb-base-card__body-cut-item"
|
|
24
24
|
@click="handleScan"
|
|
@@ -226,10 +226,11 @@ 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 } from "@/utils/xd.base";
|
|
229
|
+
import { getContainerPropsValue, isWechat,isQrCode } 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
|
+
|
|
233
234
|
export default {
|
|
234
235
|
name: "JfbBaseCard",
|
|
235
236
|
components: {
|
|
@@ -293,7 +294,7 @@ export default {
|
|
|
293
294
|
isPreview: false,
|
|
294
295
|
noticeStatus: false,
|
|
295
296
|
|
|
296
|
-
|
|
297
|
+
isQrCode: true,
|
|
297
298
|
cutIndex: 1,
|
|
298
299
|
tabIndex: 1,
|
|
299
300
|
offsetIndex:0,//第几页
|
|
@@ -340,10 +341,9 @@ export default {
|
|
|
340
341
|
this.init(this.container);
|
|
341
342
|
this.noticeBackgroundColor = Color(this.warningColor).alpha(0.2).toString();
|
|
342
343
|
this.isPreview = this.$configProject.isPreview;
|
|
344
|
+
this.isQrCode = isQrCode(this);
|
|
343
345
|
|
|
344
346
|
//#ifdef H5
|
|
345
|
-
this.isWx = this.isPreview || isWechat();
|
|
346
|
-
|
|
347
347
|
if (!this.$configProject.isPreview) {
|
|
348
348
|
jfbRootExec("getH5WxAuthorize", {
|
|
349
349
|
vm: this,
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
<view
|
|
22
22
|
class="scan_icon"
|
|
23
23
|
@click="doScanCode"
|
|
24
|
+
v-if="isQrCode"
|
|
24
25
|
>
|
|
25
26
|
<xd-font-icon icon="iconsaoma1"></xd-font-icon>
|
|
26
27
|
</view>
|
|
@@ -58,7 +59,7 @@
|
|
|
58
59
|
import XdButton from "@/components/XdButton/XdButton"
|
|
59
60
|
import { jfbRootExec } from "@/utils/xd.event";
|
|
60
61
|
import JfbBaseCardBindV2Mixin from "./JfbBaseCardBindV2Mixin";
|
|
61
|
-
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
62
|
+
import { getContainerPropsValue,isQrCode } from "@/utils/xd.base";
|
|
62
63
|
import componentsMixins from "@/mixins/componentsMixins";
|
|
63
64
|
import extsMixins from "@/mixins/extsMixins";
|
|
64
65
|
import { mapState } from "vuex"
|
|
@@ -91,6 +92,7 @@
|
|
|
91
92
|
validImageAPIUrl: "",
|
|
92
93
|
backUrl: "",
|
|
93
94
|
inCallbackUrlOrg:'',//是否带有回调地址
|
|
95
|
+
isQrCode: false,
|
|
94
96
|
}
|
|
95
97
|
},
|
|
96
98
|
watch: {
|
|
@@ -99,6 +101,7 @@
|
|
|
99
101
|
}
|
|
100
102
|
},
|
|
101
103
|
created() {
|
|
104
|
+
this.isQrCode = isQrCode(this)
|
|
102
105
|
this.init(this.container);
|
|
103
106
|
this.validImageAPIUrl = this.brandInfo['api_host'] + '/common/v1/valid_code/image/show'
|
|
104
107
|
|
|
@@ -176,7 +179,6 @@
|
|
|
176
179
|
success: res => {
|
|
177
180
|
let result = res.resultStr;
|
|
178
181
|
this.cardForm.card_qrcode = result;
|
|
179
|
-
|
|
180
182
|
jfbRootExec("qrCardBind", {
|
|
181
183
|
vm: this,
|
|
182
184
|
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="
|
|
21
|
+
<template v-if="isQrCode">
|
|
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 } from "@/utils/xd.base";
|
|
386
|
+
import { getContainerPropsValue, isWechat,isQrCode } 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,7 +434,6 @@ export default {
|
|
|
434
434
|
noticeStatus: false,
|
|
435
435
|
loadingCardList: true,
|
|
436
436
|
|
|
437
|
-
isWx: true,
|
|
438
437
|
cutIndex: 1,
|
|
439
438
|
tabIndex: 1,
|
|
440
439
|
isBack: null, //是否使用返回键
|
|
@@ -454,6 +453,7 @@ export default {
|
|
|
454
453
|
showDisabled: 'Y',
|
|
455
454
|
showCardList: false,
|
|
456
455
|
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.
|
|
469
|
+
this.isQrCode = isQrCode(this);
|
|
470
470
|
if (!this.$configProject.isPreview) {
|
|
471
471
|
jfbRootExec("getH5WxAuthorize", {
|
|
472
472
|
vm: this,
|
|
@@ -30,8 +30,7 @@
|
|
|
30
30
|
type="primary"
|
|
31
31
|
radius="20rpx"
|
|
32
32
|
@click="doLoginAuth"
|
|
33
|
-
|
|
34
|
-
>
|
|
33
|
+
>{{h5FastLoginName}}</xd-button>
|
|
35
34
|
<!-- #endif -->
|
|
36
35
|
<!--#ifdef MP-->
|
|
37
36
|
<xd-button
|
|
@@ -50,8 +49,7 @@
|
|
|
50
49
|
type="primary"
|
|
51
50
|
radius="20rpx"
|
|
52
51
|
@click="doLoginAccount"
|
|
53
|
-
|
|
54
|
-
</xd-button>
|
|
52
|
+
>账号登录</xd-button>
|
|
55
53
|
</view>
|
|
56
54
|
|
|
57
55
|
<view class="protocol">
|
|
@@ -217,7 +215,9 @@ import {
|
|
|
217
215
|
getAllPath,
|
|
218
216
|
getDomainAllPath,
|
|
219
217
|
getLocalJumpOutSiteCallbackUrl,
|
|
218
|
+
isThirdLogin
|
|
220
219
|
} from "@/utils/xd.base";
|
|
220
|
+
import icb from "@/common/ICB.SDK";
|
|
221
221
|
|
|
222
222
|
export default {
|
|
223
223
|
name: "JfbBaseLogin",
|
|
@@ -236,6 +236,7 @@ export default {
|
|
|
236
236
|
//体验模式
|
|
237
237
|
dialogPreview: false,
|
|
238
238
|
previewAccout: '',
|
|
239
|
+
h5FastLoginName:'快捷登录',
|
|
239
240
|
|
|
240
241
|
showStep: 1,
|
|
241
242
|
panel_1_checked: "",
|
|
@@ -316,7 +317,7 @@ export default {
|
|
|
316
317
|
this.init(this.container);
|
|
317
318
|
this.base = this.jfbAuthorize.getBasePath(this);
|
|
318
319
|
this.site_logo = getServiceUrl(this.projectAttr["site_logo"]);
|
|
319
|
-
this.$xdLog.setProject('JfbBaseLogin', 'JfbBaseLogin.create.done')
|
|
320
|
+
this.$xdLog.setProject('JfbBaseLogin', 'JfbBaseLogin.create.done');
|
|
320
321
|
},
|
|
321
322
|
|
|
322
323
|
methods: {
|
|
@@ -376,21 +377,6 @@ export default {
|
|
|
376
377
|
this.$xdLog.setARMSError(error);
|
|
377
378
|
}
|
|
378
379
|
//#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
|
-
// }
|
|
394
380
|
},
|
|
395
381
|
|
|
396
382
|
/**
|
|
@@ -436,6 +422,11 @@ export default {
|
|
|
436
422
|
}
|
|
437
423
|
});
|
|
438
424
|
if (!this.phoneLogin) this.accountLoginType = "pwd";
|
|
425
|
+
};
|
|
426
|
+
|
|
427
|
+
//工行处理
|
|
428
|
+
if(isThirdLogin().isThird) {
|
|
429
|
+
this.hasAuthLogin = true;
|
|
439
430
|
}
|
|
440
431
|
},
|
|
441
432
|
|
|
@@ -485,8 +476,7 @@ export default {
|
|
|
485
476
|
//需要授权操作
|
|
486
477
|
if (res.auth_code) {
|
|
487
478
|
let { redirect_url, callback_url } = this;
|
|
488
|
-
if (redirect_url)
|
|
489
|
-
redirect_url = redirect_url;
|
|
479
|
+
if (redirect_url) redirect_url = redirect_url;
|
|
490
480
|
let url = Base64.encodeURI(
|
|
491
481
|
redirect_url || callback_url || this.settings.index
|
|
492
482
|
);
|
|
@@ -550,7 +540,6 @@ export default {
|
|
|
550
540
|
};
|
|
551
541
|
|
|
552
542
|
this.$xdLog.setProject('JfbBaseLogin', 'JfbBaseLogin.onJfbLoad.loading..');
|
|
553
|
-
|
|
554
543
|
jfbRootExec("listSiteProvider", {
|
|
555
544
|
vm: this,
|
|
556
545
|
data: params,
|
|
@@ -603,11 +592,29 @@ export default {
|
|
|
603
592
|
setAccountLoginType(type) {
|
|
604
593
|
this.accountLoginType = type;
|
|
605
594
|
},
|
|
595
|
+
|
|
606
596
|
//h5授权登录
|
|
607
597
|
doLoginAuth() {
|
|
608
598
|
if(this.isFastLoginStatus) return;
|
|
609
599
|
this.isFastLoginStatus = true;
|
|
610
|
-
|
|
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;
|
|
611
618
|
location.href = redirect_url;
|
|
612
619
|
},
|
|
613
620
|
|