Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
loveisland
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘小敏
loveisland
Commits
9a12d2fd
Commit
9a12d2fd
authored
Jul 22, 2026
by
刘小敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug xhs
parent
4eab16dc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
ConversionService.php
addons/shopro/service/xhs/ConversionService.php
+6
-3
No files found.
addons/shopro/service/xhs/ConversionService.php
View file @
9a12d2fd
...
...
@@ -441,6 +441,9 @@ class ConversionService
private
function
httpPostJson
(
$url
,
$data
,
$headers
=
[])
{
try
{
custom_log
(
'[xhs.api666] 接口入参 url :'
.
$url
.
' | body:'
.
json_encode
(
$data
)
.
' | headers:'
.
json_encode
(
$headers
),
0
,
'xhs_ad'
);
$ch
=
curl_init
();
curl_setopt
(
$ch
,
CURLOPT_URL
,
$url
);
curl_setopt
(
$ch
,
CURLOPT_POST
,
true
);
...
...
@@ -456,17 +459,17 @@ class ConversionService
curl_close
(
$ch
);
if
(
$error
)
{
custom_log
(
'[xhs.api
] curl error: '
.
$error
,
0
,
'xhs_ad'
,
'error
'
);
custom_log
(
'[xhs.api
666] curl error: '
.
$error
,
0
,
'xhs_ad
'
);
return
null
;
}
if
(
$httpCode
!=
200
)
{
custom_log
(
'[xhs.api
] http error: '
.
$httpCode
.
', body='
.
substr
(
$result
,
0
,
500
),
0
,
'xhs_ad'
,
'error
'
);
custom_log
(
'[xhs.api
666] http error: '
.
$httpCode
.
', body='
.
substr
(
$result
,
0
,
500
),
0
,
'xhs_ad
'
);
}
return
json_decode
(
$result
,
true
)
?:
null
;
}
catch
(
\Exception
$e
)
{
custom_log
(
'[xhs.api
] POST JSON 请求异常: '
.
$e
->
getMessage
(),
0
,
'xhs_ad'
,
'error
'
);
custom_log
(
'[xhs.api
666] POST JSON 请求异常: '
.
$e
->
getMessage
(),
0
,
'xhs_ad
'
);
return
null
;
}
}
...
...
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