mirror of
https://iceshrimp.dev/Crimekillz/jointrashposs.git
synced 2024-11-25 10:19:07 +01:00
fix
This commit is contained in:
parent
ef7c1e00ac
commit
31290a7b50
1 changed files with 2 additions and 3 deletions
|
@ -23,8 +23,7 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
import LeftIco from 'bi/arrow-left.svg';
|
||||
import { isLocalPath } from '~/assets/js/misc';
|
||||
import { joinURL } from 'ufo';
|
||||
import { joinURL, parseURL } from 'ufo';
|
||||
import type { MiBlogParsedContent } from '~/types/content';
|
||||
// 日本語でしか提供されない
|
||||
defineI18nRoute({
|
||||
|
@ -38,7 +37,7 @@ const runtimeConfig = useRuntimeConfig();
|
|||
const { data } = await useAsyncData(`blog-${route.params.slug}`, () => queryContent<MiBlogParsedContent>(`/blog/${route.params.slug}`).findOne());
|
||||
|
||||
if (data.value?.thumbnail) {
|
||||
route.meta.thumbnail = isLocalPath(data.value.thumbnail) ? joinURL(runtimeConfig.public.baseUrl, data.value.thumbnail) : data.value.thumbnail;
|
||||
route.meta.thumbnail = (parseURL(data.value.thumbnail).host == null) ? joinURL(runtimeConfig.public.baseUrl, data.value.thumbnail) : data.value.thumbnail;
|
||||
}
|
||||
|
||||
if (!data.value) {
|
||||
|
|
Loading…
Reference in a new issue