切换导航条
此项目
正在载入...
登录
李忠强
/
temporaryfood
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
李忠强
3 years ago
提交
40e8fa1d0adc25234ab0463ec941e30449903026
1 个父辈
d49f0868
更新
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
27 行增加
和
1 行删除
application/api/controller/Index.php
application/api/controller/Index.php
查看文件 @
40e8fa1
...
...
@@ -189,7 +189,7 @@ class Index extends Api
* @ApiParams (name=page, type=integer, required=false, description="页数 默认1")
* @ApiReturn ({
'code':'1',
'msg':'
返回成功
'
'msg':'
搜索
'
'data':{
"total": 4,
"per_page": 10,
...
...
@@ -249,4 +249,30 @@ class Index extends Api
$this
->
success
(
'搜索'
,
$list
);
}
/**
* @ApiTitle (搜索历史)
* @ApiMethod (POST)
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
* @ApiReturn ({
'code':'1',
'msg':'搜索历史'
'data':{
})
*/
public
function
searchHistory
()
{
if
(
$this
->
auth
->
isLogin
()){
$list
=
Db
::
name
(
'user_search'
)
->
where
(
'user_id'
,
$this
->
auth
->
id
)
->
limit
(
10
)
->
order
(
'id'
,
'desc'
)
->
column
(
'text'
);
}
else
{
$list
=
[];
}
$this
->
success
(
'搜索历史'
,
$list
);
}
}
...
...
请
注册
或
登录
后发表评论