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
6abbc877
Commit
6abbc877
authored
Feb 28, 2024
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加ios支付及标记
parent
f831908c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
87 additions
and
28 deletions
+87
-28
coin-popup.vue
vedio/components/coin-popup/coin-popup.vue
+59
-16
my.vue
vedio/pages/my/my.vue
+7
-5
newVideoDetail.vue
vedio/pagesC/video/newVideoDetail.vue
+21
-7
No files found.
vedio/components/coin-popup/coin-popup.vue
View file @
6abbc877
...
...
@@ -71,7 +71,8 @@
<
script
>
import
common
from
'@/mixins/common'
;
import
{
message
message
,
alert
}
from
'@/utils/fun'
;
export
default
{
name
:
'coinPopup'
,
...
...
@@ -98,6 +99,7 @@
title
:
'超多精彩好剧一键解锁'
,
userBean
:
{},
showClone
:
false
,
os
:
'android'
,
isFirstPayFlag
:
false
,
popType
:
'bottom'
,
showAnim
:
true
...
...
@@ -115,6 +117,9 @@
},
handleShow
()
{
let
that
=
this
;
if
(
wx
.
getSystemInfoSync
().
platform
==
'ios'
)
{
this
.
os
=
'ios'
}
that
.
post
({
url
:
'/vip/getVipProducts/point'
,
...
...
@@ -197,21 +202,55 @@
// 符合首充
vipBean
=
this
.
firstPayList
[
0
];
}
this
.
post
({
url
:
'/vip/getVipPayParams/xpay'
,
data
:
{
vedioId
:
that
.
point
<=
0
?
null
:
that
.
vedioId
,
pid
:
vipBean
.
pid
,
payChannel
:
'WEIXIN'
},
showLoading
:
true
,
success
:
({
data
})
=>
{
that
.
wxVirtuallyPay
(
data
,
vipBean
.
largeType
);
}
});
if
(
this
.
os
==
'ios'
){
this
.
post
({
url
:
'/vip/getVipPayParams'
,
data
:
{
vedioId
:
that
.
point
<=
0
?
null
:
that
.
vedioId
,
pid
:
vipBean
.
pid
,
payChannel
:
'WEIXIN'
},
showLoading
:
true
,
success
:
({
data
})
=>
{
that
.
wxPay
(
data
,
vipBean
.
largeType
);
}
});
}
else
{
this
.
post
({
url
:
'/vip/getVipPayParams/xpay'
,
data
:
{
vedioId
:
that
.
point
<=
0
?
null
:
that
.
vedioId
,
pid
:
vipBean
.
pid
,
os
:
that
.
os
,
payChannel
:
'WEIXIN'
},
showLoading
:
true
,
success
:
({
data
})
=>
{
that
.
wxVirtuallyPay
(
data
,
vipBean
.
largeType
);
}
});
}
},
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
)
{
// 虚拟支付
...
...
@@ -233,6 +272,10 @@
errMsg
,
errCode
})
{
alert
({
content
:
'errCode='
+
errCode
+
' errMsg='
+
errMsg
});
if
(
that
.
isFirstPayFlag
&&
errCode
==
-
2
)
{
// 符合首充
that
.
handleClose
()
...
...
vedio/pages/my/my.vue
View file @
6abbc877
...
...
@@ -12,7 +12,7 @@
</view>
<view
v-if=
"
userBean.showVipInner && os === 'android'
"
<view
v-if=
"
os === 'ios' && xxxPayFlag
"
style=
"display: flex;flex-direction: row;background: #f5ca86;margin: 20rpx;padding: 40rpx;border-radius:20rpx;align-items: center;justify-content:space-between;"
>
<view
style=
"display: flex;flex-direction: column;justify-content: center;"
>
<view
style=
"font-size: 36rpx;color: #5b1500;font-weight: 777;"
>
...
...
@@ -38,7 +38,7 @@
src=
"https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/bg_my_vip.png"
mode=
"scaleToFill"
></image>
</view>
<view
v-if=
"os === '
android'
"
<view
v-if=
"os === '
ios' && xxxPayFlag
"
style=
"display: flex;height: 200rpx;margin: 20rpx;background: #f5ca86;border-radius: 20rpx;"
>
<view
style=
"flex-grow: 2; margin-left: 20rpx;"
>
<view
...
...
@@ -67,15 +67,15 @@
<view
class=
"infobg"
style=
"margin: 20rpx;"
>
<view
v-if=
"
userBean.showVipInner && os === 'android'
"
class=
"item arrow"
@
click=
"handlePayRecord"
>
<view
v-if=
"
os === 'ios' && xxxPayFlag
"
class=
"item arrow"
@
click=
"handlePayRecord"
>
我的订单
<view
class=
"item_bd ellipsis"
style=
"margin-left: 58rpx;"
></view>
</view>
<view
v-if=
"os === '
android'
"
class=
"item arrow"
@
click=
"handleDotRecord"
>
<view
v-if=
"os === '
ios' && xxxPayFlag
"
class=
"item arrow"
@
click=
"handleDotRecord"
>
看点记录
<view
class=
"item_bd ellipsis"
style=
"margin-left: 58rpx;"
></view>
</view>
<view
v-if=
"os === '
android'
"
class=
"item arrow"
@
click=
"handleUseDotRecord"
>
<view
v-if=
"os === '
ios' && xxxPayFlag
"
class=
"item arrow"
@
click=
"handleUseDotRecord"
>
消费记录
<view
class=
"item_bd ellipsis"
style=
"margin-left: 58rpx;"
></view>
</view>
...
...
@@ -127,6 +127,7 @@
statusBarHeight
:
app
.
globalData
.
statusBarHeight
,
userBean
:
{},
showAnimate
:
false
,
xxxPayFlag
:
false
,
windowHeight
:
0
,
os
:
'android'
,
versionName
:
app
.
globalData
.
versionName
,
...
...
@@ -146,6 +147,7 @@
data
})
=>
{
this
.
userBean
=
data
;
this
.
xxxPayFlag
=
data
.
xxxPayFlag
;
}
});
},
...
...
vedio/pagesC/video/newVideoDetail.vue
View file @
6abbc877
...
...
@@ -150,6 +150,7 @@
windowHeight
:
0
,
current
:
0
,
// swiper 下标
oid
:
0
,
xxxPayFlag
:
false
,
isplay
:
true
,
//是否自动播放下一个视频
duration
:
500
,
isqp
:
false
,
...
...
@@ -183,6 +184,16 @@
this
.
windowHeight
=
uni
.
getSystemInfoSync
().
windowHeight
-
this
.
safeArea
-
this
.
ttuop
console
.
log
(
this
.
windowHeight
)
this
.
post
({
url
:
'/user/baseMsg'
,
showLoading
:
false
,
success
:
({
data
})
=>
{
this
.
xxxPayFlag
=
data
.
xxxPayFlag
;
}
});
this
.
getData
()
},
onShow
()
{
...
...
@@ -205,16 +216,19 @@
}
},
showPayDialog
()
{
let
isIOS
=
wx
.
getSystemInfoSync
().
platform
;
if
(
isIOS
===
'ios'
)
{
uni
.
showToast
({
title
:
'暂不支持IOS系统'
,
icon
:
'none'
})
if
(
!
this
.
xxxPayFlag
)
{
let
isIOS
=
wx
.
getSystemInfoSync
().
platform
;
if
(
isIOS
===
'ios'
)
{
uni
.
showToast
({
title
:
'暂不支持IOS系统'
,
icon
:
'none'
})
return
return
}
}
this
.
$nextTick
(()
=>
{
// 延迟渲染,否则位置错乱
this
.
showCoinPop
=
true
...
...
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