|
|
@@ -1,13 +1,7 @@
|
|
|
-
|
|
|
-export default function ({ isServer, store, req, redirect }) {
|
|
|
+export default function ({ isServer, store, req, redirect, route }) {
|
|
|
// If nuxt generate, pass this middleware
|
|
|
if (isServer && !req) return
|
|
|
-
|
|
|
if (!store.state.option.user.logged) {
|
|
|
- this.$http.get('/logout/crossBefore').then(response => {
|
|
|
- if (response.data) {
|
|
|
- window.location.href = response.data.logoutUrl + encodeURIComponent(window.location.protocol + '//' + window.location.host + response.data.baseUrl)
|
|
|
- }
|
|
|
- })
|
|
|
+ return redirect('/auth/login')
|
|
|
}
|
|
|
}
|