Explorar o código

退出增加延时

hangb %!s(int64=7) %!d(string=hai) anos
pai
achega
221263282f
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      pages/logquit/index.vue

+ 3 - 1
pages/logquit/index.vue

@@ -23,7 +23,6 @@
         this.$http.get('/sso/login/logout', {params: this.$route.query})
           .then(response => {
             if (response.data.success) {
-              window.location.href = `${response.data.content.returnURL}`
               for (let i = 0; i < response.data.content.logoutUrls.length; i++) {
                 if (response.data.content.logoutUrls[i]) {
                   this.$jsonp(`${response.data.content.logoutUrls[i]}`, function (err) {
@@ -31,6 +30,9 @@
                   })
                 }
               }
+              setTimeout(function () {
+                window.location.href = `${response.data.content.returnURL}`
+              }, 1000)
             }
           })
       }