其余文件

This commit is contained in:
2026-04-14 17:46:22 +08:00
parent 294b68fe37
commit 3691f4db22
1343 changed files with 189847 additions and 0 deletions

View File

@ -0,0 +1,52 @@
<?php
namespace app\api\controller;
use app\api\logic\CommunitySearchRecordLogic;
use app\common\basics\Api;
use app\common\server\JsonServer;
/**
* 种草社区搜索记录
* Class CommunitySearchRecord
* @package app\api\controller
*/
class CommunitySearch extends Api
{
public $like_not_need_login = ['lists'];
/**
* @notes 历史记录
* @return \think\response\Json
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author 段誉
* @date 2022/5/9 16:59
*/
public function lists()
{
$lists = CommunitySearchRecordLogic::lists($this->user_id);
return JsonServer::success('获取成功', $lists);
}
/**
* @notes 清空历史搜索
* @return \think\response\Json
* @author 段誉
* @date 2022/5/9 16:59
*/
public function clear()
{
CommunitySearchRecordLogic::clear($this->user_id);
return JsonServer::success('清空成功');
}
}