作者 刘锟

amp设置

... ... @@ -27,10 +27,12 @@ class WebSettingAmpLogic extends BaseLogic
if ($info === false) {
return $this->success();
}
//log图处理
$info['top_logo'] = getImageUrl($info['top_logo'], $this->user['storage_type'] ?? 0);
//banner处理
if (!empty($info['index_banner'])) {
foreach ($info['index_banner'] as &$v) {
$v = getImageUrl($v, $this->user['project_location'] ?? 0, $this->user['storage_type'] ?? 0);
$v = getImageUrl($v, $this->user['storage_type'] ?? 0);
}
}
return $this->success($info);
... ... @@ -45,6 +47,8 @@ class WebSettingAmpLogic extends BaseLogic
public function ampSave()
{
try {
//log图处理
$this->param['top_logo'] = str_replace_url($this->param['top_logo'] ?? '');
//banner处理
foreach ($this->param['index_banner'] ?? [] as &$v) {
$v = str_replace_url($v);
... ...