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
664f4bc7
Commit
664f4bc7
authored
Dec 04, 2024
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
94e51199
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
21 deletions
+21
-21
player.vue
vedio/components/player/player.vue
+21
-21
No files found.
vedio/components/player/player.vue
View file @
664f4bc7
...
...
@@ -58,7 +58,7 @@
pm
.
getPlayletInfo
().
then
(
res
=>
{
this
.
albumId
=
res
.
albumId
this
.
seq
=
res
.
seq
this
.
episodeId
=
res
.
episodeId
this
.
episodeId
=
res
.
episodeId
this
.
loadAdSwitch
()
});
...
...
@@ -126,8 +126,8 @@
});
// 推荐位使用简单示例
pm
.
onChangeEpisode
((
e
)
=>
{
console
.
log
(
"触发选集切换onChangeEpisode回调:"
,
e
);
console
.
log
(
"触发选集切换onChangeEpisode回调:"
,
e
);
this
.
albumId
=
e
.
albumId
this
.
seq
=
e
.
seq
this
.
episodeId
=
e
.
episodeId
...
...
@@ -220,7 +220,7 @@
console
.
log
(
"playerBeforeMount"
);
},
mounted
()
{
this
.
getShowShortcut
()
console
.
log
(
"playerMounted"
);
},
...
...
@@ -264,16 +264,16 @@
loadAdSwitch
()
{
let
that
=
this
common
.
methods
.
post
({
url
:
'/vedio/confs'
,
data
:
{
albumId
:
this
.
albumId
url
:
'/vedio/confs'
,
data
:
{
albumId
:
this
.
albumId
},
showLoading
:
false
,
success
:
({
data
})
=>
{
that
.
showAdForServer
=
data
.
douyinAdTipOpen
;
if
(
!
that
.
showAdForServer
)
{
if
(
that
.
showAdForServer
)
{
// 预加载广告
that
.
preloadAd
()
}
...
...
@@ -284,7 +284,7 @@
let
that
=
this
// 创建实例
this
.
ad
=
tt
.
createRewardedVideoAd
({
adUnitId
:
REWARD_ID
,
adUnitId
:
REWARD_ID
});
// 监听错误
...
...
@@ -415,14 +415,14 @@
message
.
notify
(
data
.
msg
)
if
(
data
.
code
==
200
)
{
this
.
pm
.
setCurrentUnlock
()
this
.
pm
.
setCurrentUnlock
()
// this.commitVideo()
}
else
if
(
data
.
code
==
301
)
{
this
.
pm
.
setCurrentUnlock
()
// this.commitVideo()
this
.
pm
.
setCurrentUnlock
()
// this.commitVideo()
}
else
if
(
data
.
code
==
302
)
{
this
.
pm
.
setCurrentUnlock
()
// this.commitVideo()
this
.
pm
.
setCurrentUnlock
()
// this.commitVideo()
}
else
if
(
data
.
code
==
303
)
{
this
.
pm
.
toggleCustomDialog
()
}
...
...
@@ -431,7 +431,7 @@
},
adUnlock
()
{
let
that
=
this
thi
s
.
post
({
common
.
method
s
.
post
({
url
:
'/vedio/unlockByAd'
,
data
:
{
adSource
:
'csj'
,
...
...
@@ -446,14 +446,14 @@
message
.
notify
(
data
.
msg
)
if
(
data
.
code
==
200
)
{
that
.
pm
.
setCurrentUnlock
()
this
.
commitVideo
()
that
.
pm
.
setCurrentUnlock
()
this
.
commitVideo
()
}
else
if
(
data
.
code
==
301
)
{
that
.
pm
.
setCurrentUnlock
()
this
.
commitVideo
()
that
.
pm
.
setCurrentUnlock
()
this
.
commitVideo
()
}
else
if
(
data
.
code
==
302
)
{
that
.
pm
.
setCurrentUnlock
()
this
.
commitVideo
()
that
.
pm
.
setCurrentUnlock
()
this
.
commitVideo
()
}
else
if
(
data
.
code
==
303
)
{
that
.
pm
.
toggleCustomDialog
()
}
...
...
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