xiaogang 4 سال پیش
والد
کامیت
30a2ae3384
2فایلهای تغییر یافته به همراه10 افزوده شده و 2 حذف شده
  1. 1 1
      app/Admin/Actions/Chat/ChatLog.php
  2. 9 1
      app/Repositories/ImMessage.php

+ 1 - 1
app/Admin/Actions/Chat/ChatLog.php

@@ -11,7 +11,7 @@ class ChatLog extends LazyRenderable
     public function grid(): Grid
     public function grid(): Grid
     {
     {
 
 
-        return Grid::make(new ImMessage(), function (Grid $grid) {
+        return Grid::make(new ImMessage(1,2), function (Grid $grid) {
             $grid->column('user_id', 'ID')->sortable();
             $grid->column('user_id', 'ID')->sortable();
             $grid->column('nickname');
             $grid->column('nickname');
             $grid->column('created_at');
             $grid->column('created_at');

+ 9 - 1
app/Repositories/ImMessage.php

@@ -10,6 +10,14 @@ use Illuminate\Pagination\LengthAwarePaginator;
 
 
 class ImMessage extends Repository
 class ImMessage extends Repository
 {
 {
+    public $user_id;
+    public $to_user_id;
+    public function __construct($id,$id2)
+    {
+        $this->user_id = $id;
+        $this->to_user_id = $id2;
+    }
+
     /**
     /**
      * 查询表格数据
      * 查询表格数据
      *
      *
@@ -22,7 +30,7 @@ class ImMessage extends Repository
         $perPage = $model->getPerPage();
         $perPage = $model->getPerPage();
 
 
         $data =new TencentImMessage();
         $data =new TencentImMessage();
-        $res = $data->getroammsg(1,1064);
+        $res = $data->getroammsg($this->user_id,$this->to_user_id);
 
 
        return $model->makePaginator('',$res);
        return $model->makePaginator('',$res);
     }
     }