Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
liexin_supplier
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
0a5b65ab
authored
Mar 11, 2025
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
兼容try
parent
f502f700
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
app/Http/Services/CrmService.php
app/Http/Services/CrmService.php
View file @
0a5b65ab
...
...
@@ -17,16 +17,20 @@ class CrmService
return
json_decode
(
$cachedData
,
true
);
}
$url
=
env
(
'CRM_URL'
)
.
'/open/signComs/getSignComs?use_scope=2'
;
$client
=
new
Client
();
$response
=
$client
->
get
(
$url
);
$result
=
json_decode
(
$response
->
getBody
()
->
getContents
(),
true
);
if
(
$result
[
'code'
]
!=
0
)
{
try
{
$url
=
env
(
'CRM_URL'
)
.
'/open/signComs/getSignComs?use_scope=2'
;
$client
=
new
Client
();
$response
=
$client
->
get
(
$url
);
$result
=
json_decode
(
$response
->
getBody
()
->
getContents
(),
true
);
if
(
$result
[
'code'
]
!=
0
)
{
return
[];
}
(
new
RedisModel
())
->
setex
(
$cacheKey
,
60
,
json_encode
(
$result
[
'data'
][
'list'
]));
return
$result
[
'data'
][
'list'
];
}
catch
(
\Exception
$e
)
{
return
[];
}
(
new
RedisModel
())
->
setex
(
$cacheKey
,
60
,
json_encode
(
$result
[
'data'
][
'list'
]));
return
$result
[
'data'
][
'list'
];
}
//获取简单形式给各个地方使用
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment