Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
fj-captcha-service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
郑磊
fj-captcha-service
Commits
892d13f0
Commit
892d13f0
authored
May 20, 2024
by
郑磊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
直播app使用的扩展参数
parent
b62800d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletion
+20
-1
App.vue
web/src/live/App.vue
+20
-1
No files found.
web/src/live/App.vue
View file @
892d13f0
...
...
@@ -7,12 +7,30 @@ const requestCaptchaDataUrl = import.meta.env.VITE_REQUEST_CAPTCHA_URL
const
validCaptchaUrl
=
import
.
meta
.
env
.
VITE_VALID_CAPTCHA_URL
//通过URL上的参数解析验证码组件的参数
const
{
locale
}
=
(()
=>
{
const
{
locale
,
extra
}
=
(()
=>
{
const
url
=
new
URL
(
location
.
href
)
const
locale
=
url
.
searchParams
.
get
(
'lang'
)
??
undefined
const
extra
=
(()
=>
{
const
json
=
url
.
searchParams
.
get
(
'extra'
)
if
(
json
)
{
try
{
const
extra
=
JSON
.
parse
(
json
)
if
(
typeof
extra
===
'object'
&&
extra
!==
null
&&
!
Array
.
isArray
(
extra
)
)
{
return
extra
}
}
catch
{}
return
{}
}
})()
return
{
locale
,
extra
,
}
})()
...
...
@@ -33,6 +51,7 @@ const onSuccess = (id: string) => {
:validCaptchaUrl=
"validCaptchaUrl"
:showClose=
"false"
:locale=
"locale"
:extra=
"extra"
@
success=
"onSuccess"
/>
</
template
>
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