Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
feedback
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
王华
feedback
Commits
62293451
Commit
62293451
authored
Apr 12, 2022
by
yzl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- 修改config.json路径问题
parent
ded24a49
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
add.html
add.html
+10
-1
index.html
index.html
+10
-1
No files found.
add.html
View file @
62293451
...
@@ -156,9 +156,18 @@
...
@@ -156,9 +156,18 @@
useEffect
(()
=>
{
useEffect
(()
=>
{
const
getIp
=
()
=>
{
const
getIp
=
()
=>
{
const
url
=
window
.
location
.
pathname
;
let
currentUrl
=
''
;
if
(
url
.
indexOf
(
'index.html'
)
!==
-
1
){
currentUrl
=
url
.
substring
(
0
,
url
.
indexOf
(
'index.html'
));
}
else
{
currentUrl
=
url
;
}
$
.
ajax
({
$
.
ajax
({
type
:
'GET'
,
type
:
'GET'
,
url
:
'.
/config.json'
,
url
:
window
.
location
.
origin
+
currentUrl
+
'
/config.json'
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
setIp
(
data
.
ip
);
setIp
(
data
.
ip
);
...
...
index.html
View file @
62293451
...
@@ -203,9 +203,18 @@
...
@@ -203,9 +203,18 @@
}
}
const
getIp
=
()
=>
{
const
getIp
=
()
=>
{
const
url
=
window
.
location
.
pathname
;
let
currentUrl
=
''
;
if
(
url
.
indexOf
(
'index.html'
)
!==
-
1
){
currentUrl
=
url
.
substring
(
0
,
url
.
indexOf
(
'index.html'
));
}
else
{
currentUrl
=
url
;
}
$
.
ajax
({
$
.
ajax
({
type
:
'GET'
,
type
:
'GET'
,
url
:
'.
/config.json'
,
url
:
window
.
location
.
origin
+
currentUrl
+
'
/config.json'
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
setIp
(
data
.
ip
);
setIp
(
data
.
ip
);
...
...
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