fix(shopOrder): 调整商品头像显示尺寸并优化图片压缩

- 修改订单商品头像大小,从80调整为50
- 调整图片压缩函数调用,设置压缩宽度为100
- 修正商品信息组件中头像图片的压缩调用,统一宽度参数
- 引入图片压缩工具方法以支持新参数调用
This commit is contained in:
2026-07-15 01:40:12 +08:00
parent 614e843673
commit 6350a9b5a9
2 changed files with 3 additions and 2 deletions

View File

@@ -246,7 +246,7 @@
<template v-if="column.key === 'goodsName'"> <template v-if="column.key === 'goodsName'">
<div style="display: flex; align-items: center; gap: 12px"> <div style="display: flex; align-items: center; gap: 12px">
<a-avatar <a-avatar
:src="record.image || record.goodsImage" :src="getCompressedImageUrl(record.image, { width: 100 })"
shape="square" shape="square"
:size="50" :size="50"
style="flex-shrink: 0" style="flex-shrink: 0"
@@ -425,6 +425,7 @@
import { updateShopOrder, removeShopOrder, refundShopOrder } from '@/api/shop/shopOrder'; import { updateShopOrder, removeShopOrder, refundShopOrder } from '@/api/shop/shopOrder';
import { message, Modal } from 'ant-design-vue'; import { message, Modal } from 'ant-design-vue';
import DeliveryModal from './deliveryModal.vue'; import DeliveryModal from './deliveryModal.vue';
import {getCompressedImageUrl} from "@/utils/image";
const useForm = Form.useForm; const useForm = Form.useForm;

View File

@@ -193,7 +193,7 @@
<template v-for="(item, index) in record.orderGoods" :key="index"> <template v-for="(item, index) in record.orderGoods" :key="index">
<div class="item py-1"> <div class="item py-1">
<a-space :id="`g-${index}`"> <a-space :id="`g-${index}`">
<a-avatar :src="getCompressedImageUrl(item.image)" shape="square" :size="80" /> <a-avatar :src="getCompressedImageUrl(item.image,{ width: 100 })" shape="square" :size="50" />
<span>{{ item.goodsName }}</span> <span>{{ item.goodsName }}</span>
</a-space> </a-space>
</div> </div>