Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
basic-uniapp-v3
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-uniapp-v3
Commits
6735e865
提交
6735e865
authored
11月 28, 2025
作者:
方治民
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 限制视频全屏播放时竖屏
上级
eae6450e
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
8 行增加
和
5 行删除
+8
-5
detail.vue
src/pages/knowledgeVideo/detail.vue
+2
-2
index.vue
src/pages/knowledgeVideo/index.vue
+2
-1
nongchang.vue
src/pages/nongchang/nongchang.vue
+2
-1
shouye.vue
src/pages/shouye/shouye.vue
+2
-1
没有找到文件。
src/pages/knowledgeVideo/detail.vue
浏览文件 @
6735e865
...
...
@@ -11,7 +11,7 @@
addViewCount
(
id
)
const
videoContext
=
uni
.
createVideoContext
(
`video
${
id
}
`
)
videoContext
.
requestFullScreen
()
videoContext
.
requestFullScreen
(
{
direction
:
0
}
)
videoContext
.
play
()
})
}
...
...
@@ -29,7 +29,7 @@
<view
class=
"p-3"
style=
"font-family: '思源黑体'; font-weight: 400"
>
<view
class=
"w-full text-28"
>
<view
class=
"mb-1"
>
<video
class=
"w-full"
:src=
"!isNull(detail) ? detail?.url : ''"
controls
loop
></video>
<video
class=
"w-full"
:src=
"!isNull(detail) ? detail?.url : ''"
controls
loop
:direction=
"0"
></video>
</view>
</view>
<view
class=
"flex flex-col justify-between mt-1 mb-6"
>
...
...
src/pages/knowledgeVideo/index.vue
浏览文件 @
6735e865
...
...
@@ -75,7 +75,7 @@
// })
const
videoContext
=
uni
.
createVideoContext
(
`video
${
id
}
`
)
videoContext
.
requestFullScreen
()
videoContext
.
requestFullScreen
(
{
direction
:
0
}
)
videoContext
.
play
()
// 增加播放次数
...
...
@@ -132,6 +132,7 @@
:show-center-play-btn="true"
:enable-progress-gesture="true"
:show-progress="true"
:direction="0"
object-fit="contain"
@loadedmetadata="handleMetadataLoaded"
@play="handleVideoPlay(item.id)"
...
...
src/pages/nongchang/nongchang.vue
浏览文件 @
6735e865
...
...
@@ -445,7 +445,7 @@
function
playVideo
(
index
)
{
const
videoContext
=
uni
.
createVideoContext
(
`video
${
index
}
`
)
videoContext
.
requestFullScreen
()
videoContext
.
requestFullScreen
(
{
direction
:
0
}
)
videoContext
.
play
()
}
...
...
@@ -825,6 +825,7 @@
:show-center-play-btn=
"true"
:enable-progress-gesture=
"true"
:show-progress=
"true"
:direction=
"0"
object-fit=
"contain"
@
loadedmetadata=
"handleMetadataLoaded"
@
play=
"handleVideoPlay(index)"
...
...
src/pages/shouye/shouye.vue
浏览文件 @
6735e865
...
...
@@ -461,7 +461,7 @@
function
playVideo
(
index
)
{
const
videoContext
=
uni
.
createVideoContext
(
`video
${
index
}
`
)
videoContext
.
requestFullScreen
()
videoContext
.
requestFullScreen
(
{
direction
:
0
}
)
videoContext
.
play
()
}
...
...
@@ -797,6 +797,7 @@
:show-center-play-btn="true"
:enable-progress-gesture="true"
:show-progress="true"
:direction="0"
object-fit="contain"
@loadedmetadata="handleMetadataLoaded"
@play="handleVideoPlay(index)"
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论