正在显示
1 个修改的文件
包含
12 行增加
和
12 行删除
@@ -299,18 +299,6 @@ class Order extends Api | @@ -299,18 +299,6 @@ class Order extends Api | ||
299 | 'id' => '', | 299 | 'id' => '', |
300 | 'token' => '' | 300 | 'token' => '' |
301 | ]; | 301 | ]; |
302 | - if($v['status'] == 2) { | ||
303 | - $v['user'] = [ | ||
304 | - 'id' => $this->user['rongyun_id'], | ||
305 | - 'token' => $this->user['rongyun_token'] | ||
306 | - ]; | ||
307 | - $teacher_id = Db::name('teacher')->where('id',$v['teacher_id'])->value('user_id'); | ||
308 | - $teacher = Db::name('user')->field('rongyun_id,rongyun_token')->where('id',$teacher_id)->find(); | ||
309 | - $v['teacher'] = [ | ||
310 | - 'id' => $teacher['rongyun_id'], | ||
311 | - 'token' => $teacher['rongyun_token'] | ||
312 | - ]; | ||
313 | - } | ||
314 | } | 302 | } |
315 | }else{ | 303 | }else{ |
316 | $this->error('类型有误'); | 304 | $this->error('类型有误'); |
@@ -327,6 +315,18 @@ class Order extends Api | @@ -327,6 +315,18 @@ class Order extends Api | ||
327 | $v['is_comment'] = 1; | 315 | $v['is_comment'] = 1; |
328 | } | 316 | } |
329 | $v['expirationtime'] = date('Y-m-d H:i',$v['expirationtime']); | 317 | $v['expirationtime'] = date('Y-m-d H:i',$v['expirationtime']); |
318 | + if($v['status'] == 2) { | ||
319 | + $v['user'] = [ | ||
320 | + 'id' => $this->user['rongyun_id'], | ||
321 | + 'token' => $this->user['rongyun_token'] | ||
322 | + ]; | ||
323 | + $teacher_id = Db::name('teacher')->where('id',$v['teacher_id'])->value('user_id'); | ||
324 | + $teacher = Db::name('user')->field('rongyun_id,rongyun_token')->where('id',$teacher_id)->find(); | ||
325 | + $v['teacher'] = [ | ||
326 | + 'id' => $teacher['rongyun_id'], | ||
327 | + 'token' => $teacher['rongyun_token'] | ||
328 | + ]; | ||
329 | + } | ||
330 | } | 330 | } |
331 | $this->success('success',$data); | 331 | $this->success('success',$data); |
332 | } | 332 | } |
-
请 注册 或 登录 后发表评论