|
|
@ -18,8 +18,8 @@ class Index extends Controller |
|
|
|
public function getBannerList(){ |
|
|
|
public function getBannerList(){ |
|
|
|
$list = Banner::where("status", 10)->select()->toArray(); |
|
|
|
$list = Banner::where("status", 10)->select()->toArray(); |
|
|
|
foreach ($list as &$value) { |
|
|
|
foreach ($list as &$value) { |
|
|
|
$file_path = UploadFile::where('file_id', $value['image_id'])->field('file_path')->find()->file_path; |
|
|
|
$file_path = UploadFile::where('file_id', $value['image_id'])->field('file_id,file_path,file_type,storage,domain')->find(); |
|
|
|
$value['image'] = getUrl($file_path); |
|
|
|
$value['image'] = getUrl($file_path['file_path'], $file_path['domain']); |
|
|
|
} |
|
|
|
} |
|
|
|
return $this->renderSuccess($list); |
|
|
|
return $this->renderSuccess($list); |
|
|
|
} |
|
|
|
} |
|
|
|