Merge branch 'feature/article' into develop

This commit is contained in:
2025-06-30 14:48:00 +08:00
2 changed files with 7 additions and 1 deletions
@@ -108,6 +108,11 @@ class ArticleController extends BaseController
{
try {
$request->setPost('user_id', $request->user['id']);
$protocol = $request->header('x-forwarded-proto',
isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? 'https' : 'http');
$domain = $protocol . '://' . $request->host();
$request->setPost('domain', $domain);
return $this->getService()->add($request->all())
? $this->successResponse()
: $this->errorResponse();
+2 -1
View File
@@ -78,7 +78,8 @@ class ArticleService extends BaseService
// 将OSS直连地址替换为代理地址
$ossDomain = 'https://vehicle-album.oss-cn-beijing.aliyuncs.com/';
$proxyPath = '/console/upload/image/proxy?file=';
$proxyPath = $params['domain'].'/console/upload/image/proxy?file=';
unset($params['domain']);
$params['content'] = str_replace(
'?Expires=',