add 获取订阅列表
This commit is contained in:
@@ -24,7 +24,11 @@ export async function getImdbName(url) {
|
||||
}
|
||||
})
|
||||
}
|
||||
export async function addSubscribe({name, rename, desc, year, season, ep, url, img, subtitle, time,skip,sid,count}) {
|
||||
return await base.post("/videoInfo/addSubscribe", {name, rename, desc, year, season, ep, url, img, subtitle, time,skip,sid,count})
|
||||
}
|
||||
|
||||
export async function getSubscribe(){
|
||||
return await base.get("/videoInfo/getSubscribe")
|
||||
|
||||
export async function addSubscribe({name, rename, desc, year, season, ep, url, img, subtitle, time,skip,sid}) {
|
||||
return await base.post("/videoInfo/addSubscribe", {name, rename, desc, year, season, ep, url, img, subtitle, time,skip,sid})
|
||||
}
|
||||
@@ -70,6 +70,7 @@ const subtitle = ref("")
|
||||
const img = ref("")
|
||||
const time = ref("")
|
||||
const name = ref("")
|
||||
const count = ref(0)
|
||||
async function onSubmit(name) {
|
||||
let res = await searchVideo(name)
|
||||
list.value = res.data.data
|
||||
@@ -94,6 +95,7 @@ async function getInfo(id, i) {
|
||||
info.value = res.data.format
|
||||
year.value = res.data.year
|
||||
subtitle.value = res.data.trans_title.join(" / ")
|
||||
count.value = res.data.episodes
|
||||
name.value = res.data.chinese_title
|
||||
enName.value = ""
|
||||
if(res.data.imdb_link){
|
||||
@@ -123,7 +125,8 @@ async function addsubscribe() {
|
||||
subtitle: subtitle.value,
|
||||
time: dayjs(time.value).format("HH:mm:ss"),
|
||||
skip:season.value,
|
||||
sid:vid
|
||||
sid:vid,
|
||||
count:count.value
|
||||
}
|
||||
for(let i in data){
|
||||
if(!data[i]){
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<template>
|
||||
<div class="list">
|
||||
<div class="item" v-for="i in 16">
|
||||
<div class="item" v-for="i in list">
|
||||
<el-card :body-style="{ padding: '0px' }">
|
||||
<img src="https://puui.qpic.cn/vcover_vt_pic/0/ww18u675tfmhas61669188848910/260" class="image" />
|
||||
<img :src="i.img" class="image" />
|
||||
<div style="padding: 14px">
|
||||
<span>一念永恒</span>
|
||||
<span>{{i.name}}</span>
|
||||
<div class="bottom">
|
||||
<time class="time">正在订阅:100/104</time>
|
||||
<time class="time">正在订阅:{{i.skip}}/{{i.count}}</time>
|
||||
<el-button text class="button">编辑</el-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -17,6 +17,15 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {onMounted, ref} from "vue";
|
||||
import {getSubscribe} from '../../api/Video.js'
|
||||
|
||||
const list = ref([])
|
||||
onMounted(async ()=>{
|
||||
const res = await getSubscribe()
|
||||
list.value = res.data
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
Reference in New Issue
Block a user