修复Safari 浏览器没有最下面的工具栏跳转到视频详情时引起的选集被遮挡以及购买支付被遮挡问题
解决方案:跳转视频前先让页面滚动然后再跳转,让浏览器最下方工具栏出现再跳转
This commit is contained in:
@@ -201,6 +201,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {
|
||||||
|
returnIsSafari
|
||||||
|
} from '@/utils/app.js'
|
||||||
import empty from '../../components/empty.vue'
|
import empty from '../../components/empty.vue'
|
||||||
import videoList from '../../components/videoList/videoList.vue'
|
import videoList from '../../components/videoList/videoList.vue'
|
||||||
import recommendVideo from '../../components/recommendVideo/recommendVideo.vue'
|
import recommendVideo from '../../components/recommendVideo/recommendVideo.vue'
|
||||||
@@ -256,6 +259,7 @@
|
|||||||
draw: Math.floor((Math.random() * 12) + 1),
|
draw: Math.floor((Math.random() * 12) + 1),
|
||||||
isWeixin: false,
|
isWeixin: false,
|
||||||
isIos: true,
|
isIos: true,
|
||||||
|
scrollTop: 0,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onShareAppMessage(res) {
|
onShareAppMessage(res) {
|
||||||
@@ -274,6 +278,10 @@
|
|||||||
imageUrl: this.bgImg
|
imageUrl: this.bgImg
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onPageScroll(e) {
|
||||||
|
console.log(e);
|
||||||
|
this.scrollTop = e.scrollTop
|
||||||
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
// barWidth
|
// barWidth
|
||||||
// #ifdef MP-WEIXIN || MP-TOUTIAO || MP-KUAISHOU
|
// #ifdef MP-WEIXIN || MP-TOUTIAO || MP-KUAISHOU
|
||||||
@@ -508,13 +516,79 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
pageScrollTo(time = 100) {
|
||||||
|
uni.pageScrollTo({
|
||||||
|
scrollTop: this.scrollTop - 50,
|
||||||
|
duration: time,
|
||||||
|
complete() {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
//查看视频
|
//查看视频
|
||||||
seVideo(item) {
|
seVideo(item) {
|
||||||
|
const time = 100;
|
||||||
|
// #ifdef H5
|
||||||
|
if (returnIsSafari()) {
|
||||||
|
this.pageScrollTo(time)
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/me/detail/detail?id=' + item.courseId + '&courseDetailsId=' + item
|
||||||
|
.courseDetailsId +
|
||||||
|
'&tt_album_id=' + item.dyCourseId + '&tt_episode_id=' + item
|
||||||
|
.dyEpisodeId
|
||||||
|
})
|
||||||
|
}, time)
|
||||||
|
} else {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/me/detail/detail?id=' + item.courseId + '&courseDetailsId=' + item.courseDetailsId +
|
||||||
|
'&tt_album_id=' + item.dyCourseId + '&tt_episode_id=' + item
|
||||||
|
.dyEpisodeId
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// #endif
|
||||||
|
// #ifndef H5
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/me/detail/detail?id=' + item.courseId + '&courseDetailsId=' + item.courseDetailsId +
|
url: '/me/detail/detail?id=' + item.courseId + '&courseDetailsId=' + item.courseDetailsId +
|
||||||
'&tt_album_id=' + item.dyCourseId + '&tt_episode_id=' + item
|
'&tt_album_id=' + item.dyCourseId + '&tt_episode_id=' + item
|
||||||
.dyEpisodeId
|
.dyEpisodeId
|
||||||
})
|
})
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
//点击回调
|
||||||
|
posterSuccess(item) {
|
||||||
|
const time = 100;
|
||||||
|
// #ifdef H5
|
||||||
|
if (returnIsSafari()) {
|
||||||
|
this.pageScrollTo(time)
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/me/detail/detail?id=' + item.courseId + '&courseDetailsId=' + item
|
||||||
|
.courseDetailsId +
|
||||||
|
'&tt_album_id=' + item.dyCourseId + '&tt_episode_id=' + item
|
||||||
|
.dyEpisodeId
|
||||||
|
})
|
||||||
|
}, 100)
|
||||||
|
} else {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/me/detail/detail?id=' + item.courseId + '&courseDetailsId=' + item.courseDetailsId +
|
||||||
|
'&tt_album_id=' + item.dyCourseId + '&tt_episode_id=' + item
|
||||||
|
.dyEpisodeId
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
|
// #ifndef H5
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/me/detail/detail?id=' + item.courseId + '&courseDetailsId=' + item.courseDetailsId +
|
||||||
|
'&tt_album_id=' + item.dyCourseId + '&tt_episode_id=' + item
|
||||||
|
.dyEpisodeId
|
||||||
|
})
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
//获取推荐视频
|
//获取推荐视频
|
||||||
getrecomVideo(sort) {
|
getrecomVideo(sort) {
|
||||||
@@ -633,14 +707,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//点击回调
|
|
||||||
posterSuccess(item) {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/me/detail/detail?id=' + item.courseId + '&courseDetailsId=' + item.courseDetailsId +
|
|
||||||
'&tt_album_id=' + item.dyCourseId + '&tt_episode_id=' + item
|
|
||||||
.dyEpisodeId
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 获取资源列表
|
// 获取资源列表
|
||||||
getCourseList() {
|
getCourseList() {
|
||||||
let typeId = '';
|
let typeId = '';
|
||||||
@@ -1199,7 +1266,8 @@
|
|||||||
text-align: justify;
|
text-align: justify;
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
}
|
}
|
||||||
.top-zhanwei{
|
|
||||||
|
.top-zhanwei {
|
||||||
/* #ifdef H5 */
|
/* #ifdef H5 */
|
||||||
padding-top: 32rpx;
|
padding-top: 32rpx;
|
||||||
/* #endif */
|
/* #endif */
|
||||||
|
|||||||
Reference in New Issue
Block a user