tmp
This commit is contained in:
8
view/src/api/Video.js
Normal file
8
view/src/api/Video.js
Normal 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
5
view/src/api/base.js
Normal file
@@ -0,0 +1,5 @@
|
||||
import axios from "axios";
|
||||
|
||||
export const base = axios.create({
|
||||
baseURL:"http://127.0.0.1:3050"
|
||||
})
|
||||
@@ -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>
|
||||
|
||||
38
view/src/page/addVideo.vue
Normal file
38
view/src/page/addVideo.vue
Normal 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>
|
||||
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user