正在显示
3 个修改的文件
包含
17 行增加
和
5 行删除
@@ -205,7 +205,10 @@ class Activity extends Api | @@ -205,7 +205,10 @@ class Activity extends Api | ||
205 | ->find(); | 205 | ->find(); |
206 | $images = db('item_details')->where('item_id',$id)->value('images'); | 206 | $images = db('item_details')->where('item_id',$id)->value('images'); |
207 | if (!empty($images)){ | 207 | if (!empty($images)){ |
208 | - $data['images'] = cdnurl($images, true); | 208 | + $image = explode(',',$images); |
209 | + foreach ($image as $k){ | ||
210 | + $data['images'] = cdnurl($image, true); | ||
211 | + } | ||
209 | } | 212 | } |
210 | $data['holdtime'] = date('Y-m-d',$data['holdtime']); | 213 | $data['holdtime'] = date('Y-m-d',$data['holdtime']); |
211 | $data['details'] = strip_tags($data['details']); | 214 | $data['details'] = strip_tags($data['details']); |
@@ -234,6 +234,18 @@ class Bind extends Api | @@ -234,6 +234,18 @@ class Bind extends Api | ||
234 | } | 234 | } |
235 | 235 | ||
236 | /** | 236 | /** |
237 | + * @ApiTitle (绑定后获取头像昵称) | ||
238 | + */ | ||
239 | + public function study(){ | ||
240 | + $user = $this->auth->getUserinfo(); | ||
241 | + $sid = \db('study')->where('user_id', $user['id'])->value('id'); | ||
242 | + //获取学生的信息 | ||
243 | + $data = \db('study')->where('id', $sid)->field('avatar,name,earn_score')->find(); | ||
244 | + $data['avatar'] = cdnurl( $data['avatar'], true); | ||
245 | + $this->success('',$data); | ||
246 | + } | ||
247 | + | ||
248 | + /** | ||
237 | * @ApiTitle (获取学生信息) | 249 | * @ApiTitle (获取学生信息) |
238 | * @ApiMethod (POST) | 250 | * @ApiMethod (POST) |
239 | * @ApiParams (name="cid", type="string", required=true, description="校区id") | 251 | * @ApiParams (name="cid", type="string", required=true, description="校区id") |
@@ -264,9 +276,6 @@ class Bind extends Api | @@ -264,9 +276,6 @@ class Bind extends Api | ||
264 | $user = $this->auth->getUserinfo(); | 276 | $user = $this->auth->getUserinfo(); |
265 | $cid = $this->request->param('cid'); | 277 | $cid = $this->request->param('cid'); |
266 | $sid = \db('study')->where('user_id', $user['id'])->value('id'); | 278 | $sid = \db('study')->where('user_id', $user['id'])->value('id'); |
267 | - //获取学生的信息 | ||
268 | - $data = \db('study')->where('id', $sid)->field('avatar,name,earn_score')->find(); | ||
269 | - $data['avatar'] = cdnurl( $data['avatar'], true); | ||
270 | //获取雷达维度 | 279 | //获取雷达维度 |
271 | $data['item'] = \db('study_score_log') | 280 | $data['item'] = \db('study_score_log') |
272 | ->distinct('item_id') | 281 | ->distinct('item_id') |
@@ -282,7 +291,7 @@ class Bind extends Api | @@ -282,7 +291,7 @@ class Bind extends Api | ||
282 | ->value('r.title'); | 291 | ->value('r.title'); |
283 | return $item; | 292 | return $item; |
284 | }); | 293 | }); |
285 | - $this->success('获取学生信息成功', $data); | 294 | + $this->success('获取成功', $data); |
286 | } | 295 | } |
287 | 296 | ||
288 | } | 297 | } |
此 diff 太大无法显示。
-
请 注册 或 登录 后发表评论