update image thumb

This commit is contained in:
Timi
2026-08-22 01:27:45 +08:00
parent e2af521996
commit 3b56de2430
16 changed files with 69 additions and 38 deletions
+5 -5
View File
@@ -144,7 +144,7 @@
<script setup lang="ts">
import { Message } from "@/utils/message";
import { AttachmentAPI, PassTimeLabel, Text, useUserStore } from "timi-web";
import { PassTimeLabel, Text, useUserStore } from "timi-web";
import CustomerAPI from "@/api/CustomerAPI";
import PointAPI from "@/api/PointAPI";
import TagAPI from "@/api/TagAPI";
@@ -158,6 +158,7 @@ import type { BodyAreaValue, Customer } from "@/types/Customer";
import type { PointAccount } from "@/types/Point";
import type { Tag } from "@/types/Tag";
import { bodyAreaLabelMap } from "@/utils/bodyArea";
import { getAttachmentReadURL } from "@/utils/attachment";
import { normalizeBodyAreaValue } from "@/utils/customer";
import { corePermissionCodes, permissionCodes } from "@/utils/permission";
import { LunarCalendar } from "@/utils/LunarCalendar";
@@ -192,15 +193,14 @@ const solarBirthdateText = computed(() => formatSolarBirthdate(customer.value));
const birthdateText = computed(() => showSolarBirthdate.value && isLunarBirthdate.value ? solarBirthdateText.value : formatBirthdate(customer.value));
const ageText = computed(() => customer.value?.age === undefined || customer.value?.age === null ? "" : `${customer.value.age} 岁`);
const inviteeCountText = computed(() => `${customer.value?.invitedCount ?? 0} 人`);
const photoList = computed(() => (customer.value?.attachmentList || [])
.filter(item => !!item.id)
.map(item => AttachmentAPI.getReadURL(item.id || "")));
const photoItemList = computed(() => (customer.value?.attachmentList || [])
.filter(item => !!item.id)
.map(item => ({
attachType: item.attachType || "PHOTO",
url: AttachmentAPI.getReadURL(item.id || "")
previewUrl: getAttachmentReadURL(item.id || ""),
url: getAttachmentReadURL(item.id || "", 64)
})));
const photoList = computed(() => photoItemList.value.map(item => item.url));
const selectedAreas = computed<BodyAreaValue>({
get() {
return normalizeBodyAreaValue(customer.value?.conditioningPart);