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
ff20d6cd
Commit
ff20d6cd
authored
Dec 13, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化快手推荐视频展示
parent
75d3cb10
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
55 additions
and
28 deletions
+55
-28
recommendVideo.vue
vedio/components/home/recommendVideo.vue
+4
-4
pages.json
vedio/pages.json
+26
-7
home.vue
vedio/pages/home.vue
+2
-2
index.vue
vedio/pages/index/index.vue
+1
-1
my.vue
vedio/pages/my/my.vue
+9
-2
follow.vue
vedio/pages/recommend/follow.vue
+8
-7
recommendVideo.vue
vedio/pages/recommend/recommendVideo.vue
+5
-5
No files found.
vedio/components/home/recommendVideo.vue
View file @
ff20d6cd
<
template
>
<view
class=
"body"
>
<swiper
class=
"swiper"
circular
@
change=
"swiperChange"
:current=
"current"
:vertical=
"true"
duration=
"300"
>
<swiper
class=
"swiper"
style=
"height: 100%;width: 100%;"
circular
@
change=
"swiperChange"
:current=
"current"
:vertical=
"true"
duration=
"300"
>
<swiper-item
v-for=
"(list, index) in displaySwiperList"
:key=
"index"
>
<view
v-if=
"Math.abs(displayIndex-index)==0"
style=
"height: 100%;"
>
<video
v-if=
"Math.abs(displayIndex-index)==0"
:id=
"''+list.vedioId"
:controls=
"controls"
<swiper-item
v-for=
"(list, index) in displaySwiperList"
:key=
"index"
style=
"height: 100%;width: 100%;"
>
<view
v-if=
"Math.abs(displayIndex-index)==0"
style=
"height: 100%;
width: 100%;
"
>
<video
style=
"height: 100%;width: 100%;"
v-if=
"Math.abs(displayIndex-index)==0"
:id=
"''+list.vedioId"
:controls=
"controls"
:autoplay=
"true"
:isplay=
"true"
play-btn-position=
"center"
:loop=
"!isplay"
@
ended=
"ended"
@
controlstoggle=
"controlstoggle"
:show-fullscreen-btn=
"false"
:poster=
"list.coverImage"
:show-loading=
"true"
@
click=
"tapVideoHover()"
:enable-progress-gesture=
"false"
class=
"tsvideo"
...
...
vedio/pages.json
View file @
ff20d6cd
...
...
@@ -17,13 +17,6 @@
//
}
//
},
{
"path"
:
"pages/home"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarBackgroundColor"
:
"#2196f3"
,
"navigationBarTextStyle"
:
"black"
}
},
{
"path"
:
"pages/index/index"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
...
...
@@ -151,6 +144,32 @@
"bounce"
:
"none"
,
"scrollIndicator"
:
"none"
}
},
"tabBar"
:
{
"color"
:
"#999"
,
"selectedColor"
:
"#F8425A"
,
"borderStyle"
:
"black"
,
"backgroundColor"
:
"#ffffff"
,
"height"
:
"50px"
,
"fontSize"
:
"16px"
,
"iconWidth"
:
"24px"
,
"spacing"
:
"3px"
,
"list"
:
[{
"pagePath"
:
"pages/index/index"
,
"iconPath"
:
"static/tab/index_unselected.png"
,
"selectedIconPath"
:
"static/tab/index_selected.png"
,
"text"
:
"剧场"
},
{
"pagePath"
:
"pages/recommend/recommendVideo"
,
"iconPath"
:
"static/tab/promote_unselected.png"
,
"selectedIconPath"
:
"static/tab/promote_selected.png"
,
"text"
:
"推荐"
},
{
"pagePath"
:
"pages/my/my"
,
"iconPath"
:
"static/tab/my_unselected.png"
,
"selectedIconPath"
:
"static/tab/my_selected.png"
,
"text"
:
"我的"
}]
},
"condition"
:
{
//模式配置,仅开发期间生效
"current"
:
0
,
//当前激活的模式(list
的索引项)
...
...
vedio/pages/home.vue
View file @
ff20d6cd
...
...
@@ -2,7 +2,7 @@
<view
class=
"body"
>
<view
style=
"height: 100%;"
>
<indexPage
v-show=
"currentPage==0"
ref=
"index"
/>
<recommendPage
v-on:showEditBarH=
"showEditBarH"
v-on:changeBottomBarColor=
"changeBottomBarColor"
<recommendPage
v-on:showEditBarH=
"showEditBarH"
v-on:changeBottomBarColor=
"changeBottomBarColor"
z
v-show=
"currentPage==1"
ref=
"recommend"
/>
<userPage
v-show=
"currentPage==2"
ref=
"user"
/>
</view>
...
...
@@ -93,7 +93,7 @@
// import userPage from "@/pages/my/my.vue";
import
indexPage
from
"@/components/home/index.vue"
;
import
recommendPage
from
"@/components/home/recommend.vue"
;
import
recommendPage
from
"@/components/home/recommend
Video
.vue"
;
import
userPage
from
"@/components/home/my.vue"
;
export
default
{
...
...
vedio/pages/index/index.vue
View file @
ff20d6cd
...
...
@@ -250,7 +250,7 @@
};
},
methods
:
{
s
how
()
{
onS
how
()
{
// 匹配视频
this
.
showFirstDialog
();
// 轮播图
...
...
vedio/pages/my/my.vue
View file @
ff20d6cd
...
...
@@ -70,6 +70,10 @@
<view
v-if=
"userBean.showVipInner && os === 'android' "
class=
"item arrow"
@
click=
"handlePayRecord"
>
我的订单
<view
class=
"item_bd ellipsis"
style=
"margin-left: 58rpx;"
></view>
</view>
<view
class=
"item arrow"
@
click=
"handleVedio"
>
我的追剧
<view
class=
"item_bd ellipsis"
style=
"margin-left: 58rpx;"
></view>
</view>
<view
v-if=
"os === 'android' "
class=
"item arrow"
@
click=
"handleDotRecord"
>
看点记录
...
...
@@ -135,8 +139,8 @@
};
},
methods
:
{
s
how
()
{
this
.
os
=
wx
.
getSystemInfoSync
().
platform
;
onS
how
()
{
//
this.os = wx.getSystemInfoSync().platform;
this
.
windowHeight
=
uni
.
getSystemInfoSync
().
windowHeight
// loadData() {
this
.
post
({
...
...
@@ -151,6 +155,9 @@
},
hide
()
{
},
handleVedio
(){
navigateTo
(
`/pages/recommend/follow`
)
},
handleDotRecord
()
{
// 看点记录
...
...
vedio/pages/recommend/follow.vue
View file @
ff20d6cd
<
template
>
<view
style=
"background: white;"
>
<scroll-view
scroll-y=
"true"
:style=
"'height: '+(windowHeight -120)+'px;margin-top:'+(titleBarHeight +statusBarHeight)+'px;'"
>
<view
class=
"flex space"
style=
"display:flex; flex-wrap:wrap;"
>
<view
style=
"background-color: white;"
>
<status-title
:showBack=
"true"
>
我的追剧
</status-title>
<scroll-view
scroll-y=
"true"
:style=
"'height: '+(windowHeight -80)+'px;'"
>
<view
class=
"flex space"
style=
"display:flex; flex-wrap:wrap;height: 100%;width: 100%;background-color: white;"
>
<block
v-for=
"(value,key) in dataList"
:key=
"key"
>
<view
class=
"mt-10"
style=
"width:31%; position: relative; border-radius:20rpx;margin-bottom: 10rpx;margin-left: 14rpx;"
...
...
@@ -26,11 +27,11 @@
</view>
</scroll-view>
<view
v-if=
"dataList.length
<
=
0
"
<
!--
<
view
v-if=
"dataList.length
<
=
0
"
style=
"position: absolute;left: 50%;width: 240rpx;margin-left: -120rpx;top: 600rpx;text-align: center;"
>
<text
style=
"color: gray;"
>
暂无在追剧
</text>
<view
@
click=
"goRecommend"
class=
"button"
style=
"margin-top: 20rpx;color: white;"
>
去剧场
</view>
</view>
</view>
-->
</view>
</
template
>
...
...
@@ -64,7 +65,7 @@
},
onLoad
(
e
)
{},
methods
:
{
s
how
()
{
onS
how
()
{
this
.
windowHeight
=
uni
.
getSystemInfoSync
().
windowHeight
this
.
loadData
()
},
...
...
vedio/pages/recommend/recommendVideo.vue
View file @
ff20d6cd
<
template
>
<view
class=
"body"
>
<swiper
class=
"swiper"
circular
@
change=
"swiperChange"
:current=
"current"
:vertical=
"true"
duration=
"300"
>
<swiper
style=
"height: 100%;width: 100%;"
class=
"swiper"
circular
@
change=
"swiperChange"
:current=
"current"
:vertical=
"true"
duration=
"300"
>
<swiper-item
v-for=
"(list, index) in displaySwiperList"
:key=
"index"
>
<view
v-if=
"Math.abs(displayIndex-index)==0"
style=
"height: 100%;"
>
<video
v-if=
"Math.abs(displayIndex-index)==0"
:id=
"''+list.vedioId"
:controls=
"controls"
<swiper-item
v-for=
"(list, index) in displaySwiperList"
:key=
"index"
style=
"height: 100%;width: 100%;"
>
<view
v-if=
"Math.abs(displayIndex-index)==0"
style=
"height: 100%;
width: 100%;
"
>
<video
style=
"height: 100%;width: 100%;"
v-if=
"Math.abs(displayIndex-index)==0"
:id=
"''+list.vedioId"
:controls=
"controls"
:autoplay=
"true"
:isplay=
"true"
play-btn-position=
"center"
:loop=
"!isplay"
@
ended=
"ended"
@
controlstoggle=
"controlstoggle"
:show-fullscreen-btn=
"false"
:poster=
"list.coverImage"
:show-loading=
"true"
@
click=
"tapVideoHover()"
:enable-progress-gesture=
"false"
class=
"tsvideo"
...
...
@@ -118,7 +118,7 @@
})
// #endif
},
s
how
()
{
onS
how
()
{
if
(
this
.
isFirstLoad
)
{
this
.
isFirstLoad
=
false
this
.
queryList
()
...
...
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