正在显示
1 个修改的文件
包含
30 行增加
和
0 行删除
@@ -249,6 +249,7 @@ class Order extends Api | @@ -249,6 +249,7 @@ class Order extends Api | ||
249 | "is_complaint"://是否被投诉(1是2否3已处理) | 249 | "is_complaint"://是否被投诉(1是2否3已处理) |
250 | "is_comment"://是否评价过(1是2否) | 250 | "is_comment"://是否评价过(1是2否) |
251 | "right_status"://学生售后订单中的状态(1已处理2未处理) | 251 | "right_status"://学生售后订单中的状态(1已处理2未处理) |
252 | + "chat_id"://房间id | ||
252 | } | 253 | } |
253 | }) | 254 | }) |
254 | */ | 255 | */ |
@@ -293,6 +294,23 @@ class Order extends Api | @@ -293,6 +294,23 @@ class Order extends Api | ||
293 | }else{ | 294 | }else{ |
294 | $v['right_status'] = 1; | 295 | $v['right_status'] = 1; |
295 | } | 296 | } |
297 | + // 融云账号信息 | ||
298 | + $v['user'] = $v['teacher'] = [ | ||
299 | + 'id' => '', | ||
300 | + 'token' => '' | ||
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 | + } | ||
296 | } | 314 | } |
297 | }else{ | 315 | }else{ |
298 | $this->error('类型有误'); | 316 | $this->error('类型有误'); |
@@ -343,6 +361,7 @@ class Order extends Api | @@ -343,6 +361,7 @@ class Order extends Api | ||
343 | "is_complaint"://是否被投诉(1是2否3已处理 | 361 | "is_complaint"://是否被投诉(1是2否3已处理 |
344 | "is_comment"://是否评价过(1是2否 | 362 | "is_comment"://是否评价过(1是2否 |
345 | "is_chargeback"://是否退单(1已退款2未申请退款 | 363 | "is_chargeback"://是否退单(1已退款2未申请退款 |
364 | + "chat_id"://房间id | ||
346 | } | 365 | } |
347 | }) | 366 | }) |
348 | */ | 367 | */ |
@@ -424,6 +443,17 @@ class Order extends Api | @@ -424,6 +443,17 @@ class Order extends Api | ||
424 | $v['is_comment'] = 1; | 443 | $v['is_comment'] = 1; |
425 | } | 444 | } |
426 | $v['expirationtime'] = date('Y-m-d H:i',$v['expirationtime']); | 445 | $v['expirationtime'] = date('Y-m-d H:i',$v['expirationtime']); |
446 | + if($v['status'] == 2) { | ||
447 | + $v['teacher'] = [ | ||
448 | + 'id' => $this->user['rongyun_id'], | ||
449 | + 'token' => $this->user['rongyun_token'] | ||
450 | + ]; | ||
451 | + $user = Db::name('user')->field('rongyun_id,rongyun_token')->where('id',$v['user_id'])->find(); | ||
452 | + $v['user'] = [ | ||
453 | + 'id' => $user['rongyun_id'], | ||
454 | + 'token' => $user['rongyun_token'] | ||
455 | + ]; | ||
456 | + } | ||
427 | } | 457 | } |
428 | $this->success('success',$data); | 458 | $this->success('success',$data); |
429 | } | 459 | } |
-
请 注册 或 登录 后发表评论