Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
uniapp_vedio
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
uniapp_vedio
Commits
17957b0b
Commit
17957b0b
authored
Dec 11, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加抖音支付
parent
a91d7f3b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
21 deletions
+47
-21
coin-popup.vue
vedio/components/coin-popup/coin-popup.vue
+47
-21
No files found.
vedio/components/coin-popup/coin-popup.vue
View file @
17957b0b
...
...
@@ -154,22 +154,36 @@
handlePay
()
{
let
that
=
this
;
let
vipBean
=
this
.
vipList
[
this
.
selectedIndex
];
let
myPayChannel
=
'WEIXIN'
// #ifdef MP-TOUTIAO
myPayChannel
=
'TT'
// 快手支付
// #ifdef MP-KUAISHOU
// #endif
// #ifdef MP-WEIXIN
myPayChannel
=
'WEIXIN'
// 抖音支付
// #ifdef MP-TOUTIAO
this
.
post
({
url
:
'/vip/getVipPayParams/xdouyin'
,
data
:
{
vedioId
:
that
.
point
<=
0
?
null
:
that
.
vedioId
,
pid
:
vipBean
.
pid
},
showLoading
:
true
,
success
:
({
data
})
=>
{
that
.
ttPay
(
data
,
vipBean
.
largeType
);
}
});
// #endif
// 微信虚拟支付
// #ifdef MP-WEIXIN
this
.
post
({
url
:
'/vip/getVipPayParams/xpay'
,
data
:
{
vedioId
:
that
.
point
<=
0
?
null
:
that
.
vedioId
,
pid
:
vipBean
.
pid
,
payChannel
:
myPayChannel
pid
:
vipBean
.
pid
},
showLoading
:
true
,
success
:
({
...
...
@@ -178,6 +192,30 @@
that
.
wxVirtuallyPay
(
data
,
vipBean
.
largeType
);
}
});
// #endif
},
ttPay
(
ttData
,
largeType
)
{
let
that
=
this
;
tt
.
pay
({
orderInfo
:
{
order_id
:
ttData
.
order_id
,
order_token
:
ttData
.
order_token
,
},
service
:
5
,
success
(
res
)
{
if
(
res
.
code
==
0
)
{
// 拉取服务器,是否支付成功
that
.
queryOrderStatus
(
largeType
,
ttData
.
tid
)
}
else
{
message
.
notify
(
'支付异常'
);
}
},
fail
(
res
)
{
message
.
notify
(
res
.
errMsg
);
},
});
},
wxPay
(
wxData
,
largeType
)
{
let
wxParams
=
wxData
.
params
;
...
...
@@ -190,7 +228,7 @@
signType
:
wxParams
.
signType
,
paySign
:
wxParams
.
paySign
,
success
(
res
)
{
that
.
paySuccess
(
largeType
);
that
.
queryOrderStatus
(
largeType
,
wxData
.
tid
)
},
fail
(
res
)
{}
})
...
...
@@ -204,17 +242,6 @@
if
(
this
.
compareVersion
(
SDKVersion
,
'2.19.2'
)
>=
0
||
wx
.
canIUse
(
'requestVirtualPayment'
))
{
wx
.
requestVirtualPayment
({
signData
:
JSON
.
stringify
(
wxData
.
params
.
sigData
),
// signData: JSON.stringify({
// offerId: signDataParams.offerId,
// buyQuantity: signDataParams.buyQuantity,
// env: signDataParams.env,
// currencyType: signDataParams.currencyType,
// platform: signDataParams.platform,
// productId: signDataParams.productId,
// goodsPrice: signDataParams.goodsPrice,
// outTradeNo: signDataParams.outTradeNo,
// attach: signDataParams.attach,
// }),
paySig
:
wxParams
.
paySig
,
signature
:
wxParams
.
signature
,
mode
:
wxParams
.
mode
,
...
...
@@ -226,8 +253,7 @@
errMsg
,
errCode
})
{
// message.notify(errMsg);
// console.log('虚拟支付异常:errMsg=' + errMsg + ' errCode=' + errCode);
message
.
notify
(
errMsg
);
},
})
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment