Commit 1c56538a by 杨树贤

fix

parent edd88c24
Showing with 8 additions and 13 deletions
...@@ -168,6 +168,6 @@ IMAGE_SERVER_URL=http://image.liexindev.net ...@@ -168,6 +168,6 @@ IMAGE_SERVER_URL=http://image.liexindev.net
FILE_SERVER_URL=http://file.liexindev.net FILE_SERVER_URL=http://file.liexindev.net
CRM_URL=http://crmnew.liexindev.net CRM_URL=http://crmnew_v4.liexindev.net
CUBE_URL=http://cube.liexindev.net CUBE_URL=http://cube.liexindev.net
...@@ -17,20 +17,15 @@ class CrmService ...@@ -17,20 +17,15 @@ class CrmService
return json_decode($cachedData, true); return json_decode($cachedData, true);
} }
try { $url = env('CRM_URL') . '/open/signComs/getSignComs?use_scope=2';
$url = env('CRM_URL') . '/open/signComs/getSignComs?use_scope=2'; $client = new Client();
$client = new Client(); $response = $client->get($url);
$response = $client->get($url); $result = json_decode($response->getBody()->getContents(), true);
$result = json_decode($response->getBody()->getContents(), true); if ($result['code'] != 0) {
if ($result['code'] != 0) {
return [];
}
(new RedisModel())->setex($cacheKey, 60, json_encode($result['data']['list']));
return $result['data']['list'];
} catch (\Exception $e) {
return []; return [];
} }
(new RedisModel())->setex($cacheKey, 60, json_encode($result['data']['list']));
return $result['data']['list'];
} }
//获取简单形式给各个地方使用 //获取简单形式给各个地方使用
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment