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
Show 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 @@
...
@@ -71,7 +71,8 @@
<
script
>
<
script
>
import
common
from
'@/mixins/common'
;
import
common
from
'@/mixins/common'
;
import
{
import
{
message
message
,
alert
}
from
'@/utils/fun'
;
}
from
'@/utils/fun'
;
export
default
{
export
default
{
name
:
'coinPopup'
,
name
:
'coinPopup'
,
...
@@ -98,6 +99,7 @@
...
@@ -98,6 +99,7 @@
title
:
'超多精彩好剧一键解锁'
,
title
:
'超多精彩好剧一键解锁'
,
userBean
:
{},
userBean
:
{},
showClone
:
false
,
showClone
:
false
,
os
:
'android'
,
isFirstPayFlag
:
false
,
isFirstPayFlag
:
false
,
popType
:
'bottom'
,
popType
:
'bottom'
,
showAnim
:
true
showAnim
:
true
...
@@ -115,6 +117,9 @@
...
@@ -115,6 +117,9 @@
},
},
handleShow
()
{
handleShow
()
{
let
that
=
this
;
let
that
=
this
;
if
(
wx
.
getSystemInfoSync
().
platform
==
'ios'
)
{
this
.
os
=
'ios'
}
that
.
post
({
that
.
post
({
url
:
'/vip/getVipProducts/point'
,
url
:
'/vip/getVipProducts/point'
,
...
@@ -197,12 +202,28 @@
...
@@ -197,12 +202,28 @@
// 符合首充
// 符合首充
vipBean
=
this
.
firstPayList
[
0
];
vipBean
=
this
.
firstPayList
[
0
];
}
}
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
({
this
.
post
({
url
:
'/vip/getVipPayParams/xpay'
,
url
:
'/vip/getVipPayParams/xpay'
,
data
:
{
data
:
{
vedioId
:
that
.
point
<=
0
?
null
:
that
.
vedioId
,
vedioId
:
that
.
point
<=
0
?
null
:
that
.
vedioId
,
pid
:
vipBean
.
pid
,
pid
:
vipBean
.
pid
,
os
:
that
.
os
,
payChannel
:
'WEIXIN'
payChannel
:
'WEIXIN'
},
},
showLoading
:
true
,
showLoading
:
true
,
...
@@ -212,6 +233,24 @@
...
@@ -212,6 +233,24 @@
that
.
wxVirtuallyPay
(
data
,
vipBean
.
largeType
);
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
)
{
wxVirtuallyPay
(
wxData
,
largeType
)
{
// 虚拟支付
// 虚拟支付
...
@@ -233,6 +272,10 @@
...
@@ -233,6 +272,10 @@
errMsg
,
errMsg
,
errCode
errCode
})
{
})
{
alert
({
content
:
'errCode='
+
errCode
+
' errMsg='
+
errMsg
});
if
(
that
.
isFirstPayFlag
&&
errCode
==
-
2
)
{
if
(
that
.
isFirstPayFlag
&&
errCode
==
-
2
)
{
// 符合首充
// 符合首充
that
.
handleClose
()
that
.
handleClose
()
...
...
vedio/pages/my/my.vue
View file @
6abbc877
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
</view>
</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;"
>
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=
"display: flex;flex-direction: column;justify-content: center;"
>
<view
style=
"font-size: 36rpx;color: #5b1500;font-weight: 777;"
>
<view
style=
"font-size: 36rpx;color: #5b1500;font-weight: 777;"
>
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
src=
"https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/bg_my_vip.png"
mode=
"scaleToFill"
></image>
src=
"https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/bg_my_vip.png"
mode=
"scaleToFill"
></image>
</view>
</view>
<view
v-if=
"os === '
android'
"
<view
v-if=
"os === '
ios' && xxxPayFlag
"
style=
"display: flex;height: 200rpx;margin: 20rpx;background: #f5ca86;border-radius: 20rpx;"
>
style=
"display: flex;height: 200rpx;margin: 20rpx;background: #f5ca86;border-radius: 20rpx;"
>
<view
style=
"flex-grow: 2; margin-left: 20rpx;"
>
<view
style=
"flex-grow: 2; margin-left: 20rpx;"
>
<view
<view
...
@@ -67,15 +67,15 @@
...
@@ -67,15 +67,15 @@
<view
class=
"infobg"
style=
"margin: 20rpx;"
>
<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
class=
"item_bd ellipsis"
style=
"margin-left: 58rpx;"
></view>
</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
class=
"item_bd ellipsis"
style=
"margin-left: 58rpx;"
></view>
</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
class=
"item_bd ellipsis"
style=
"margin-left: 58rpx;"
></view>
</view>
</view>
...
@@ -127,6 +127,7 @@
...
@@ -127,6 +127,7 @@
statusBarHeight
:
app
.
globalData
.
statusBarHeight
,
statusBarHeight
:
app
.
globalData
.
statusBarHeight
,
userBean
:
{},
userBean
:
{},
showAnimate
:
false
,
showAnimate
:
false
,
xxxPayFlag
:
false
,
windowHeight
:
0
,
windowHeight
:
0
,
os
:
'android'
,
os
:
'android'
,
versionName
:
app
.
globalData
.
versionName
,
versionName
:
app
.
globalData
.
versionName
,
...
@@ -146,6 +147,7 @@
...
@@ -146,6 +147,7 @@
data
data
})
=>
{
})
=>
{
this
.
userBean
=
data
;
this
.
userBean
=
data
;
this
.
xxxPayFlag
=
data
.
xxxPayFlag
;
}
}
});
});
},
},
...
...
vedio/pagesC/video/newVideoDetail.vue
View file @
6abbc877
...
@@ -150,6 +150,7 @@
...
@@ -150,6 +150,7 @@
windowHeight
:
0
,
windowHeight
:
0
,
current
:
0
,
// swiper 下标
current
:
0
,
// swiper 下标
oid
:
0
,
oid
:
0
,
xxxPayFlag
:
false
,
isplay
:
true
,
//是否自动播放下一个视频
isplay
:
true
,
//是否自动播放下一个视频
duration
:
500
,
duration
:
500
,
isqp
:
false
,
isqp
:
false
,
...
@@ -183,6 +184,16 @@
...
@@ -183,6 +184,16 @@
this
.
windowHeight
=
uni
.
getSystemInfoSync
().
windowHeight
-
this
.
safeArea
-
this
.
ttuop
this
.
windowHeight
=
uni
.
getSystemInfoSync
().
windowHeight
-
this
.
safeArea
-
this
.
ttuop
console
.
log
(
this
.
windowHeight
)
console
.
log
(
this
.
windowHeight
)
this
.
post
({
url
:
'/user/baseMsg'
,
showLoading
:
false
,
success
:
({
data
})
=>
{
this
.
xxxPayFlag
=
data
.
xxxPayFlag
;
}
});
this
.
getData
()
this
.
getData
()
},
},
onShow
()
{
onShow
()
{
...
@@ -205,6 +216,7 @@
...
@@ -205,6 +216,7 @@
}
}
},
},
showPayDialog
()
{
showPayDialog
()
{
if
(
!
this
.
xxxPayFlag
)
{
let
isIOS
=
wx
.
getSystemInfoSync
().
platform
;
let
isIOS
=
wx
.
getSystemInfoSync
().
platform
;
if
(
isIOS
===
'ios'
)
{
if
(
isIOS
===
'ios'
)
{
uni
.
showToast
({
uni
.
showToast
({
...
@@ -214,6 +226,8 @@
...
@@ -214,6 +226,8 @@
return
return
}
}
}
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
// 延迟渲染,否则位置错乱
// 延迟渲染,否则位置错乱
...
...
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