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
c3260a91
Commit
c3260a91
authored
Jan 03, 2024
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首充逻辑优化
parent
1c213f02
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
22 deletions
+22
-22
coin-popup.vue
vedio/components/coin-popup/coin-popup.vue
+21
-21
my.vue
vedio/pages/my/my.vue
+1
-1
No files found.
vedio/components/coin-popup/coin-popup.vue
View file @
c3260a91
...
...
@@ -33,7 +33,6 @@
:class=
"[
{active: index==selectedIndex}]" v-for='(item, index) in vipList' :key='index'
@click="choosePack(item, index)">
<view
style=
"display: flex;flex-direction: column;align-items: center;"
>
<view
class=
"price row"
>
{{
item
.
firstPayPrice
}}
元
</view>
...
...
@@ -59,8 +58,6 @@
</view>
</view>
<view
v-if=
"isTimeoutPayFlag"
style=
"width: 100%;height: 700rpx;background-color: white;"
></view>
<view
style=
"display: flex;flex-direction: column;align-items: center;"
>
<view
style=
"font-size: 24rpx;color: gray;margin-top: 16rpx;margin-bottom: 18rpx;"
>
订单中如有疑问,请在个人中心联系客服
</view>
...
...
@@ -96,13 +93,11 @@
data
()
{
return
{
vipList
:
[],
screenH
:
700
,
firstPayList
:
[]
,
selectedIndex
:
0
,
title
:
'超多精彩好剧一键解锁'
,
userBean
:
{},
showClone
:
false
,
isFirstPayFlag
:
false
,
isTimeoutPayFlag
:
false
isFirstPayFlag
:
false
};
},
methods
:
{
...
...
@@ -112,8 +107,6 @@
this
.
handleClose
();
},
handleShow
()
{
this
.
screenH
=
uni
.
getSystemInfoSync
().
screenHeight
;
let
that
=
this
;
this
.
$refs
.
coinPop
.
open
(
'bottom'
);
...
...
@@ -126,15 +119,25 @@
success
:
({
data
})
=>
{
that
.
vipList
=
data
.
list
;
that
.
isFirstPayFlag
=
data
.
forFirst
;
if
(
data
.
list
!=
null
)
{
if
(
data
.
list
!=
null
&&
data
.
list
.
length
>
0
)
{
if
(
that
.
isFirstPayFlag
!=
null
&&
that
.
isFirstPayFlag
)
{
// 符合首充
var
tempFirstPayFlag
=
false
;
for
(
let
i
=
0
;
i
<
data
.
list
.
length
;
i
++
)
{
if
(
data
.
list
[
i
].
forFirst
==
1
&&
!
tempFirstPayFlag
)
{
// 首充
tempFirstPayFlag
=
true
;
that
.
firstPayList
.
push
(
data
.
list
[
i
]);
}
else
{
that
.
vipList
.
push
(
data
.
list
[
i
]);
}
}
that
.
firstCash
=
data
.
list
[
0
].
firstPayPrice
;
that
.
title
=
that
.
firstCash
+
' 元自动解锁后续剧集'
;
// 符合首充
that
.
handlePay
()
}
else
{
that
.
vipList
=
data
.
list
;
that
.
title
=
'超多精彩好剧一键解锁'
;
for
(
let
i
=
0
;
i
<
data
.
list
.
length
;
i
++
)
{
if
(
data
.
list
[
i
].
activityType
==
1
)
{
...
...
@@ -160,7 +163,6 @@
handleClose
()
{
this
.
$refs
.
coinPop
.
close
(
'bottom'
);
this
.
$emit
(
'close'
);
this
.
isTimeoutPayFlag
=
false
;
},
choosePack
(
item
,
index
)
{
this
.
selectedIndex
=
index
;
...
...
@@ -169,7 +171,11 @@
},
handlePay
()
{
let
that
=
this
;
let
vipBean
=
this
.
vipList
[
this
.
selectedIndex
];
var
vipBean
=
this
.
vipList
[
this
.
selectedIndex
];
if
(
this
.
isFirstPayFlag
!=
null
&&
this
.
isFirstPayFlag
&&
this
.
firstPayList
.
length
>
0
)
{
// 符合首充
vipBean
=
this
.
firstPayList
[
0
];
}
this
.
post
({
url
:
'/vip/getVipPayParams/xpay'
,
...
...
@@ -193,12 +199,6 @@
let
that
=
this
;
const
SDKVersion
=
wx
.
getSystemInfoSync
().
SDKVersion
;
if
(
this
.
compareVersion
(
SDKVersion
,
'2.19.2'
)
>=
0
||
wx
.
canIUse
(
'requestVirtualPayment'
))
{
if
(
that
.
isFirstPayFlag
)
{
setTimeout
(()
=>
{
that
.
isTimeoutPayFlag
=
true
;
},
1800
);
}
wx
.
requestVirtualPayment
({
signData
:
JSON
.
stringify
(
wxData
.
params
.
sigData
),
paySig
:
wxParams
.
paySig
,
...
...
vedio/pages/my/my.vue
View file @
c3260a91
...
...
@@ -136,7 +136,7 @@
},
methods
:
{
show
()
{
this
.
os
=
wx
.
getSystemInfoSync
().
platform
;
//
this.os = wx.getSystemInfoSync().platform;
this
.
windowHeight
=
uni
.
getSystemInfoSync
().
windowHeight
// loadData() {
this
.
post
({
...
...
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