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
61e244eb
Commit
61e244eb
authored
Jan 02, 2024
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
支付弹窗添加首充逻辑
parent
5b46416b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
43 deletions
+26
-43
coin-popup.vue
vedio/components/coin-popup/coin-popup.vue
+26
-43
No files found.
vedio/components/coin-popup/coin-popup.vue
View file @
61e244eb
...
...
@@ -9,7 +9,7 @@
src=
"@/static/index/ic_quit_white.png"
></image>
</view>
<view
style=
"display: flex;flex-direction: column;align-items: center;margin-bottom: 20rpx;"
>
<view
style=
"font-size: 38rpx;color: black;"
>
超多精彩好剧一键解锁
</view>
<view
style=
"font-size: 38rpx;color: black;"
>
{{
title
}}
</view>
<view
class=
"flex"
>
<view
v-if=
"point>0"
style=
"display: flex;flex-direction: row;margin-top: 10rpx;"
>
<view
style=
"font-size: 28rpx;color: #644238;margin-top: 12rpx;"
>
解锁本集:
</view>
...
...
@@ -26,7 +26,7 @@
</view>
</view>
</view>
<view
class=
"section"
>
<view
class=
"section"
v-if=
"!isFirstPayFlag"
>
<view
class=
"pack-box"
>
<view
class=
"pack-item"
:style=
"item.largeType !=='vip' ?'background: #f5f5f5;':'background: #f4c98b;'"
...
...
@@ -96,8 +96,10 @@
return
{
vipList
:
[],
selectedIndex
:
0
,
title
:
'超多精彩好剧一键解锁'
,
userBean
:
{},
showClone
:
false
showClone
:
false
,
isFirstPayFlag
:
false
};
},
methods
:
{
...
...
@@ -110,7 +112,7 @@
let
that
=
this
;
this
.
$refs
.
coinPop
.
open
(
'bottom'
);
th
is
.
post
({
th
at
.
post
({
url
:
'/vip/getVipProducts/point'
,
data
:
{
vedioId
:
that
.
point
<=
0
?
null
:
that
.
vedioId
...
...
@@ -119,17 +121,25 @@
success
:
({
data
})
=>
{
this
.
vipList
=
data
.
list
;
that
.
vipList
=
data
.
list
;
that
.
isFirstPayFlag
=
data
.
forFirst
;
if
(
data
.
list
!=
null
)
{
// this.selectedIndex = data.list[0].activityType;
if
(
that
.
isFirstPayFlag
!=
null
&&
that
.
isFirstPayFlag
)
{
that
.
firstCash
=
data
.
list
[
0
].
firstPayPrice
;
that
.
title
=
that
.
firstCash
+
' 元自动解锁后续剧集'
;
// 符合首充
that
.
handlePay
()
}
else
{
that
.
title
=
'超多精彩好剧一键解锁'
;
for
(
let
i
=
0
;
i
<
data
.
list
.
length
;
i
++
)
{
if
(
data
.
list
[
i
].
activityType
==
1
)
{
this
.
selectedIndex
=
i
;
that
.
selectedIndex
=
i
;
break
;
}
}
}
}
}
});
this
.
post
({
...
...
@@ -170,22 +180,6 @@
}
});
},
wxPay
(
wxData
,
largeType
)
{
let
wxParams
=
wxData
.
params
;
let
that
=
this
;
// 发起微信支付
wx
.
requestPayment
({
timeStamp
:
wxParams
.
timeStamp
,
nonceStr
:
wxParams
.
nonceStr
,
package
:
wxParams
.
packageStr
,
signType
:
wxParams
.
signType
,
paySign
:
wxParams
.
paySign
,
success
(
res
)
{
that
.
paySuccess
(
largeType
);
},
fail
(
res
)
{}
})
},
wxVirtuallyPay
(
wxData
,
largeType
)
{
// 虚拟支付
let
wxParams
=
wxData
.
params
;
...
...
@@ -195,17 +189,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
,
...
...
@@ -217,8 +200,12 @@
errMsg
,
errCode
})
{
if
(
that
.
isFirstPayFlag
&&
errCode
==
-
2
)
{
// 符合首充
that
.
handleClose
()
}
else
{
// message.notify(errMsg);
// console.log('虚拟支付异常:errMsg=' + errMsg + ' errCode=' + errCode);
}
},
})
}
else
{
...
...
@@ -226,10 +213,6 @@
}
},
queryOrderStatus
(
largeType
,
tid
)
{
// setTimeout(() => {
// }, 5000);
let
that
=
this
;
this
.
post
({
data
:
{
...
...
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