作者 何书鹏
1 个管道 的构建 通过 耗费 0 秒

im设置资料优化

... ... @@ -152,7 +152,16 @@ class Tim extends Controller
];
$client = new Client();
$response = $client->request('POST',$url,['json'=>$data]);
return json_decode($response->getBody()->getContents(),true);
$res = json_decode($response->getBody()->getContents(),true);
if(!isset($res['ErrorCode'])){
$this->setError('设置资料失败');
return false;
}
if($res['ErrorCode'] != 0){
$this->setError($res['ErrorInfo']);
return false;
}
return true;
}
/**
... ...