<?php

namespace App\Controller\admin;

use App\Controller\AbstractController;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\RequestMapping;
use Hyperf\View\Render;
use Psr\Http\Message\ResponseInterface;

#[Controller(prefix: 'admin/keywords')]
class KeywordsController extends AbstractController
{

    /**
     * 舆情关键词列表
     * @url /admin/keywords/monitor
     */
    #[RequestMapping(path: 'monitor', methods: 'get')]
    public function monitor(Render $render): \Psr\Http\Message\ResponseInterface
    {
        return $render->render('keywords/index');
    }

    /**
     * 新增舆情监控关键词页面
     * @url /admin/keywords/monitor/insert
     * @param Render $render
     * @return ResponseInterface
     */
    #[RequestMapping(path: 'monitor/insert', methods: 'get')]
    public function monitorInsert(Render $render): \Psr\Http\Message\ResponseInterface
    {
        return $render->render('keywords/insert');
    }

    /**
     * 编辑舆情监控关键词页面
     * @url /admin/keywords/monitor/view
     * @param Render $render
     * @return ResponseInterface
     */
    #[RequestMapping(path: 'monitor/view', methods: 'get')]
    public function monitorUpdate(Render $render): \Psr\Http\Message\ResponseInterface
    {
        return $render->render('keywords/view');
    }
}