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
ed2c6beb
Commit
ed2c6beb
authored
Jul 24, 2024
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加签约支付
parent
8190e475
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
24 deletions
+49
-24
coin-popup.vue
vedio/components/coin-popup/coin-popup.vue
+45
-18
my.vue
vedio/components/home/my.vue
+3
-3
loading.vue
vedio/pages/loading.vue
+1
-3
No files found.
vedio/components/coin-popup/coin-popup.vue
View file @
ed2c6beb
...
...
@@ -98,7 +98,8 @@
vipList
:
[],
selectedIndex
:
0
,
agreeFlag
:
false
,
userBean
:
{},
userBean
:
{},
agreementDto
:
null
,
os
:
'android'
,
titleText
:
'超多精彩小说一键解锁'
,
showClone
:
false
...
...
@@ -140,12 +141,12 @@
});
this
.
post
({
url
:
'/
user/baseMsg
'
,
url
:
'/
vip/getOrderList
'
,
showLoading
:
false
,
success
:
({
data
})
=>
{
this
.
userBean
=
data
;
this
.
agreementDto
=
data
.
agreement
;
}
});
},
...
...
@@ -169,21 +170,28 @@
handlePay
()
{
let
that
=
this
;
var
vipBean
=
this
.
vipList
[
this
.
selectedIndex
];
if
(
this
.
os
==
'ios'
)
{
if
(
this
.
os
==
'ios'
)
{
message
.
notify
(
'暂不支持ios系统~'
);
}
else
{
this
.
post
({
url
:
'/vip/getVipPayParams/wechat'
,
data
:
{
pid
:
vipBean
.
pid
,
payChannel
:
'WEIXIN'
},
showLoading
:
true
,
success
:
({
data
})
=>
{
that
.
wxPay
(
data
,
vipBean
.
largeType
);
}
}
else
{
this
.
post
({
url
:
'/vip/getVipPayParams/wechat'
,
data
:
{
pid
:
vipBean
.
pid
,
payChannel
:
'WEIXIN'
},
showLoading
:
true
,
success
:
({
data
})
=>
{
if
(
vipBean
.
firstPayPrice
==
0
)
{
//签约
that
.
wxSign
(
data
,
vipBean
.
largeType
);
}
else
{
//普通支付
that
.
wxPay
(
data
,
vipBean
.
largeType
);
}
}
});
}
},
...
...
@@ -198,11 +206,30 @@
signType
:
wxParams
.
signType
,
paySign
:
wxParams
.
paySign
,
success
(
res
)
{
that
.
queryOrderStatus
(
largeType
,
wxData
.
tidStr
);
that
.
queryOrderStatus
(
largeType
,
wxData
.
tidStr
);
},
fail
(
res
)
{}
})
},
wxSign
(
wxData
,
largeType
)
{
let
wxParams
=
wxData
.
params
;
let
that
=
this
;
// 发起微信签约
wx
.
navigateToMiniProgram
({
appId
:
wxData
.
appId
,
path
:
'pages/loading'
,
extraData
:
wxData
.
params
,
success
(
res
)
{
console
.
log
(
"wxSign suc="
,
res
);
// 成功跳转到签约小程序
that
.
queryOrderStatus
(
largeType
,
wxData
.
tidStr
);
},
fail
(
res
)
{
// 未成功跳转到签约小程序
console
.
log
(
"wxSign fail="
,
res
);
}
})
},
queryOrderStatus
(
largeType
,
tid
)
{
let
that
=
this
;
this
.
post
({
...
...
vedio/components/home/my.vue
View file @
ed2c6beb
...
...
@@ -42,12 +42,12 @@
到期时间:
{{
userBean
.
expireTime
*
1000
|
formatDate
(
'yyyy-MM-dd'
)
}}
</view>
</view>
</view>
<view
v-if=
"userBean.expireTime
<
=
0
"
style=
"width: 220rpx;"
>
<view
style=
"width: 220rpx;"
>
<view
style=
"width: 100%;height: 100%;display: flex;flex-direction: column;align-items: center;justify-content: center;"
>
<view
@
click=
"handleCoinPay"
style=
"width: 160rpx;height: 60rpx;background-color: #fff;border-radius:30rpx;color: 263358;font-size: 26rpx;justify-content: center;align-items: center;display: flex;padding-bottom: 4rpx;"
>
去开通
{{
userBean
.
expireTime
<=
0
?
'去开通'
:
'VIP会员'
}}
</view>
</view>
</view>
...
...
@@ -70,7 +70,7 @@
阅读记录
<view
class=
"item_bd ellipsis"
style=
"margin-left: 58rpx;"
></view>
</view>
<view
class=
"item arrow"
@
click=
"handleFind"
>
<view
v-if=
"false"
class=
"item arrow"
@
click=
"handleFind"
>
如何找到我
<view
class=
"item_bd ellipsis"
style=
"margin-left: 58rpx;"
></view>
</view>
...
...
vedio/pages/loading.vue
View file @
ed2c6beb
...
...
@@ -90,9 +90,7 @@
app
.
globalData
.
userId
=
data
.
idcode
;
saveToken
(
data
.
token
)
setTimeout
(()
=>
{
// redirectTo('home?activiteFlag='+data.activiteFlag+"&idcode="+data.idcode);
redirectTo
(
'home?activiteFlag='
+
1
+
"&idcode="
+
data
.
idcode
);
redirectTo
(
'home?activiteFlag='
+
data
.
activiteFlag
+
"&idcode="
+
data
.
idcode
);
},
1000
);
}
});
...
...
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