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
29a1056d
Commit
29a1056d
authored
Dec 20, 2023
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
fb0b06a1
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
42 additions
and
731 deletions
+42
-731
follow.vue
vedio/components/home/follow.vue
+1
-1
index.vue
vedio/components/home/index.vue
+0
-4
recommendVideo.vue
vedio/components/home/recommendVideo.vue
+1
-1
pages.json
vedio/pages.json
+17
-27
follow.vue
vedio/pages/recommend/follow.vue
+1
-1
recommendVideo.vue
vedio/pages/recommend/recommendVideo.vue
+1
-1
ttVideoDetail.vue
vedio/pagesC/ttvideo/ttVideoDetail.vue
+19
-24
newVideoDetail.vue
vedio/pagesC/video/newVideoDetail.vue
+0
-670
watchRecord.vue
vedio/pagesD/watchRecord/watchRecord.vue
+1
-1
uni.scss
vedio/scss/uni.scss
+1
-1
No files found.
vedio/components/home/follow.vue
View file @
29a1056d
...
@@ -95,7 +95,7 @@
...
@@ -95,7 +95,7 @@
this
.
$emit
(
"goRecommend"
)
this
.
$emit
(
"goRecommend"
)
},
},
click
(
detail
)
{
click
(
detail
)
{
navigateTo
(
`/pagesC/video/
new
VideoDetail?data=`
+
encodeURIComponent
(
JSON
.
stringify
(
detail
)))
navigateTo
(
`/pagesC/video/
tt
VideoDetail?data=`
+
encodeURIComponent
(
JSON
.
stringify
(
detail
)))
},
},
longClick
(
key
)
{
longClick
(
key
)
{
this
.
isEditStyle
=
true
this
.
isEditStyle
=
true
...
...
vedio/components/home/index.vue
View file @
29a1056d
...
@@ -311,19 +311,15 @@
...
@@ -311,19 +311,15 @@
});
});
},
},
handleBanner
(
item
)
{
handleBanner
(
item
)
{
// navigateTo(`/pagesC/video/newVideoDetail?data=` + encodeURIComponent(JSON.stringify(item)));
navigateTo
(
`/pagesC/ttvideo/ttVideoDetail?data=`
+
encodeURIComponent
(
JSON
.
stringify
(
item
)));
navigateTo
(
`/pagesC/ttvideo/ttVideoDetail?data=`
+
encodeURIComponent
(
JSON
.
stringify
(
item
)));
},
},
handleInfo
(
item
)
{
handleInfo
(
item
)
{
// navigateTo(`/pagesC/video/newVideoDetail?data=` + encodeURIComponent(JSON.stringify(item)));
navigateTo
(
`/pagesC/ttvideo/ttVideoDetail?data=`
+
encodeURIComponent
(
JSON
.
stringify
(
item
)));
navigateTo
(
`/pagesC/ttvideo/ttVideoDetail?data=`
+
encodeURIComponent
(
JSON
.
stringify
(
item
)));
},
},
handleTop
(
item
)
{
handleTop
(
item
)
{
// navigateTo(`/pagesC/video/newVideoDetail?data=` + encodeURIComponent(JSON.stringify(item)));
navigateTo
(
`/pagesC/ttvideo/ttVideoDetail?data=`
+
encodeURIComponent
(
JSON
.
stringify
(
item
)));
navigateTo
(
`/pagesC/ttvideo/ttVideoDetail?data=`
+
encodeURIComponent
(
JSON
.
stringify
(
item
)));
},
},
handleBottomPlay
(
item
)
{
handleBottomPlay
(
item
)
{
// navigateTo(`/pagesC/video/newVideoDetail?data=` + encodeURIComponent(JSON.stringify(item)));
navigateTo
(
`/pagesC/ttvideo/ttVideoDetail?data=`
+
encodeURIComponent
(
JSON
.
stringify
(
item
)));
navigateTo
(
`/pagesC/ttvideo/ttVideoDetail?data=`
+
encodeURIComponent
(
JSON
.
stringify
(
item
)));
},
},
handleBottomClose
()
{
handleBottomClose
()
{
...
...
vedio/components/home/recommendVideo.vue
View file @
29a1056d
...
@@ -236,7 +236,7 @@
...
@@ -236,7 +236,7 @@
this
.
isqp
=
e
.
detail
.
show
this
.
isqp
=
e
.
detail
.
show
},
},
detail
(
detail
)
{
detail
(
detail
)
{
navigateTo
(
`/pagesC/video/
new
VideoDetail?data=`
+
encodeURIComponent
(
JSON
.
stringify
(
detail
))
+
navigateTo
(
`/pagesC/video/
tt
VideoDetail?data=`
+
encodeURIComponent
(
JSON
.
stringify
(
detail
))
+
`&playNext=1`
)
`&playNext=1`
)
},
},
collect
(
vedioId
,
index
)
{
collect
(
vedioId
,
index
)
{
...
...
vedio/pages.json
View file @
29a1056d
...
@@ -84,25 +84,16 @@
...
@@ -84,25 +84,16 @@
},
{
},
{
"root"
:
"pagesC"
,
"root"
:
"pagesC"
,
"pages"
:
[{
"pages"
:
[{
"path"
:
"ttvideo/ttVideoDetail"
,
"path"
:
"ttvideo/ttVideoDetail"
,
"style"
:
{
"style"
:
{
"navigationStyle"
:
"default"
,
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#000000"
,
"navigationBarBackgroundColor"
:
"#000000"
,
"navigationBarTextStyle"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"#ffffff"
,
"usingComponents "
:
{
"usingComponents "
:
{
"video-player"
:
"ext://industry/video-player"
"video-player"
:
"ext://industry/video-player"
}
}
},
{
"path"
:
"video/newVideoDetail"
,
"style"
:
{
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#000000"
,
"navigationBarTextStyle"
:
"#ffffff"
}
}
}
}
]
}
]
},
},
{
{
"root"
:
"pagesD"
,
"root"
:
"pagesD"
,
...
@@ -147,19 +138,18 @@
...
@@ -147,19 +138,18 @@
"pages/home"
:
{
"pages/home"
:
{
"network"
:
"all"
,
//在指定网络下预下载,可选值为:all(不限网络)、wifi(仅wifi下预下载)
"network"
:
"all"
,
//在指定网络下预下载,可选值为:all(不限网络)、wifi(仅wifi下预下载)
"packages"
:
[
"pagesA"
,
"pagesC"
,
"pagesD"
]
//进入页面后预下载分包
"packages"
:
[
"pagesA"
,
"pagesC"
,
"pagesD"
]
//进入页面后预下载分包
},
"pages/recommend/recommend"
:
{
"network"
:
"all"
,
//在指定网络下预下载,可选值为:all(不限网络)、wifi(仅wifi下预下载)
"packages"
:
[
"pagesC"
]
//进入页面后预下载分包
},
"pages/my/my"
:
{
"network"
:
"all"
,
//在指定网络下预下载,可选值为:all(不限网络)、wifi(仅wifi下预下载)
"packages"
:
[
"pagesD"
]
//进入页面后预下载分包
}
}
//
,
//
"pages/recommend/recommend"
:
{
//
"network"
:
"all"
,
//在指定网络下预下载,可选值为:all(不限网络)、wifi(仅wifi下预下载)
//
"packages"
:
[
"pagesC"
]
//进入页面后预下载分包
//
},
//
"pages/my/my"
:
{
//
"network"
:
"all"
,
//在指定网络下预下载,可选值为:all(不限网络)、wifi(仅wifi下预下载)
//
"packages"
:
[
"pagesD"
]
//进入页面后预下载分包
//
}
},
},
"globalStyle"
:
{
"globalStyle"
:
{
"backgroundColor"
:
"#
23232
5"
,
"backgroundColor"
:
"#
f5f5f
5"
,
"navigationStyle"
:
"default"
,
"navigationStyle"
:
"default"
,
"app-plus"
:
{
"app-plus"
:
{
"bounce"
:
"none"
,
"bounce"
:
"none"
,
...
...
vedio/pages/recommend/follow.vue
View file @
29a1056d
...
@@ -95,7 +95,7 @@
...
@@ -95,7 +95,7 @@
this
.
$emit
(
"goRecommend"
)
this
.
$emit
(
"goRecommend"
)
},
},
click
(
detail
)
{
click
(
detail
)
{
navigateTo
(
`/pagesC/video/
new
VideoDetail?data=`
+
encodeURIComponent
(
JSON
.
stringify
(
detail
)))
navigateTo
(
`/pagesC/video/
tt
VideoDetail?data=`
+
encodeURIComponent
(
JSON
.
stringify
(
detail
)))
},
},
longClick
(
key
)
{
longClick
(
key
)
{
this
.
isEditStyle
=
true
this
.
isEditStyle
=
true
...
...
vedio/pages/recommend/recommendVideo.vue
View file @
29a1056d
...
@@ -236,7 +236,7 @@
...
@@ -236,7 +236,7 @@
this
.
isqp
=
e
.
detail
.
show
this
.
isqp
=
e
.
detail
.
show
},
},
detail
(
detail
)
{
detail
(
detail
)
{
navigateTo
(
`/pagesC/video/
new
VideoDetail?data=`
+
encodeURIComponent
(
JSON
.
stringify
(
detail
))
+
navigateTo
(
`/pagesC/video/
tt
VideoDetail?data=`
+
encodeURIComponent
(
JSON
.
stringify
(
detail
))
+
`&playNext=1`
)
`&playNext=1`
)
},
},
collect
(
vedioId
,
index
)
{
collect
(
vedioId
,
index
)
{
...
...
vedio/pagesC/ttvideo/ttVideoDetail.vue
View file @
29a1056d
...
@@ -2,23 +2,20 @@
...
@@ -2,23 +2,20 @@
<view
style=
"width: 100%;height: 100%;"
>
<view
style=
"width: 100%;height: 100%;"
>
<!--
<status-title
style=
"position: absolute;"
iconColor=
"white"
:showBack=
"true"
/>
-->
<!--
<status-title
style=
"position: absolute;"
iconColor=
"white"
:showBack=
"true"
/>
-->
<swiper
class=
"swiper"
circular
@
change=
"swiperChange"
:current=
"current"
:vertical=
"true"
:duration=
"duration"
>
<swiper
class=
"swiper"
circular
@
change=
"swiperChange"
:current=
"current"
:vertical=
"true"
:duration=
"duration"
>
<swiper-item
v-for=
"(list, index) in displaySwiperList"
:key=
"index"
>
<swiper-item
v-for=
"(list, index) in displaySwiperList"
:key=
"index"
@
click=
"tapVides()"
>
<block>
<block>
<tt-video-player
v-if=
"canUseTTPlayer && Math.abs(displayIndex-index)==0"
:id=
"list.vedioIndex"
<tt-video-player
v-if=
"canUseTTPlayer && Math.abs(displayIndex-index)==0"
:id=
"list.vedioIndex"
:album-id=
"list.douyinAlbumId"
:episode-id=
"list.douyinEpisodeId"
:cloud-type=
"1"
version=
"1"
:album-id=
"list.douyinAlbumId"
:episode-id=
"list.douyinEpisodeId"
:cloud-type=
"1"
version=
"1"
object-fit=
"contain"
:controls=
"controls"
:poster=
"data.coverImage"
:loop=
"!isplay"
object-fit=
"contain"
:controls=
"controls"
:poster=
"data.coverImage"
:loop=
"!isplay"
@
getsource=
"getsource"
:enable-progress-gesture=
"false"
:show-loading=
"true
"
:autoplay=
"!list.lock"
:enable-progress-gesture=
"false"
:show-loading=
"true"
@
play=
"startPlay
"
:show-fullscreen-btn=
"false"
@
controlstoggle=
"controlstoggle"
@
timeupdate=
"timeUpdate"
:show-fullscreen-btn=
"false"
@
controlstoggle=
"controlstoggle"
@
timeupdate=
"timeUpdate"
@
ended=
"ended"
@
click=
"tapVides()"
@
error=
"error"
>
@
ended=
"ended"
/>
<cover-view>
{{
list
.
douyinAlbumId
}}
</cover-view>
<cover-view>
{{
list
.
douyinEpisodeId
}}
</cover-view>
</tt-video-player>
<video
v-if=
"!canUseTTPlayer && Math.abs(displayIndex-index)==0"
:id=
"list.vedioIndex"
<video
v-if=
"!canUseTTPlayer && Math.abs(displayIndex-index)==0"
:id=
"list.vedioIndex"
@
ended=
"ended"
:controls=
"controls"
:loop=
"!isplay"
:enable-progress-gesture=
"false"
@
ended=
"ended"
:controls=
"controls"
:loop=
"!isplay"
:enable-progress-gesture=
"false"
:show-loading=
"true"
:show-fullscreen-btn=
"false"
@
controlstoggle=
"controlstoggle"
:show-loading=
"true"
:show-fullscreen-btn=
"false"
@
controlstoggle=
"controlstoggle"
:poster=
"data.coverImage"
@
click=
"tapVides()"
@
timeupdate=
"timeupdate"
:autoplay=
"!list.lock
"
:poster=
"data.coverImage"
@
timeupdate=
"timeupdate"
:autoplay=
"!list.lock"
:src=
"list.vedioUrl
"
:src=
"list.vedioUrl"
class=
"tsvideo"
play-btn-position=
"center"
object-fit=
"contain"
/>
class=
"tsvideo"
play-btn-position=
"center"
object-fit=
"contain"
/>
<view
v-if=
"originList[originIndex].lock || !list.vedioUrl"
class=
"videoHover tsimg"
<view
v-if=
"originList[originIndex].lock || !list.vedioUrl"
class=
"videoHover tsimg"
@
click
.
stop=
"tapVideoHover(index,list.pays)"
@
click
.
stop=
"tapVideoHover(index,list.pays)"
...
@@ -125,8 +122,6 @@
...
@@ -125,8 +122,6 @@
showCoinPop
:
false
,
showCoinPop
:
false
,
vipBackPage
:
''
,
vipBackPage
:
''
,
canUseTTPlayer
:
true
,
canUseTTPlayer
:
true
,
ttPreloadAlbumId
:
''
,
ttPreloadEpisodeId
:
''
,
};
};
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
...
@@ -142,9 +137,6 @@
...
@@ -142,9 +137,6 @@
// #ifdef MP-TOUTIAO
// #ifdef MP-TOUTIAO
this
.
canUseTTPlayer
=
tt
.
canIUse
(
'video-player'
)
this
.
canUseTTPlayer
=
tt
.
canIUse
(
'video-player'
)
if
(
this
.
canUseTTPlayer
&&
tt
.
canIUse
(
'preloadResourceVideo'
))
{
this
.
preloadplaylet
()
}
this
.
ttuop
=
64
this
.
ttuop
=
64
// #endif
// #endif
...
@@ -167,27 +159,32 @@
...
@@ -167,27 +159,32 @@
return
result
;
return
result
;
},
},
methods
:
{
methods
:
{
startPlay
()
{
if
(
tt
.
canIUse
(
'preloadResourceVideo'
))
{
this
.
preloadplaylet
()
}
},
preloadplaylet
()
{
preloadplaylet
()
{
var
preIndex
=
0
if
(
this
.
displayIndex
<
2
)
{
preIndex
=
this
.
displayIndex
+
1
}
else
{
preIndex
=
0
}
// 抖音预加载
// 抖音预加载
tt
.
preloadResourceVideo
({
tt
.
preloadResourceVideo
({
albumId
:
'7312714531850388019'
,
albumId
:
this
.
displaySwiperList
[
preIndex
].
douyinAlbumId
,
episodeId
:
'7312719321847529984'
,
episodeId
:
this
.
displaySwiperList
[
preIndex
].
douyinEpisodeId
,
cloudType
:
1
,
cloudType
:
1
,
version
:
1
,
version
:
1
,
success
:
()
=>
{
success
:
()
=>
{
console
.
log
(
"短剧预加载成功"
,
);
console
.
log
(
"短剧预加载成功"
+
this
.
displaySwiperList
[
preIndex
].
douyinEpisodeId
);
},
},
fail
:
(
error
)
=>
{
fail
:
(
error
)
=>
{
console
.
log
(
"短剧预加载失败"
,
error
);
console
.
log
(
"短剧预加载失败"
,
error
);
},
},
});
});
},
},
getsource
(
e
)
{
console
.
log
(
'AAAAAAA '
+
e
)
},
error
(
e
)
{
console
.
log
(
'BBBBBBB '
+
e
)
},
paySuccess
(
largeType
)
{
paySuccess
(
largeType
)
{
// largeType=vip 开通vip
// largeType=vip 开通vip
// largeType=point 购买看点
// largeType=point 购买看点
...
@@ -213,8 +210,6 @@
...
@@ -213,8 +210,6 @@
// return
// return
// }
// }
console
.
log
(
'AAAAAAA'
)
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
// 延迟渲染,否则位置错乱
// 延迟渲染,否则位置错乱
this
.
showCoinPop
=
true
this
.
showCoinPop
=
true
...
...
vedio/pagesC/video/newVideoDetail.vue
deleted
100644 → 0
View file @
fb0b06a1
This diff is collapsed.
Click to expand it.
vedio/pagesD/watchRecord/watchRecord.vue
View file @
29a1056d
...
@@ -83,7 +83,7 @@
...
@@ -83,7 +83,7 @@
});
});
},
},
handleInfo
(
item
)
{
handleInfo
(
item
)
{
navigateTo
(
`/pagesC/video/
new
VideoDetail?data=`
+
encodeURIComponent
(
JSON
.
stringify
(
item
)));
navigateTo
(
`/pagesC/video/
tt
VideoDetail?data=`
+
encodeURIComponent
(
JSON
.
stringify
(
item
)));
},
},
handleXing
(
item
)
{
handleXing
(
item
)
{
var
that
=
this
;
var
that
=
this
;
...
...
vedio/scss/uni.scss
View file @
29a1056d
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
$main-color
:
#03E7C9
;
$main-color
:
#03E7C9
;
$second-color
:
#413F48
;
$second-color
:
#413F48
;
/* 背景颜色 */
/* 背景颜色 */
$bg-color
:
#
23232
5
;
$bg-color
:
#
f5f5f
5
;
$bg-color-gray
:
#f8f8f8
;
$bg-color-gray
:
#f8f8f8
;
$bg-color-hover
:
#f1f1f1
;
//点击状态颜色
$bg-color-hover
:
#f1f1f1
;
//点击状态颜色
$bg-color-mask
:
rgba
(
0
,
0
,
0
,
0
.5
);
//遮罩颜色
$bg-color-mask
:
rgba
(
0
,
0
,
0
,
0
.5
);
//遮罩颜色
...
...
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