From e8a6237ce59f4b21c81ff4bd0dc180b3de9eaf9e Mon Sep 17 00:00:00 2001
From: yujialong <479214531@qq.com>
Date: Tue, 1 Mar 2022 20:02:19 +0800
Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E9=A2=84=E8=A7=88=E7=AD=89?=
=?UTF-8?q?=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/achievement/list/index.vue | 2 +-
src/pages/course/contentSettings/index.vue | 7 ++++---
src/pages/station/preview/index.vue | 6 +++++-
src/setting.js | 4 ++--
4 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/src/pages/achievement/list/index.vue b/src/pages/achievement/list/index.vue
index 1ce7f1c..9c196a1 100644
--- a/src/pages/achievement/list/index.vue
+++ b/src/pages/achievement/list/index.vue
@@ -80,7 +80,7 @@
- {{ scope.row.permissions == 2 ? "竞赛" : projectType.find(n => n.id === scope.row.permissions).name }}
+ {{ projectPermissions ? '考核' : '练习' }}
diff --git a/src/pages/course/contentSettings/index.vue b/src/pages/course/contentSettings/index.vue
index de42663..d89cd6d 100644
--- a/src/pages/course/contentSettings/index.vue
+++ b/src/pages/course/contentSettings/index.vue
@@ -342,9 +342,10 @@ export default {
this.$router.push("course");
},
transferType(ext) {
- if ("jpg,jpeg,png,gif,svg,psd".includes(ext)) return "图片";
- if ("mp4,3gp,mov,m4v,avi,dat,mkv,flv,vob,rmvb,rm,qlv".includes(ext)) return "视频";
- return ext;
+ const suf = ext.toLowerCase()
+ if ("jpg,jpeg,png,gif,svg,psd".includes(suf)) return "图片";
+ if ("mp4,3gp,mov,m4v,avi,dat,mkv,flv,vob,rmvb,rm,qlv".includes(suf)) return "视频";
+ return suf;
},
addChapter() {
this.chapterName = "";
diff --git a/src/pages/station/preview/index.vue b/src/pages/station/preview/index.vue
index f4da620..eef1759 100644
--- a/src/pages/station/preview/index.vue
+++ b/src/pages/station/preview/index.vue
@@ -188,7 +188,6 @@ export default {
},
preview(row, chapterName) {
this.curLink = `${chapterName}${row.name}`; // 章节名称+小节名称,小节名称有重复的情况,如果只用小节名称判断,会有同时选中多个的情况
- this.player = null;
this.playauth = "";
this.coverUrl = "";
this.pdfSrc = "";
@@ -199,6 +198,11 @@ export default {
if (this.transferType(row.fileType) == "视频") {
this.$get(`${this.api.getPlayAuth}/${row.fileId}`).then(res => {
this.playAuth = res.data.playAuth;
+ // 如果已经产生了实例,则销毁重新创建,不然播放器会播放上一个视频
+ if (this.player) {
+ this.player.dispose()
+ this.player = null
+ }
this.$nextTick(() => {
if (this.player) {
this.player.replayByVidAndPlayAuth(row.fileId, this.playAuth);
diff --git a/src/setting.js b/src/setting.js
index 60ff857..81ad999 100644
--- a/src/setting.js
+++ b/src/setting.js
@@ -40,8 +40,8 @@ if (isHh) {
jumpPath = "http://192.168.31.125:8087/";
bankPath = `http://192.168.31.125:8093`
// host = "http://www.occupationlab.com:9000/";//线上
- // host = "http://39.108.250.202:9000/"; // 中台测试服
- host = "http://192.168.31.151:9000/"; // 榕
+ host = "http://39.108.250.202:9000/"; // 中台测试服
+ // host = "http://192.168.31.151:9000/"; // 榕
// host = 'http://192.168.31.137:9000/'; // 赓
title = "职站服务端管理系统";
} else {