Commit 176853bc650ac1c3def7b4b4deb883b6dac48467
Merge branch 'f-dev' into 'main'
fix:修复mp端视频管理点击默认不全屏显示问题(兼容APP端) fix:修复mp端登录页和手机验证码背景页不贴边问题 See merge request huang/thingskit-app!54
Showing
4 changed files
with
8 additions
and
8 deletions
... | ... | @@ -25,7 +25,7 @@ |
25 | 25 | class="video" |
26 | 26 | :src="item.videoUrl" |
27 | 27 | controls |
28 | - webkit-playsinline | |
28 | + :title="item.name" | |
29 | 29 | x5-video-player-type="h5" |
30 | 30 | x5-video-orientation="portraint" |
31 | 31 | show-mute-btn |
... | ... | @@ -64,8 +64,7 @@ export default { |
64 | 64 | current: 0, |
65 | 65 | cameraTotal: 0, |
66 | 66 | list: [], |
67 | - ordId: '', | |
68 | - videoContext: null | |
67 | + ordId: '' | |
69 | 68 | }; |
70 | 69 | }, |
71 | 70 | onShow() { |
... | ... | @@ -74,9 +73,6 @@ export default { |
74 | 73 | this.loadData(1, this.ordId); |
75 | 74 | } |
76 | 75 | }, |
77 | - onReady() { | |
78 | - this.videoContext = uni.createVideoContext('myVideo', this); | |
79 | - }, | |
80 | 76 | onHide() { |
81 | 77 | this.ordId = ''; |
82 | 78 | this.loadData(1, null); |
... | ... | @@ -126,17 +122,19 @@ export default { |
126 | 122 | }, |
127 | 123 | playVideo(e) { |
128 | 124 | /** |
129 | - * 播放当前视频,暂停其余视频 | |
125 | + * 点击全屏播放当前视频,暂停其余视频 | |
126 | + * 兼容APP和MP端 | |
130 | 127 | */ |
131 | 128 | let currentId = 'video' + e.currentTarget.dataset.id; |
132 | 129 | this.videoContent = uni.createVideoContext(currentId, this); |
133 | - this.videoContext.requestFullScreen({ direction: 90 }); | |
130 | + this.videoContent.requestFullScreen(); | |
134 | 131 | // 获取视频列表 |
135 | 132 | let trailer = this.list; |
136 | 133 | trailer.forEach((item, index) => { |
137 | 134 | if (item.videoUrl != null && item.videoUrl != '') { |
138 | 135 | let temp = 'video' + item.id; |
139 | 136 | if (temp != currentId) { |
137 | + //暂停不是当前的视频 | |
140 | 138 | uni.createVideoContext(temp, this).pause(); |
141 | 139 | } |
142 | 140 | } | ... | ... |