Commit 1bc9186e authored by clone's avatar clone

parent 00a55cc7
...@@ -324,7 +324,7 @@ class AppChat extends Basic ...@@ -324,7 +324,7 @@ class AppChat extends Basic
$params = $this->params; $params = $this->params;
/* $params = array( /* $params = array(
"target" => "user_2", "target" => "user_2",
"is_user" => 0,//0用户1经纪人 "is_user" => 1,//1用户2经纪人
"relation_list" => '[{"r_id":"2","msg_id":3536},{"r_id":"8","msg_id":3524}]', "relation_list" => '[{"r_id":"2","msg_id":3536},{"r_id":"8","msg_id":3524}]',
);*/ );*/
if (!isset($params['target']) || !isset($params["is_user"])) { if (!isset($params['target']) || !isset($params["is_user"])) {
......
...@@ -408,7 +408,6 @@ class ChatService ...@@ -408,7 +408,6 @@ class ChatService
$relationList = $chatRelationModel->getChatRelationInfo($params, $field); $relationList = $chatRelationModel->getChatRelationInfo($params, $field);
$result = []; $result = [];
//dump($relationList);
$fields = "a.id,a.from_id,a.to_id,b.body,b.type,a.created_at"; $fields = "a.id,a.from_id,a.to_id,b.body,b.type,a.created_at";
$msgModel = new ChatMsg(); $msgModel = new ChatMsg();
foreach ($relationList as $key => $item) { foreach ($relationList as $key => $item) {
...@@ -417,7 +416,7 @@ class ChatService ...@@ -417,7 +416,7 @@ class ChatService
} else { } else {
$result[$key]["relation_id"] = $item["from_id"]; $result[$key]["relation_id"] = $item["from_id"];
} }
if ($is_user == 0) { if ($is_user == 1) {
$result[$key]["name"] = empty($item["user_nick"]) ? $item["user_name"] : $item["user_nick"]; $result[$key]["name"] = empty($item["user_nick"]) ? $item["user_name"] : $item["user_nick"];
$result[$key]["img"] = empty($item["user_pic"]) ? $item["other_pic"] : $item["user_pic"]; $result[$key]["img"] = empty($item["user_pic"]) ? $item["other_pic"] : $item["user_pic"];
$result[$key]["phone"] = $item["user_phone"]; $result[$key]["phone"] = $item["user_phone"];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment