62 lines
1.7 KiB
Vue
62 lines
1.7 KiB
Vue
<template>
|
||
<view>
|
||
<view class="top">
|
||
<i class="iconfont" @click="backinfo()"></i>
|
||
<span class="text" >{{videoData.seo_title}}</span>
|
||
<span></span>
|
||
</view>
|
||
<video :src="this.videoData.xhz_video_url" :poster="videoData.bd_photo"></video>
|
||
<view class="content_font">
|
||
<view class="title">{{videoData.seo_title}}</view>
|
||
<view class="content_font_span">
|
||
<span>时长:</span>
|
||
<span class="time">{{secondToTimeStr(total_time)}}</span>
|
||
</view>
|
||
<view class="user">
|
||
<image src="../../static/img/user.jpg"></image>
|
||
<view class="user_right">
|
||
<p>美食杰 <span>专业原创菜谱视频</span></p>
|
||
<p class="user_p">做菜只用美食杰,让做饭更具幸福感!</p>
|
||
</view>
|
||
</view>
|
||
<view class="title_s">视频内容</view>
|
||
<text class="content_c">{{videoData.intro}}</text>
|
||
</view>
|
||
|
||
</view>
|
||
</template>
|
||
|
||
<script>
|
||
export default {
|
||
data() {
|
||
return {
|
||
videoData:{},
|
||
total_time:{}
|
||
|
||
}
|
||
},
|
||
onLoad(str) {
|
||
this.videoData=JSON.parse(str.str)
|
||
},
|
||
methods: {
|
||
|
||
secondToTimeStr(t) {
|
||
if (!t) return;
|
||
if (t < 60) return "00:" + ((i = t) < 10 ? "0" + i : i);
|
||
if (t < 3600) return "" + ((a = parseInt(t / 60)) < 10 ? "0" + a : a) + ":" + ((i = t % 60) < 10 ? "0" + i : i);
|
||
if (3600 <= t) {
|
||
var a, i, e = parseInt(t / 3600);
|
||
return (e < 10 ? "0" + e : e) + ":" + ((a = parseInt(t % 3600 / 60)) < 10 ? "0" + a : a) + ":" + ((i = t % 60) < 10 ? "0" + i : i);
|
||
}
|
||
},
|
||
backinfo(){
|
||
uni.navigateBack()
|
||
}
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style lang="less" scoped>
|
||
@import "../../common/less/page/videoinfo.less";
|
||
</style>
|