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
+1 -1
View File
@@ -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/',
}) })
// 添加请求拦截器 // 添加请求拦截器
+1 -1
View File
@@ -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>
+4 -2
View File
@@ -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>
+1 -1
View File
@@ -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
View File
@@ -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: {
+1 -1
View File
@@ -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);
} }
+1 -1
View File
@@ -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);
} }