<?php

namespace app\api\controller\Poster;

use app\BaseController;
use app\common\model\Poster\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]);
    }
}
