feat(shop): 列表商品图片改用 OSS 压缩函数

- src/views/shop/shopGoodsBrowse/index.vue 中引入 getCompressedImageUrl
- 商品图片 :src 改为使用 getCompressedImageUrl(record.goodsImage)
- 统一默认宽度 240px,质量 90,自动补全 OSS 域名
- 跳过已含 x-oss-process 的 URL 保持预览行为不变
This commit is contained in:
2026-07-15 14:50:22 +08:00
parent 2abd7e3372
commit 3a951c70f5
2 changed files with 9 additions and 1 deletions

View File

@@ -15,7 +15,7 @@
<template v-if="column.key === 'goodsImage'">
<a-image
v-if="record.goodsImage"
:src="record.goodsImage"
:src="getCompressedImageUrl(record.goodsImage)"
:width="50"
:height="50"
style="border-radius: 4px; object-fit: cover"
@@ -57,6 +57,7 @@
import { message } from 'ant-design-vue';
import type { EleProTable } from 'ele-admin-pro';
import { toDateString } from 'ele-admin-pro';
import { getCompressedImageUrl } from '@/utils/image';
import type {
DatasourceFunction,
ColumnItem