fix(file): 修复商品详情截图与提现打款凭证等私有图片 403 权限问题

- 放宽公开商品截图 key 提取规则,支持任意合规 object key 转换为免鉴权公开端点
- 补充后台截图上传 listing_screenshot 与 operating-expense 场景识别
- dependencies 授权器支持已审核上架商品截图兜底放行、提现人打款凭证鉴权及变体后缀匹配
- /api/files 路由组支持用户与管理员双重鉴权 (AuthUserOrAdmin)
- 前端收款账号凭证与提现详情凭证统一升级为 AuthImage 组件并支持大图预览
This commit is contained in:
yml2213
2026-09-16 20:33:09 +08:00
parent 64a4e5bb16
commit 69774458b0
13 changed files with 215 additions and 27 deletions
@@ -484,7 +484,7 @@ async function handleSave() {
}
const file = new File([blob], `edited_screenshot_${Date.now()}.jpg`, { type: 'image/jpeg' })
const uploaded = await uploadAdminFile(file, 'listing_screenshot')
const uploaded = await uploadAdminFile(file, 'listing')
if (!uploaded || !uploaded.url) {
throw new Error('上传截图失败')
}
@@ -289,9 +289,13 @@ function accountTypeLabel(type: string) {
{{ withdrawal.payment_remark }}
</el-descriptions-item>
<el-descriptions-item v-if="withdrawal.payment_proof_url" label="打款凭证" :span="2">
<el-link :href="withdrawal.payment_proof_url" target="_blank" type="primary">
查看凭证
</el-link>
<AuthImage
:source="withdrawal.payment_proof_url"
admin
alt="打款凭证"
class="certificate-image"
:preview-src-list="[withdrawal.payment_proof_url]"
/>
</el-descriptions-item>
</el-descriptions>
</div>