Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
fcc77d13
Commit
fcc77d13
authored
Mar 01, 2026
by
erio
Browse files
refactor(purchase): use URL/searchParams only for purchase query merge
parent
997cd1e3
Changes
1
Show whitespace changes
Inline
Side-by-side
frontend/src/views/user/PurchaseSubscriptionView.vue
View file @
fcc77d13
...
...
@@ -117,17 +117,7 @@ function buildPurchaseUrl(
url
.
searchParams
.
set
(
PURCHASE_UI_MODE_QUERY_KEY
,
PURCHASE_UI_MODE_EMBEDDED
)
return
url
.
toString
()
}
catch
{
const
params
:
string
[]
=
[]
if
(
userId
)
{
params
.
push
(
`
${
PURCHASE_USER_ID_QUERY_KEY
}
=
${
encodeURIComponent
(
String
(
userId
))}
`
)
}
if
(
authToken
)
{
params
.
push
(
`
${
PURCHASE_AUTH_TOKEN_QUERY_KEY
}
=
${
encodeURIComponent
(
authToken
)}
`
)
}
params
.
push
(
`
${
PURCHASE_THEME_QUERY_KEY
}
=
${
encodeURIComponent
(
theme
)}
`
)
params
.
push
(
`
${
PURCHASE_UI_MODE_QUERY_KEY
}
=
${
encodeURIComponent
(
PURCHASE_UI_MODE_EMBEDDED
)}
`
)
const
separator
=
baseUrl
.
includes
(
'
?
'
)
?
'
&
'
:
'
?
'
return
`
${
baseUrl
}${
separator
}${
params
.
join
(
'
&
'
)}
`
return
baseUrl
}
}
...
...
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