This commit is contained in:
2023-07-04 21:38:26 +08:00
parent 0c010beb54
commit e38a226795
13 changed files with 74 additions and 10 deletions

8
view/src/api/Video.js Normal file
View File

@@ -0,0 +1,8 @@
import { base } from "./base";
export async function getVideoInfo(name){
return await base.get("/videoInfo/search",{
params:{
name
}
})
}

5
view/src/api/base.js Normal file
View File

@@ -0,0 +1,5 @@
import axios from "axios";
export const base = axios.create({
baseURL:"http://127.0.0.1:3050"
})

View File

@@ -17,7 +17,16 @@ import {router} from "../router/index.js";
<el-menu-item index="/downloadTest" to><el-icon><Download /></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>
<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-group>
</el-sub-menu>
</el-menu>
</el-scrollbar>
</template>

View File

@@ -0,0 +1,38 @@
<template>
<div>
<el-form-item label="视频名称">
<el-input v-model="form.name" />
</el-form-item>
<el-form-item label="播放地址">
<el-input v-model="form.url" />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit">搜索</el-button>
</el-form-item>
</div>
</template>
<script setup>
import { ref } from 'vue';
import {getVideoInfo} from "../api/Video.js"
const form = ref({
name: "",
url:""
})
async function onSubmit(){
await getVideoInfo(form.value.name)
}
</script>
<style lang="scss" scoped>
.form {
display: flex;
align-items: center;
&>span {
flex-shrink: 0;
}
}
</style>

View File

@@ -14,6 +14,10 @@ const routes = [
path: "medaInfoTest",
name: "medaInfoTest",
component: () => import("../page/test/getMediaInfoTest.vue")
},
{
path:"addVideo",
component: ()=>import("../page/addVideo.vue")
}
],
component: () => import("../page/index.vue"),