xiaogang 4 yıl önce
ebeveyn
işleme
30a2ae3384

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

xqd
@@ -11,7 +11,7 @@ class ChatLog extends LazyRenderable
     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('nickname');
             $grid->column('created_at');

+ 9 - 1
app/Repositories/ImMessage.php

xqd xqd
@@ -10,6 +10,14 @@ use Illuminate\Pagination\LengthAwarePaginator;
 
 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();
 
         $data =new TencentImMessage();
-        $res = $data->getroammsg(1,1064);
+        $res = $data->getroammsg($this->user_id,$this->to_user_id);
 
        return $model->makePaginator('',$res);
     }