diff --git a/src/components/CustomerList.vue b/src/components/CustomerList.vue
index d18dfc1..5864b82 100644
--- a/src/components/CustomerList.vue
+++ b/src/components/CustomerList.vue
@@ -22,7 +22,7 @@
-
+
diff --git a/src/pages/customer/CustomerList.vue b/src/pages/customer/CustomerList.vue
index 826ef8b..2819354 100644
--- a/src/pages/customer/CustomerList.vue
+++ b/src/pages/customer/CustomerList.vue
@@ -48,9 +48,9 @@
>
diff --git a/src/utils/customer.ts b/src/utils/customer.ts
index 4cd7c8f..8a75b36 100644
--- a/src/utils/customer.ts
+++ b/src/utils/customer.ts
@@ -1,20 +1,29 @@
import { AttachmentAPI } from "timi-web";
import type { BodyAreaValue, Customer } from "@/types/Customer";
-export function getCustomerPhotoURL(customer?: Customer): string {
- return getCustomerAttachmentURL(customer, "PHOTO");
+export function getCustomerPhotoURL(customer?: Customer, thumbnailSize?: number): string {
+ return getCustomerAttachmentURL(customer, "PHOTO", thumbnailSize);
}
-export function getCustomerPointCardURL(customer?: Customer): string {
- return getCustomerAttachmentURL(customer, "POINT_CARD");
+export function getCustomerPointCardURL(customer?: Customer, thumbnailSize?: number): string {
+ return getCustomerAttachmentURL(customer, "POINT_CARD", thumbnailSize);
}
-function getCustomerAttachmentURL(customer: Customer | undefined, attachType: string): string {
+function getCustomerAttachmentURL(customer: Customer | undefined, attachType: string, thumbnailSize?: number): string {
const attachment = customer?.attachmentList?.find(item => item.attachType === attachType);
if (!attachment?.id) {
return "";
}
- return AttachmentAPI.getReadURL(attachment.id);
+ const url = AttachmentAPI.getReadURL(attachment.id);
+ if (thumbnailSize === undefined) {
+ return url;
+ }
+
+ const params = new URLSearchParams({
+ thumbWidth: String(thumbnailSize),
+ thumbHeight: String(thumbnailSize)
+ });
+ return `${url}?${params.toString()}`;
}
export function normalizeBodyAreaValue(value: unknown): BodyAreaValue {