Present.php
953 字节
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
namespace app\api\controller;
use think\Db;
use think\Validate;
use app\common\controller\Api;
/**
* 赠品接口
*/
class Present extends Api
{
/**
* @ApiTitle (获取赠品列表)
* @ApiSummary (获取赠品列表)
* @ApiMethod (POST)
* @ApiRoute (/api/present/getPresentList)
* @ApiHeaders (name=token, type=string, required=false, description="请求的Token")
* @ApiReturn({
"code": 1,
"msg": "SUCCESS",
"time": "1553839125",
"data": [
{
"id": 3, 赠品id
"ch_name": "赠品3", 中文名称
"en_name": "present3", 英文名称
"image": "http://q7s0a1rb4.bkt.clouddn.com/uploads/20200420/26f5e51b8ac7fbd6f1c649cc45a18265.png" 缩略图
},
]
})
*/
public function getPresentList(){
$model = new \app\api\model\Present;
$data = $model->selectData([],null,$this->lang);
$this->success('SUCCESS',$data);
}
}