mirror of
https://iceshrimp.dev/Crimekillz/jointrashposs.git
synced 2024-11-22 08:53:49 +01:00
fix
This commit is contained in:
parent
ef7c1e00ac
commit
31290a7b50
@ -23,8 +23,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import LeftIco from 'bi/arrow-left.svg';
|
import LeftIco from 'bi/arrow-left.svg';
|
||||||
import { isLocalPath } from '~/assets/js/misc';
|
import { joinURL, parseURL } from 'ufo';
|
||||||
import { joinURL } from 'ufo';
|
|
||||||
import type { MiBlogParsedContent } from '~/types/content';
|
import type { MiBlogParsedContent } from '~/types/content';
|
||||||
// 日本語でしか提供されない
|
// 日本語でしか提供されない
|
||||||
defineI18nRoute({
|
defineI18nRoute({
|
||||||
@ -38,7 +37,7 @@ const runtimeConfig = useRuntimeConfig();
|
|||||||
const { data } = await useAsyncData(`blog-${route.params.slug}`, () => queryContent<MiBlogParsedContent>(`/blog/${route.params.slug}`).findOne());
|
const { data } = await useAsyncData(`blog-${route.params.slug}`, () => queryContent<MiBlogParsedContent>(`/blog/${route.params.slug}`).findOne());
|
||||||
|
|
||||||
if (data.value?.thumbnail) {
|
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) {
|
if (!data.value) {
|
||||||
|
Loading…
Reference in New Issue
Block a user