<template> <view> <u-navbar :is-back="true" title='视频教程' :background="bgc" title-color="#000" :border-bottom="false" id="navbar"> </u-navbar> <view class="video"> <video :src="obj.videoUrl"></video> </view> </view> </template> <script> export default { data() { return { bgc: { backgroundColor: " #fff", }, id:'', obj:{} } }, onLoad(option) { console.log(option); this.id = option.id this.getlist() }, methods: { // 请求视频详情 getlist(){ this.$u.get(`/app/help/detail?code=&id=${this.id}`).then(res => { if (res.code == 200) { this.obj = res.data } }) }, } } </script> <style lang="less"> .video{ width: 694rpx; height: 390rpx; margin: auto; border-radius: 20rpx; overflow: hidden; video{ width: 694rpx; height: 390rpx; } } </style>