Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mongo-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
mongo-ui
Commits
3b068a9a
Commit
3b068a9a
authored
Aug 18, 2020
by
郭志伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: 联调暴露全局变量
parent
6d3f0cd3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
index.html
public/index.html
+2
-0
http.js
src/service/http.js
+3
-2
No files found.
public/index.html
View file @
3b068a9a
...
...
@@ -26,6 +26,8 @@
});
}
})();
// ! 上线需要删掉
var
baseUrl
=
""
;
</script>
</head>
<body>
...
...
src/service/http.js
View file @
3b068a9a
...
...
@@ -25,7 +25,6 @@ const { Notify } = cherry;
const
CancelToken
=
axios
.
CancelToken
;
let
pending
=
{};
let
reqNum
=
0
;
axios
.
defaults
.
baseURL
=
config
.
basicHost
;
axios
.
defaults
.
timeout
=
30000
;
...
...
@@ -55,7 +54,9 @@ axios.interceptors.request.use(
pending
[
config
.
url
](
"
取消重复请求
"
);
}
config
.
cancelToken
=
new
CancelToken
(
c
=>
(
pending
[
config
.
url
]
=
c
));
// ! 上线需要删掉
// eslint-disable-next-line
config
.
baseURL
=
baseUrl
||
config
.
baseURL
;
// 添加token
const
token
=
localStorage
.
get
(
"
mongoToken
"
);
if
(
token
)
{
...
...
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