作者 Cool
1 个管道 的构建 通过 耗费 6 秒

订单列表修改

... ... @@ -249,6 +249,7 @@ class Order extends Api
"is_complaint"://是否被投诉(1是2否3已处理)
"is_comment"://是否评价过(1是2否)
"right_status"://学生售后订单中的状态(1已处理2未处理)
"chat_id"://房间id
}
})
*/
... ... @@ -293,6 +294,23 @@ class Order extends Api
}else{
$v['right_status'] = 1;
}
// 融云账号信息
$v['user'] = $v['teacher'] = [
'id' => '',
'token' => ''
];
if($v['status'] == 2) {
$v['user'] = [
'id' => $this->user['rongyun_id'],
'token' => $this->user['rongyun_token']
];
$teacher_id = Db::name('teacher')->where('id',$v['teacher_id'])->value('user_id');
$teacher = Db::name('user')->field('rongyun_id,rongyun_token')->where('id',$teacher_id)->find();
$v['teacher'] = [
'id' => $teacher['rongyun_id'],
'token' => $teacher['rongyun_token']
];
}
}
}else{
$this->error('类型有误');
... ... @@ -343,6 +361,7 @@ class Order extends Api
"is_complaint"://是否被投诉(1是2否3已处理
"is_comment"://是否评价过(1是2否
"is_chargeback"://是否退单(1已退款2未申请退款
"chat_id"://房间id
}
})
*/
... ... @@ -424,6 +443,17 @@ class Order extends Api
$v['is_comment'] = 1;
}
$v['expirationtime'] = date('Y-m-d H:i',$v['expirationtime']);
if($v['status'] == 2) {
$v['teacher'] = [
'id' => $this->user['rongyun_id'],
'token' => $this->user['rongyun_token']
];
$user = Db::name('user')->field('rongyun_id,rongyun_token')->where('id',$v['user_id'])->find();
$v['user'] = [
'id' => $user['rongyun_id'],
'token' => $user['rongyun_token']
];
}
}
$this->success('success',$data);
}
... ...