jufubao-third 1.0.9-beta1 → 1.0.10-beta1
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
|
@@ -149,5 +149,17 @@ module.exports = [
|
|
|
149
149
|
},
|
|
150
150
|
isConsole: true,
|
|
151
151
|
disabled: true
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
mapFnName: "getVipList",
|
|
155
|
+
title: "会员中心 - 会员卡列表",
|
|
156
|
+
path: "/member/v1/:namespace/vip-card",
|
|
157
|
+
isRule: false,
|
|
158
|
+
params: {
|
|
159
|
+
namespace: ['业务线', 'String', true],
|
|
160
|
+
is_show_exchange_code: ['是否展示 兑换码 ', 'Y/N,默认N', false],
|
|
161
|
+
},
|
|
162
|
+
isConsole: true,
|
|
163
|
+
disabled: true
|
|
152
164
|
}
|
|
153
165
|
];
|
|
@@ -17,82 +17,106 @@
|
|
|
17
17
|
<!-- #endif -->
|
|
18
18
|
<view class="jfb-third-pay__body">
|
|
19
19
|
<view class="column-group">
|
|
20
|
-
<view
|
|
21
|
-
<view
|
|
22
|
-
<view
|
|
23
|
-
|
|
24
|
-
<
|
|
20
|
+
<view class="pay_section">
|
|
21
|
+
<view style="padding: 20rpx 0 0;">
|
|
22
|
+
<view class="column-item noBorder">
|
|
23
|
+
<view v-if="product_total_price" class="column_label text_gray">商品总额</view>
|
|
24
|
+
<view class="column_value text-gray">
|
|
25
|
+
<xd-unit :price="product_total_price" :isOld="false" :font-size="24" :icon-size="0.3"></xd-unit>
|
|
26
|
+
</view>
|
|
25
27
|
</view>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
<view v-if="servicePrice" class="column-item noBorder">
|
|
29
|
+
<view class="column_label text_gray">平台服务费总额</view>
|
|
30
|
+
<view class="column_value text-gray">
|
|
31
|
+
<xd-unit :price="servicePrice" :isOld="false" :font-size="24" :icon-size="0.3"></xd-unit>
|
|
32
|
+
</view>
|
|
33
|
+
</view>
|
|
34
|
+
<view v-if="logisticsPrice" class="column-item noBorder">
|
|
35
|
+
<view class="column_label text_gray">运费</view>
|
|
36
|
+
<view class="column_value text-gray">
|
|
37
|
+
<xd-unit :price="logisticsPrice" :isOld="false" :font-size="24" :icon-size="0.3"></xd-unit>
|
|
38
|
+
</view>
|
|
31
39
|
</view>
|
|
32
40
|
</view>
|
|
33
|
-
<view
|
|
34
|
-
<view class="column_label
|
|
41
|
+
<view class="column-item">
|
|
42
|
+
<view class="column_label">
|
|
43
|
+
订单总额
|
|
44
|
+
</view>
|
|
35
45
|
<view class="column_value text-gray">
|
|
36
|
-
<xd-unit
|
|
46
|
+
<xd-unit
|
|
47
|
+
:price="total_price"
|
|
48
|
+
:isOld="false"
|
|
49
|
+
:font-size="24"
|
|
50
|
+
:icon-size="0.3"
|
|
51
|
+
></xd-unit>
|
|
37
52
|
</view>
|
|
38
53
|
</view>
|
|
39
54
|
</view>
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
:price="total_price"
|
|
47
|
-
:isOld="false"
|
|
48
|
-
:font-size="24"
|
|
49
|
-
:icon-size="0.3"
|
|
50
|
-
></xd-unit>
|
|
51
|
-
</view>
|
|
55
|
+
|
|
56
|
+
<view v-if="show_vip_card==='Y'" class="pay_section">
|
|
57
|
+
<cus-vip-list :list="vipCardList"
|
|
58
|
+
:vip_card_id="vip_card_id"
|
|
59
|
+
:plus_saving_money="plus_saving_money"
|
|
60
|
+
@choseVipCard="handleChoseVipCard"></cus-vip-list>
|
|
52
61
|
</view>
|
|
53
|
-
<view class="
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
<view
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
<xd-unit
|
|
60
|
-
:price="showOldPay ? needPayPrice :orderNeedPayPrice"
|
|
61
|
-
:isOld="false"
|
|
62
|
-
:font-size="24"
|
|
63
|
-
:icon-size="0.3"
|
|
64
|
-
></xd-unit>
|
|
65
|
-
</view>
|
|
62
|
+
<view v-if="vip_card_id" class="pay_section">
|
|
63
|
+
<xd-list-item label="PLUS专项立减" size="small" paddingLR="40rpx" >
|
|
64
|
+
<view slot="label" style="color: #86541E;">PLUS专项立减</view>
|
|
65
|
+
<!-- <view style="color: #FF7070;">-5.00</view> -->
|
|
66
|
+
<xd-unit :price="plus_saving_money" :isOld="false" :fontSize="24" :iconSize="0.3"></xd-unit>
|
|
67
|
+
</xd-list-item>
|
|
66
68
|
</view>
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
<view class="
|
|
69
|
+
|
|
70
|
+
<view class="pay_section">
|
|
71
|
+
<view class="column-item">
|
|
72
|
+
<view class="column_label">
|
|
73
|
+
仍需支付
|
|
74
|
+
<view class="label_sub">(可使用多张票券支付)</view>
|
|
75
|
+
</view>
|
|
76
|
+
<view class="column_value text-primary">
|
|
77
|
+
<xd-unit
|
|
78
|
+
:price="showOldPay ? needPayPrice :orderNeedPayPrice"
|
|
79
|
+
:isOld="false"
|
|
80
|
+
:font-size="24"
|
|
81
|
+
:icon-size="0.3"
|
|
82
|
+
></xd-unit>
|
|
83
|
+
</view>
|
|
71
84
|
</view>
|
|
72
|
-
<view class="
|
|
73
|
-
<
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
85
|
+
<view v-if="showOldPay" class="column-item">
|
|
86
|
+
<view class="column_label">
|
|
87
|
+
我的票券
|
|
88
|
+
<view class="label_sub">(已使用{{checkedCards.length}}张票券)</view>
|
|
89
|
+
</view>
|
|
90
|
+
<view class="column_value">
|
|
91
|
+
<xd-button
|
|
92
|
+
width="220rpx"
|
|
93
|
+
radius="60rpx"
|
|
94
|
+
type="primary"
|
|
95
|
+
size="small"
|
|
96
|
+
@click="xdDownDrawer=true; switchValidToken()"
|
|
97
|
+
>使用新票券</xd-button>
|
|
98
|
+
</view>
|
|
80
99
|
</view>
|
|
81
100
|
</view>
|
|
82
101
|
</view>
|
|
83
|
-
<
|
|
102
|
+
<!-- <view class="pay_section">
|
|
103
|
+
<xd-list-item label="账户余额" size="small" paddingLR="40rpx" showRight>
|
|
104
|
+
<view style="color: #999999;">30.00</view>
|
|
105
|
+
</xd-list-item>
|
|
106
|
+
</view> -->
|
|
107
|
+
<view class="pay_section" v-if="!showOldPay">
|
|
84
108
|
<template v-for="item in otherPayMethod">
|
|
85
|
-
<xd-list-item v-if="item.method === 'card'" :key="item.method" :label="item.show_name" paddingLR="
|
|
109
|
+
<xd-list-item v-if="item.method === 'card'" :key="item.method" :label="item.show_name" paddingLR="40rpx" size="small" showRight @click="toChoseCard">
|
|
86
110
|
<view v-if="choseCard && choseCard.cardPayPrice" slot="label">{{item.show_name}} <text style="color:red;margin-left: 4px;">(已选{{ choseCard.selectedCardList.length }}张)</text></view>
|
|
87
111
|
<xd-unit v-if="choseCard && choseCard.cardPayPrice" :price="choseCard.cardPayPrice" :isOld="false" :fontSize="24" :iconSize="0.3"></xd-unit>
|
|
88
112
|
<view v-else>请选择</view>
|
|
89
113
|
</xd-list-item>
|
|
90
|
-
<xd-list-item v-if="item.method === 'wallet'" :key="item.method" :label="item.show_name" paddingLR="
|
|
114
|
+
<xd-list-item v-if="item.method === 'wallet'" :key="item.method" :label="item.show_name" paddingLR="40rpx" size="small" showRight @click="toChoseWallet">
|
|
91
115
|
<xd-unit v-if="choseWallet && choseWallet.walletPayPrice" :price='choseWallet.walletPayPrice' :isOld="false" :fontSize="24" :iconSize="0.3"></xd-unit>
|
|
92
116
|
<view v-else>请选择</view>
|
|
93
117
|
</xd-list-item>
|
|
94
118
|
</template>
|
|
95
|
-
</
|
|
119
|
+
</view>
|
|
96
120
|
|
|
97
121
|
<view
|
|
98
122
|
class="ticket_list"
|
|
@@ -283,6 +307,7 @@
|
|
|
283
307
|
import XdListItem from "./XdListItem.vue"
|
|
284
308
|
import XdCardPayChose from "@/components/XdCardPayChose/XdCardPayChose"
|
|
285
309
|
import XdWalletChose from "@/components/XdWalletChose/XdWalletChose"
|
|
310
|
+
import CusVipList from "@/components/CusVipList/CusVipList"
|
|
286
311
|
import {mapState} from "vuex"
|
|
287
312
|
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
288
313
|
export default {
|
|
@@ -299,7 +324,8 @@
|
|
|
299
324
|
XdUnit,
|
|
300
325
|
XdListItem,
|
|
301
326
|
XdCardPayChose,
|
|
302
|
-
XdWalletChose
|
|
327
|
+
XdWalletChose,
|
|
328
|
+
CusVipList
|
|
303
329
|
},
|
|
304
330
|
mixins: [
|
|
305
331
|
componentsMixins, extsMixins, JfbThirdPayMixin, WalletMixins
|
|
@@ -335,6 +361,11 @@
|
|
|
335
361
|
selectedCardList: [], //卡绑定使用的
|
|
336
362
|
options: {},
|
|
337
363
|
|
|
364
|
+
show_vip_card: "",
|
|
365
|
+
vipCardList: [],
|
|
366
|
+
vip_card_id: 0,
|
|
367
|
+
plus_saving_money: 0,
|
|
368
|
+
|
|
338
369
|
//面板
|
|
339
370
|
orderSuccessPath: "",
|
|
340
371
|
thirdPayPath: "",
|
|
@@ -399,6 +430,7 @@
|
|
|
399
430
|
this.validImageAPIUrl = this.brandInfo['api_host'] + '/common/v1/valid_code/image/show'
|
|
400
431
|
|
|
401
432
|
this.getOrderConfirm();
|
|
433
|
+
|
|
402
434
|
},
|
|
403
435
|
/**
|
|
404
436
|
* @description 监听事件变化
|
|
@@ -419,12 +451,27 @@
|
|
|
419
451
|
}
|
|
420
452
|
return time;
|
|
421
453
|
},
|
|
454
|
+
handleChoseVipCard(vip_card_id){
|
|
455
|
+
this.vip_card_id = vip_card_id;
|
|
456
|
+
this.getOrderConfirm();
|
|
457
|
+
},
|
|
458
|
+
p_getVipList(xnamespace){
|
|
459
|
+
jfbRootExec("getVipList", {
|
|
460
|
+
vm: this,
|
|
461
|
+
data: {
|
|
462
|
+
namespace: xnamespace,
|
|
463
|
+
}
|
|
464
|
+
}).then(res => {
|
|
465
|
+
this.vipCardList = res.list;
|
|
466
|
+
})
|
|
467
|
+
},
|
|
422
468
|
getOrderConfirm(){
|
|
423
469
|
jfbRootExec("getThirdOrderInfo", {
|
|
424
470
|
vm: this,
|
|
425
471
|
data: {
|
|
426
472
|
main_order_id: this.main_order_id,
|
|
427
473
|
namespace: this.xnamespace,
|
|
474
|
+
vip_card_id: this.vip_card_id,
|
|
428
475
|
...this.options,
|
|
429
476
|
}
|
|
430
477
|
}).then(res => {
|
|
@@ -450,6 +497,11 @@
|
|
|
450
497
|
this.servicePrice = this.$xdUniHelper.multiplyFloatNumber(res.service_fee, 1);
|
|
451
498
|
this.logisticsPrice = this.$xdUniHelper.multiplyFloatNumber(res.logistics_amount, 1);
|
|
452
499
|
this.product_total_price = this.$xdUniHelper.multiplyFloatNumber(res.product_total_price, 1);
|
|
500
|
+
this.plus_saving_money = this.$xdUniHelper.multiplyFloatNumber(res.discount_price, 1);
|
|
501
|
+
this.show_vip_card = res.show_vip_card;
|
|
502
|
+
if(res.show_vip_card === 'Y' && !this.vipCardList.length){
|
|
503
|
+
this.p_getVipList(res.business_code);
|
|
504
|
+
}
|
|
453
505
|
})
|
|
454
506
|
},
|
|
455
507
|
p_getH5WxAuthorize(){
|
|
@@ -514,6 +566,7 @@
|
|
|
514
566
|
other_channel_pay_price: needPayPrice,
|
|
515
567
|
need_pay_price: needPayPrice,
|
|
516
568
|
namespace: this.xnamespace,
|
|
569
|
+
vip_card_id: this.vip_card_id,
|
|
517
570
|
...this.options,
|
|
518
571
|
}, res => {
|
|
519
572
|
this.$xdLog.setARMSInfo({
|
|
@@ -809,22 +862,31 @@
|
|
|
809
862
|
.jfb-third-pay {
|
|
810
863
|
&__body{
|
|
811
864
|
padding-bottom: 150rpx;
|
|
812
|
-
background: #FFFFFF;
|
|
865
|
+
// background: #FFFFFF;
|
|
813
866
|
|
|
867
|
+
.pay_section{
|
|
868
|
+
margin: 24rpx;
|
|
869
|
+
background-color: #FFFFFF;
|
|
870
|
+
border-radius: 20rpx;
|
|
871
|
+
overflow: hidden;
|
|
872
|
+
}
|
|
814
873
|
.text_gray{
|
|
815
874
|
color: #666666 !important;
|
|
875
|
+
}
|
|
876
|
+
.vip_list_wrap{
|
|
877
|
+
|
|
816
878
|
}
|
|
817
879
|
.column-group{
|
|
818
880
|
.column-item{
|
|
819
881
|
display: flex;
|
|
820
882
|
align-items: center;
|
|
821
883
|
justify-content: space-between;
|
|
822
|
-
border-bottom: 1px solid rgba(238, 238, 238, 1);
|
|
823
|
-
padding: 30rpx
|
|
884
|
+
// border-bottom: 1px solid rgba(238, 238, 238, 1);
|
|
885
|
+
padding: 30rpx 40rpx;
|
|
824
886
|
|
|
825
887
|
&.noBorder{
|
|
826
888
|
border-bottom: none;
|
|
827
|
-
padding: 12rpx
|
|
889
|
+
padding: 12rpx 40rpx;
|
|
828
890
|
}
|
|
829
891
|
|
|
830
892
|
.column_label{
|
|
@@ -1,8 +1,66 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
3
|
module.exports = {
|
|
4
|
-
getThirdOrderInfo: {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
getThirdOrderInfo: {
|
|
5
|
+
main_order_id: "b517729203734716416",
|
|
6
|
+
address: "北京市东城区崇文门外大街18号1幢(F1-1)号商铺",
|
|
7
|
+
phone: "13611111111",
|
|
8
|
+
total_price: "1680",
|
|
9
|
+
show_time: 1684396260,
|
|
10
|
+
remark: "",
|
|
11
|
+
count_down: 897,
|
|
12
|
+
product_total_price: "1680",
|
|
13
|
+
logistics_amount: "100",
|
|
14
|
+
request_id: "d2002455fa902b94"
|
|
15
|
+
},
|
|
16
|
+
getThirdListCards: {
|
|
17
|
+
list: [
|
|
18
|
+
{
|
|
19
|
+
card_number: "101001000005388",
|
|
20
|
+
card_type_name: "聚福宝福",
|
|
21
|
+
end_time: 1764345599,
|
|
22
|
+
card_point: 8319,
|
|
23
|
+
is_bind_card: true
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
request_id: "7a01f757e9c2b1ab"
|
|
27
|
+
},
|
|
28
|
+
getPayMethod: {
|
|
29
|
+
list: [
|
|
30
|
+
{ method: "wallet", show_name: "使用我的元宝", icon: "icon_1" },
|
|
31
|
+
{ method: "third", show_name: "使用补差", icon: "icon_2" },
|
|
32
|
+
{ method: "score", show_name: "使用积分", icon: "icon_3" },
|
|
33
|
+
{ method: "card", show_name: "使用票券1", icon: "icon_4" }
|
|
34
|
+
],
|
|
35
|
+
request_id: "6549409a86024ecf"
|
|
36
|
+
},
|
|
37
|
+
getUserWallet: {
|
|
38
|
+
show_name: "我的元宝",
|
|
39
|
+
icon: "icon_1",
|
|
40
|
+
total_amount: 127134,
|
|
41
|
+
list: [
|
|
42
|
+
{
|
|
43
|
+
wallet_type: "UC",
|
|
44
|
+
wallet_name: "测试账户1",
|
|
45
|
+
wallet_virtual_number: "1000000000000245",
|
|
46
|
+
amount: 66955,
|
|
47
|
+
business_codes: "cake,v-RcA8Mv-Gpd96_Y_mjIf,movie",
|
|
48
|
+
business_codes_name: "蛋糕(勿改),商城,电影(勿改)",
|
|
49
|
+
wallet_rule:
|
|
50
|
+
'<p>UC使用规则说明</p>\n<p>123</p>\n<p>阿达我娃的啊我啊我啊我啊我</p>\n<p><span style="color: #ff0000;">阿我打我爱我的啊我啊我</span></p>'
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
wallet_type: "UB",
|
|
54
|
+
wallet_name: "测试账户3",
|
|
55
|
+
wallet_virtual_number: "1000000000000244",
|
|
56
|
+
amount: 60179,
|
|
57
|
+
business_codes: "cake,movie,market,video,book",
|
|
58
|
+
business_codes_name:
|
|
59
|
+
"蛋糕(勿改),电影(勿改),商城(对应百货)(勿改),网络视听(勿改),图书(勿改)",
|
|
60
|
+
wallet_rule: "<p>UB使用规则说明</p>\n<p>123456</p>"
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
request_id: "c9975f7b9bc426a5"
|
|
64
|
+
},
|
|
65
|
+
getVipList:{"total_size":3,"next_page_token":"","list":[{"vip_card_id":3,"product_id":60038520,"product_name":"体验卡","sale_price":10000000,"vip_card_icon":""},{"vip_card_id":2,"product_id":60038519,"product_name":"月卡","sale_price":10000000,"vip_card_icon":""},{"vip_card_id":1,"product_id":60038515,"product_name":"测1","sale_price":10000000,"vip_card_icon":""}],"request_id":"c5cf58415cffdc30"},
|
|
66
|
+
};
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { jfbRootExec } from "@/utils/xd.event";
|
|
2
|
+
// #ifdef H5
|
|
3
|
+
import cookie from "@/common/cookie";
|
|
4
|
+
//#endif
|
|
5
|
+
import {Base64} from "js-base64";
|
|
6
|
+
|
|
2
7
|
export default {
|
|
3
8
|
data(){
|
|
4
9
|
return {
|
|
@@ -205,6 +210,7 @@ export default {
|
|
|
205
210
|
selected_wallet_list_json: JSON.stringify(selected_wallet_list),
|
|
206
211
|
need_pay_price: this.orderNeedPayPrice,
|
|
207
212
|
namespace: this.xnamespace,
|
|
213
|
+
vip_card_id: this.vip_card_id,
|
|
208
214
|
...this.options,
|
|
209
215
|
}, (res) => {
|
|
210
216
|
console.warn("创建订单成功");
|
|
@@ -219,6 +225,29 @@ export default {
|
|
|
219
225
|
}, 'create_order');
|
|
220
226
|
})
|
|
221
227
|
},
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
handleToPay(res){
|
|
231
|
+
let payPath = '';
|
|
232
|
+
let isMp = false;
|
|
233
|
+
// #ifdef H5
|
|
234
|
+
payPath = cookie.get(`jfb-pay-path-${this.brandInfo.site_id}`);
|
|
235
|
+
if(navigator.userAgent.match(/miniprogram/i)) isMp = true;
|
|
236
|
+
//#endif
|
|
237
|
+
if(payPath && isMp) {
|
|
238
|
+
payPath = Base64.encodeURI(`${this.thirdPayPath}?order_id=${res['pay_order_id']}&main_order_id=${res['order_id']}`);
|
|
239
|
+
this['$xdUniHelper'].redirectTo({
|
|
240
|
+
url: `/pages/jumptomp/jumptomp?callback=${payPath}`
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
else {
|
|
244
|
+
this.$xdUniHelper.redirectTo({
|
|
245
|
+
url: this.thirdPayPath + `?order_id=${res['pay_order_id']}&main_order_id=${res['order_id']}`
|
|
246
|
+
}, false, true)
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
|
|
250
|
+
|
|
222
251
|
createSettleOrder(options, successCb){
|
|
223
252
|
let postData = {
|
|
224
253
|
...options,
|
|
@@ -241,9 +270,7 @@ export default {
|
|
|
241
270
|
}else{
|
|
242
271
|
//支持补差, 跳转补差页
|
|
243
272
|
if(this.payThird){
|
|
244
|
-
this
|
|
245
|
-
url: this.thirdPayPath + `?order_id=${res.pay_order_id}&main_order_id=${res.order_id}`
|
|
246
|
-
})
|
|
273
|
+
this.handleToPay(res);
|
|
247
274
|
}else{
|
|
248
275
|
this.$xdAlert({
|
|
249
276
|
content: '余额不足,请选择其他票券',
|
|
@@ -256,4 +283,4 @@ export default {
|
|
|
256
283
|
})
|
|
257
284
|
}
|
|
258
285
|
}
|
|
259
|
-
}
|
|
286
|
+
}
|