分享页面缩略图自定义
This commit is contained in:
@@ -184,6 +184,7 @@ class Common extends Api
|
||||
$toLabels = function ($value) {
|
||||
return array_values(array_filter(array_map('trim', explode(',', $value ?? ''))));
|
||||
};
|
||||
$shareImage = config('site.promotion_share_image') ?? '';
|
||||
$config = [
|
||||
'languageLabels' => $toLabels($code_languages),
|
||||
'frontLabels' => $toLabels($front_techs),
|
||||
@@ -192,6 +193,8 @@ class Common extends Api
|
||||
'developTypes' => $developTypes,
|
||||
// 平台服务费比例(0~1),前端据此计算开发者预计到手金额
|
||||
'platform_commission_ratio' => (float)DemandService::getPlatformCommissionRatio(),
|
||||
// 推广分享卡片预览图,未配置时为空
|
||||
'promotion_share_image' => $shareImage ? cdnurl($shareImage, true) : '',
|
||||
];
|
||||
|
||||
$this->success('', $config);
|
||||
|
||||
Reference in New Issue
Block a user