fix browser

This commit is contained in:
jxxghp
2023-06-29 21:43:43 +08:00
parent 76cd494bdf
commit f88b70ce56
7 changed files with 10 additions and 8 deletions

View File

@@ -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/',
})
// 添加请求拦截器

View File

@@ -43,7 +43,7 @@ const getChipColor = (type: string) => {
<VChip
variant="elevated"
size="small"
:class="getChipColor(props.media?.type||'')"
:class="getChipColor('')"
class="absolute right-2 top-2 bg-opacity-80 shadow-md text-white font-bold">
{{ props.media?.vote_average }}
</VChip>

View File

@@ -3,13 +3,15 @@ import MediaCardListView from '@/views/discover/MediaCardListView.vue';
// 输入参数
const props = defineProps({
type: String,
type: Array as PropType<string[]>,
});
console.log(props.type);
</script>
<template>
<div>
<MediaCardListView :apipath="props.type"/>
<MediaCardListView :apipath="props.type?.join('/')"/>
</div>
</template>

View File

@@ -8,7 +8,7 @@ import MediaCardSlideView from '@/views/discover/MediaCardSlideView.vue';
TMDB流行趋势
</p>
<MediaCardSlideView apipath="/tmdb/trending"/>
<MediaCardSlideView apipath="tmdb/trending"/>
</div>
</template>

View File

@@ -87,7 +87,7 @@ const router = createRouter({
},
},
{
path: 'browse/:type',
path: '/browse/:type+',
component: () => import('../pages/browse.vue'),
props: true,
meta: {

View File

@@ -20,7 +20,7 @@ const dataList = ref<TransferHistory[]>([]);
// 获取订阅列表数据
const fetchData = async () => {
try {
dataList.value = await api.get("/history/transfer");
dataList.value = await api.get("history/transfer");
} catch (error) {
console.error(error);
}

View File

@@ -14,7 +14,7 @@ const dataList = ref<Subscribe[]>([]);
// 获取订阅列表数据
const fetchData = async () => {
try {
dataList.value = await api.get("/subscribe");
dataList.value = await api.get("subscribe");
} catch (error) {
console.error(error);
}