From ca14b6f89ecfefafb6f2ba0d0042876bab8a12f8 Mon Sep 17 00:00:00 2001 From: paidaxing444 <12qwaszx> Date: Mon, 1 Jun 2020 10:04:51 +0800 Subject: [PATCH] =?UTF-8?q?20200529-zlp-3=20=E4=BC=98=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E7=94=9F=E6=88=90=20=E6=96=B0=E5=A2=9E=E8=AF=84?= =?UTF-8?q?=E5=88=86=E8=AF=84=E4=BB=B7=E5=90=8E=E5=8F=B0=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/api/benyi_train/feedback.js | 53 ++++++++++++ ruoyi-ui/src/api/benyi_train/score.js | 53 ++++++++++++ .../views/benyi_train/video_study/detail.vue | 83 +++++++++++++++++++ 3 files changed, 189 insertions(+) create mode 100644 ruoyi-ui/src/api/benyi_train/feedback.js create mode 100644 ruoyi-ui/src/api/benyi_train/score.js create mode 100644 ruoyi-ui/src/views/benyi_train/video_study/detail.vue diff --git a/ruoyi-ui/src/api/benyi_train/feedback.js b/ruoyi-ui/src/api/benyi_train/feedback.js new file mode 100644 index 000000000..520b9102b --- /dev/null +++ b/ruoyi-ui/src/api/benyi_train/feedback.js @@ -0,0 +1,53 @@ +import request from '@/utils/request' + +// 查询培训视频评价反馈列表 +export function listFeedback(query) { + return request({ + url: '/benyi/feedback/list', + method: 'get', + params: query + }) +} + +// 查询培训视频评价反馈详细 +export function getFeedback(id) { + return request({ + url: '/benyi/feedback/' + id, + method: 'get' + }) +} + +// 新增培训视频评价反馈 +export function addFeedback(data) { + return request({ + url: '/benyi/feedback', + method: 'post', + data: data + }) +} + +// 修改培训视频评价反馈 +export function updateFeedback(data) { + return request({ + url: '/benyi/feedback', + method: 'put', + data: data + }) +} + +// 删除培训视频评价反馈 +export function delFeedback(id) { + return request({ + url: '/benyi/feedback/' + id, + method: 'delete' + }) +} + +// 导出培训视频评价反馈 +export function exportFeedback(query) { + return request({ + url: '/benyi/feedback/export', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/ruoyi-ui/src/api/benyi_train/score.js b/ruoyi-ui/src/api/benyi_train/score.js new file mode 100644 index 000000000..8d17c561a --- /dev/null +++ b/ruoyi-ui/src/api/benyi_train/score.js @@ -0,0 +1,53 @@ +import request from '@/utils/request' + +// 查询培训视频评分列表 +export function listScore(query) { + return request({ + url: '/benyi/score/list', + method: 'get', + params: query + }) +} + +// 查询培训视频评分详细 +export function getScore(id) { + return request({ + url: '/benyi/score/' + id, + method: 'get' + }) +} + +// 新增培训视频评分 +export function addScore(data) { + return request({ + url: '/benyi/score', + method: 'post', + data: data + }) +} + +// 修改培训视频评分 +export function updateScore(data) { + return request({ + url: '/benyi/score', + method: 'put', + data: data + }) +} + +// 删除培训视频评分 +export function delScore(id) { + return request({ + url: '/benyi/score/' + id, + method: 'delete' + }) +} + +// 导出培训视频评分 +export function exportScore(query) { + return request({ + url: '/benyi/score/export', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/ruoyi-ui/src/views/benyi_train/video_study/detail.vue b/ruoyi-ui/src/views/benyi_train/video_study/detail.vue new file mode 100644 index 000000000..bfca0e221 --- /dev/null +++ b/ruoyi-ui/src/views/benyi_train/video_study/detail.vue @@ -0,0 +1,83 @@ +<template> + <div class="app-container"> + <el-row> + <el-col :xs="24" :sm="12" style="padding: 10px;"> + <el-card> + <video-player + class="vjs-custom-skin" + :playsinline="true" + :options="playerOptions" + ref="videoPlayer" + ></video-player> + </el-card> + </el-col> + <el-col :xs="24" :sm="12" style="padding: 10px;"> + <el-card> + 内容介绍 + <br />标题:{{title}} + <br />讲师:{{lecturername}} + <br />简介:{{information}} + <br />评分: + <el-rate v-model="value"></el-rate>留言: + <el-input type="textarea" placeholder="请输入内容" /> + </el-card> + </el-col> + </el-row> + </div> +</template> + +<script> +import { getVideo } from "@/api/benyi_train/video"; + +export default { + name: "detail", + data() { + return { + title: "", + lecturername: "", + information: "", + //视频播放参数 + playerOptions: {}, + value: null + }; + }, + created() { + const id = this.$route.params && this.$route.params.id; + //console.log(id); + this.getVideoById(id); + }, + methods: { + /** 查询培训列表 */ + getVideoById(id) { + getVideo(id).then(response => { + this.title=response.data.title; + this.lecturername=response.data.lecturername; + this.information=response.data.information; + //console.log(response.data); + this.playerOptions = { + autoplay: true, + muted: true, + language: "zh-CN", + playbackRates: [0.7, 1.0, 1.5, 2.0], + fluid: true, + sources: [ + { + type: response.data.filetype, + // mp4 + src: "https://files.benyiedu.com/" + response.data.videourl + } + ], + notSupportedMessage: "此视频暂无法播放,请稍后再试", + poster: "", + controlBar: { + timeDivider: true, + durationDisplay: false, + remainingTimeDisplay: false, + fullscreenToggle: true //全屏按钮 + } + }; + }); + } + } +}; +</script> \ No newline at end of file