diff --git a/src/components/app/t-postcard.vue b/src/components/app/t-postcard.vue index 1dd3be8e..82b1fe7c 100644 --- a/src/components/app/t-postcard.vue +++ b/src/components/app/t-postcard.vue @@ -142,7 +142,7 @@ function getPostCover(item: TGApp.Plugins.Mys.Post.FullData): string { else if (item.post.images.length > 0) cover = item.post.images[0]; if (cover === undefined) return ""; if (cover.endsWith(".gif")) return cover; - // 裁剪图片格式为 png,比例为 36:13,进行缩放但是不拉伸 + // return `${cover}?x-oss-process=image/resize,m_fill,w_360,h_130,limit_0/format,jpg/quality,Q_${imageQualityPercent.value}`; return `${cover}?x-oss-process=image/resize,m_fill,w_360,h_130,limit_0/format,png`; } diff --git a/src/components/userGacha/gro-table.vue b/src/components/userGacha/gro-table.vue index 0aba7b2d..9bff9837 100644 --- a/src/components/userGacha/gro-table.vue +++ b/src/components/userGacha/gro-table.vue @@ -25,7 +25,7 @@ type GroTableProps = { modelValue: Array const props = defineProps(); -const headers = [ +const headers = [ { title: "时间", align: "center", key: "time" }, { title: "卡池", align: "center", key: "uigfType" }, { title: "类型", align: "center", key: "type" }, diff --git a/src/components/viewPost/tp-image.vue b/src/components/viewPost/tp-image.vue index 142cf230..2d01a951 100644 --- a/src/components/viewPost/tp-image.vue +++ b/src/components/viewPost/tp-image.vue @@ -2,7 +2,7 @@
-
+
加载中...
@@ -13,6 +13,7 @@ import { computed, onMounted, onUnmounted, ref } from "vue"; import VpOverlayImage from "./vp-overlay-image.vue"; +import { useAppStore } from "@/store/modules/app.js"; import { saveImgLocal } from "@/utils/TGShare.js"; import { bytesToSize } from "@/utils/toolFunc.js"; @@ -28,6 +29,7 @@ export type TpImage = { }; type TpImageProps = { data: TpImage }; +const appStore = useAppStore(); const props = defineProps(); const showOverlay = ref(false); const localUrl = ref(); @@ -41,7 +43,7 @@ const imgWidth = computed(() => { console.log("tp-image", props.data.insert.image, props.data.attributes); onMounted(async () => { - const link = getImageUrl(); + const link = appStore.getImageUrl(props.data.insert.image); localUrl.value = await saveImgLocal(link); }); @@ -63,13 +65,6 @@ function getImageTitle(): string { } return res.join("\n"); } - -function getImageUrl(): string { - const img = props.data.insert.image; - const append = "?x-oss-process=image/format,png"; - if (img.endsWith(".gif")) return img; - return img + append; -}