diff --git a/src/api/index.ts b/src/api/index.ts index a61f09b2..e59c21b2 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -4,7 +4,7 @@ import axios from 'axios' // 创建axios实例 const api = axios.create({ - baseURL: 'http://localhost:3001/api/v1', + baseURL: 'http://localhost:3001/api/v1/', }) // 添加请求拦截器 diff --git a/src/components/cards/MediaCard.vue b/src/components/cards/MediaCard.vue index abf36b1e..49422f5e 100644 --- a/src/components/cards/MediaCard.vue +++ b/src/components/cards/MediaCard.vue @@ -43,7 +43,7 @@ const getChipColor = (type: string) => { {{ props.media?.vote_average }} diff --git a/src/pages/browse.vue b/src/pages/browse.vue index 81e6a911..e5bd9525 100644 --- a/src/pages/browse.vue +++ b/src/pages/browse.vue @@ -3,13 +3,15 @@ import MediaCardListView from '@/views/discover/MediaCardListView.vue'; // 输入参数 const props = defineProps({ - type: String, + type: Array as PropType, }); +console.log(props.type); + diff --git a/src/pages/ranking.vue b/src/pages/ranking.vue index cc9efcdb..b2909d3b 100644 --- a/src/pages/ranking.vue +++ b/src/pages/ranking.vue @@ -8,7 +8,7 @@ import MediaCardSlideView from '@/views/discover/MediaCardSlideView.vue'; TMDB流行趋势

- + diff --git a/src/router/index.ts b/src/router/index.ts index 6dea7017..834dbd98 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -87,7 +87,7 @@ const router = createRouter({ }, }, { - path: 'browse/:type', + path: '/browse/:type+', component: () => import('../pages/browse.vue'), props: true, meta: { diff --git a/src/views/reorganize/TransferHistoryView.vue b/src/views/reorganize/TransferHistoryView.vue index 92aa6ac3..a10c115f 100644 --- a/src/views/reorganize/TransferHistoryView.vue +++ b/src/views/reorganize/TransferHistoryView.vue @@ -20,7 +20,7 @@ const dataList = ref([]); // 获取订阅列表数据 const fetchData = async () => { try { - dataList.value = await api.get("/history/transfer"); + dataList.value = await api.get("history/transfer"); } catch (error) { console.error(error); } diff --git a/src/views/subscribe/SubscribeListView.vue b/src/views/subscribe/SubscribeListView.vue index 585b8869..a14e861b 100644 --- a/src/views/subscribe/SubscribeListView.vue +++ b/src/views/subscribe/SubscribeListView.vue @@ -14,7 +14,7 @@ const dataList = ref([]); // 获取订阅列表数据 const fetchData = async () => { try { - dataList.value = await api.get("/subscribe"); + dataList.value = await api.get("subscribe"); } catch (error) { console.error(error); }