Sfoglia il codice sorgente

Merge branch 'dev' of https://gitee.com/zxt_5/admin_consumer into dev

rkljw 2 mesi fa
parent
commit
80c80527ac

+ 4 - 3
app/Controller/ChatController.php

@@ -82,7 +82,7 @@ class ChatController extends AbstractController
     public function topicType()
     public function topicType()
     {
     {
         $type = array(
         $type = array(
-            '1' => '课题',
+            '1' => '科研',
             '2' => '维权',
             '2' => '维权',
             '3' => '讨论',
             '3' => '讨论',
         );
         );
@@ -193,7 +193,8 @@ class ChatController extends AbstractController
     public function applyFriend()
     public function applyFriend()
     {
     {
         $requireData = $this->request->all();
         $requireData = $this->request->all();
-        $frindid =$requireData['apply_id'];
+        $frindid =$requireData['friend_id']??0;
+        unset($requireData['friend_id']);
         unset($requireData['apply_id']);
         unset($requireData['apply_id']);
         // 定义验证规则
         // 定义验证规则
         $validator = $this->validationFactory->make(
         $validator = $this->validationFactory->make(
@@ -223,7 +224,7 @@ class ChatController extends AbstractController
             // var_dump($myFriends, '--------------------1');
             // var_dump($myFriends, '--------------------1');
             $redisClient->setUserFriends((string)$requireData['user_id'], $myFriends['data']);
             $redisClient->setUserFriends((string)$requireData['user_id'], $myFriends['data']);
             $myFriends = $this->chatServiceClient->getFriendsList(['user_id' => $frindid, 'status' => 2]);
             $myFriends = $this->chatServiceClient->getFriendsList(['user_id' => $frindid, 'status' => 2]);
-            // var_dump($myFriends, '-------------3-------1');
+             var_dump($myFriends, '-------------3-------1');
             $redisClient->setUserFriends((string)$frindid, $myFriends['data']);
             $redisClient->setUserFriends((string)$frindid, $myFriends['data']);
             $result =  $redisClient->getUserFriends((string)$requireData['user_id']);
             $result =  $redisClient->getUserFriends((string)$requireData['user_id']);
             // var_dump($result,'redis-结果');
             // var_dump($result,'redis-结果');

+ 2 - 2
app/Controller/IndexController.php

@@ -63,8 +63,8 @@ class IndexController extends AbstractController
 //        return $result->getImageBase64();
 //        return $result->getImageBase64();
 
 
     }
     }
-    // 1
-    /**
+// test
+      /**
      * 获取验证码
      * 获取验证码
      */
      */
     public function getverifyCode(){
     public function getverifyCode(){

+ 27 - 2
app/Controller/LoginController.php

@@ -11,7 +11,7 @@ use Hyperf\Di\Annotation\Inject;
 use Hyperf\HttpServer\Annotation\AutoController;
 use Hyperf\HttpServer\Annotation\AutoController;
 use Hyperf\Validation\Contract\ValidatorFactoryInterface;
 use Hyperf\Validation\Contract\ValidatorFactoryInterface;
 use \Phper666\JWTAuth\JWT;
 use \Phper666\JWTAuth\JWT;
-
+use App\Model\UserToken;
 /**
 /**
  * @AutoController()
  * @AutoController()
  */
  */
@@ -94,13 +94,38 @@ class LoginController extends AbstractController
 //        var_dump($userData);
 //        var_dump($userData);
         // 使用默认场景登录
         // 使用默认场景登录
         $token = $jwt->getToken('default', $userData);
         $token = $jwt->getToken('default', $userData);
+
+        // 检查是否二次登录
+        // 检查是否有旧的token
+        // $old_token = UserToken::where('user_id', $userInfos['data']['id'])->orderBy('created_at')->first();
+        // var_dump("==============================old_token",$old_token);
+        // if (!empty($old_token)) {
+        //     if ($old_token->token != $token->toString()) {
+        //         $out = $jwt->logout('default', $userData);
+        //         if ($out != $old_token->token) {
+        //             $log_out = UserToken::where('user_id', $userInfos['data']['id'])->update(['token' => $out]);
+        //             var_dump("******************log_out",$log_out);
+        //         } else {
+        //             return Result::error("请不要重复登录!");
+        //         }
+        //     }
+        // }else{
+        //     $user_token =  UserToken::create([
+        //         'user_id' => $userInfos['data']['id'],
+        //         'token' => $token->toString()
+        //     ]);
+        //     var_dump("==============================user_token",$user_token);
+        //     if (!$user_token) {
+        //         return Result::error("登录失败!");
+        //     }
+        // }
+
         $data = [
         $data = [
             'token' => $token->toString(),
             'token' => $token->toString(),
             'exp' => $jwt->getTTL($token->toString()),
             'exp' => $jwt->getTTL($token->toString()),
         ];
         ];
         return Result::success($data);
         return Result::success($data);
     }
     }
-
     /**
     /**
      * @return void
      * @return void
      */
      */

+ 37 - 4
app/Controller/NewsController.php

@@ -9,6 +9,7 @@ use Hyperf\HttpServer\Annotation\AutoController;
 use App\Tools\Result;
 use App\Tools\Result;
 use Hyperf\Validation\Contract\ValidatorFactoryInterface;
 use Hyperf\Validation\Contract\ValidatorFactoryInterface;
 use Hyperf\Context\Context;
 use Hyperf\Context\Context;
+use App\JsonRpc\UserServiceInterface;
 /**
 /**
  * Class NewsController
  * Class NewsController
  * @package App\Controller
  * @package App\Controller
@@ -25,6 +26,13 @@ class NewsController extends AbstractController
     #[Inject]
     #[Inject]
     private $newsServiceClient;
     private $newsServiceClient;
 
 
+     /**
+     * @var UserServiceInterface
+     */
+    #[Inject]
+    private $userServiceClient;
+
+
     /**
     /**
      * 导航池列表
      * 导航池列表
      * @return void
      * @return void
@@ -47,8 +55,12 @@ class NewsController extends AbstractController
             $errorMessage = $validator->errors()->first();
             $errorMessage = $validator->errors()->first();
             return Result::error($errorMessage);
             return Result::error($errorMessage);
         }
         }
-
-
+         //获取用户信息
+         $user_id = Context::get("UserId");
+         $userInfo = $this->userServiceClient->getUserInfo((int)$user_id);
+         var_dump("用户信息:",$userInfo);
+         $sszq = $userInfo['data']['sszq'];
+         $type_id = $userInfo['data']['type_id']; //'1:个人会员 2:政务会员 3:企业会员 4:调研员 10000:管理员 20000:游客(小程序)'
         $result = $this->newsServiceClient->getCategoryList($requireData);
         $result = $this->newsServiceClient->getCategoryList($requireData);
         if($result['data']){
         if($result['data']){
             foreach ($result['data']['rows'] as $k=>$v) {
             foreach ($result['data']['rows'] as $k=>$v) {
@@ -80,8 +92,19 @@ class NewsController extends AbstractController
         }
         }
 
 
         $requireData['website_id'] = Context::get("SiteId");
         $requireData['website_id'] = Context::get("SiteId");
-
-        $result = $this->newsServiceClient->categoryList($requireData);
+         //获取用户信息
+         $user_id = Context::get("UserId");
+         $userInfo = $this->userServiceClient->getUserInfo((int)$user_id);
+         var_dump("用户信息:",$userInfo);
+         $sszq = $userInfo['data']['sszq'];
+         $type_id = $userInfo['data']['type_id']; //'1:个人会员 2:政务会员 3:企业会员 4:调研员 10000:管理员 20000:游客(小程序)'
+         //管理员看所有
+         if($type_id == 10000){
+             $result = $this->newsServiceClient->categoryList($requireData);
+        } else {
+            $requireData['sszq'] = $sszq;
+            $result = $this->newsServiceClient->myCategoryList($requireData);
+        }
 //        $rep = PublicData::buildMenuTree($result['data']);
 //        $rep = PublicData::buildMenuTree($result['data']);
         return $result ? Result::success($result['data']) : Result::error($result['message']);
         return $result ? Result::success($result['data']) : Result::error($result['message']);
     }
     }
@@ -218,6 +241,16 @@ class NewsController extends AbstractController
             return Result::error($errorMessage);
             return Result::error($errorMessage);
         }
         }
         $requireData['website_id'] = Context::get("SiteId");
         $requireData['website_id'] = Context::get("SiteId");
+        //获取用户信息
+        $user_id = Context::get("UserId");
+        $userInfo = $this->userServiceClient->getUserInfo((int)$user_id);
+        var_dump("用户信息:",$userInfo);
+        $sszq = $userInfo['data']['sszq'];
+        $type_id = $userInfo['data']['type_id']; //'1:个人会员 2:政务会员 3:企业会员 4:调研员 10000:管理员 20000:游客(小程序)'
+        $requireData['type_id'] = $type_id;
+        $requireData['user_id'] = $user_id;
+
+
         var_dump("资讯:",$requireData);
         var_dump("资讯:",$requireData);
         $result = $this->newsServiceClient->getArticleList($requireData);
         $result = $this->newsServiceClient->getArticleList($requireData);
         //1通过,2待审核,3待发 4,拒绝 5删除
         //1通过,2待审核,3待发 4,拒绝 5删除

+ 4 - 3
app/Controller/WebSocketController.php

@@ -79,12 +79,13 @@ class WebSocketController implements OnMessageInterface, OnOpenInterface, OnClos
         if (!in_array($result['receiver_id'], $myFriendsID)) {
         if (!in_array($result['receiver_id'], $myFriendsID)) {
             $myFriends = $this->chatServiceClient->getFriendsList(['user_id' => $userId, 'status' => 2]);
             $myFriends = $this->chatServiceClient->getFriendsList(['user_id' => $userId, 'status' => 2]);
             $redisClient->setUserFriends($userId, $myFriends['data']);
             $redisClient->setUserFriends($userId, $myFriends['data']);
-            $myFriendsArr = $myFriends['data'];
-                if (!in_array($result['receiver_id'], $myFriendsID)) {
+            $myFriendsArrdata = $myFriends['data'];
+            $myFriendsArrID = array_column($myFriendsArrdata, 'friend_id');
+                if (!in_array($result['receiver_id'], $myFriendsArrID)) {
                     $result['content'] = '您还不是好友,无法发送消息!';
                     $result['content'] = '您还不是好友,无法发送消息!';
                     $server->push((int) $frame->fd, json_encode($result));
                     $server->push((int) $frame->fd, json_encode($result));
+                    return;
                 }
                 }
-            return;
         }
         }
             //给自己推一条数据
             //给自己推一条数据
             if ($server->isEstablished($frame->fd)) {
             if ($server->isEstablished($frame->fd)) {

+ 48 - 20
app/Controller/WebsiteController.php

@@ -1535,18 +1535,23 @@ class WebsiteController extends AbstractController
 
 
      {
      {
         $requireData = $this->request->all();
         $requireData = $this->request->all();
-        $validator = $this->validationFactory->make(
-            $requireData,
-            [
-                'website_id' =>'required',
-            ],
-            [
-                'website_id.required' => '网站id不能为空',
-            ]
-            );
-         if ($validator->fails()){
-             $errorMessage = $validator->errors()->first();
-             return Result::error($errorMessage); 
+        // $validator = $this->validationFactory->make(
+        //     $requireData,
+        //     [
+        //         'website_id' =>'required',
+        //     ],
+        //     [
+        //         'website_id.required' => '网站id不能为空',
+        //     ]
+        // );
+        //  if ($validator->fails()){
+        //      $errorMessage = $validator->errors()->first();
+        //      return Result::error($errorMessage); 
+        //  }
+         if(isset($requireData['keyword']) && !empty($requireData['keyword'])){
+            $requireData['keyword'] = trim($requireData['keyword']);
+         }else{
+            $requireData['keyword'] = '';
          }
          }
          $result = $this->websiteServiceClient->selectWebsiteDepartment($requireData);
          $result = $this->websiteServiceClient->selectWebsiteDepartment($requireData);
          return $result['code']==200?Result::success($result['data']):Result::error($result['message']);
          return $result['code']==200?Result::success($result['data']):Result::error($result['message']);
@@ -1560,15 +1565,38 @@ class WebsiteController extends AbstractController
      public function selectWebsiteArea()
      public function selectWebsiteArea()
     {
     {
         $requireData = $this->request->all();
         $requireData = $this->request->all();
-        $validator = $this->validationFactory->make(
-            $requireData,
-            [
-                'website_id' =>'required',
+        $rules = [
+            // 'website_id' => 'required',
+            'province' => [
+                'nullable',
+                'numeric',
+                function ($attribute, $value, $fail) {
+                    if ($value === 0) {
+                        $fail($attribute . '不能为0');
+                    }
+                },
             ],
             ],
-            [
-                'website_id.required' => '网站id不能为空',
-            ]
-            );
+            'city' => [
+                'nullable',
+                'numeric',
+                function ($attribute, $value, $fail) {
+                    if ($value === 0) {
+                        $fail($attribute . '不能为0');
+                    }
+                },
+            ],
+        ];
+
+        $messages = [
+            // 'website_id.required' => '网站id不能为空',
+            'province.numeric' => '省份必须是数字类型',
+            'province.custom' => '省份不能为0',
+            'city.numeric' => '城市必须是数字类型',
+            'city.custom' => '城市不能为0',
+        ];
+
+        $validator = $this->validationFactory->make($requireData, $rules, $messages);
+       
         if ($validator->fails()){
         if ($validator->fails()){
             $errorMessage = $validator->errors()->first();
             $errorMessage = $validator->errors()->first();
             return Result::error($errorMessage); 
             return Result::error($errorMessage); 

+ 154 - 146
app/JsonRpc/NewsService.php

@@ -1,147 +1,155 @@
-<?php
-
-namespace App\JsonRpc;
-
-use Hyperf\RpcClient\AbstractServiceClient;
-
-class NewsService extends AbstractServiceClient implements NewsServiceInterface
-{
-    /**
-     * 定义对应服务提供者的服务名称
-     * @var string
-     */
-    protected string $serviceName = 'NewsService';
-    /**
-     * 定义对应服务提供者的服务协议
-     * @var string
-     */
-    protected string $protocol = 'jsonrpc-http';
-
-
-    /**
-     * @param array $data
-     * @return mixed
-     */
-    public function getCategoryList(array $data)
-    {
-        return $this->__request(__FUNCTION__, $data);
-    }
-
-    /**
-     * @param array $data
-     * @return array
-     */
-    public function categoryList(array $data)
-    {
-        return $this->__request(__FUNCTION__, $data);
-    }
-
-    /**
-     * @param array $data
-     * @return array
-     */
-    public function addCategory(array $data)
-    {
-        return $this->__request(__FUNCTION__, $data);
-    }
-
-    /**
-     * @param array $data
-     * @return array
-     */
-    public function delCategory(array $data)
-    {
-        return $this->__request(__FUNCTION__, $data);
-    }
-
-    /**
-     * @param array $data
-     * @return array
-     */
-    public function updateCategory(array $data)
-    {
-        return $this->__request(__FUNCTION__, $data);
-    }
-
-    /**
-     * @param array $data
-     * @return array
-     */
-    public function getArticleList(array $data)
-    {
-        return $this->__request(__FUNCTION__, $data);
-    }
-
-    /**
-     * @param array $data
-     * @return array
-     */
-    public function addArticle(array $data)
-    {
-        return $this->__request(__FUNCTION__, $data);
-    }
-
-    /**
-     * @param array $data
-     * @return array
-     */
-    public function delArticle(array $data)
-    {
-        return $this->__request(__FUNCTION__, $data);
-    }
-
-    /**
-     * @param array $data
-     * @return array
-     */
-    public function updateArticle(array $data)
-    {
-        return $this->__request(__FUNCTION__, $data);
-    }
-    /**
-     * @param array $data
-     * @return array
-     */
-    public function getArticleInfo(array $data)
-    {
-        return $this->__request(__FUNCTION__, $data);
-    }
-    /**
-     * @param array $data
-     * @return array|mixed
-     */
-    public function getCategoryInfo(array $data)
-    {
-        return $this->__request(__FUNCTION__, $data);
-    }
-
-
-    /**
-     * 更新资讯状态
-     * @param array $data
-     * @return mixed
-     */
-    public function upArticleStatus(array $data)
-    {
-        return $this->__request(__FUNCTION__, $data);
-    }
-
-    /**
-     * @param array $data
-     * @return mixed
-     */
-    public function getWebsiteArticlett(array $data)
-    {
-        return $this->__request(__FUNCTION__, $data);
-    }
-    /**
-     * @param array $data
-     * @return array
-     */
-    public function getWebsiteModelArticles(array $data)
-    {
-        return $this->__request(__FUNCTION__, $data);
-    }
-    
-
+<?php
+
+namespace App\JsonRpc;
+
+use Hyperf\RpcClient\AbstractServiceClient;
+
+class NewsService extends AbstractServiceClient implements NewsServiceInterface
+{
+    /**
+     * 定义对应服务提供者的服务名称
+     * @var string
+     */
+    protected string $serviceName = 'NewsService';
+    /**
+     * 定义对应服务提供者的服务协议
+     * @var string
+     */
+    protected string $protocol = 'jsonrpc-http';
+
+
+    /**
+     * @param array $data
+     * @return mixed
+     */
+    public function getCategoryList(array $data)
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
+    
+     /**
+     * @param array $data
+     * @return mixed
+     */
+    public function myCategoryList(array $data)
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
+    /**
+     * @param array $data
+     * @return array
+     */
+    public function categoryList(array $data)
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
+
+    /**
+     * @param array $data
+     * @return array
+     */
+    public function addCategory(array $data)
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
+
+    /**
+     * @param array $data
+     * @return array
+     */
+    public function delCategory(array $data)
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
+
+    /**
+     * @param array $data
+     * @return array
+     */
+    public function updateCategory(array $data)
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
+
+    /**
+     * @param array $data
+     * @return array
+     */
+    public function getArticleList(array $data)
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
+
+    /**
+     * @param array $data
+     * @return array
+     */
+    public function addArticle(array $data)
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
+
+    /**
+     * @param array $data
+     * @return array
+     */
+    public function delArticle(array $data)
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
+
+    /**
+     * @param array $data
+     * @return array
+     */
+    public function updateArticle(array $data)
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
+    /**
+     * @param array $data
+     * @return array
+     */
+    public function getArticleInfo(array $data)
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
+    /**
+     * @param array $data
+     * @return array|mixed
+     */
+    public function getCategoryInfo(array $data)
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
+
+
+    /**
+     * 更新资讯状态
+     * @param array $data
+     * @return mixed
+     */
+    public function upArticleStatus(array $data)
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
+
+    /**
+     * @param array $data
+     * @return array
+     */
+    public function getWebsiteArticlett(array $data)
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
+    /**
+     * @param array $data
+     * @return array
+     */
+    public function getWebsiteModelArticles(array $data)
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
+    
+
 }
 }

+ 80 - 75
app/JsonRpc/NewsServiceInterface.php

@@ -1,75 +1,80 @@
-<?php
-
-namespace App\JsonRpc;
-interface NewsServiceInterface
-{
-
-    /**
-     * @param array $data
-     */
-    public function getCategoryList(array $data);
-    /**
-     * @param array $data
-     */
-    public function categoryList(array $data);
-
-    /**
-     * @param array $data
-     */
-    public function addCategory(array $data);
-
-    /**
-     * @param array $data
-     */
-    public function delCategory(array $data);
-
-    /**
-     * @param array $data
-     */
-    public function updateCategory(array $data);
-
-    /**
-     * @param array $data
-    */
-    public function getArticleList(array $data);
-
-    /**
-     * @param array $data
-     */
-    public function addArticle(array $data);
-
-    /**
-     * @param array $data
-     */
-    public function delArticle(array $data);
-    /**
-     * @param array $data
-     */
-    public function updateArticle(array $data);
-    /**
-     * @param array $data
-     */
-    public function getArticleInfo(array $data);
-    /**
-     * @param array $data
-     * @return mixed
-     */
-    public function getCategoryInfo(array $data);
-
-    /**
-     * @param array $data
-     *
-     */
-    public function getWebsiteArticlett(array $data);
-    /**
-     * @param array $data
-     * @return mixed
-     */
-    public function upArticleStatus(array $data);
-    /**
-     * @param array $data
-     * @return mixed
-     */
-    public function getWebsiteModelArticles(array $data);
-
-}
+<?php
+
+namespace App\JsonRpc;
+
+interface NewsServiceInterface
+{
+
+    /**
+     * @param array $data
+     */
+    public function getCategoryList(array $data);
+
+    /**
+     * @param array $data
+     */
+    public function myCategoryList(array $data);
+    /**
+     * @param array $data
+     */
+    public function categoryList(array $data);
+
+    /**
+     * @param array $data
+     */
+    public function addCategory(array $data);
+
+    /**
+     * @param array $data
+     */
+    public function delCategory(array $data);
+
+    /**
+     * @param array $data
+     */
+    public function updateCategory(array $data);
+
+    /**
+     * @param array $data
+     */
+    public function getArticleList(array $data);
+
+    /**
+     * @param array $data
+     */
+    public function addArticle(array $data);
+
+    /**
+     * @param array $data
+     */
+    public function delArticle(array $data);
+    /**
+     * @param array $data
+     */
+    public function updateArticle(array $data);
+    /**
+     * @param array $data
+     */
+    public function getArticleInfo(array $data);
+    /**
+     * @param array $data
+     * @return mixed
+     */
+    public function getCategoryInfo(array $data);
+    /**
+     * @param array $data
+     *
+     */
+    public function getWebsiteArticlett(array $data);
+    /**
+     * @param array $data
+     */
+    public function getWebsiteModelArticles(array $data);
+
+    /**
+     * @param array $data
+     * @return mixed
+     */
+    public function upArticleStatus(array $data);
+
+}

+ 0 - 1
app/JsonRpc/PublicRpcService.php

@@ -217,7 +217,6 @@ class PublicRpcService extends AbstractServiceClient implements PublicRpcService
     {
     {
         return $this->__request(__FUNCTION__, $data);
         return $this->__request(__FUNCTION__, $data);
     }
     }
-
     public function getTemplateClass(array $data)
     public function getTemplateClass(array $data)
     {
     {
         return $this->__request(__FUNCTION__, $data);
         return $this->__request(__FUNCTION__, $data);

+ 0 - 1
app/JsonRpc/PublicRpcServiceInterface.php

@@ -129,7 +129,6 @@ interface PublicRpcServiceInterface
      *
      *
      */
      */
     public function modZhinengbumen(array $data);
     public function modZhinengbumen(array $data);
-
     public function getTemplateClass(array $data);
     public function getTemplateClass(array $data);
     public function getTemplateList(array $data);
     public function getTemplateList(array $data);
     public function getTemplateInfo(array $data);
     public function getTemplateInfo(array $data);

+ 27 - 0
app/Model/UserToken.php

@@ -0,0 +1,27 @@
+<?php
+
+declare(strict_types=1);
+
+namespace App\Model;
+
+use Hyperf\DbConnection\Model\Model;
+
+/**
+ */
+class UserToken extends Model
+{
+    /**
+     * The table associated with the model.
+     */
+    protected ?string $table = 'user_token';
+
+    /**
+     * The attributes that are mass assignable.
+     */
+    protected array $fillable = [];
+
+    /**
+     * The attributes that should be cast to native types.
+     */
+    protected array $casts = [];
+}

+ 12 - 12
composer.lock

@@ -3833,16 +3833,16 @@
         },
         },
         {
         {
             "name": "hyperf/process",
             "name": "hyperf/process",
-            "version": "v3.1.48",
+            "version": "v3.1.42",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/hyperf/process.git",
                 "url": "https://github.com/hyperf/process.git",
-                "reference": "8d68398bdb4f2623af1bec846399b6ce29bd7d2c"
+                "reference": "2b2286cff615989f01cb87691882b61c4c931ea3"
             },
             },
             "dist": {
             "dist": {
                 "type": "zip",
                 "type": "zip",
-                "url": "https://api.github.com/repos/hyperf/process/zipball/8d68398bdb4f2623af1bec846399b6ce29bd7d2c",
-                "reference": "8d68398bdb4f2623af1bec846399b6ce29bd7d2c",
+                "url": "https://api.github.com/repos/hyperf/process/zipball/2b2286cff615989f01cb87691882b61c4c931ea3",
+                "reference": "2b2286cff615989f01cb87691882b61c4c931ea3",
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
@@ -3899,7 +3899,7 @@
                     "type": "open_collective"
                     "type": "open_collective"
                 }
                 }
             ],
             ],
-            "time": "2024-12-02T10:54:30+00:00"
+            "time": "2024-09-25T02:54:12+00:00"
         },
         },
         {
         {
             "name": "hyperf/redis",
             "name": "hyperf/redis",
@@ -6422,16 +6422,16 @@
         },
         },
         {
         {
             "name": "phpseclib/phpseclib",
             "name": "phpseclib/phpseclib",
-            "version": "3.0.43",
+            "version": "3.0.42",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/phpseclib/phpseclib.git",
                 "url": "https://github.com/phpseclib/phpseclib.git",
-                "reference": "709ec107af3cb2f385b9617be72af8cf62441d02"
+                "reference": "db92f1b1987b12b13f248fe76c3a52cadb67bb98"
             },
             },
             "dist": {
             "dist": {
                 "type": "zip",
                 "type": "zip",
-                "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/709ec107af3cb2f385b9617be72af8cf62441d02",
-                "reference": "709ec107af3cb2f385b9617be72af8cf62441d02",
+                "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/db92f1b1987b12b13f248fe76c3a52cadb67bb98",
+                "reference": "db92f1b1987b12b13f248fe76c3a52cadb67bb98",
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
@@ -6512,7 +6512,7 @@
             ],
             ],
             "support": {
             "support": {
                 "issues": "https://github.com/phpseclib/phpseclib/issues",
                 "issues": "https://github.com/phpseclib/phpseclib/issues",
-                "source": "https://github.com/phpseclib/phpseclib/tree/3.0.43"
+                "source": "https://github.com/phpseclib/phpseclib/tree/3.0.42"
             },
             },
             "funding": [
             "funding": [
                 {
                 {
@@ -6528,7 +6528,7 @@
                     "type": "tidelift"
                     "type": "tidelift"
                 }
                 }
             ],
             ],
-            "time": "2024-12-14T21:12:59+00:00"
+            "time": "2024-09-16T03:06:04+00:00"
         },
         },
         {
         {
             "name": "psr/cache",
             "name": "psr/cache",
@@ -9797,7 +9797,7 @@
                 "ext-mbstring": "*",
                 "ext-mbstring": "*",
                 "ext-xml": "*",
                 "ext-xml": "*",
                 "ext-xmlwriter": "*",
                 "ext-xmlwriter": "*",
-                "myclabs/deep-copy": "^1.12.1",
+                "myclabs/deep-copy": "^1.12.0",
                 "phar-io/manifest": "^2.0.4",
                 "phar-io/manifest": "^2.0.4",
                 "phar-io/version": "^3.2.1",
                 "phar-io/version": "^3.2.1",
                 "php": ">=8.1",
                 "php": ">=8.1",

+ 9 - 9
config/api/login.php

@@ -1,9 +1,9 @@
-<?php
-
-declare (strict_types = 1);
-use Hyperf\HttpServer\Router\Router;
-Router::post('/api/login', 'App\Controller\LoginController@login');
-Router::post('/api/checkVerifyCode', 'App\Controller\LoginController@checkVerifyCode');
-
-Router::post('/api/registerOrLogin', 'App\Controller\LoginController@registerOrLogin');
-Router::post('/api/getToken', 'App\Controller\LoginController@getToken');
+<?php
+
+declare (strict_types = 1);
+use Hyperf\HttpServer\Router\Router;
+Router::post('/api/login', 'App\Controller\LoginController@login');
+Router::post('/api/checkVerifyCode', 'App\Controller\LoginController@checkVerifyCode');
+
+Router::post('/api/registerOrLogin', 'App\Controller\LoginController@registerOrLogin');
+Router::post('/api/getToken', 'App\Controller\LoginController@getToken');

+ 5 - 2
config/api/news.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 
 
-declare(strict_types=1);
+declare (strict_types = 1);
 
 
 use App\Controller\NewsController;
 use App\Controller\NewsController;
 use Hyperf\HttpServer\Router\Router;
 use Hyperf\HttpServer\Router\Router;
@@ -9,6 +9,9 @@ Router::addGroup(
     '/news', function () {
     '/news', function () {
         //获取导航池列表
         //获取导航池列表
         Router::get('/getCategoryList', [NewsController::class, 'getCategoryList']);
         Router::get('/getCategoryList', [NewsController::class, 'getCategoryList']);
+        //后台获取  我的导航池
+        Router::get('/myCategoryList', [NewsController::class, 'myCategoryList']);
+
         //导航池 筛选 搜索
         //导航池 筛选 搜索
         Router::get('/categoryList', [NewsController::class, 'categoryList']);
         Router::get('/categoryList', [NewsController::class, 'categoryList']);
         //添加导航池
         //添加导航池
@@ -32,6 +35,6 @@ Router::addGroup(
         //获取导航池信息
         //获取导航池信息
         Router::get('/getCategoryInfo', [NewsController::class, 'getCategoryInfo']);
         Router::get('/getCategoryInfo', [NewsController::class, 'getCategoryInfo']);
 
 
-},
+    },
     ['middleware' => [FooMiddleware::class]]
     ['middleware' => [FooMiddleware::class]]
 );
 );

+ 5 - 5
config/autoload/services.php

@@ -56,16 +56,16 @@ return [
             ],
             ],
             'options' => [
             'options' => [
                 'connect_timeout' => 50.0, // 连接超时时间,单位为秒
                 'connect_timeout' => 50.0, // 连接超时时间,单位为秒
-                'read_timeout' => 100.0,   // 读取超时时间,单位为秒
-                'write_timeout' => 100.0,  // 写入超时时间,单位为秒
+                'read_timeout' => 100.0, // 读取超时时间,单位为秒
+                'write_timeout' => 100.0, // 写入超时时间,单位为秒
             ],
             ],
             'pool' => [
             'pool' => [
                 'min_connections' => 1,
                 'min_connections' => 1,
                 'max_connections' => 30,
                 'max_connections' => 30,
                 'connect_timeout' => 100.0, // 连接池连接超时时间,单位为秒
                 'connect_timeout' => 100.0, // 连接池连接超时时间,单位为秒
-                'wait_timeout' => 30.0,     // 等待连接池可用连接的超时时间,单位为秒
-                'heartbeat' => -1,         // 心跳检测间隔,-1 表示禁用心跳检测
-                'max_idle_time' => 60.0,   // 连接的最大空闲时间,单位为秒
+                'wait_timeout' => 30.0, // 等待连接池可用连接的超时时间,单位为秒
+                'heartbeat' => -1, // 心跳检测间隔,-1 表示禁用心跳检测
+                'max_idle_time' => 60.0, // 连接的最大空闲时间,单位为秒
             ],
             ],
         ],
         ],
         [
         [