jufubao-base 1.0.145-beta3 → 1.0.145-beta4
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
|
@@ -23,6 +23,18 @@ module.exports = [
|
|
|
23
23
|
phone_number_collect_url: ['收集手机号地址', 'String', '是'],
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
|
+
{
|
|
27
|
+
mapFnName: 'userBaseLoginIcb',
|
|
28
|
+
title: '工行e生活登录',
|
|
29
|
+
path: '/passport/v1/user/login-icbc',
|
|
30
|
+
isRule: false,
|
|
31
|
+
data: {
|
|
32
|
+
encrypted_params: ['用户登录信息', 'String', '必选'],
|
|
33
|
+
provider_id: ['登录方式id', 'Number', '必选'],
|
|
34
|
+
},
|
|
35
|
+
isConsole: true,
|
|
36
|
+
disabled: true,
|
|
37
|
+
},
|
|
26
38
|
{
|
|
27
39
|
mapFnName: 'phoneLogin',
|
|
28
40
|
title: "手机号登录",
|
|
@@ -287,7 +287,7 @@ export default {
|
|
|
287
287
|
};
|
|
288
288
|
},
|
|
289
289
|
computed: {
|
|
290
|
-
...mapState(["jfbAuthorize","siteInfo"]),
|
|
290
|
+
...mapState(["jfbAuthorize","siteInfo",'loginParams']),
|
|
291
291
|
panelIsChecked() {
|
|
292
292
|
return this.panel_1_checked.includes(1);
|
|
293
293
|
},
|
|
@@ -363,16 +363,16 @@ export default {
|
|
|
363
363
|
|
|
364
364
|
|
|
365
365
|
onJfbLoad(options) {
|
|
366
|
+
this.$xdLog.setProject('JfbBaseLogin', 'JfbBaseLogin.onJfbLoad.start')
|
|
366
367
|
this.redirect_url = options.redirect_url ? Base64.decode(options.redirect_url): '';
|
|
367
368
|
this.isDebugPreview = options['x-test'] === 'jfb-tiyan';
|
|
368
369
|
// #ifdef MP-WEIXIN
|
|
369
370
|
this.authWxMpListProviders();
|
|
370
371
|
// #endif
|
|
371
|
-
|
|
372
|
+
|
|
372
373
|
// #ifdef H5
|
|
373
|
-
try{
|
|
374
|
-
|
|
375
|
-
}catch (error) {
|
|
374
|
+
try{ this.authH5ListProviders();}
|
|
375
|
+
catch (error) {
|
|
376
376
|
this.$xdLog.setProject('JfbBaseLogin', 'JfbBaseLogin.onJfbLoad.error');
|
|
377
377
|
this.$xdLog.setARMSError(error);
|
|
378
378
|
}
|
|
@@ -411,6 +411,11 @@ export default {
|
|
|
411
411
|
if (res.quick_enabled) {
|
|
412
412
|
this.hasAuthLogin = true;
|
|
413
413
|
this.quickLogin = res.quick;
|
|
414
|
+
|
|
415
|
+
//工行处理
|
|
416
|
+
if(this.quickLogin.login_platform_code === 'icbc') {
|
|
417
|
+
this.h5FastLoginName = '工银e生活登录'
|
|
418
|
+
}
|
|
414
419
|
}
|
|
415
420
|
if (res.others.length > 0) {
|
|
416
421
|
this.hasAccountLogin = true;
|
|
@@ -422,11 +427,6 @@ export default {
|
|
|
422
427
|
}
|
|
423
428
|
});
|
|
424
429
|
if (!this.phoneLogin) this.accountLoginType = "pwd";
|
|
425
|
-
};
|
|
426
|
-
|
|
427
|
-
//工行处理
|
|
428
|
-
if(isThirdLogin().isThird) {
|
|
429
|
-
this.hasAuthLogin = true;
|
|
430
430
|
}
|
|
431
431
|
},
|
|
432
432
|
|
|
@@ -545,6 +545,7 @@ export default {
|
|
|
545
545
|
data: params,
|
|
546
546
|
})
|
|
547
547
|
.then((res) => {
|
|
548
|
+
console.log('listSiteProvider',res)
|
|
548
549
|
this.handleAuthResult(res);
|
|
549
550
|
})
|
|
550
551
|
.catch((error) => {
|
|
@@ -593,29 +594,58 @@ export default {
|
|
|
593
594
|
this.accountLoginType = type;
|
|
594
595
|
},
|
|
595
596
|
|
|
597
|
+
/**
|
|
598
|
+
* @description 工行e生活处理
|
|
599
|
+
*/
|
|
600
|
+
icbcLogin(){
|
|
601
|
+
//无三方用户登录信息
|
|
602
|
+
if(!this.loginParams) {
|
|
603
|
+
this.status = false;
|
|
604
|
+
console.warn(`无三方用户登录信息`);
|
|
605
|
+
throw new Error('无三方用户登录信息');
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
console.warn(`LoginParams.use: ${this.loginParams}`)
|
|
609
|
+
this.$xdShowLoading({});
|
|
610
|
+
jfbRootExec("userBaseLoginIcb", {
|
|
611
|
+
vm: this,
|
|
612
|
+
data:{
|
|
613
|
+
encrypted_params: this.loginParams,
|
|
614
|
+
provider_id: this.quickLogin.provider_id
|
|
615
|
+
},
|
|
616
|
+
})
|
|
617
|
+
.then(res=>{
|
|
618
|
+
this.$xdHideLoading();
|
|
619
|
+
this.$xdUniHelper.redirectTo({
|
|
620
|
+
url: this.redirect_url || this.$settings.index,
|
|
621
|
+
},false, true);
|
|
622
|
+
})
|
|
623
|
+
.catch(err=>{
|
|
624
|
+
this.$xdHideLoading();
|
|
625
|
+
console.error(err);
|
|
626
|
+
})
|
|
627
|
+
},
|
|
628
|
+
|
|
596
629
|
//h5授权登录
|
|
597
630
|
doLoginAuth() {
|
|
598
631
|
if(this.isFastLoginStatus) return;
|
|
599
632
|
this.isFastLoginStatus = true;
|
|
600
633
|
|
|
601
634
|
//工行处理
|
|
602
|
-
if(
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
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
|
-
// })
|
|
635
|
+
if(this.quickLogin && this.quickLogin.login_platform_code === 'icbc'){
|
|
636
|
+
window['ICBC_SDK']['merLogin']((res)=>{
|
|
637
|
+
console.log('ICBC_SDK',res);
|
|
638
|
+
this.icbcLogin(res)
|
|
639
|
+
})
|
|
614
640
|
return;
|
|
615
641
|
}
|
|
616
642
|
|
|
617
|
-
|
|
618
|
-
|
|
643
|
+
//跳转到第三方进行授权
|
|
644
|
+
if(this.quickLogin.is_redirect === 'Y') {
|
|
645
|
+
const { redirect_url } = this.quickLogin;
|
|
646
|
+
location.href = redirect_url;
|
|
647
|
+
}
|
|
648
|
+
|
|
619
649
|
},
|
|
620
650
|
|
|
621
651
|
//小程序授权登录
|
|
@@ -714,6 +744,7 @@ export default {
|
|
|
714
744
|
});
|
|
715
745
|
}
|
|
716
746
|
},
|
|
747
|
+
|
|
717
748
|
toHomeAfterLogin() {
|
|
718
749
|
let { redirect_url, callback_url } = this;
|
|
719
750
|
if (redirect_url) redirect_url = redirect_url;
|