作者 开飞机的舒克

接口优化

@@ -78,7 +78,7 @@ class Activity extends Api @@ -78,7 +78,7 @@ class Activity extends Api
78 /** 78 /**
79 * @ApiTitle (场次筛选) 79 * @ApiTitle (场次筛选)
80 * @ApiMethod (POST) 80 * @ApiMethod (POST)
81 - * @ApiParams (name="id", type="string", required=false, description="校区id") 81 + * @ApiParams (name="cid", type="string", required=false, description="校区id")
82 * @ApiReturnParams (name="code", type="integer", required=true, description="状态码") 82 * @ApiReturnParams (name="code", type="integer", required=true, description="状态码")
83 * @ApiReturnParams (name="msg", type="string", required=true, description="提示语") 83 * @ApiReturnParams (name="msg", type="string", required=true, description="提示语")
84 * @ApiReturnParams (name="data", type="object", description="扩展数据返回") 84 * @ApiReturnParams (name="data", type="object", description="扩展数据返回")
@@ -94,14 +94,14 @@ class Activity extends Api @@ -94,14 +94,14 @@ class Activity extends Api
94 */ 94 */
95 public function getRonda() 95 public function getRonda()
96 { 96 {
97 - $id = $this->request->param('id'); 97 + $cid = $this->request->param('cid');
98 if (empty($id)) { 98 if (empty($id)) {
99 $this->error('参数错误', ['status' => 2]); 99 $this->error('参数错误', ['status' => 2]);
100 } 100 }
101 $data = db('ronda r') 101 $data = db('ronda r')
102 ->join('campus c','c.id = r.campus_id') 102 ->join('campus c','c.id = r.campus_id')
103 - ->field('c.title as campus_title,r.title as ronda_title,r.holdtime as ronda_holdtime,r.id')  
104 - ->where('r.campus_id',$id) 103 + ->field('r.id as rid,c.title as campus_title,r.title as ronda_title,r.holdtime as ronda_holdtime')
  104 + ->where('r.campus_id',$cid)
105 ->paginate(10,false); 105 ->paginate(10,false);
106 $this->success('获取场次列表成功', $data); 106 $this->success('获取场次列表成功', $data);
107 } 107 }
@@ -109,7 +109,7 @@ class Activity extends Api @@ -109,7 +109,7 @@ class Activity extends Api
109 /** 109 /**
110 * @ApiTitle (项目筛选) 110 * @ApiTitle (项目筛选)
111 * @ApiMethod (POST) 111 * @ApiMethod (POST)
112 - * @ApiParams (name="id", type="string", required=false, description="场次id") 112 + * @ApiParams (name="rid", type="string", required=false, description="场次id")
113 * @ApiReturnParams (name="code", type="integer", required=true, description="状态码") 113 * @ApiReturnParams (name="code", type="integer", required=true, description="状态码")
114 * @ApiReturnParams (name="msg", type="string", required=true, description="提示语") 114 * @ApiReturnParams (name="msg", type="string", required=true, description="提示语")
115 * @ApiReturnParams (name="data", type="object", description="扩展数据返回") 115 * @ApiReturnParams (name="data", type="object", description="扩展数据返回")
@@ -125,7 +125,7 @@ class Activity extends Api @@ -125,7 +125,7 @@ class Activity extends Api
125 */ 125 */
126 public function getItem() 126 public function getItem()
127 { 127 {
128 - $id = $this->request->param('id'); 128 + $rid = $this->request->param('rid');
129 if (empty($id)) { 129 if (empty($id)) {
130 $this->error('参数错误', ['status' => 2]); 130 $this->error('参数错误', ['status' => 2]);
131 } 131 }
@@ -134,7 +134,7 @@ class Activity extends Api @@ -134,7 +134,7 @@ class Activity extends Api
134 ->join('campus c','r.campus_id as c.id') 134 ->join('campus c','r.campus_id as c.id')
135 ->field('i.*,c.title as campus_title') 135 ->field('i.*,c.title as campus_title')
136 ->where([ 136 ->where([
137 - 'i.ronda_id' => $id 137 + 'i.ronda_id' => $rid
138 ]) 138 ])
139 ->paginate(10,false); 139 ->paginate(10,false);
140 $this->success('获取项目列表成功', $data); 140 $this->success('获取项目列表成功', $data);
@@ -143,7 +143,7 @@ class Activity extends Api @@ -143,7 +143,7 @@ class Activity extends Api
143 /** 143 /**
144 * @ApiTitle (场次详情) 144 * @ApiTitle (场次详情)
145 * @ApiMethod (POST) 145 * @ApiMethod (POST)
146 - * @ApiParams (name="id", type="string", required=false, description="场次id") 146 + * @ApiParams (name="rid", type="string", required=false, description="场次id")
147 * @ApiReturnParams (name="code", type="integer", required=true, description="状态码") 147 * @ApiReturnParams (name="code", type="integer", required=true, description="状态码")
148 * @ApiReturnParams (name="msg", type="string", required=true, description="提示语") 148 * @ApiReturnParams (name="msg", type="string", required=true, description="提示语")
149 * @ApiReturnParams (name="data", type="object", description="扩展数据返回") 149 * @ApiReturnParams (name="data", type="object", description="扩展数据返回")
@@ -157,9 +157,9 @@ class Activity extends Api @@ -157,9 +157,9 @@ class Activity extends Api
157 */ 157 */
158 public function getRondaDetails() 158 public function getRondaDetails()
159 { 159 {
160 - $id = $this->request->param('id'); 160 + $rid = $this->request->param('rid');
161 $data = db('ronda') 161 $data = db('ronda')
162 - ->where('id', $id) 162 + ->where('id', $rid)
163 ->find(); 163 ->find();
164 $data['images'] = cdnurl($data['images'], true); 164 $data['images'] = cdnurl($data['images'], true);
165 $this->success('获取场次详情成功', $data); 165 $this->success('获取场次详情成功', $data);
@@ -2127,7 +2127,7 @@ @@ -2127,7 +2127,7 @@
2127 </thead> 2127 </thead>
2128 <tbody> 2128 <tbody>
2129 <tr> 2129 <tr>
2130 - <td>id</td> 2130 + <td>cid</td>
2131 <td>string</td> 2131 <td>string</td>
2132 <td></td> 2132 <td></td>
2133 <td>校区id</td> 2133 <td>校区id</td>
@@ -2155,8 +2155,8 @@ @@ -2155,8 +2155,8 @@
2155 <div class="panel-body"> 2155 <div class="panel-body">
2156 <form enctype="application/x-www-form-urlencoded" role="form" action="/api/activity/getRonda" method="POST" name="form2" id="form2"> 2156 <form enctype="application/x-www-form-urlencoded" role="form" action="/api/activity/getRonda" method="POST" name="form2" id="form2">
2157 <div class="form-group"> 2157 <div class="form-group">
2158 - <label class="control-label" for="id">id</label>  
2159 - <input type="string" class="form-control input-sm" id="id" placeholder="校区id" name="id"> 2158 + <label class="control-label" for="cid">cid</label>
  2159 + <input type="string" class="form-control input-sm" id="cid" placeholder="校区id" name="cid">
2160 </div> 2160 </div>
2161 <div class="form-group form-group-submit"> 2161 <div class="form-group form-group-submit">
2162 <button type="submit" class="btn btn-success send" rel="2">提交</button> 2162 <button type="submit" class="btn btn-success send" rel="2">提交</button>
@@ -2291,7 +2291,7 @@ @@ -2291,7 +2291,7 @@
2291 </thead> 2291 </thead>
2292 <tbody> 2292 <tbody>
2293 <tr> 2293 <tr>
2294 - <td>id</td> 2294 + <td>rid</td>
2295 <td>string</td> 2295 <td>string</td>
2296 <td></td> 2296 <td></td>
2297 <td>场次id</td> 2297 <td>场次id</td>
@@ -2319,8 +2319,8 @@ @@ -2319,8 +2319,8 @@
2319 <div class="panel-body"> 2319 <div class="panel-body">
2320 <form enctype="application/x-www-form-urlencoded" role="form" action="/api/activity/getItem" method="POST" name="form3" id="form3"> 2320 <form enctype="application/x-www-form-urlencoded" role="form" action="/api/activity/getItem" method="POST" name="form3" id="form3">
2321 <div class="form-group"> 2321 <div class="form-group">
2322 - <label class="control-label" for="id">id</label>  
2323 - <input type="string" class="form-control input-sm" id="id" placeholder="场次id" name="id"> 2322 + <label class="control-label" for="rid">rid</label>
  2323 + <input type="string" class="form-control input-sm" id="rid" placeholder="场次id" name="rid">
2324 </div> 2324 </div>
2325 <div class="form-group form-group-submit"> 2325 <div class="form-group form-group-submit">
2326 <button type="submit" class="btn btn-success send" rel="3">提交</button> 2326 <button type="submit" class="btn btn-success send" rel="3">提交</button>
@@ -2455,7 +2455,7 @@ @@ -2455,7 +2455,7 @@
2455 </thead> 2455 </thead>
2456 <tbody> 2456 <tbody>
2457 <tr> 2457 <tr>
2458 - <td>id</td> 2458 + <td>rid</td>
2459 <td>string</td> 2459 <td>string</td>
2460 <td></td> 2460 <td></td>
2461 <td>场次id</td> 2461 <td>场次id</td>
@@ -2483,8 +2483,8 @@ @@ -2483,8 +2483,8 @@
2483 <div class="panel-body"> 2483 <div class="panel-body">
2484 <form enctype="application/x-www-form-urlencoded" role="form" action="/api/activity/getRondaDetails" method="POST" name="form4" id="form4"> 2484 <form enctype="application/x-www-form-urlencoded" role="form" action="/api/activity/getRondaDetails" method="POST" name="form4" id="form4">
2485 <div class="form-group"> 2485 <div class="form-group">
2486 - <label class="control-label" for="id">id</label>  
2487 - <input type="string" class="form-control input-sm" id="id" placeholder="场次id" name="id"> 2486 + <label class="control-label" for="rid">rid</label>
  2487 + <input type="string" class="form-control input-sm" id="rid" placeholder="场次id" name="rid">
2488 </div> 2488 </div>
2489 <div class="form-group form-group-submit"> 2489 <div class="form-group form-group-submit">
2490 <button type="submit" class="btn btn-success send" rel="4">提交</button> 2490 <button type="submit" class="btn btn-success send" rel="4">提交</button>
@@ -5200,7 +5200,7 @@ @@ -5200,7 +5200,7 @@
5200 5200
5201 </div> 5201 </div>
5202 <div class="col-md-6" align="right"> 5202 <div class="col-md-6" align="right">
5203 - Generated on 2023-03-17 13:46:22 <a href="./" target="_blank">校园活动</a> 5203 + Generated on 2023-03-17 13:49:30 <a href="./" target="_blank">校园活动</a>
5204 </div> 5204 </div>
5205 </div> 5205 </div>
5206 5206