jufubao-base 1.0.56-beta6 → 1.0.56-beta7
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
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
<view>使用扫码绑定</view>
|
|
32
32
|
<xd-font-icon
|
|
33
33
|
:style="{marginLeft: '15rpx'}"
|
|
34
|
-
size="
|
|
34
|
+
size="45"
|
|
35
35
|
icon="iconsaoma"
|
|
36
36
|
></xd-font-icon>
|
|
37
37
|
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
<view>券号密码绑定</view>
|
|
49
49
|
<xd-font-icon
|
|
50
50
|
:style="{marginLeft: '15rpx'}"
|
|
51
|
-
size="
|
|
51
|
+
size="45"
|
|
52
52
|
icon="iconyuechi"
|
|
53
53
|
></xd-font-icon>
|
|
54
54
|
|
|
@@ -114,26 +114,25 @@
|
|
|
114
114
|
color: tabIndex === 2 ? '#fff' : '#B8B7BE',
|
|
115
115
|
background: tabIndex === 2 ? mainColor : '#fff',
|
|
116
116
|
}"
|
|
117
|
-
>
|
|
118
|
-
可转换票券
|
|
119
|
-
</view>
|
|
117
|
+
>可转换票券</view>
|
|
120
118
|
</view>
|
|
121
119
|
<view
|
|
122
120
|
class="jfb-base-card-entry__body-tips"
|
|
123
|
-
:style="{ color:
|
|
121
|
+
:style="{ color: warningColor }"
|
|
124
122
|
v-if="tabIndex === 2"
|
|
125
|
-
|
|
126
|
-
>
|
|
123
|
+
>* 目前仅支持电影票兑换券进行转换</view>
|
|
127
124
|
<view
|
|
128
125
|
v-if="tabIndex === 2 || tabIndex === 1"
|
|
129
126
|
class="jfb-base-card-entry__body-card"
|
|
130
127
|
>
|
|
131
128
|
<view
|
|
132
|
-
v-for="(item
|
|
129
|
+
v-for="(item) in showList"
|
|
133
130
|
class="card-list"
|
|
134
131
|
:key="item.card_number"
|
|
132
|
+
@click="toDetail(item)"
|
|
135
133
|
:style="{
|
|
136
|
-
|
|
134
|
+
background: item['theme']['color'],
|
|
135
|
+
backgroundSize: '100%'
|
|
137
136
|
}"
|
|
138
137
|
>
|
|
139
138
|
<view class="card-list-warp" :style="{backgroundImage: 'url('+ item['theme']['image'] +')'}">
|
|
@@ -156,19 +155,19 @@
|
|
|
156
155
|
</view>
|
|
157
156
|
<view class="card-list__yue">
|
|
158
157
|
<text>余额:</text>
|
|
159
|
-
<text>{{item.card_point}}</text>
|
|
158
|
+
<text>{{item.card_point}} {{ item.unit }}</text>
|
|
160
159
|
</view>
|
|
161
|
-
<view class="card-list__other" v-if="item.other_card_point && item.card_point_type
|
|
162
|
-
<view><text>购买其他物品可抵:</text><text>{{item.other_card_point}}</text></view>
|
|
160
|
+
<view class="card-list__other" v-if="item.other_card_point && item.card_point_type === 2">
|
|
161
|
+
<view><text>购买其他物品可抵:</text><text>{{item.other_card_point}} {{ item.unit }}</text></view>
|
|
163
162
|
</view>
|
|
164
163
|
<view class="card-list__entry" v-if="item.entries.length === 1">
|
|
165
|
-
<view :style="{color: mainColor}">{{login_name}}</view>
|
|
164
|
+
<view @click.stop="handleBindLogin(item,item['entries'][0])" :style="{color: mainColor}">{{login_name}}</view>
|
|
166
165
|
</view>
|
|
167
166
|
<view class="card-list__nodata" v-if="item.entries.length === 0">暂无支持服务列表</view>
|
|
168
167
|
<view class="card-list__entrys" v-if="item.entries.length > 1">
|
|
169
168
|
<view class="card-list__entrys-title">
|
|
170
169
|
<view>可兑换权益</view>
|
|
171
|
-
<view>
|
|
170
|
+
<view @click="toDetail(item, false)">
|
|
172
171
|
<text>查看详情</text>
|
|
173
172
|
<xd-font-icon icon="iconxiangyou_xian" color="#999" size="20"></xd-font-icon>
|
|
174
173
|
</view>
|
|
@@ -176,7 +175,11 @@
|
|
|
176
175
|
<view class="card-list__entrys-list">
|
|
177
176
|
<scroll-view scroll-x class="card-list__entrys-scroll">
|
|
178
177
|
<view class="card-list__entrys-item">
|
|
179
|
-
<view
|
|
178
|
+
<view
|
|
179
|
+
v-for="(entry,idx) in item.entries"
|
|
180
|
+
:key="idx"
|
|
181
|
+
@click.stop="handleBindLogin(item, entry)"
|
|
182
|
+
>
|
|
180
183
|
<view><image :src="entry.image_url"></image></view>
|
|
181
184
|
<view>{{entry|cutstr}}</view>
|
|
182
185
|
<view>
|
|
@@ -189,12 +192,13 @@
|
|
|
189
192
|
</view>
|
|
190
193
|
</view>
|
|
191
194
|
</view>
|
|
192
|
-
|
|
193
195
|
</view>
|
|
194
196
|
</view>
|
|
195
|
-
<view
|
|
196
|
-
|
|
197
|
-
|
|
197
|
+
<view
|
|
198
|
+
v-if="showDisabled==='Y'"
|
|
199
|
+
@click="handleToDisabled"
|
|
200
|
+
class="jfb-base-card-entry__body-disabled"
|
|
201
|
+
>已失效票券>>></view>
|
|
198
202
|
</view>
|
|
199
203
|
<view class="jfb-base-card-entry__body-dialog" v-if="dialogEvent">
|
|
200
204
|
<view class="jfb-base-card-entry__body-dialog-content">
|
|
@@ -246,6 +250,9 @@ export default {
|
|
|
246
250
|
jwxSDK: (state) => state.jwxSDK,
|
|
247
251
|
jfbAuthorize: (state) => state.jfbAuthorize,
|
|
248
252
|
}),
|
|
253
|
+
showList(){
|
|
254
|
+
return this.tabIndex === 1 ? this.cardList: this.changeList
|
|
255
|
+
}
|
|
249
256
|
},
|
|
250
257
|
filters:{
|
|
251
258
|
cutstr(val){
|
|
@@ -254,13 +261,6 @@ export default {
|
|
|
254
261
|
}
|
|
255
262
|
},
|
|
256
263
|
watch: {
|
|
257
|
-
tabIndex(newVal, oldVal) {
|
|
258
|
-
if (newVal === 1) {
|
|
259
|
-
this.showList = this.cardList;
|
|
260
|
-
} else {
|
|
261
|
-
this.showList = this.changeList;
|
|
262
|
-
}
|
|
263
|
-
},
|
|
264
264
|
container(value) {
|
|
265
265
|
this.init(value)
|
|
266
266
|
}
|
|
@@ -278,7 +278,6 @@ export default {
|
|
|
278
278
|
tabIndex: 1,
|
|
279
279
|
isBack: null, //是否使用返回键
|
|
280
280
|
cardList: [],
|
|
281
|
-
showList: [],
|
|
282
281
|
changeList: [],
|
|
283
282
|
disableList: [],
|
|
284
283
|
inCallback: null, //内部跳转地址
|
|
@@ -294,16 +293,27 @@ export default {
|
|
|
294
293
|
cardLayout: "1", //票券布局
|
|
295
294
|
showDisabled: 'Y',
|
|
296
295
|
|
|
296
|
+
|
|
297
297
|
cardThemesColor: [
|
|
298
298
|
'radial-gradient(50% 50%, rgba(255, 151, 128, 1) 0%, rgba(255, 64, 61, 1) 100%)',
|
|
299
299
|
'radial-gradient(50% 50%, rgba(247, 198, 35, 1) 0%, rgba(255, 81, 0, 1) 99.91%)',
|
|
300
300
|
'radial-gradient(50% 50%, rgba(0, 207, 193, 1) 0%, rgba(0, 117, 108, 1) 99.91%)',
|
|
301
301
|
'radial-gradient(50% 50%, rgba(255, 148, 77, 1) 0%, rgba(240, 92, 0, 1) 100%)',
|
|
302
|
-
'radial-gradient(50% 50%, rgba(252, 126, 49, 1) 0%, rgba(255, 143, 67, 1) 100%)'
|
|
302
|
+
'radial-gradient(50% 50%, rgba(252, 126, 49, 1) 0%, rgba(255, 143, 67, 1) 100%)',
|
|
303
|
+
'#FF524D', '#FFAA00', '#00C2B8', '#33AAFF', '#FF8636', '#FF744A', '#38C4EB', '#AF5EE0', '#D98643', '#17C26F'
|
|
303
304
|
],
|
|
304
305
|
cardThemesImage: [
|
|
305
|
-
'//img.jufubao.cn/component/card/vip.png',
|
|
306
|
-
|
|
306
|
+
//'//img.jufubao.cn/component/card/vip.png',
|
|
307
|
+
'//img.jufubao.cn/component/card/1.png',
|
|
308
|
+
'//img.jufubao.cn/component/card/2.png',
|
|
309
|
+
'//img.jufubao.cn/component/card/3.png',
|
|
310
|
+
'//img.jufubao.cn/component/card/4.png',
|
|
311
|
+
'//img.jufubao.cn/component/card/5.png',
|
|
312
|
+
'//img.jufubao.cn/component/card/6.png',
|
|
313
|
+
'//img.jufubao.cn/component/card/7.png',
|
|
314
|
+
'//img.jufubao.cn/component/card/8.png',
|
|
315
|
+
'//img.jufubao.cn/component/card/9.png',
|
|
316
|
+
'//img.jufubao.cn/component/card/10.png'
|
|
307
317
|
],
|
|
308
318
|
|
|
309
319
|
//活动
|
|
@@ -373,7 +383,7 @@ export default {
|
|
|
373
383
|
getCardGroupItem(list, allEntry){
|
|
374
384
|
list.map(item=>{
|
|
375
385
|
//设置卡片样式
|
|
376
|
-
item['theme'] = this.getCardThemes(item['card_type_name']);
|
|
386
|
+
item['theme'] = this.getCardThemes(item['card_type_name'] + item['card_type']);
|
|
377
387
|
item['entries'] = this.getEntry(item['business_codes'], allEntry)
|
|
378
388
|
});
|
|
379
389
|
return list
|
|
@@ -469,63 +479,99 @@ export default {
|
|
|
469
479
|
* @description 已绑定卡登录
|
|
470
480
|
* @param item
|
|
471
481
|
*/
|
|
472
|
-
handleBindLogin(item) {
|
|
482
|
+
handleBindLogin(item , entry) {
|
|
483
|
+
//卡券登陆
|
|
473
484
|
if (this.tabIndex === 1) {
|
|
474
|
-
console.log("bindCardLogin", this.inCallback);
|
|
475
|
-
|
|
476
|
-
//无效卡
|
|
477
485
|
if (item["is_valid"] !== "Y") {
|
|
478
|
-
console.log(
|
|
479
|
-
item,
|
|
480
|
-
item["is_valid"],
|
|
481
|
-
item["is_valid"] !== "Y",
|
|
482
|
-
"itemitem"
|
|
483
|
-
);
|
|
484
486
|
return;
|
|
485
487
|
}
|
|
488
|
+
|
|
486
489
|
this.$xdShowLoading({});
|
|
487
|
-
jfbRootExec("
|
|
490
|
+
jfbRootExec("loginEntryCardBind", {
|
|
488
491
|
vm: this,
|
|
489
492
|
data: { card_number: item["card_number"] },
|
|
490
493
|
})
|
|
491
494
|
.then((res) => {
|
|
492
|
-
console.log(res);
|
|
493
495
|
this.$xdHideLoading();
|
|
494
496
|
//#ifdef MP-WEIXIN
|
|
495
497
|
if (this.jfbAuthorize !== null) {
|
|
496
498
|
this.jfbAuthorize.setToken("card", res["card_token"], {
|
|
497
499
|
expires: res["card_expire_in"] / 60 / 60,
|
|
498
500
|
});
|
|
501
|
+
this.handleToApp(entry);
|
|
499
502
|
}
|
|
500
503
|
//#endif
|
|
501
|
-
|
|
502
504
|
if (this.$configProject.isPreview) {
|
|
503
505
|
console.log("handleBindLogin", "预览模式不跳转", this.inCallback);
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
else {
|
|
509
|
+
this.handleToApp(entry);
|
|
508
510
|
}
|
|
509
511
|
})
|
|
510
512
|
.catch((res) => {
|
|
511
513
|
this.$xdHideLoading();
|
|
512
514
|
});
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
);
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
//转换卡跳转
|
|
518
|
+
else {
|
|
519
|
+
this.$xdUniHelper.navigateTo({
|
|
520
|
+
url: `${this.changeUrl}?card_number=${item["card_number"]}`
|
|
521
|
+
}, false);
|
|
520
522
|
}
|
|
521
523
|
},
|
|
522
|
-
|
|
523
|
-
this.$xdUniHelper.
|
|
524
|
-
|
|
524
|
+
toApp(url){
|
|
525
|
+
this.$xdUniHelper.redirectTo({
|
|
526
|
+
url
|
|
527
|
+
})
|
|
528
|
+
},
|
|
529
|
+
handleToApp(entry){
|
|
530
|
+
let item, redirectUrl;
|
|
531
|
+
try{
|
|
532
|
+
item = JSON.parse(entry['redirect_data']);
|
|
533
|
+
}catch (e) {
|
|
534
|
+
return;
|
|
535
|
+
}
|
|
536
|
+
const {dir, path, host} = item;
|
|
537
|
+
let nsp = Base64.encodeURI(JSON.stringify({business_code: entry['business_code']}));
|
|
538
|
+
|
|
539
|
+
//外站配置地址
|
|
540
|
+
if (entry.redirect_type === 'URL') {
|
|
541
|
+
if (item['path'].indexOf('?') === -1) {
|
|
542
|
+
redirectUrl = `${item['path']}?x-common=${nsp}&vs=${new Date().getTime()}`
|
|
543
|
+
} else redirectUrl = `${item['path']}&x-common=${nsp}&vs=${new Date().getTime()}`;
|
|
544
|
+
this.toApp(redirectUrl);
|
|
545
|
+
return;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
//站内转换
|
|
549
|
+
let jumpUrl = item.path;
|
|
550
|
+
//#ifdef H5
|
|
551
|
+
jumpUrl = `//${host}/${dir}${path}`;
|
|
552
|
+
//#endif
|
|
553
|
+
|
|
554
|
+
if (item['fixed_business_code'] === '') {
|
|
555
|
+
redirectUrl = `${jumpUrl}?x-common=${nsp}&vs=${new Date().getTime()}`
|
|
556
|
+
}
|
|
557
|
+
else {
|
|
558
|
+
redirectUrl = `${jumpUrl}?x-common=${nsp}&vs=${new Date().getTime()}`
|
|
559
|
+
}
|
|
560
|
+
this.toApp(redirectUrl);
|
|
561
|
+
},
|
|
562
|
+
|
|
563
|
+
toDetail(item, out=true) {
|
|
564
|
+
if(out && item.entries.length === 1) {
|
|
565
|
+
this.$xdUniHelper.navigateTo({
|
|
525
566
|
url: `${this.detailUrl}?card_number=${item["card_number"]}`,
|
|
526
|
-
},
|
|
527
|
-
|
|
528
|
-
|
|
567
|
+
}, false);
|
|
568
|
+
}
|
|
569
|
+
else{
|
|
570
|
+
this.$xdUniHelper.navigateTo({
|
|
571
|
+
url: `${this.detailUrl}?card_number=${item["card_number"]}`,
|
|
572
|
+
}, false);
|
|
573
|
+
}
|
|
574
|
+
|
|
529
575
|
},
|
|
530
576
|
|
|
531
577
|
onJfbLoad(options) {
|
|
@@ -572,16 +618,15 @@ export default {
|
|
|
572
618
|
),
|
|
573
619
|
};
|
|
574
620
|
});
|
|
621
|
+
|
|
575
622
|
this.cardList = this.getCardGroupItem(res.list.filter((item) => {
|
|
576
623
|
return item["is_valid"] === "Y";
|
|
577
624
|
}), res['site_entry_settings']);
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
});
|
|
581
|
-
this.changeList = this.cardList.filter((item) => {
|
|
625
|
+
|
|
626
|
+
this.changeList = this.getCardGroupItem(this.cardList.filter((item) => {
|
|
582
627
|
return item["is_exchange"] === "Y";
|
|
583
|
-
});
|
|
584
|
-
|
|
628
|
+
}), res['site_entry_settings']);
|
|
629
|
+
|
|
585
630
|
this.$xdHideLoading();
|
|
586
631
|
})
|
|
587
632
|
.catch(() => this.$xdHideLoading());
|
|
@@ -678,8 +723,8 @@ export default {
|
|
|
678
723
|
display: flex;
|
|
679
724
|
align-items: center;
|
|
680
725
|
font-size: unit(28, rpx);
|
|
681
|
-
margin-bottom: unit(
|
|
682
|
-
margin-top: unit(
|
|
726
|
+
margin-bottom: unit(40, rpx);
|
|
727
|
+
margin-top: unit(40, rpx);
|
|
683
728
|
|
|
684
729
|
& > view {
|
|
685
730
|
// width: unit(214, rpx);
|
|
@@ -694,7 +739,7 @@ export default {
|
|
|
694
739
|
|
|
695
740
|
&-tips {
|
|
696
741
|
font-size: unit(20, rpx);
|
|
697
|
-
margin-bottom: unit(
|
|
742
|
+
margin-bottom: unit(40, rpx);
|
|
698
743
|
}
|
|
699
744
|
|
|
700
745
|
&-disabled {
|
|
@@ -709,7 +754,11 @@ export default {
|
|
|
709
754
|
.card-list {
|
|
710
755
|
overflow: hidden;
|
|
711
756
|
border-radius: unit(16, rpx);
|
|
712
|
-
|
|
757
|
+
margin-bottom: unit(30, rpx);
|
|
758
|
+
|
|
759
|
+
&:last-child {
|
|
760
|
+
margin-bottom: 0;
|
|
761
|
+
}
|
|
713
762
|
|
|
714
763
|
|
|
715
764
|
&__title {
|
|
@@ -804,12 +853,7 @@ export default {
|
|
|
804
853
|
}
|
|
805
854
|
|
|
806
855
|
&__entry {
|
|
807
|
-
|
|
808
|
-
bottom: unit(28, rpx);
|
|
809
|
-
left: unit(40, rpx);
|
|
810
|
-
right: unit(40, rpx);
|
|
811
|
-
height: unit(64, rpx);
|
|
812
|
-
|
|
856
|
+
padding: unit(20, rpx) unit(40, rpx) 0;
|
|
813
857
|
& > view {
|
|
814
858
|
line-height: unit(64, rpx);
|
|
815
859
|
text-align: center;
|
|
@@ -909,13 +953,13 @@ export default {
|
|
|
909
953
|
}
|
|
910
954
|
|
|
911
955
|
|
|
912
|
-
|
|
956
|
+
&-warp {
|
|
913
957
|
width: unit(700, rpx);
|
|
914
|
-
min-height: unit(
|
|
958
|
+
min-height: unit(310, rpx);
|
|
915
959
|
position: relative;
|
|
916
960
|
border-radius: unit(16, rpx);
|
|
917
961
|
background-size: 100%;
|
|
918
|
-
padding-bottom: unit(
|
|
962
|
+
padding-bottom: unit(20, rpx);
|
|
919
963
|
}
|
|
920
964
|
}
|
|
921
965
|
</style>
|