@@ -347,7 +347,7 @@
width: 476px;
top: 50%;
left: 50%;
- margin-top: -325px;
+ margin-top: -162px;
margin-left: -238px;
overflow-y: auto;
/*-webkit-box-shadow: 0 5px 15px rgba(0,0,0,.5);*/
@@ -65,8 +65,15 @@ service.interceptors.response.use(response => {
}
return response
}, error => {
- if (--reqCount <= 0 && !process.server) {
- document.getElementById('loading').setAttribute('class', 'loading')
+ if (!process.server) {
+ if (--reqCount <= 0) {
+ document.getElementById('loading').setAttribute('class', 'loading')
+ }
+ // 401拦截
+ if (error.response.status === 401 && !/\/store-service\/stores$/g.test(error.response.config.url)) {
+ window.location.href = `/auth/login?returnUrl=${window.location.href}`
+ return
return Promise.reject(error)
})