jufubao-base 1.0.56-beta2013 → 1.0.56-beta2014
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
|
@@ -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;
|