12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- <template>
- <view class="container">
- <back text="课程回放"></back>
- <!-- 视频资源 -->
- <view class="video-box">
- <video class="video" id="classVideo" :src="videoSrc" controls></video>
- </view>
- <!-- 信息模块 -->
- <view class="info-box">
- <view class="flex-box" style="width: 68%;height: 100%;">
- <view class="info-name">{{classInfo.title}}</view>
- <view style="display: flex;flex-direction: column;">
- <view class="info-time">课程时间:</view>
- <view style="display: flex;">
- <view class="info-msg" style="margin-right: 20rpx;">{{today}}</view>
- <view class="info-msg">{{classInfo.time}}</view>
- </view>
- </view>
- </view>
- <view class="flex-box" style=" width: 32%;height: 100%;">
- <view class="flex">
- <view class="block-tag-box">
- <view class="block-tag">{{classInfo.name}}</view>
- </view>
- <view class="block-tag-box">
- <view class="block-tag">{{classInfo.teacher}}</view>
- </view>
- </view>
- <view class="flex" style="margin: 0 10rpx;">
- <view class="t-icon t-icon-baocun" @click="saveVideo"></view>
- <view class="t-icon t-icon-fenxiang" ></view>
- </view>
- </view>
- </view>
- <!-- 缺省区域 -->
- <view style="margin-top: 150rpx;">
- <u-empty mode="data"></u-empty>
- </view>
- </view>
- </template>
- <script>
- import {
- mapState
- } from 'vuex'
- export default {
- computed: {
- ...mapState('m_children', ['classList'])
- },
- data() {
- return {
- videoSrc: 'https://img.cdn.aliyun.dcloud.net.cn/guide/uniapp/%E7%AC%AC1%E8%AE%B2%EF%BC%88uni-app%E4%BA%A7%E5%93%81%E4%BB%8B%E7%BB%8D%EF%BC%89-%20DCloud%E5%AE%98%E6%96%B9%E8%A7%86%E9%A2%91%E6%95%99%E7%A8%8B@20200317.mp4',
- classInfo: '',
- today: '',
- };
- },
- onLoad(options) {
- this.classInfo = this.classList[options.info]
- this.getToday()
- this.videoContext = uni.createVideoContext('classVideo')
- },
- methods: {
- getToday() {
- this.today = (new Date()).format("yyyy-MM-dd")
- },
- saveVideo(){
- console.log('点击保存');
- let that = this
- uni.saveVideoToPhotosAlbum({
- filePath: that.videoSrc,
- success: function() {
- console.log('保存成功')
- }
- })
- }
- }
- }
- </script>
- <style lang="scss">
- @import '@/subpkg/common/videopage.scss';
- </style>
|