This commit is contained in:
theluyuan 2023-07-04 21:43:52 +08:00
commit 06b631750e
23 changed files with 299 additions and 74 deletions

Binary file not shown.

View File

@ -18,6 +18,7 @@
"koa-sse-stream": "^0.2.0",
"koa-static": "^5.0.0",
"koa-websocket": "^7.0.0",
"process": "^0.11.10",
"puppeteer": "^20.7.1",
"sqlite3": "^5.1.6"
},

View File

@ -1,5 +1,9 @@
lockfileVersion: '6.0'
settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
dependencies:
axios:
specifier: ^1.4.0
@ -25,6 +29,9 @@ dependencies:
koa-websocket:
specifier: ^7.0.0
version: 7.0.0
process:
specifier: ^0.11.10
version: 0.11.10
puppeteer:
specifier: ^20.7.1
version: 20.7.1
@ -1680,6 +1687,11 @@ packages:
engines: {node: '>= 0.8.0'}
dev: false
/process@0.11.10:
resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==}
engines: {node: '>= 0.6.0'}
dev: false
/progress@2.0.3:
resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==}
engines: {node: '>=0.4.0'}

View File

@ -4,10 +4,21 @@ const utils = require("../util/utils")
const KoaSSEStream = require('koa-sse-stream');
const {dowload} = require("../util/download");
const {addDownList, getDownList, setDownState} = require("../util/sql/download");
const dayjs = require("dayjs")
const {getMediaInfo} = require("../util/utils");
const router = new Router()
// const dowloadlist = []
// const download = []
router.get("/test", async (ctx) => {
await utils.uploadImg('C:\\Users\\SummerTail\\Pictures\\Snipaste_2023-07-03_22-16-37.png')
ctx.body = {
code: 0,
msg: "test",
data: ''
}
})
router.get("/getMediaInfo", async (ctx) => {
let url = ctx.query.filePath
@ -26,22 +37,21 @@ router.get("/getMediaInfo", async (ctx) => {
router.get("/getQqList", async (ctx) => {
let url = ctx.query.url
let videoid = url.split("/")
for (let i in videoid) {
if (videoid[i] == "cover") {
videoid = videoid[i + 1].replace(".html")
let video_id = url.split("/")
for (let i in video_id) {
if (video_id[i] === "cover") {
video_id = video_id[i + 1].replace(".html")
break
}
}
let list = await getQqListData(url)
ctx.body = list
ctx.body = await getQqListData(url)
})
router.get("/startDown", async (ctx) => {
let title = ctx.query.title
let url = ctx.query.url
let save = ctx.query.save
// dowloadlist.push({
// download.push({
// title,url,save
// })
// startDown()
@ -52,9 +62,6 @@ router.get("/startDown", async (ctx) => {
}
})
router.get("/test", async (ctx) => {
utils.getVideoSpecifyTimeImage("D:/aaa/梦中的那片海/梦中的那片海 第01集.mp4", 46, "D:/aaa/梦中的那片海/aaa.jpg")
})
// 连接池
@ -92,9 +99,9 @@ function startDown(data) {
setInterval(async () => {
let dowloadlist = await getDownList()
if (dowloadlist.length != 0 && !start) {
if (dowloadlist.length !== 0 && !start) {
startDown(dowloadlist[0])
} else if (dowloadlist.length == 0) {
} else if (dowloadlist.length === 0) {
start = false
}
}, 1000)

View File

@ -22,7 +22,7 @@ async function getQqListData(url) {
console.log(list)
for (let i of list) {
if (i && i.innerText) {
if ("全部" == i.innerText.trim()) {
if ("全部" === i.innerText.trim()) {
i.click()
}
}

View File

@ -1,7 +1,8 @@
const {spawn} = require('child_process');
const path = require('path');
const {cwd} = require('process');
const {readFile} = require("fs");
const {post} = require("axios");
function seep(time) {
return new Promise((res) => {
@ -11,12 +12,43 @@ function seep(time) {
})
}
/**
* 上传图片至图床 暂不可用
* @param filePath 图片路径
*/
function uploadImg(filePath) {
readFile(filePath, function (err, data) {
let formData = new FormData()
formData.append('file', data)
post('https://image.zmpt.cc/upload/localhost', formData).then((response, headers) => {
console.info(response)
})
})
}
/**
* 获取视频截图 (目前不可用,不好使)
* 获取腾讯视频播放列表
* @param {String}cid 视频id
* @returns {JSON} 播放列表等参数
*/
function getTencentVideoPlayList(cid) {
return new Promise((resolve) => {
const lux = spawn("./bin/getTencentVideoPlayList.exe", [cid, 'vversion_name=8.2.95;', 1])
lux.stdout.on('data', (data) => {
resolve(JSON.parse(String(data)))
});
})
}
/**
* 获取视频截图
* @param {String} filePath 文件绝对路径
* @param {number} seconds 时间
* @param {Promise<String>} save 保存绝对路径(含文件名)
* @param {string} save 保存绝对路径(含文件名)
* @returns {Promise<String>} 文件位置(待定)
*/
function getVideoSpecifyTimeImage(filePath, seconds, save) {
@ -68,7 +100,7 @@ function createTorrent(filePath, save) {
lux.stdout.on('data', (data) => {
response += data
});
lux.stdout.on('close', (code) => {
lux.stdout.on('close', () => {
resolve(response)
})
})
@ -133,5 +165,7 @@ module.exports = {
dow,
getVideoSpecifyTimeImage,
getMediaInfo,
createTorrent
createTorrent,
getTencentVideoPlayList,
uploadImg
}

View File

@ -1,7 +1,14 @@
# Vue 3 + Vite
# WEB-DL全自动发布工具
This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
目前工具处于开发阶段,暂不可用
## Recommended IDE Setup
- [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
- [x] 爬取腾讯视频播放列表
- [x] 下载视频
- [x] 获取文件MediaInfo
- [x] 对视频文件截图
- [x] 文件制种
- [ ] 上传图片至PT站点图床
- [ ] 影片订阅自动下载
- [ ] 下载缓存
- [ ] 失败重试
- [ ] 发布至PT站点

View File

@ -1 +0,0 @@
.card-header[data-v-ef30d7a3]{display:flex;justify-content:space-between;align-items:center}.text[data-v-ef30d7a3]{font-size:14px}.item[data-v-ef30d7a3]{margin-bottom:18px}.box-card[data-v-ef30d7a3]{width:480px}

View File

@ -1 +0,0 @@
import{a as h}from"./axios-4a70c6fc.js";import{_ as E,r as d,a as n,o as w,c as L,w as a,b as e,d as r,e as i,f as b,g as U,F as N,E as x,t as F,p as M,h as R}from"./index-f3388604.js";const j=c=>(M("data-v-ef30d7a3"),c=c(),R(),c),z=j(()=>r("div",{class:"card-header"},[r("span",null,"Video Download Test")],-1)),Q={style:{display:"flex",width:"100%"}},A={style:{display:"flex"}},G={style:{display:"flex"}},H={style:{width:"100%",height:"100%","overflow-y":"auto"}},J={__name:"downloadTest",setup(c){const p=d(!1),l=d({name:"https://v.qq.com/x/cover/mzc002007vp35qj.html",start:1,save:localStorage.getItem("save")}),m=d([]),_=d();function V(){h.get("/getQqList",{params:{url:l.value.name}}).then(t=>{m.value=t.data})}function k(){_.value.clearSelection();for(let t=l.value.start-1;t<m.value.length;t++)console.log(t),_.value.toggleRowSelection(m.value[t],void 0)}const v=d([]);async function C(){let t=_.value.getSelectionRows();if(t.length===0){x({showClose:!0,message:"请选择要下载的剧集",type:"error"});return}if(!l.value.save){x({showClose:!0,message:"请填写下载位置",type:"error"});return}p.value=!0,localStorage.setItem("save",l.value.save);for(let o of t)await h.get("/startDown",{params:{...o,save:l.value.save+"/"+o.title.split(" ")[0]}});x({showClose:!0,message:"添加完成",type:"success"})}const S=new EventSource("/msg");S.onmessage=t=>{v.value.length>200&&v.value.splice(200),v.value.unshift(t.data)};function I(){p.value=!0}function T(){h.get("/test",{params:{url:l.value.name}}).then(t=>{console.log(t.data)})}return(t,o)=>{const f=n("el-input"),u=n("el-button"),g=n("el-form-item"),y=n("el-table-column"),q=n("el-table"),B=n("el-dialog"),D=n("el-card");return w(),L(D,{class:"box-card"},{header:a(()=>[z]),default:a(()=>[e(g,{label:"视频地址"},{default:a(()=>[r("div",Q,[e(f,{style:{width:"100%"},modelValue:l.value.name,"onUpdate:modelValue":o[0]||(o[0]=s=>l.value.name=s)},null,8,["modelValue"]),e(u,{style:{"flex-shrink":"0",margin:"0 10px"},onClick:V,type:"primary"},{default:a(()=>[i("获取")]),_:1})])]),_:1}),e(g,{label:"第几集开始"},{default:a(()=>[r("div",A,[e(f,{modelValue:l.value.start,"onUpdate:modelValue":o[1]||(o[1]=s=>l.value.start=s)},null,8,["modelValue"]),e(u,{style:{"flex-shrink":"0",margin:"0 10px"},onClick:k,type:"primary"},{default:a(()=>[i("设置")]),_:1}),e(u,{style:{"flex-shrink":"0",margin:"0 10px"},onClick:T,type:"primary"},{default:a(()=>[i("测试按钮")]),_:1})])]),_:1}),e(g,{label:"下载保存地址"},{default:a(()=>[r("div",G,[e(f,{modelValue:l.value.save,"onUpdate:modelValue":o[2]||(o[2]=s=>l.value.save=s)},null,8,["modelValue"]),e(u,{style:{"flex-shrink":"0",margin:"0 10px"},onClick:C,type:"primary"},{default:a(()=>[i("下载")]),_:1}),e(u,{style:{"flex-shrink":"0",margin:"0 10px"},onClick:I,type:"primary"},{default:a(()=>[i("查看进度")]),_:1})])]),_:1}),e(q,{ref_key:"table",ref:_,data:m.value,style:{width:"100%"}},{default:a(()=>[e(y,{type:"selection",width:"55"}),e(y,{label:"title",prop:"title"}),e(y,{label:"url",prop:"url"})]),_:1},8,["data"]),e(B,{fullscreen:!0,modelValue:p.value,"onUpdate:modelValue":o[3]||(o[3]=s=>p.value=s),title:"Tips",width:"30%"},{default:a(()=>[r("div",H,[(w(!0),b(N,null,U(v.value,s=>(w(),b("div",null,F(s),1))),256))])]),_:1},8,["modelValue"])]),_:1})}}},P=E(J,[["__scopeId","data-v-ef30d7a3"]]);export{P as default};

View File

@ -0,0 +1 @@
import{a as x}from"./axios-4a70c6fc.js";import{_ as D,r as u,a as n,o as h,c as E,w as o,b as e,d as r,e as v,f as b,g as L,F as U,E as w,t as N,p as F,h as M}from"./index-a65d067b.js";const R=d=>(F("data-v-509f07c5"),d=d(),M(),d),j=R(()=>r("div",{class:"card-header"},[r("span",null,"Video Download Test")],-1)),z={style:{display:"flex",width:"100%"}},Q={style:{display:"flex"}},A={style:{display:"flex"}},G={style:{width:"100%",height:"100%","overflow-y":"auto"}},H={__name:"downloadTest",setup(d){const i=u(!1),l=u({name:"https://v.qq.com/x/cover/mzc002007vp35qj.html",start:1,save:localStorage.getItem("save")}),c=u([]),p=u();function V(){x.get("/getQqList",{params:{url:l.value.name}}).then(t=>{c.value=t.data})}function k(){p.value.clearSelection();for(let t=l.value.start-1;t<c.value.length;t++)console.log(t),p.value.toggleRowSelection(c.value[t],void 0)}const m=u([]);async function S(){let t=p.value.getSelectionRows();if(t.length===0){w({showClose:!0,message:"请选择要下载的剧集",type:"error"});return}if(!l.value.save){w({showClose:!0,message:"请填写下载位置",type:"error"});return}i.value=!0,localStorage.setItem("save",l.value.save);for(let a of t)await x.get("/startDown",{params:{...a,save:l.value.save+"/"+a.title.split(" ")[0]}});w({showClose:!0,message:"添加完成",type:"success"})}const C=new EventSource("/msg");C.onmessage=t=>{m.value.length>200&&m.value.splice(200),m.value.unshift(t.data)};function I(){i.value=!0}return(t,a)=>{const f=n("el-input"),_=n("el-button"),g=n("el-form-item"),y=n("el-table-column"),T=n("el-table"),q=n("el-dialog"),B=n("el-card");return h(),E(B,{class:"box-card"},{header:o(()=>[j]),default:o(()=>[e(g,{label:"视频地址"},{default:o(()=>[r("div",z,[e(f,{style:{width:"100%"},modelValue:l.value.name,"onUpdate:modelValue":a[0]||(a[0]=s=>l.value.name=s)},null,8,["modelValue"]),e(_,{style:{"flex-shrink":"0",margin:"0 10px"},onClick:V,type:"primary"},{default:o(()=>[v("获取")]),_:1})])]),_:1}),e(g,{label:"第几集开始"},{default:o(()=>[r("div",Q,[e(f,{modelValue:l.value.start,"onUpdate:modelValue":a[1]||(a[1]=s=>l.value.start=s)},null,8,["modelValue"]),e(_,{style:{"flex-shrink":"0",margin:"0 10px"},onClick:k,type:"primary"},{default:o(()=>[v("设置")]),_:1})])]),_:1}),e(g,{label:"下载保存地址"},{default:o(()=>[r("div",A,[e(f,{modelValue:l.value.save,"onUpdate:modelValue":a[2]||(a[2]=s=>l.value.save=s)},null,8,["modelValue"]),e(_,{style:{"flex-shrink":"0",margin:"0 10px"},onClick:S,type:"primary"},{default:o(()=>[v("下载")]),_:1}),e(_,{style:{"flex-shrink":"0",margin:"0 10px"},onClick:I,type:"primary"},{default:o(()=>[v("查看进度")]),_:1})])]),_:1}),e(T,{ref_key:"table",ref:p,data:c.value,style:{width:"100%"}},{default:o(()=>[e(y,{type:"selection",width:"55"}),e(y,{label:"title",prop:"title"}),e(y,{label:"url",prop:"url"})]),_:1},8,["data"]),e(q,{fullscreen:!0,modelValue:i.value,"onUpdate:modelValue":a[3]||(a[3]=s=>i.value=s),title:"Tips",width:"30%"},{default:o(()=>[r("div",G,[(h(!0),b(U,null,L(m.value,s=>(h(),b("div",null,N(s),1))),256))])]),_:1},8,["modelValue"])]),_:1})}}},O=D(H,[["__scopeId","data-v-509f07c5"]]);export{O as default};

View File

@ -0,0 +1 @@
.card-header[data-v-509f07c5]{display:flex;justify-content:space-between;align-items:center}.text[data-v-509f07c5]{font-size:14px}.item[data-v-509f07c5]{margin-bottom:18px}.box-card[data-v-509f07c5]{width:480px}

View File

@ -1 +1 @@
import{a as i}from"./axios-4a70c6fc.js";import{_ as f,r as m,a as o,o as v,c as x,w as s,d as _,b as l,e as I,i as h,p as g,h as M}from"./index-f3388604.js";const T=e=>(g("data-v-215ae4a3"),e=e(),M(),e),V={class:"card-header"},b=T(()=>_("span",null,"MediaInfo Test",-1)),B={__name:"getMediaInfoTest",setup(e){const a=m("");function c(){i.get("/getMediaInfo",{params:{filePath:a.value}}).then(n=>{h.alert(n.data.data)})}return(n,t)=>{const p=o("el-button"),r=o("el-input"),u=o("el-card");return v(),x(u,{class:"box-card"},{header:s(()=>[_("div",V,[b,l(p,{onClick:t[0]||(t[0]=d=>c()),class:"button",text:""},{default:s(()=>[I("Test")]),_:1})])]),default:s(()=>[l(r,{modelValue:a.value,"onUpdate:modelValue":t[1]||(t[1]=d=>a.value=d),placeholder:"视频文件绝对路径"},null,8,["modelValue"])]),_:1})}}},C=f(B,[["__scopeId","data-v-215ae4a3"]]);export{C as default};
import{a as i}from"./axios-4a70c6fc.js";import{_ as f,r as m,a as o,o as v,c as x,w as s,d as _,b as l,e as I,i as h,p as g,h as M}from"./index-a65d067b.js";const T=e=>(g("data-v-215ae4a3"),e=e(),M(),e),V={class:"card-header"},b=T(()=>_("span",null,"MediaInfo Test",-1)),B={__name:"getMediaInfoTest",setup(e){const a=m("");function c(){i.get("/getMediaInfo",{params:{filePath:a.value}}).then(n=>{h.alert(n.data.data)})}return(n,t)=>{const p=o("el-button"),r=o("el-input"),u=o("el-card");return v(),x(u,{class:"box-card"},{header:s(()=>[_("div",V,[b,l(p,{onClick:t[0]||(t[0]=d=>c()),class:"button",text:""},{default:s(()=>[I("Test")]),_:1})])]),default:s(()=>[l(r,{modelValue:a.value,"onUpdate:modelValue":t[1]||(t[1]=d=>a.value=d),placeholder:"视频文件绝对路径"},null,8,["modelValue"])]),_:1})}}},C=f(B,[["__scopeId","data-v-215ae4a3"]]);export{C as default};

View File

@ -0,0 +1 @@
import{a as i}from"./axios-4a70c6fc.js";import{_ as f,r as m,a as o,o as v,c as x,w as s,d as _,b as l,e as I,i as h,p as g,h as M}from"./index-a65d067b.js";const T=e=>(g("data-v-215ae4a3"),e=e(),M(),e),V={class:"card-header"},b=T(()=>_("span",null,"MediaInfo Test",-1)),B={__name:"getMediaInfoTest",setup(e){const a=m("");function c(){i.get("/getMediaInfo",{params:{filePath:a.value}}).then(n=>{h.alert(n.data.data)})}return(n,t)=>{const p=o("el-button"),r=o("el-input"),u=o("el-card");return v(),x(u,{class:"box-card"},{header:s(()=>[_("div",V,[b,l(p,{onClick:t[0]||(t[0]=d=>c()),class:"button",text:""},{default:s(()=>[I("Test")]),_:1})])]),default:s(()=>[l(r,{modelValue:a.value,"onUpdate:modelValue":t[1]||(t[1]=d=>a.value=d),placeholder:"视频文件绝对路径"},null,8,["modelValue"])]),_:1})}}},C=f(B,[["__scopeId","data-v-215ae4a3"]]);export{C as default};

1
view/dist/assets/index-6cd6c959.js vendored Normal file
View File

@ -0,0 +1 @@
import{a as n,o as r,c as v,w as t,b as e,u as a,j as w,e as _,v as b,k as g,l as k,m as y,n as B,q as C,s as I,x as M,r as p,f as x,F as N,d as h,_ as T}from"./index-a65d067b.js";import{a as V}from"./axios-4a70c6fc.js";function $(){V.get("/test").then(d=>{})}const z={__name:"leftMenu",setup(d){return(i,m)=>{const l=n("el-icon"),o=n("el-menu-item"),u=n("el-menu-item-group"),s=n("el-sub-menu"),c=n("el-menu"),f=n("el-scrollbar");return r(),v(f,null,{default:t(()=>[e(c,{router:!0},{default:t(()=>[e(s,{index:"1"},{title:t(()=>[e(l,null,{default:t(()=>[e(a(w))]),_:1}),_(" 订阅管理 ")]),default:t(()=>[e(u,null,{default:t(()=>[e(o,{index:"/subscribe"},{default:t(()=>[e(l,null,{default:t(()=>[e(a(b))]),_:1}),_(" 电视剧订阅 ")]),_:1}),e(o,{index:""},{default:t(()=>[e(l,null,{default:t(()=>[e(a(g))]),_:1}),_(" 电影订阅 ")]),_:1})]),_:1})]),_:1}),e(s,{index:"2"},{title:t(()=>[e(l,null,{default:t(()=>[e(a(k))]),_:1}),_(" 功能测试 ")]),default:t(()=>[e(u,null,{title:t(()=>[_("测试模块")]),default:t(()=>[e(o,{index:"/medaInfoTest"},{default:t(()=>[e(l,null,{default:t(()=>[e(a(y))]),_:1}),_(" MediaInfo ")]),_:1}),e(o,{index:"1"},{default:t(()=>[e(l,null,{default:t(()=>[e(a(B))]),_:1}),_(" 图像截取 ")]),_:1}),e(o,{index:"/downloadTest",to:""},{default:t(()=>[e(l,null,{default:t(()=>[e(a(C))]),_:1}),_(" 视频下载 ")]),_:1}),e(o,{onClick:$},{default:t(()=>[e(l,null,{default:t(()=>[e(a(I))]),_:1}),_(" 功能测试 ")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}}},E=h("h3",{style:{width:"180px"}},"WEB-DL发布工具",-1),F=h("div",{class:"h-6"},null,-1),S=M({__name:"headerMenu",setup(d){const i=p("1");p("1");const m=(l,o)=>{console.log(l,o)};return(l,o)=>{const u=n("el-menu-item"),s=n("el-sub-menu"),c=n("el-avatar"),f=n("el-menu");return r(),x(N,null,[e(f,{"default-active":i.value,class:"el-menu-demo",mode:"horizontal",onSelect:m},{default:t(()=>[E,e(u,{index:"1"},{default:t(()=>[_("首页")]),_:1}),e(s,{index:"2"},{title:t(()=>[_("设置")]),default:t(()=>[e(u,{index:"2-1"},{default:t(()=>[_("item one")]),_:1})]),_:1}),e(c,{style:{position:"absolute",right:"0"},size:50,src:"https://www.konfan.cn/img/favicon.png"})]),_:1},8,["default-active"]),F],64)}}});const j={class:"common-layout"},q={__name:"index",setup(d){return(i,m)=>{const l=n("el-header"),o=n("el-aside"),u=n("router-view"),s=n("el-main"),c=n("el-container");return r(),x("div",j,[e(c,null,{default:t(()=>[e(l,null,{default:t(()=>[e(S)]),_:1}),e(c,null,{default:t(()=>[e(o,{width:"200px"},{default:t(()=>[e(z)]),_:1}),e(s,null,{default:t(()=>[e(u)]),_:1})]),_:1})]),_:1})])}}},W=T(q,[["__scopeId","data-v-10e397ef"]]);export{W as default};

View File

@ -1 +0,0 @@
import{a as t,o as r,c as v,w as n,b as e,u,j as w,e as l,k as b,v as g,l as k,m as y,r as p,f as x,F as B,d as h,_ as I}from"./index-f3388604.js";const C={__name:"leftMenu",setup(f){return(d,m)=>{const _=t("el-icon"),o=t("el-menu-item"),a=t("el-menu-item-group"),s=t("el-sub-menu"),c=t("el-menu"),i=t("el-scrollbar");return r(),v(i,null,{default:n(()=>[e(c,{router:!0},{default:n(()=>[e(s,{index:"1"},{title:n(()=>[e(_,null,{default:n(()=>[e(u(w))]),_:1}),l("功能测试")]),default:n(()=>[e(a,null,{title:n(()=>[l("测试模块")]),default:n(()=>[e(o,{index:"/medaInfoTest"},{default:n(()=>[e(_,null,{default:n(()=>[e(u(b))]),_:1}),l("MediaInfo")]),_:1}),e(o,{index:"1"},{default:n(()=>[e(_,null,{default:n(()=>[e(u(g))]),_:1}),l("图像截取")]),_:1}),e(o,{index:"/downloadTest",to:""},{default:n(()=>[e(_,null,{default:n(()=>[e(u(k))]),_:1}),l("视频下载")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}}},M=h("h3",{style:{width:"180px"}},"WEB-DL发布工具",-1),N=h("div",{class:"h-6"},null,-1),T=y({__name:"headerMenu",setup(f){const d=p("1");p("1");const m=(_,o)=>{console.log(_,o)};return(_,o)=>{const a=t("el-menu-item"),s=t("el-sub-menu"),c=t("el-avatar"),i=t("el-menu");return r(),x(B,null,[e(i,{"default-active":d.value,class:"el-menu-demo",mode:"horizontal",onSelect:m},{default:n(()=>[M,e(a,{index:"1"},{default:n(()=>[l("首页")]),_:1}),e(s,{index:"2"},{title:n(()=>[l("设置")]),default:n(()=>[e(a,{index:"2-1"},{default:n(()=>[l("item one")]),_:1})]),_:1}),e(c,{style:{position:"absolute",right:"0"},size:50,src:"https://www.konfan.cn/img/favicon.png"})]),_:1},8,["default-active"]),N],64)}}});const V={class:"common-layout"},$={__name:"index",setup(f){return(d,m)=>{const _=t("el-header"),o=t("el-aside"),a=t("router-view"),s=t("el-main"),c=t("el-container");return r(),x("div",V,[e(c,null,{default:n(()=>[e(_,null,{default:n(()=>[e(T)]),_:1}),e(c,null,{default:n(()=>[e(o,{width:"200px"},{default:n(()=>[e(C)]),_:1}),e(s,null,{default:n(()=>[e(a)]),_:1})]),_:1})]),_:1})])}}},E=I($,[["__scopeId","data-v-10e397ef"]]);export{E as default};

62
view/dist/assets/index-a65d067b.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
import{_ as i,a as t,o as c,c as u,w as s,f as p,g as f,F as m,b as o,d as e,e as b}from"./index-a65d067b.js";const h={},x=e("img",{src:"https://puui.qpic.cn/vcover_vt_pic/0/ww18u675tfmhas61669188848910/260",class:"image"},null,-1),v={style:{padding:"14px"}},g=e("span",null,"一念永恒",-1),w={class:"bottom"},y=e("time",{class:"time"},"正在订阅100/104",-1);function k(B,N){const n=t("el-button"),_=t("el-card"),a=t("el-col"),l=t("el-row");return c(),u(l,null,{default:s(()=>[(c(),p(m,null,f(1,(r,d)=>o(a,{key:r,span:8,offset:d>0?2:0},{default:s(()=>[o(_,{"body-style":{padding:"0px"}},{default:s(()=>[x,e("div",v,[g,e("div",w,[y,o(n,{text:"",class:"button"},{default:s(()=>[b("编辑")]),_:1})])])]),_:1})]),_:2},1032,["offset"])),64))]),_:1})}const C=i(h,[["render",k]]);export{C as default};

View File

@ -0,0 +1 @@
.time{font-size:12px;color:#999}.bottom{margin-top:13px;line-height:12px;display:flex;justify-content:space-between;align-items:center}.button{padding:0;min-height:auto}.image{width:100%;display:block}

View File

@ -5,8 +5,8 @@
<link rel="icon" type="image/svg+xml" href="./vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + Vue</title>
<script type="module" crossorigin src="./assets/index-f3388604.js"></script>
<link rel="stylesheet" href="./assets/index-6ef103ac.css">
<script type="module" crossorigin src="./assets/index-a65d067b.js"></script>
<link rel="stylesheet" href="./assets/index-44d7f76c.css">
</head>
<body>
<div id="app"></div>

View File

@ -1,6 +1,15 @@
<script setup>
import {Check, Download, Edit, View} from "@element-plus/icons-vue";
import {
Check,
Download,
Edit,
View,
CollectionTag,
VideoCamera,
VideoPlay,
SwitchButton
} from "@element-plus/icons-vue";
import {router} from "../router/index.js";
</script>
@ -9,29 +18,75 @@ import {router} from "../router/index.js";
<el-scrollbar>
<el-menu :router="true">
<el-sub-menu index="1">
<template #title><el-icon><Check /></el-icon></template>
<template #title>
<el-icon>
<CollectionTag/>
</el-icon>
订阅管理
</template>
<el-menu-item-group>
<template #title>测试模块</template>
<el-menu-item index="/medaInfoTest"><el-icon><Edit /></el-icon>MediaInfo</el-menu-item>
<el-menu-item index="1"><el-icon><View /></el-icon></el-menu-item>
<el-menu-item index="/downloadTest" to><el-icon><Download /></el-icon></el-menu-item>
<el-menu-item index="/subscribe">
<el-icon>
<VideoCamera/>
</el-icon>
电视剧订阅
</el-menu-item>
<el-menu-item index="">
<el-icon>
<VideoPlay/>
</el-icon>
电影订阅
</el-menu-item>
</el-menu-item-group>
</el-sub-menu>
<el-sub-menu index="2">
<template #title><el-icon><Check /></el-icon></template>
<template #title>
<el-icon>
<Check/>
</el-icon>
功能测试
</template>
<el-menu-item-group>
<template #title>测试模块</template>
<el-menu-item index="/addVideo"><el-icon><Edit /></el-icon></el-menu-item>
<el-menu-item index="/downloadTest" to><el-icon><Download /></el-icon></el-menu-item>
<el-menu-item index="/medaInfoTest">
<el-icon>
<Edit/>
</el-icon>
MediaInfo
</el-menu-item>
<el-menu-item index="1">
<el-icon>
<View/>
</el-icon>
图像截取
</el-menu-item>
<el-menu-item index="/downloadTest" to>
<el-icon>
<Download/>
</el-icon>
视频下载
</el-menu-item>
<el-menu-item @click="test">
<el-icon>
<SwitchButton/>
</el-icon>
功能测试
</el-menu-item>
</el-menu-item-group>
</el-sub-menu>
</el-menu>
</el-scrollbar>
</template>
<script>
import axios from "axios";
function test() {
axios.get('/test').then(r => {
})
}
</script>

View File

@ -0,0 +1,52 @@
<template>
<el-row>
<el-col
v-for="(o, index) in 1"
:key="o"
:span="8"
:offset="index > 0 ? 2 : 0"
>
<el-card :body-style="{ padding: '0px' }">
<img
src="https://puui.qpic.cn/vcover_vt_pic/0/ww18u675tfmhas61669188848910/260"
class="image"
/>
<div style="padding: 14px">
<span>一念永恒</span>
<div class="bottom">
<time class="time">正在订阅100/104</time>
<el-button text class="button">编辑</el-button>
</div>
</div>
</el-card>
</el-col>
</el-row>
</template>
<script lang="ts" setup>
</script>
<style>
.time {
font-size: 12px;
color: #999;
}
.bottom {
margin-top: 13px;
line-height: 12px;
display: flex;
justify-content: space-between;
align-items: center;
}
.button {
padding: 0;
min-height: auto;
}
.image {
width: 100%;
display: block;
}
</style>

View File

@ -17,7 +17,6 @@
<div style="display: flex;">
<el-input v-model="form.start"/>
<el-button style="flex-shrink: 0;margin: 0 10px;" @click="setList" type="primary">设置</el-button>
<el-button style="flex-shrink: 0;margin: 0 10px;" @click="test" type="primary">测试按钮</el-button>
</div>
</el-form-item>
@ -137,14 +136,6 @@ function showMsg() {
dialogVisible.value = true
}
function test() {
axios.get("/test", {
params: {url: form.value.name}
}).then((r) => {
console.log(r.data);
})
}
</script>
<style lang="scss" scoped>

View File

@ -16,8 +16,9 @@ const routes = [
component: () => import("../page/test/getMediaInfoTest.vue")
},
{
path:"addVideo",
component: ()=>import("../page/addVideo.vue")
path: "subscribe",
name: "subscribe",
component:() => import ("../page/subscribe/subscribe.vue")
}
],
component: () => import("../page/index.vue"),