jufubao-base 1.0.145-beta4 → 1.0.146-beta31
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/components/JfbBaseAddress/XdAddress.vue +5 -1
- package/src/components/JfbBaseCard/JfbBaseCard.vue +5 -5
- package/src/components/JfbBaseCardBindV2/JfbBaseCardBindV2.vue +2 -4
- package/src/components/JfbBaseCardDisabledEntry/JfbBaseCardDisabledEntry.vue +8 -4
- package/src/components/JfbBaseCardDisabledEntry/cardListMixins.js +15 -1
- package/src/components/JfbBaseCardEntry/JfbBaseCardEntry.vue +4 -4
- package/src/components/JfbBaseLogin/Api.js +0 -12
- package/src/components/JfbBaseLogin/JfbBaseLogin.vue +30 -68
- package/src/common/ICB.SDK.js +0 -78
package/package.json
CHANGED
|
@@ -391,6 +391,10 @@ export default {
|
|
|
391
391
|
},
|
|
392
392
|
|
|
393
393
|
setReceiptRegionName() {
|
|
394
|
+
console.log(this.level,'apapappap');
|
|
395
|
+
this.city_name = this.city_name.splice(0, this.level+1);
|
|
396
|
+
this.city_code = this.city_code.splice(0, this.level+1);
|
|
397
|
+
// this.city_selected_data = this.city_selected_data.splice(0, this.level+1);
|
|
394
398
|
this.receipt_region_name = this.city_name.join(this.citySeparator);
|
|
395
399
|
},
|
|
396
400
|
|
|
@@ -423,10 +427,10 @@ export default {
|
|
|
423
427
|
},
|
|
424
428
|
|
|
425
429
|
selectCity(item) {
|
|
430
|
+
console.log(this.maxLevel,'this.maxLevel');
|
|
426
431
|
if (this.level < this.maxLevel - 1) {
|
|
427
432
|
this.level++;
|
|
428
433
|
}
|
|
429
|
-
|
|
430
434
|
//保存信息
|
|
431
435
|
this.$set(this.city_name, this.level, item.label);
|
|
432
436
|
this.$set(this.city_code, this.level, item.value);
|
|
@@ -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="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
|
|
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
|
-
|
|
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
|
|
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: {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
<div class="card-list__content">
|
|
42
42
|
<view>
|
|
43
43
|
<text>券号:</text>
|
|
44
|
-
<text>{{item.card_number}}</text>
|
|
44
|
+
<text>{{item.card_number}}{{isShowIndex?`--${item.index}`:''}}</text>
|
|
45
45
|
</view>
|
|
46
46
|
</div>
|
|
47
47
|
<view class="card-list__date">
|
|
@@ -169,8 +169,8 @@ export default {
|
|
|
169
169
|
mixins: [componentsMixins, extsMixins, JfbBaseCardDisabledEntryMixin, colorCardMixins, cardListMixins],
|
|
170
170
|
data() {
|
|
171
171
|
return {
|
|
172
|
-
|
|
173
|
-
|
|
172
|
+
isShowUnbind: false,
|
|
173
|
+
isShowIndex:false,
|
|
174
174
|
};
|
|
175
175
|
},
|
|
176
176
|
computed:{
|
|
@@ -191,9 +191,11 @@ export default {
|
|
|
191
191
|
},
|
|
192
192
|
methods: {
|
|
193
193
|
onJfbLoad(options) {
|
|
194
|
+
this.isShowIndex = options['show_index'] === '1';
|
|
194
195
|
this.getCardList();
|
|
195
196
|
},
|
|
196
197
|
|
|
198
|
+
|
|
197
199
|
getCardList() {
|
|
198
200
|
this.$xdShowLoading({});
|
|
199
201
|
jfbRootExec("getDisableCardListEntry", {vm: this, data: {is_all: "Y", is_show_entry_settings: 'Y'},})
|
|
@@ -233,7 +235,7 @@ export default {
|
|
|
233
235
|
vm: this,
|
|
234
236
|
success: (res) => {
|
|
235
237
|
if (res.confirm) {
|
|
236
|
-
let cardIds = this.
|
|
238
|
+
let cardIds = this.cardOrgList.map(item=>{
|
|
237
239
|
return item.card_number + ''
|
|
238
240
|
});
|
|
239
241
|
jfbRootExec("batchDisabledCardUnbindEntry", {vm: this, data: {card_numbers: cardIds.join(','),},})
|
|
@@ -241,6 +243,7 @@ export default {
|
|
|
241
243
|
this.$xdAlert({
|
|
242
244
|
content: "全部失效票券已解绑",
|
|
243
245
|
close: () => {
|
|
246
|
+
this.clearData();
|
|
244
247
|
this.getCardList();
|
|
245
248
|
},
|
|
246
249
|
});
|
|
@@ -275,6 +278,7 @@ export default {
|
|
|
275
278
|
this.$xdAlert({
|
|
276
279
|
content: "票券已解绑",
|
|
277
280
|
close: () => {
|
|
281
|
+
this.clearData();
|
|
278
282
|
this.getCardList();
|
|
279
283
|
},
|
|
280
284
|
});
|
|
@@ -65,6 +65,19 @@ export default {
|
|
|
65
65
|
|
|
66
66
|
},
|
|
67
67
|
|
|
68
|
+
clearData(){
|
|
69
|
+
this.ajaxCardList = null;
|
|
70
|
+
this.cardOrgList = []
|
|
71
|
+
this.cardList = null;
|
|
72
|
+
this.cardPageNum = 0;
|
|
73
|
+
this.cardComputedList = [];
|
|
74
|
+
this.cardLoading = false;
|
|
75
|
+
this.cardNextTop = 0;
|
|
76
|
+
this.cardIndex = 0;
|
|
77
|
+
this.contentStatus = false;
|
|
78
|
+
this.hasContent = true;
|
|
79
|
+
},
|
|
80
|
+
|
|
68
81
|
async handleCardComputed(paddingBottom=30){
|
|
69
82
|
this.$xdShowLoading({});
|
|
70
83
|
if(this.contentStatus === false) await this.getBoxTop();
|
|
@@ -83,7 +96,6 @@ export default {
|
|
|
83
96
|
return card
|
|
84
97
|
});
|
|
85
98
|
this.cardList = (this.cardList||[]).concat(arr);
|
|
86
|
-
this.cardPageNum++;
|
|
87
99
|
this.$xdHideLoading();
|
|
88
100
|
}).exec();
|
|
89
101
|
})
|
|
@@ -102,6 +114,7 @@ export default {
|
|
|
102
114
|
this.cardPageNum*this.cardPageLen,
|
|
103
115
|
this.cardPageNum*this.cardPageLen + this.cardPageLen
|
|
104
116
|
);
|
|
117
|
+
console.warn(`无效卡张数:${validCardList.length} 张,页码:第 ${this.cardPageNum} 页`);
|
|
105
118
|
if(this.cardComputedList.length < this.cardPageLen) {
|
|
106
119
|
this.hasContent = false;
|
|
107
120
|
}
|
|
@@ -120,6 +133,7 @@ export default {
|
|
|
120
133
|
this.cardPageNum*this.cardPageLen,
|
|
121
134
|
this.cardPageNum*this.cardPageLen + this.cardPageLen
|
|
122
135
|
);
|
|
136
|
+
console.warn(`无效卡张数:${this.cardOrgList.length} 张,页码:第 ${this.cardPageNum} 页`);
|
|
123
137
|
this.handleCardComputed().then().catch();
|
|
124
138
|
if(this.cardComputedList.length < this.cardPageLen) {
|
|
125
139
|
this.hasContent = false;
|
|
@@ -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="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
|
|
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.
|
|
469
|
+
this.isWx = this.isPreview || isWechat();
|
|
470
470
|
if (!this.$configProject.isPreview) {
|
|
471
471
|
jfbRootExec("getH5WxAuthorize", {
|
|
472
472
|
vm: this,
|
|
@@ -23,18 +23,6 @@ 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
|
-
},
|
|
38
26
|
{
|
|
39
27
|
mapFnName: 'phoneLogin',
|
|
40
28
|
title: "手机号登录",
|
|
@@ -30,7 +30,8 @@
|
|
|
30
30
|
type="primary"
|
|
31
31
|
radius="20rpx"
|
|
32
32
|
@click="doLoginAuth"
|
|
33
|
-
|
|
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
|
-
|
|
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: "",
|
|
@@ -287,7 +286,7 @@ export default {
|
|
|
287
286
|
};
|
|
288
287
|
},
|
|
289
288
|
computed: {
|
|
290
|
-
...mapState(["jfbAuthorize","siteInfo"
|
|
289
|
+
...mapState(["jfbAuthorize","siteInfo"]),
|
|
291
290
|
panelIsChecked() {
|
|
292
291
|
return this.panel_1_checked.includes(1);
|
|
293
292
|
},
|
|
@@ -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: {
|
|
@@ -363,20 +362,35 @@ export default {
|
|
|
363
362
|
|
|
364
363
|
|
|
365
364
|
onJfbLoad(options) {
|
|
366
|
-
this.$xdLog.setProject('JfbBaseLogin', 'JfbBaseLogin.onJfbLoad.start')
|
|
367
365
|
this.redirect_url = options.redirect_url ? Base64.decode(options.redirect_url): '';
|
|
368
366
|
this.isDebugPreview = options['x-test'] === 'jfb-tiyan';
|
|
369
367
|
// #ifdef MP-WEIXIN
|
|
370
368
|
this.authWxMpListProviders();
|
|
371
369
|
// #endif
|
|
372
|
-
|
|
370
|
+
this.$xdLog.setProject('JfbBaseLogin', 'JfbBaseLogin.onJfbLoad.start')
|
|
373
371
|
// #ifdef H5
|
|
374
|
-
try{
|
|
375
|
-
|
|
372
|
+
try{
|
|
373
|
+
this.authH5ListProviders();
|
|
374
|
+
}catch (error) {
|
|
376
375
|
this.$xdLog.setProject('JfbBaseLogin', 'JfbBaseLogin.onJfbLoad.error');
|
|
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
|
/**
|
|
@@ -411,11 +425,6 @@ export default {
|
|
|
411
425
|
if (res.quick_enabled) {
|
|
412
426
|
this.hasAuthLogin = true;
|
|
413
427
|
this.quickLogin = res.quick;
|
|
414
|
-
|
|
415
|
-
//工行处理
|
|
416
|
-
if(this.quickLogin.login_platform_code === 'icbc') {
|
|
417
|
-
this.h5FastLoginName = '工银e生活登录'
|
|
418
|
-
}
|
|
419
428
|
}
|
|
420
429
|
if (res.others.length > 0) {
|
|
421
430
|
this.hasAccountLogin = true;
|
|
@@ -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)
|
|
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,12 +550,12 @@ 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,
|
|
546
557
|
})
|
|
547
558
|
.then((res) => {
|
|
548
|
-
console.log('listSiteProvider',res)
|
|
549
559
|
this.handleAuthResult(res);
|
|
550
560
|
})
|
|
551
561
|
.catch((error) => {
|
|
@@ -593,59 +603,12 @@ export default {
|
|
|
593
603
|
setAccountLoginType(type) {
|
|
594
604
|
this.accountLoginType = type;
|
|
595
605
|
},
|
|
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
|
-
|
|
629
606
|
//h5授权登录
|
|
630
607
|
doLoginAuth() {
|
|
631
608
|
if(this.isFastLoginStatus) return;
|
|
632
609
|
this.isFastLoginStatus = true;
|
|
633
|
-
|
|
634
|
-
|
|
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
|
-
})
|
|
640
|
-
return;
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
//跳转到第三方进行授权
|
|
644
|
-
if(this.quickLogin.is_redirect === 'Y') {
|
|
645
|
-
const { redirect_url } = this.quickLogin;
|
|
646
|
-
location.href = redirect_url;
|
|
647
|
-
}
|
|
648
|
-
|
|
610
|
+
const { provider_id, login_platform_code, is_redirect, redirect_url } = this.quickLogin;
|
|
611
|
+
location.href = redirect_url;
|
|
649
612
|
},
|
|
650
613
|
|
|
651
614
|
//小程序授权登录
|
|
@@ -744,7 +707,6 @@ export default {
|
|
|
744
707
|
});
|
|
745
708
|
}
|
|
746
709
|
},
|
|
747
|
-
|
|
748
710
|
toHomeAfterLogin() {
|
|
749
711
|
let { redirect_url, callback_url } = this;
|
|
750
712
|
if (redirect_url) redirect_url = redirect_url;
|
package/src/common/ICB.SDK.js
DELETED
|
@@ -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();
|