mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-07 00:36:41 +08:00
fix browser
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@ import axios from 'axios'
|
|||||||
|
|
||||||
// 创建axios实例
|
// 创建axios实例
|
||||||
const api = axios.create({
|
const api = axios.create({
|
||||||
baseURL: 'http://localhost:3001/api/v1',
|
baseURL: 'http://localhost:3001/api/v1/',
|
||||||
})
|
})
|
||||||
|
|
||||||
// 添加请求拦截器
|
// 添加请求拦截器
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ const getChipColor = (type: string) => {
|
|||||||
<VChip
|
<VChip
|
||||||
variant="elevated"
|
variant="elevated"
|
||||||
size="small"
|
size="small"
|
||||||
:class="getChipColor(props.media?.type||'')"
|
:class="getChipColor('')"
|
||||||
class="absolute right-2 top-2 bg-opacity-80 shadow-md text-white font-bold">
|
class="absolute right-2 top-2 bg-opacity-80 shadow-md text-white font-bold">
|
||||||
{{ props.media?.vote_average }}
|
{{ props.media?.vote_average }}
|
||||||
</VChip>
|
</VChip>
|
||||||
|
|||||||
@@ -3,13 +3,15 @@ import MediaCardListView from '@/views/discover/MediaCardListView.vue';
|
|||||||
|
|
||||||
// 输入参数
|
// 输入参数
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
type: String,
|
type: Array as PropType<string[]>,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log(props.type);
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<MediaCardListView :apipath="props.type"/>
|
<MediaCardListView :apipath="props.type?.join('/')"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import MediaCardSlideView from '@/views/discover/MediaCardSlideView.vue';
|
|||||||
TMDB流行趋势
|
TMDB流行趋势
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<MediaCardSlideView apipath="/tmdb/trending"/>
|
<MediaCardSlideView apipath="tmdb/trending"/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
+1
-1
@@ -87,7 +87,7 @@ const router = createRouter({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'browse/:type',
|
path: '/browse/:type+',
|
||||||
component: () => import('../pages/browse.vue'),
|
component: () => import('../pages/browse.vue'),
|
||||||
props: true,
|
props: true,
|
||||||
meta: {
|
meta: {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ const dataList = ref<TransferHistory[]>([]);
|
|||||||
// 获取订阅列表数据
|
// 获取订阅列表数据
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
try {
|
try {
|
||||||
dataList.value = await api.get("/history/transfer");
|
dataList.value = await api.get("history/transfer");
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ const dataList = ref<Subscribe[]>([]);
|
|||||||
// 获取订阅列表数据
|
// 获取订阅列表数据
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
try {
|
try {
|
||||||
dataList.value = await api.get("/subscribe");
|
dataList.value = await api.get("subscribe");
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user