全面移除视频,移除域名混淆加载,直接写死,移除展示类型(同步更新)
This commit is contained in:
+6
-106
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div class="side" style="width: 100%">
|
||||
<span v-show="loadComplete">{{showType === 'gallery' || showType === 'collect' ? '本子' : '视频'}}历史</span>
|
||||
<span v-show="loadComplete">本子历史</span>
|
||||
<div v-show="loadComplete" class="load_complete">
|
||||
<el-table :data="currentTasks" v-show="showType === 'gallery'" :empty-text="emptyText" :row-key="gallery=>gallery.gid">
|
||||
<el-table :data="currentTasks" :empty-text="emptyText" :row-key="gallery=>gallery.gid">
|
||||
|
||||
<el-table-column type="expand">
|
||||
<template #default="props">
|
||||
@@ -49,55 +49,8 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table :data="currentTasks" v-show="showType === 'video'" :empty-text="emptyText" :row-key="video=>video.id">
|
||||
<el-table-column type="expand">
|
||||
<template #default="props">
|
||||
名字:{{props.row.name}} <br>
|
||||
网站:{{props.row.website}} <br>
|
||||
链接:<el-link :href="props.row.link">链接</el-link> <br>
|
||||
文件大小:{{props.row.fileSize}} <br>
|
||||
视频长度:{{props.row.duration}} <br>
|
||||
分辨率:{{props.row.resolution}} <br>
|
||||
任务创建时间:{{props.row.createTimeDisplay}}<br>
|
||||
标签:{{props.row.tag === '' ? '无': props.row.tag}} <br>
|
||||
<span v-show="isLion">
|
||||
downloader:{{props.row.downloader}}
|
||||
</span>
|
||||
|
||||
<el-button @click="deleteVideo(props.row.id)" :disabled="props.row.download === undefined">删除</el-button>
|
||||
<el-button @click="editVideoTag(props.row.id, props.row.tag)">编辑标签</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="名字" width="300vw">
|
||||
<template #default="scoped">
|
||||
{{scoped.row.name}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" width="300vw">
|
||||
<template #default="scoped">
|
||||
<span>
|
||||
<el-button @click="downloadTask(scoped.row.download)" :disabled="scoped.row.download === undefined">下载</el-button>
|
||||
<el-button @click="changeVideoCollect(scoped.row.id, scoped.row.isCollect)">{{scoped.row.isCollect ? '取消收藏' : '收藏'}}</el-button>
|
||||
<el-button @click="openVideoPanel(scoped.row.download)" :disabled="scoped.row.download === undefined">在线播放</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="进度" width="80">
|
||||
<template #default="scoped">
|
||||
{{ scoped.row.progress }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-row class="pageChanger">
|
||||
<el-col>
|
||||
<el-select v-model="showType" @change="changeShowType" class="el-select" style="width: 75px">
|
||||
<el-option value="gallery" label="本子"/>
|
||||
<el-option value="video" label="视频"/>
|
||||
</el-select>
|
||||
<el-select v-model="category" @change="changeCategory">
|
||||
<template #prefix>
|
||||
分类
|
||||
@@ -111,10 +64,10 @@
|
||||
排序
|
||||
</template>
|
||||
<el-option value="name" label="名字"/>
|
||||
<el-option value="shortName" label="简洁名字" v-show="showType === 'gallery'"/>
|
||||
<el-option value="shortName" label="简洁名字"/>
|
||||
<el-option value="createTime" label="任务创建时间"/>
|
||||
</el-select>
|
||||
<el-select v-model="galleryNameType" @change="changeGalleryNameType" v-show="showType === 'gallery'">
|
||||
<el-select v-model="galleryNameType" @change="changeGalleryNameType">
|
||||
<template #prefix>
|
||||
显示
|
||||
</template>
|
||||
@@ -150,7 +103,7 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-footer>
|
||||
<el-button @click="tempGid === '' ? submitVideoTag(): submitGalleryTag()">提交修改</el-button>
|
||||
<el-button @click="submitGalleryTag()">提交修改</el-button>
|
||||
</el-footer>
|
||||
</el-dialog>
|
||||
|
||||
@@ -163,9 +116,6 @@
|
||||
|
||||
<span v-show="!loadComplete" class="side">请输入授权码后再查看</span>
|
||||
</div>
|
||||
<el-dialog v-model="isPlaying" @opened="initPlayer()" @closed="destroyPlayer()" width="635px" title="在线预览">
|
||||
<div id="player"></div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -173,7 +123,6 @@ import store from "../store";
|
||||
import {computed, ref} from "vue";
|
||||
import axios from "axios";
|
||||
import {ElMessage} from "element-plus";
|
||||
import Player from "xgplayer";
|
||||
|
||||
//输入
|
||||
let inputNode = ref(null)
|
||||
@@ -181,21 +130,13 @@ let inputNode = ref(null)
|
||||
let isEditingPage = ref(false)
|
||||
//是否正在编辑标签
|
||||
let isEditingTag = ref(false)
|
||||
//是否打开播放面板
|
||||
let isPlaying = ref(false)
|
||||
|
||||
//在线播放链接以及播放器实例
|
||||
let current_video_link = ref("")
|
||||
let player = ref()
|
||||
|
||||
//临时变量
|
||||
let tempTag = ref("")
|
||||
let tempGid = ref("")
|
||||
let tempId = ref("")
|
||||
|
||||
let category = ref("myDownload") //myDownload myCollect total
|
||||
let galleryNameType = ref("shortName") // shortName name
|
||||
let showType = ref("gallery") // gallery video collect
|
||||
let sortType = ref("shortName") // shortName name createTime
|
||||
let targetPage = ref(1) // 当前页数
|
||||
|
||||
@@ -232,9 +173,8 @@ let isLion = computed(() => {
|
||||
})
|
||||
|
||||
let emptyText = computed(() => {
|
||||
let type = showType.value === 'gallery' ? '本子': '视频'
|
||||
let action = category.value === 'myDownload' ? '下载': '收藏'
|
||||
return '您未' + action + type
|
||||
return '您未' + action + "本子"
|
||||
})
|
||||
|
||||
//在线预览相关
|
||||
@@ -285,11 +225,6 @@ function reverseEditMode(){
|
||||
function changeCategory(){
|
||||
store.commit("_setCategory", category.value)
|
||||
}
|
||||
function changeShowType(){
|
||||
if(showType.value === 'video')
|
||||
sortType.value = 'name'
|
||||
store.commit("_setShowType", showType.value)
|
||||
}
|
||||
function changeGalleryNameType(){
|
||||
store.commit("_setShowNameType", galleryNameType.value)
|
||||
}
|
||||
@@ -304,34 +239,17 @@ function changeGalleryCollect(gid, isCollect){
|
||||
else
|
||||
store.dispatch("collectGallery", gid)
|
||||
}
|
||||
function changeVideoCollect(id, isCollect){
|
||||
if(isCollect)
|
||||
store.dispatch("disCollectVideo", id)
|
||||
else
|
||||
store.dispatch("collectVideo", id)
|
||||
}
|
||||
function editGalleryTag(gid, tag){
|
||||
tempTag.value = tag
|
||||
tempGid.value = gid
|
||||
isEditingTag.value = true
|
||||
}
|
||||
function editVideoTag(id, tag){
|
||||
tempTag.value = tag
|
||||
tempId.value = id
|
||||
isEditingTag.value = true
|
||||
}
|
||||
function submitGalleryTag(){
|
||||
store.dispatch("updateGalleryTag", {gid:tempGid.value, tag:tempTag.value})
|
||||
tempTag.value = ''
|
||||
tempGid.value = ''
|
||||
isEditingTag.value = false
|
||||
}
|
||||
function submitVideoTag(){
|
||||
store.dispatch("updateVideoTag", {id:tempId.value, tag:tempTag.value})
|
||||
tempTag.value = ''
|
||||
tempId.value = ''
|
||||
isEditingTag.value = false
|
||||
}
|
||||
|
||||
//下载,删除,在线看
|
||||
function downloadTask(link){
|
||||
@@ -343,9 +261,6 @@ function updateGallery(link){
|
||||
function deleteGallery(gid){
|
||||
store.dispatch("deleteGallery", gid)
|
||||
}
|
||||
function deleteVideo(id){
|
||||
store.dispatch("deleteVideo", id)
|
||||
}
|
||||
function onlineGalleryReader(gid){
|
||||
store.dispatch("queryOnlineLinks", gid)
|
||||
}
|
||||
@@ -371,21 +286,6 @@ function shareGallery(data){
|
||||
ElMessage(res.data.data)
|
||||
})
|
||||
}
|
||||
function openVideoPanel(link){
|
||||
current_video_link.value = link
|
||||
isPlaying.value = true
|
||||
}
|
||||
function initPlayer(){
|
||||
player.value = new Player({
|
||||
id: "player",
|
||||
url: current_video_link.value,
|
||||
videoInit: true,
|
||||
lang: 'zh-cn'
|
||||
})
|
||||
}
|
||||
function destroyPlayer(){
|
||||
player.value.destroy()
|
||||
}
|
||||
|
||||
//显示缩略图
|
||||
function showThumbnail(gallery){
|
||||
|
||||
Reference in New Issue
Block a user