Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
0bb04413
Commit
0bb04413
authored
Apr 17, 2018
by
Junling Bu
Browse files
update[litemall-admin]: 访问存储服务超时时,显示警告信息,可能是存储服务没有启动。
parent
14e000ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
litemall-admin/src/api/storage.js
View file @
0bb04413
import
axios
from
'
axios
'
import
{
Message
}
from
'
element-ui
'
// create an axios instance
const
service
=
axios
.
create
({
...
...
@@ -6,6 +7,20 @@ const service = axios.create({
timeout
:
5000
// request timeout
})
// respone interceptor
service
.
interceptors
.
response
.
use
(
response
=>
{
return
response
},
error
=>
{
console
.
log
(
'
err
'
+
error
)
// for debug
Message
({
message
:
'
对象存储服务访问超时,请检查链接是否能够访问。
'
,
type
:
'
error
'
,
duration
:
5
*
1000
})
return
Promise
.
reject
(
error
)
})
export
function
listStorage
(
query
)
{
return
service
({
url
:
'
/storage/list
'
,
...
...
Write
Preview
Supports
Markdown
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