fix: 备货单车辆附件图片过期打不开——url 改为响应期重签
原因:attachment[].url 存的是上传时生成的带签名OSS地址(默认1小时 有效),过期后 AccessDenied/Request has expired。 修复:OssService 新增 resignAttachmentUrls(),从存量 url(完整签名URL/ 未签名URL/纯对象键三种格式)提取对象键重新签名(7天); detail(prepareVehicleListData)与 show(crm/admin 两控制器 showFormat 的 items)三处响应时统一重签。存储不动,前端无需改。 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -136,6 +136,10 @@ class StockOrdersController extends BaseController
|
||||
];
|
||||
}
|
||||
unset($item['options']);
|
||||
// 附件 url 响应期重签(历史签名URL会过期)
|
||||
if (!empty($item['attachment']) && is_array($item['attachment'])) {
|
||||
$item['attachment'] = \app\common\service\OssService::resignAttachmentUrls($item['attachment']);
|
||||
}
|
||||
}
|
||||
unset($item);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user