帖子关联商品

This commit is contained in:
2025-12-11 14:17:24 +08:00
parent a83a2d2356
commit 18d29af70b
7 changed files with 39 additions and 11 deletions
+10 -1
View File
@@ -54,10 +54,11 @@ class SkuService
$data['spec_json'] = $spec_json;
$data['user_id'] = $request->user->uid;
$data['code'] = $this->generateUniqueCode();
$data['image'] = implode(',',$data['image']);
// 将OSS直连地址替换为代理地址
$ossDomain = 'https://vehicle-album.oss-cn-beijing.aliyuncs.com/';
$proxyPath = '/console/upload/image/proxy?file=';
$proxyPath = '/proxy/ossurl?file=';
$data['desc'] = str_replace(
'?Expires=',
@@ -69,6 +70,14 @@ class SkuService
$proxyPath,
$data['desc']
);
// 将OSS直连地址替换为代理地址
$ossDomain = 'https://oss-cn-beijing.aliyuncs.com/';
$proxyPath = '/proxy/ossurl?file=';
$data['desc'] = str_replace(
$ossDomain,
$proxyPath,
$data['desc']
);
return $data;
}