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
681580bc
Commit
681580bc
authored
Sep 02, 2020
by
郝聪敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 去掉loading、修改神策线上地址
parent
2a40e797
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
prod.config.js
src/config/prod.config.js
+1
-1
http.js
src/service/http.js
+6
-4
No files found.
src/config/prod.config.js
View file @
681580bc
...
@@ -6,6 +6,6 @@ export default {
...
@@ -6,6 +6,6 @@ export default {
basicHost
:
"
https://mangguo.qthbx.com/api/
"
,
basicHost
:
"
https://mangguo.qthbx.com/api/
"
,
sharePath
:
"
https://mangguo.qthbx.com/share.html#
"
,
sharePath
:
"
https://mangguo.qthbx.com/share.html#
"
,
wxAppId
:
"
wx514de17b23d53a20
"
,
wxAppId
:
"
wx514de17b23d53a20
"
,
shenceUrl
:
`
${
protocol
}
//bn.xyqb.com/sa?project=
default
`
,
// 神策数据请求地址
shenceUrl
:
`
${
protocol
}
//bn.xyqb.com/sa?project=
production
`
,
// 神策数据请求地址
test
:
false
test
:
false
};
};
src/service/http.js
View file @
681580bc
//引入axios
//引入axios
import
store
from
"
@/store
"
;
//
import store from "@/store";
import
router
from
"
@/router
"
;
import
router
from
"
@/router
"
;
import
axios
from
"
axios
"
;
import
axios
from
"
axios
"
;
import
cherry
from
"
@qg/cherry-ui
"
;
import
cherry
from
"
@qg/cherry-ui
"
;
...
@@ -31,19 +31,21 @@ axios.defaults.timeout = 30000;
...
@@ -31,19 +31,21 @@ axios.defaults.timeout = 30000;
const
wait
=
async
seconds
=>
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
seconds
));
const
wait
=
async
seconds
=>
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
seconds
));
// 体验优化暂时下掉loading
function
beforeRequest
()
{
function
beforeRequest
()
{
reqNum
++
;
reqNum
++
;
store
.
dispatch
(
"
setIsLoading
"
,
true
);
//
store.dispatch("setIsLoading", true);
}
}
function
afterRequest
()
{
function
afterRequest
()
{
setTimeout
(
clearRequest
,
300
);
clearRequest
();
// setTimeout(clearRequest, 300);
}
}
function
clearRequest
()
{
function
clearRequest
()
{
reqNum
--
;
reqNum
--
;
if
(
reqNum
<=
0
)
{
if
(
reqNum
<=
0
)
{
store
.
dispatch
(
"
setIsLoading
"
,
false
);
//
store.dispatch("setIsLoading", false);
}
}
}
}
...
...
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