正在显示
4 个修改的文件
包含
19 行增加
和
83 行删除
@@ -34,7 +34,6 @@ class Activity extends Api | @@ -34,7 +34,6 @@ class Activity extends Api | ||
34 | 34 | ||
35 | /** | 35 | /** |
36 | * @ApiTitle (项目校区) | 36 | * @ApiTitle (项目校区) |
37 | - * @ApiHeaders (name=token, type=string, required=true, description="请求的Token") | ||
38 | * @ApiParams (name="id", type="string", required=false, description="活动id") | 37 | * @ApiParams (name="id", type="string", required=false, description="活动id") |
39 | * @ApiReturnParams (name="code", type="integer", required=true, description="状态码") | 38 | * @ApiReturnParams (name="code", type="integer", required=true, description="状态码") |
40 | * @ApiReturnParams (name="msg", type="string", required=true, description="提示语") | 39 | * @ApiReturnParams (name="msg", type="string", required=true, description="提示语") |
@@ -85,13 +84,8 @@ class Activity extends Api | @@ -85,13 +84,8 @@ class Activity extends Api | ||
85 | public function getItemRonda() | 84 | public function getItemRonda() |
86 | { | 85 | { |
87 | $id = $this->request->param('id'); | 86 | $id = $this->request->param('id'); |
88 | - $data['school_name'] = db('school s') | ||
89 | - ->join('activity a','s.activity_id = a.id') | ||
90 | - ->field('s.*,a.title as activity_name') | ||
91 | - ->where('s.id', $id) | ||
92 | - ->find(); | ||
93 | $data['ronda'] = db('ronda') | 87 | $data['ronda'] = db('ronda') |
94 | - ->where('xq_id', $id) | 88 | + ->where('campus_id', $id) |
95 | ->paginate(10) | 89 | ->paginate(10) |
96 | ->each(function ($item, $k) { | 90 | ->each(function ($item, $k) { |
97 | $data['item'] = db('item')->where('ronda_id', $item['id'])->find(); | 91 | $data['item'] = db('item')->where('ronda_id', $item['id'])->find(); |
@@ -22,7 +22,7 @@ class Index extends Api | @@ -22,7 +22,7 @@ class Index extends Api | ||
22 | * @ApiTitle (首页) | 22 | * @ApiTitle (首页) |
23 | * @ApiMethod (POST) | 23 | * @ApiMethod (POST) |
24 | * @ApiHeaders (name=token, type=string, required=true, description="请求的Token") | 24 | * @ApiHeaders (name=token, type=string, required=true, description="请求的Token") |
25 | - * @ApiParams (name="xq", type="string", required=true, description="校区id[必填]") | 25 | + * @ApiParams (name="campus", type="string", required=true, description="校区id[必填]") |
26 | * @ApiParams (name="row", type="string", required=false, description="每页显示行数[非必填]") | 26 | * @ApiParams (name="row", type="string", required=false, description="每页显示行数[非必填]") |
27 | * @ApiParams (name="page", type="string", required=false, description="当前页[非必填]") | 27 | * @ApiParams (name="page", type="string", required=false, description="当前页[非必填]") |
28 | * @ApiReturn ({"code":状态码, | 28 | * @ApiReturn ({"code":状态码, |
@@ -46,12 +46,12 @@ class Index extends Api | @@ -46,12 +46,12 @@ class Index extends Api | ||
46 | */ | 46 | */ |
47 | public function index() | 47 | public function index() |
48 | { | 48 | { |
49 | - $xq = $this->request->param('xq'); | 49 | + $campus = $this->request->param('campus'); |
50 | $row = $this->request->param('row'); | 50 | $row = $this->request->param('row'); |
51 | $page = $this->request->param('page'); | 51 | $page = $this->request->param('page'); |
52 | $row = $row ? $row : 10; | 52 | $row = $row ? $row : 10; |
53 | $page = $page ? $page : 1; | 53 | $page = $page ? $page : 1; |
54 | - if (empty($xq)) { | 54 | + if (empty($campus)) { |
55 | $this->error('参数错误', ['status' => 2]); | 55 | $this->error('参数错误', ['status' => 2]); |
56 | } | 56 | } |
57 | $userinfo = $this->auth->getUserinfo(); | 57 | $userinfo = $this->auth->getUserinfo(); |
@@ -59,7 +59,7 @@ class Index extends Api | @@ -59,7 +59,7 @@ class Index extends Api | ||
59 | //个人排行榜 | 59 | //个人排行榜 |
60 | $data = \db('study_score_log') | 60 | $data = \db('study_score_log') |
61 | ->field('id,SUM(score) as sum_score,study_id') | 61 | ->field('id,SUM(score) as sum_score,study_id') |
62 | - ->where('school_id', $xq) | 62 | + ->where('campus_id', $campus) |
63 | ->group('study_id') | 63 | ->group('study_id') |
64 | ->order('sum_score DESC') | 64 | ->order('sum_score DESC') |
65 | ->paginate($row, false, ['page' => $page]) | 65 | ->paginate($row, false, ['page' => $page]) |
@@ -68,7 +68,7 @@ class Index extends Api | @@ -68,7 +68,7 @@ class Index extends Api | ||
68 | return $item; | 68 | return $item; |
69 | }); | 69 | }); |
70 | $data['active_study_score'] = \db('study_score_log') | 70 | $data['active_study_score'] = \db('study_score_log') |
71 | - ->where(['study_id' => $sid, 'school_id' => $xq]) | 71 | + ->where(['study_id' => $sid, 'campus_id' => $campus]) |
72 | ->sum('score'); | 72 | ->sum('score'); |
73 | $data['active_study_info'] = \db('study')->where('id', $sid)->value('name'); | 73 | $data['active_study_info'] = \db('study')->where('id', $sid)->value('name'); |
74 | $this->success('获取成功', [$data, 'status' => 1]); | 74 | $this->success('获取成功', [$data, 'status' => 1]); |
@@ -118,7 +118,7 @@ class Index extends Api | @@ -118,7 +118,7 @@ class Index extends Api | ||
118 | * @ApiTitle (战队排行榜) | 118 | * @ApiTitle (战队排行榜) |
119 | * @ApiMethod (POST) | 119 | * @ApiMethod (POST) |
120 | * @ApiHeaders (name=token, type=string, required=true, description="请求的Token") | 120 | * @ApiHeaders (name=token, type=string, required=true, description="请求的Token") |
121 | - * @ApiParams (name="xq", type="string", required=true, description="校区id[必填]") | 121 | + * @ApiParams (name="campus", type="string", required=true, description="校区id[必填]") |
122 | * @ApiParams (name="row", type="string", required=false, description="每页显示行数[非必填]") | 122 | * @ApiParams (name="row", type="string", required=false, description="每页显示行数[非必填]") |
123 | * @ApiParams (name="page", type="string", required=false, description="当前页[非必填]") | 123 | * @ApiParams (name="page", type="string", required=false, description="当前页[非必填]") |
124 | * @ApiReturn ({"code":状态码, | 124 | * @ApiReturn ({"code":状态码, |
@@ -146,14 +146,14 @@ class Index extends Api | @@ -146,14 +146,14 @@ class Index extends Api | ||
146 | $page = $this->request->param('page'); | 146 | $page = $this->request->param('page'); |
147 | $row = $row ? $row : 10; | 147 | $row = $row ? $row : 10; |
148 | $page = $page ? $page : 1; | 148 | $page = $page ? $page : 1; |
149 | - $xq = $this->request->param('xq'); | ||
150 | - if (empty($xq)) { | 149 | + $campus = $this->request->param('campus'); |
150 | + if (empty($campus)) { | ||
151 | $this->error('参数错误', ['status' => 2]); | 151 | $this->error('参数错误', ['status' => 2]); |
152 | } | 152 | } |
153 | $data = \db('study_score_log l') | 153 | $data = \db('study_score_log l') |
154 | ->distinct('l.team_id') | 154 | ->distinct('l.team_id') |
155 | ->join('team t', 't.id = l.team_id') | 155 | ->join('team t', 't.id = l.team_id') |
156 | - ->where('l.school_id', $xq) | 156 | + ->where('l.campus_id', $campus) |
157 | ->field('t.title,t.score,l.team_id') | 157 | ->field('t.title,t.score,l.team_id') |
158 | ->order('t.score DESC') | 158 | ->order('t.score DESC') |
159 | ->paginate($row, false, ['page' => $page]); | 159 | ->paginate($row, false, ['page' => $page]); |
@@ -165,7 +165,7 @@ class Index extends Api | @@ -165,7 +165,7 @@ class Index extends Api | ||
165 | * @ApiTitle (个人排行榜) | 165 | * @ApiTitle (个人排行榜) |
166 | * @ApiMethod (POST) | 166 | * @ApiMethod (POST) |
167 | * @ApiHeaders (name=token, type=string, required=true, description="请求的Token") | 167 | * @ApiHeaders (name=token, type=string, required=true, description="请求的Token") |
168 | - * @ApiParams (name="xq", type="string", required=true, description="校区id[必填]") | 168 | + * @ApiParams (name="campus", type="string", required=true, description="校区id[必填]") |
169 | * @ApiParams (name="row", type="string", required=false, description="每页显示行数[非必填]") | 169 | * @ApiParams (name="row", type="string", required=false, description="每页显示行数[非必填]") |
170 | * @ApiParams (name="page", type="string", required=false, description="当前页[非必填]") | 170 | * @ApiParams (name="page", type="string", required=false, description="当前页[非必填]") |
171 | * @ApiReturn ({"code":状态码, | 171 | * @ApiReturn ({"code":状态码, |
@@ -187,19 +187,19 @@ class Index extends Api | @@ -187,19 +187,19 @@ class Index extends Api | ||
187 | */ | 187 | */ |
188 | public function personRank() | 188 | public function personRank() |
189 | { | 189 | { |
190 | - $xq = $this->request->param('xq'); | 190 | + $campus = $this->request->param('campus'); |
191 | $row = $this->request->param('row'); | 191 | $row = $this->request->param('row'); |
192 | $page = $this->request->param('page'); | 192 | $page = $this->request->param('page'); |
193 | $user = $this->auth->getUserinfo(); | 193 | $user = $this->auth->getUserinfo(); |
194 | $row = $row ? $row : 10; | 194 | $row = $row ? $row : 10; |
195 | $page = $page ? $page : 1; | 195 | $page = $page ? $page : 1; |
196 | - if (empty($xq)) { | 196 | + if (empty($campus)) { |
197 | $this->error('参数错误', ['status' => 2]); | 197 | $this->error('参数错误', ['status' => 2]); |
198 | } | 198 | } |
199 | //个人排行榜 | 199 | //个人排行榜 |
200 | $data = \db('study_score_log') | 200 | $data = \db('study_score_log') |
201 | ->field('id,SUM(score) as sum_score,study_id') | 201 | ->field('id,SUM(score) as sum_score,study_id') |
202 | - ->where('school_id', $xq) | 202 | + ->where('campus_id', $campus) |
203 | ->group('study_id') | 203 | ->group('study_id') |
204 | ->order('sum_score DESC') | 204 | ->order('sum_score DESC') |
205 | ->paginate($row, false, ['page' => $page]) | 205 | ->paginate($row, false, ['page' => $page]) |
@@ -16,7 +16,6 @@ class Screen extends Api | @@ -16,7 +16,6 @@ class Screen extends Api | ||
16 | /** | 16 | /** |
17 | * @ApiTitle (大屏管理) | 17 | * @ApiTitle (大屏管理) |
18 | * @ApiMethod (POST) | 18 | * @ApiMethod (POST) |
19 | - * @ApiHeaders (name=token, type=string, required=true, description="请求的Token") | ||
20 | * @ApiReturn ({"code":状态码, | 19 | * @ApiReturn ({"code":状态码, |
21 | "msg":"提示信息" | 20 | "msg":"提示信息" |
22 | "time": "时间戳", | 21 | "time": "时间戳", |
@@ -3356,53 +3356,13 @@ | @@ -3356,53 +3356,13 @@ | ||
3356 | <div class="panel panel-default"> | 3356 | <div class="panel panel-default"> |
3357 | <div class="panel-heading"><strong>Headers</strong></div> | 3357 | <div class="panel-heading"><strong>Headers</strong></div> |
3358 | <div class="panel-body"> | 3358 | <div class="panel-body"> |
3359 | - <table class="table table-hover"> | ||
3360 | - <thead> | ||
3361 | - <tr> | ||
3362 | - <th>名称</th> | ||
3363 | - <th>类型</th> | ||
3364 | - <th>必选</th> | ||
3365 | - <th>描述</th> | ||
3366 | - </tr> | ||
3367 | - </thead> | ||
3368 | - <tbody> | ||
3369 | - <tr> | ||
3370 | - <td>token</td> | ||
3371 | - <td>string</td> | ||
3372 | - <td>是</td> | ||
3373 | - <td>请求的Token</td> | ||
3374 | - </tr> | ||
3375 | - </tbody> | ||
3376 | - </table> | 3359 | + 无 |
3377 | </div> | 3360 | </div> |
3378 | </div> | 3361 | </div> |
3379 | <div class="panel panel-default"> | 3362 | <div class="panel panel-default"> |
3380 | <div class="panel-heading"><strong>参数</strong></div> | 3363 | <div class="panel-heading"><strong>参数</strong></div> |
3381 | <div class="panel-body"> | 3364 | <div class="panel-body"> |
3382 | - <table class="table table-hover"> | ||
3383 | - <thead> | ||
3384 | - <tr> | ||
3385 | - <th>名称</th> | ||
3386 | - <th>类型</th> | ||
3387 | - <th>必选</th> | ||
3388 | - <th>描述</th> | ||
3389 | - </tr> | ||
3390 | - </thead> | ||
3391 | - <tbody> | ||
3392 | - <tr> | ||
3393 | - <td>xq</td> | ||
3394 | - <td>string</td> | ||
3395 | - <td>是</td> | ||
3396 | - <td>校区id[必填]</td> | ||
3397 | - </tr> | ||
3398 | - <tr> | ||
3399 | - <td>hd</td> | ||
3400 | - <td>string</td> | ||
3401 | - <td>是</td> | ||
3402 | - <td>活动id[必填]</td> | ||
3403 | - </tr> | ||
3404 | - </tbody> | ||
3405 | - </table> | 3365 | + 无 |
3406 | </div> | 3366 | </div> |
3407 | </div> | 3367 | </div> |
3408 | <div class="panel panel-default"> | 3368 | <div class="panel panel-default"> |
@@ -3416,17 +3376,6 @@ | @@ -3416,17 +3376,6 @@ | ||
3416 | <div class="row"> | 3376 | <div class="row"> |
3417 | <div class="col-md-12"> | 3377 | <div class="col-md-12"> |
3418 | <div class="panel panel-default"> | 3378 | <div class="panel panel-default"> |
3419 | - <div class="panel-heading"><strong>Headers</strong></div> | ||
3420 | - <div class="panel-body"> | ||
3421 | - <div class="headers"> | ||
3422 | - <div class="form-group"> | ||
3423 | - <label class="control-label" for="token">token</label> | ||
3424 | - <input type="string" class="form-control input-sm" id="token" required placeholder="请求的Token - Ex: " name="token"> | ||
3425 | - </div> | ||
3426 | - </div> | ||
3427 | - </div> | ||
3428 | - </div> | ||
3429 | - <div class="panel panel-default"> | ||
3430 | <div class="panel-heading"><strong>参数</strong> | 3379 | <div class="panel-heading"><strong>参数</strong> |
3431 | <div class="pull-right"> | 3380 | <div class="pull-right"> |
3432 | <a href="javascript:" class="btn btn-xs btn-info btn-append">追加</a> | 3381 | <a href="javascript:" class="btn btn-xs btn-info btn-append">追加</a> |
@@ -3435,12 +3384,7 @@ | @@ -3435,12 +3384,7 @@ | ||
3435 | <div class="panel-body"> | 3384 | <div class="panel-body"> |
3436 | <form enctype="application/x-www-form-urlencoded" role="form" action="/api/screen/index" method="POST" name="form17" id="form17"> | 3385 | <form enctype="application/x-www-form-urlencoded" role="form" action="/api/screen/index" method="POST" name="form17" id="form17"> |
3437 | <div class="form-group"> | 3386 | <div class="form-group"> |
3438 | - <label class="control-label" for="xq">xq</label> | ||
3439 | - <input type="string" class="form-control input-sm" id="xq" required placeholder="校区id[必填]" name="xq"> | ||
3440 | - </div> | ||
3441 | - <div class="form-group"> | ||
3442 | - <label class="control-label" for="hd">hd</label> | ||
3443 | - <input type="string" class="form-control input-sm" id="hd" required placeholder="活动id[必填]" name="hd"> | 3387 | + 无 |
3444 | </div> | 3388 | </div> |
3445 | <div class="form-group form-group-submit"> | 3389 | <div class="form-group form-group-submit"> |
3446 | <button type="submit" class="btn btn-success send" rel="17">提交</button> | 3390 | <button type="submit" class="btn btn-success send" rel="17">提交</button> |
@@ -3483,7 +3427,6 @@ | @@ -3483,7 +3427,6 @@ | ||
3483 | "starttime": 校区活动开始时间, | 3427 | "starttime": 校区活动开始时间, |
3484 | "endtime": 校区活动结束时间, | 3428 | "endtime": 校区活动结束时间, |
3485 | "is_view": 是否展示, | 3429 | "is_view": 是否展示, |
3486 | - "hd_name": "活动名称", | ||
3487 | "createtime": 创建时间, | 3430 | "createtime": 创建时间, |
3488 | "updatetime": 更新时间, | 3431 | "updatetime": 更新时间, |
3489 | "count_down": "倒计时", | 3432 | "count_down": "倒计时", |
@@ -3497,7 +3440,7 @@ | @@ -3497,7 +3440,7 @@ | ||
3497 | "title": "坦克战队", | 3440 | "title": "坦克战队", |
3498 | "score": "13.00", | 3441 | "score": "13.00", |
3499 | "team_id": 1, | 3442 | "team_id": 1, |
3500 | - "study": 战队下个人排行{ | 3443 | + "study": 战队个人排行{ |
3501 | "data": [{ | 3444 | "data": [{ |
3502 | "name": "李四", | 3445 | "name": "李四", |
3503 | "earn_score": "12.00" | 3446 | "earn_score": "12.00" |
@@ -4620,7 +4563,7 @@ | @@ -4620,7 +4563,7 @@ | ||
4620 | 4563 | ||
4621 | </div> | 4564 | </div> |
4622 | <div class="col-md-6" align="right"> | 4565 | <div class="col-md-6" align="right"> |
4623 | - Generated on 2023-03-09 13:41:34 <a href="./" target="_blank">校园活动</a> | 4566 | + Generated on 2023-03-09 15:44:57 <a href="./" target="_blank">校园活动</a> |
4624 | </div> | 4567 | </div> |
4625 | </div> | 4568 | </div> |
4626 | 4569 |
-
请 注册 或 登录 后发表评论