信息发布

This commit is contained in:
2025-11-24 16:34:56 +08:00
commit d5491511f7
138 changed files with 17218 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
<?php
namespace app\admin\controller;
use app\common\controller\BaseController;
use app\common\traits\crud\CrudControllerTrait;
use app\common\service\BannerService;
class BannerController extends BaseController
{
use CrudControllerTrait;
protected $service;
public function __construct()
{
$this->service = new BannerService();
}
/**
* 轮播图模块
* @return \support\Response
*/
public function getBannerModule()
{
try {
$raw = $this->service->getBannerModule();
$data = $this->transformData($raw, method_exists($this, 'indexFormat')
? [$this, 'indexFormat']
: null);
return $this->success($data);
} catch (\Throwable $e) {
return $this->error($e->getMessage());
}
}
}