正在显示
3 个修改的文件
包含
41 行增加
和
0 行删除
不能预览此文件类型
application/api/controller/Six.php
0 → 100644
1 | +<?php | ||
2 | + | ||
3 | + | ||
4 | +namespace app\api\controller; | ||
5 | + | ||
6 | + | ||
7 | +use app\common\controller\Api; | ||
8 | +use think\Db; | ||
9 | + | ||
10 | +/** | ||
11 | + * 六期新增接口 | ||
12 | + */ | ||
13 | +class Six extends Api | ||
14 | +{ | ||
15 | + protected $noNeedLogin = ['*']; | ||
16 | + protected $noNeedRight = ['*']; | ||
17 | + | ||
18 | + | ||
19 | + /** | ||
20 | + * @ApiTitle (机型-下拉菜单) | ||
21 | + * @ApiMethod (POST) | ||
22 | + * @ApiParams (name="base_id", type="integer", required=true, description="基地ID") | ||
23 | + * @ApiReturn ({ | ||
24 | + 'code':'1', | ||
25 | + 'msg':'返回成功', | ||
26 | + "data": [ | ||
27 | + { | ||
28 | + "id": 15, | ||
29 | + "title": "R22直升机" //飞机名称 | ||
30 | + } | ||
31 | + ] | ||
32 | + }) | ||
33 | + */ | ||
34 | + public function SelectPage() | ||
35 | + { | ||
36 | + $BaseId = $this->request->post('base_id'); | ||
37 | + if (!isset($BaseId) || $BaseId == 0) $this->error('基地ID不能为空'); | ||
38 | + $this->success('SUCCESS', Db::name('plane')->where('base_id', $BaseId)->field('id,title')->select()); | ||
39 | + } | ||
40 | +} |
-
请 注册 或 登录 后发表评论