<?php

namespace app\api\controller\Tdk;

use app\BaseController;
use app\common\model\Tdk\Tdk as ModelTdk;
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 Tdk extends BaseController
{
    /**
     * 获取网站tdk详情
     */
    public function getTdkInfo(Request $request): array
    {
        $params = $request->param();

        $this->validate($params, ['tdk_type' => 'require']);

        $find = ModelTdk::field([
            'tdk_id',
            'tdk_type',
            'tdk_title',
            'tdk_description',
            'tdk_keyword'
        ])
            ->where('tdk_type', $params['tdk_type'])
            ->find();

        return msg(0, '获取网站tdk详情成功!', ['data' => $find]);
    }
}
