This commit is contained in:
2025-06-30 14:34:23 +08:00
parent e5a4df1bc0
commit 73e3e7ab5b
3 changed files with 41 additions and 0 deletions
+15
View File
@@ -76,6 +76,21 @@ class ArticleService extends BaseService
$num = $params['num'] ?? 0;
unset($params['num']);
// 将OSS直连地址替换为代理地址
$ossDomain = 'https://vehicle-album.oss-cn-beijing.aliyuncs.com/';
$proxyPath = '/console/upload/image/proxy?file=';
$params['content'] = str_replace(
'?Expires=',
'&Expires=',
$params['content']
);
$params['content'] = str_replace(
$ossDomain,
$proxyPath,
$params['content']
);
Db::beginTransaction();
try {
$info = $this->create($params);