作者 赵彬吉

update

@@ -88,12 +88,9 @@ class ProjectAssociationController extends BaseController @@ -88,12 +88,9 @@ class ProjectAssociationController extends BaseController
88 $cache = isset($cache); 88 $cache = isset($cache);
89 $search = request()->input('search'); 89 $search = request()->input('search');
90 // $result = ProjectAssociationServices::getInstance()->getAiccWechatLists($isRes, $app, $cache); 90 // $result = ProjectAssociationServices::getInstance()->getAiccWechatLists($isRes, $app, $cache);
91 - $result = ProjectAssociationServices::getInstance()->getWorkChatRoomList($search); 91 + $result = ProjectAssociationServices::getInstance()->getWorkChatRoomList($search, $isRes->friend_id);
92 $result['info'] = [ 92 $result['info'] = [
93 - 'friend_id' => $isRes->friend_id ?? 0,  
94 - 'nickname' => $isRes->nickname ?? '',  
95 - 'user_name' => $isRes->user_name ?? '',  
96 - 'image' => $isRes->image ?? '', 93 + 'friend_id' => $isRes->friend_id ?? 0
97 ]; 94 ];
98 $this->response('success', Code::SUCCESS, $result); 95 $this->response('success', Code::SUCCESS, $result);
99 } 96 }
@@ -158,11 +158,14 @@ class ProjectAssociationServices extends BaseService @@ -158,11 +158,14 @@ class ProjectAssociationServices extends BaseService
158 * @author zbj 158 * @author zbj
159 * @date 2024/9/7 159 * @date 2024/9/7
160 */ 160 */
161 - public function getWorkChatRoomList($search = ''){ 161 + public function getWorkChatRoomList($search = '', $friend_id = 0){
162 $param = [ 162 $param = [
163 'search' => $search, 163 'search' => $search,
164 'time' => time(), 164 'time' => time(),
165 ]; 165 ];
  166 + if(!$search && $friend_id){
  167 + $param['friend_id'] = $friend_id;
  168 + }
166 $param['sign'] = $this->getSign($param); 169 $param['sign'] = $this->getSign($param);
167 $url = 'https://hub.ai.cc/api/globalso_ai_customer_service/chatroom_list'; 170 $url = 'https://hub.ai.cc/api/globalso_ai_customer_service/chatroom_list';
168 $result = Http::withoutVerifying()->post($url, $param)->json(); 171 $result = Http::withoutVerifying()->post($url, $param)->json();