正在显示
2 个修改的文件
包含
25 行增加
和
0 行删除
@@ -136,6 +136,31 @@ class Index extends Api | @@ -136,6 +136,31 @@ class Index extends Api | ||
136 | } | 136 | } |
137 | 137 | ||
138 | /** | 138 | /** |
139 | + * @ApiTitle (项目校区) | ||
140 | + * @ApiMethod (POST) | ||
141 | + * @ApiReturnParams (name="code", type="integer", required=true, description="状态码") | ||
142 | + * @ApiReturnParams (name="msg", type="string", required=true, description="提示语") | ||
143 | + * @ApiReturnParams (name="data", type="object", description="扩展数据返回") | ||
144 | + * @ApiReturn ({ | ||
145 | + "code":"状态码", | ||
146 | + "msg": "提示消息", | ||
147 | + "data": {} | ||
148 | + }) | ||
149 | + */ | ||
150 | + public function getSchoolItem() | ||
151 | + { | ||
152 | + $data = db('campus c') | ||
153 | + ->join('activity a','a.id = c.activity_id') | ||
154 | + ->join('school s','s.id = c.school_id') | ||
155 | + ->field('c.*,a.title as activity_name,s.title as school_name') | ||
156 | + ->select(); | ||
157 | + if (empty($data)) { | ||
158 | + $this->error('当前还没有校区', ['status' => 2]); | ||
159 | + } | ||
160 | + $this->success('项目校区', $data); | ||
161 | + } | ||
162 | + | ||
163 | + /** | ||
139 | * @ApiTitle (战队排行榜) | 164 | * @ApiTitle (战队排行榜) |
140 | * @ApiMethod (POST) | 165 | * @ApiMethod (POST) |
141 | * @ApiParams (name="campus", type="string", required=true, description="校区id[必填]") | 166 | * @ApiParams (name="campus", type="string", required=true, description="校区id[必填]") |
此 diff 太大无法显示。
-
请 注册 或 登录 后发表评论