| xqd
@@ -14,8 +14,8 @@ class ChatLog extends LazyRenderable
|
|
|
$chat_data = ChatList::query()->find($this->payload['id']);
|
|
|
|
|
|
return Grid::make(new ImMessage($chat_data->user_id,$chat_data->to_user_id), function (Grid $grid) {
|
|
|
- $grid->column('user_id', 'ID')->sortable();
|
|
|
- $grid->column('From_Account')->display(function ($res){
|
|
|
+// $grid->column('user_id', 'ID')->sortable();
|
|
|
+ $grid->column('From_Account','用户1')->display(function ($res){
|
|
|
$user = User::query()->where('tencent_im_user_id',$res)->with("user_info")->first();
|
|
|
$str = "";
|
|
|
$str.="<div style='margin-right:10px;text-align: center'>";
|
| xqd
@@ -24,7 +24,7 @@ class ChatLog extends LazyRenderable
|
|
|
$str.="</div>";
|
|
|
return $str;
|
|
|
});
|
|
|
- $grid->column('To_Account')->display(function ($res){
|
|
|
+ $grid->column('To_Account','用户2')->display(function ($res){
|
|
|
$user = User::query()->where('tencent_im_user_id',$res)->with("user_info")->first();
|
|
|
$str = "";
|
|
|
$str.="<div style='margin-right:10px;text-align: center'>";
|
| xqd
@@ -33,7 +33,9 @@ class ChatLog extends LazyRenderable
|
|
|
$str.="</div>";
|
|
|
return $str;
|
|
|
});
|
|
|
- $grid->column('MsgTimeStamp');
|
|
|
+ $grid->column('MsgTimeStamp')->display(function ($res){
|
|
|
+ return date("m-d H:i",$res);
|
|
|
+ });
|
|
|
$grid->column('MsgBody')->display(function ($res){
|
|
|
//dd($res);
|
|
|
//$res = json_decode($res,true);
|