From 51ff7bff5b92e4a1088040f09d0a102c83b05a1a Mon Sep 17 00:00:00 2001 From: lcc Date: Thu, 22 Aug 2024 17:34:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=93=E9=A2=98=E5=BA=95?= =?UTF-8?q?=E9=83=A8=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- home/controllers/h5/market/sytopic/Welcome.php | 1 + home/views/h5/market/sytopic/index.php | 3 +++ market/controllers/api/sytopic/Topic.php | 15 +++++++++++++++ 3 files changed, 19 insertions(+) diff --git a/home/controllers/h5/market/sytopic/Welcome.php b/home/controllers/h5/market/sytopic/Welcome.php index 0b66fe7e..13a5aafe 100644 --- a/home/controllers/h5/market/sytopic/Welcome.php +++ b/home/controllers/h5/market/sytopic/Welcome.php @@ -45,6 +45,7 @@ class Welcome extends Wx 'banner' => $jsonData['banner'] ? build_qiniu_image_url($jsonData['banner']) : '', 'bgColor' => $jsonData['bg_color'] ?: '', 'buttonType' => $jsonData['button_type'] ? (int)$jsonData['button_type'] : '', + 'bottom_img' => $jsonData['bottom_img'] ? build_qiniu_image_url($jsonData['bottom_img']) : '', ]; $moduleLists = $this->module_option_model->getTopicModelOptionsList($this->a_id); $this->data['modules'] = array_values($moduleLists); diff --git a/home/views/h5/market/sytopic/index.php b/home/views/h5/market/sytopic/index.php index 38c9660d..f63ffc8e 100644 --- a/home/views/h5/market/sytopic/index.php +++ b/home/views/h5/market/sytopic/index.php @@ -390,6 +390,9 @@ +
+ +
diff --git a/market/controllers/api/sytopic/Topic.php b/market/controllers/api/sytopic/Topic.php index e962191d..dfa48ec2 100644 --- a/market/controllers/api/sytopic/Topic.php +++ b/market/controllers/api/sytopic/Topic.php @@ -65,6 +65,11 @@ class Topic extends BaseController }else{ $jsonData['banner'] = []; } + if($jsonData['bottom_img']){ + $jsonData['bottom_img'] = [['uid' => 1, 'fileUrl' => $jsonData['bottom_img'], 'url' => build_qiniu_image_url($jsonData['bottom_img']), 'status' => 'done']]; + }else{ + $jsonData['bottom_img'] = []; + } $v['status'] = intval($v['status']); $v['sharePhoto'] = $sharePhoto; $v['banner'] = $banner; @@ -131,6 +136,11 @@ class Topic extends BaseController } else { $setJsonData['banner'] = ''; } + if ($jsonData['bottom_img']) { + $setJsonData['bottom_img'] = $jsonData['bottom_img'] ? $jsonData['bottom_img'][0]['fileUrl'] : ''; + } else { + $setJsonData['bottom_img'] = ''; + } $setJsonData['bg_color'] = $jsonData['bg_color'] ?: ''; $setJsonData['button_type'] = $jsonData['button_type'] ?: ''; $createTime = date('Y-m-d H:i:s'); @@ -185,6 +195,11 @@ class Topic extends BaseController } else { $setJsonData['banner'] = ''; } + if ($jsonData['bottom_img']) { + $setJsonData['bottom_img'] = $jsonData['bottom_img'] ? $jsonData['bottom_img'][0]['fileUrl'] : ''; + } else { + $setJsonData['bottom_img'] = ''; + } $setJsonData['bg_color'] = $jsonData['bg_color'] ?: ''; $setJsonData['button_type'] = $jsonData['button_type'] ?: ''; $addData = ['title' => $title, 'banner' => $banner, 'organizationId' => $organizationId, 'sharePhoto' => $sharePhoto,