Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
npm
/
glsk-toolkit
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit dd898f2a
authored
Sep 17, 2025
by
liimin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
refactor(adapter): 优化URL构建逻辑,合并查询字符串处理
1 parent
8a5497cc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
2 deletions
src/adapter/utils.ts
src/adapter/utils.ts
View file @
dd898f2
...
...
@@ -21,8 +21,7 @@ export function buildURL(baseURL: string = '', url: string = '', params: Record<
const
queryParts
=
processedParams
.
map
(({
key
,
value
})
=>
`
${
encodeURIComponent
(
key
)}
=
${
encodeURIComponent
(
value
)}
`
);
const
queryString
=
queryParts
.
join
(
'&'
);
fullURL
+=
(
fullURL
.
includes
(
'?'
)
?
'&'
:
'?'
)
+
queryString
;
fullURL
+=
(
fullURL
.
includes
(
'?'
)
?
'&'
:
'?'
)
+
queryParts
.
join
(
'&'
);
}
return
fullURL
;
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment