40 lines
978 B
PHP
40 lines
978 B
PHP
<?php
|
|
|
|
namespace app\api\controller\Banners;
|
|
|
|
use app\BaseController;
|
|
use app\common\model\Banners\Poster as ModelPoster;
|
|
use app\Request;
|
|
use think\Validate;
|
|
use think\exception\ValidateException;
|
|
use think\facade\Filesystem;
|
|
use app\common\arw\adjfut\src\Excel;
|
|
use app\common\arw\adjfut\src\UploadFile;
|
|
use think\facade\Db;
|
|
use app\common\exception\Tool;
|
|
use think\facade\Env;
|
|
|
|
|
|
class Poster extends BaseController
|
|
{
|
|
/**
|
|
* 获取海报详情
|
|
*/
|
|
public function getPoster(Request $request): array
|
|
{
|
|
$params = $request->param();
|
|
|
|
$this->validate($params, ['poster_location|海报位置' => 'require']);
|
|
|
|
$find = ModelPoster::field([
|
|
'poster_img' => 'imgSrc',
|
|
'poster_title' => 'title',
|
|
'poster_describe' => 'text',
|
|
])
|
|
->where('poster_location', $params['poster_location'])
|
|
->find();
|
|
|
|
return msg(0, '获取海报详情成功!', ['data' => $find]);
|
|
}
|
|
}
|