临时
This commit is contained in:
parent
213130a207
commit
a9428fe8ce
BIN
db/database.db
BIN
db/database.db
Binary file not shown.
@ -38,6 +38,7 @@ router.get("/getVideoInfo", async (ctx) => {
|
|||||||
router.post("/addSubscribe", async (ctx) => {
|
router.post("/addSubscribe", async (ctx) => {
|
||||||
// console.log(ctx.request.body)
|
// console.log(ctx.request.body)
|
||||||
let data = ctx.request.body
|
let data = ctx.request.body
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
router.get("/getImdbName", async (ctx) => {
|
router.get("/getImdbName", async (ctx) => {
|
||||||
|
6
util/sql/video.js
Normal file
6
util/sql/video.js
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
const { run, getAll } = require("./base");
|
||||||
|
|
||||||
|
function addSub(info){
|
||||||
|
let sql = `insert into download(name,rename,skip,desc,url,subtitle,img) values(?,?,?,?,?,?)`
|
||||||
|
|
||||||
|
}
|
@ -3,13 +3,13 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="list">
|
<div class="list">
|
||||||
<div class="item" v-for="i in list">
|
<div class="item" v-for="i in list">
|
||||||
<el-card @click="getInfo(i.id)" shadow="hover" :body-style="{ padding: '0px' }">
|
<el-card @click="getInfo(i.id,i.img)" shadow="hover" :body-style="{ padding: '0px' }">
|
||||||
<img :src="i.img" class="image"/>
|
<img :src="i.img" class="image"/>
|
||||||
<div style="padding: 14px">
|
<div style="padding: 14px">
|
||||||
<span>{{ i.title }}({{ i.year }})</span>
|
<span>{{ i.title }}({{ i.year }})</span>
|
||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
<time class="time">类型:{{ i.type }}</time>
|
<time class="time">类型:{{ i.type }}</time>
|
||||||
<el-button text class="button" >详情</el-button>
|
<el-button text class="button">详情</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
@ -28,6 +28,10 @@
|
|||||||
<el-input style="width: 100px" v-model="ep"></el-input>
|
<el-input style="width: 100px" v-model="ep"></el-input>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<div style="display: flex;align-items: center;padding: 5px">
|
||||||
|
副标题:
|
||||||
|
<el-input style="width: 80%" v-model="subtitle"></el-input>
|
||||||
|
</div>
|
||||||
<div style="display: flex;align-items: center;padding: 5px">
|
<div style="display: flex;align-items: center;padding: 5px">
|
||||||
地址:
|
地址:
|
||||||
<el-input style="width: 80%" v-model="url"></el-input>
|
<el-input style="width: 80%" v-model="url"></el-input>
|
||||||
@ -57,6 +61,8 @@ const year = ref("")
|
|||||||
const ep = ref(1)
|
const ep = ref(1)
|
||||||
const season = ref(1)
|
const season = ref(1)
|
||||||
const url = ref("")
|
const url = ref("")
|
||||||
|
const subtitle = ref("")
|
||||||
|
const img = ref("")
|
||||||
async function onSubmit(name) {
|
async function onSubmit(name) {
|
||||||
let res = await searchVideo(name)
|
let res = await searchVideo(name)
|
||||||
list.value = res.data.data
|
list.value = res.data.data
|
||||||
@ -73,18 +79,22 @@ let vid = "";
|
|||||||
const dialogFormVisible = ref(false)
|
const dialogFormVisible = ref(false)
|
||||||
|
|
||||||
|
|
||||||
async function getInfo(id) {
|
async function getInfo(id,i) {
|
||||||
const loadingInstance = ElLoading.service({fullscreen: true})
|
const loadingInstance = ElLoading.service({fullscreen: true})
|
||||||
vid = id
|
vid = id
|
||||||
|
img.value = i
|
||||||
let res = await getVideoInfo(id)
|
let res = await getVideoInfo(id)
|
||||||
info.value = res.data.format
|
info.value = res.data.format
|
||||||
year.value = res.data.year
|
year.value = res.data.year
|
||||||
|
subtitle.value = res.data.trans_title.join(" / ")
|
||||||
await subscribe(res.data.imdb_link)
|
await subscribe(res.data.imdb_link)
|
||||||
dialogFormVisible.value = true
|
dialogFormVisible.value = true
|
||||||
loadingInstance.close()
|
loadingInstance.close()
|
||||||
}
|
}
|
||||||
|
|
||||||
const enName = ref("")
|
const enName = ref("")
|
||||||
async function subscribe(url){
|
|
||||||
|
async function subscribe(url) {
|
||||||
const res = await getImdbName(url)
|
const res = await getImdbName(url)
|
||||||
enName.value = res.data
|
enName.value = res.data
|
||||||
}
|
}
|
||||||
@ -93,10 +103,12 @@ async function addsubscribe() {
|
|||||||
addSubscribe({
|
addSubscribe({
|
||||||
name: enName.value,
|
name: enName.value,
|
||||||
desc: info.value,
|
desc: info.value,
|
||||||
year:year.value,
|
year: year.value,
|
||||||
season:season.value,
|
season: season.value,
|
||||||
ep:ep.value,
|
ep: ep.value,
|
||||||
url:url.value
|
url: url.value,
|
||||||
|
img:img.value,
|
||||||
|
subtitle:subtitle.value
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user