Browse Source

登录延时问题

hangb 7 years ago
parent
commit
1329f4be5c
1 changed files with 5 additions and 2 deletions
  1. 5 2
      components/login/Login.vue

+ 5 - 2
components/login/Login.vue

@@ -330,10 +330,13 @@
                   for (let n in param) {
                     a += (n + '=' + param[n] + '&')
                   }
+                  let countLink = 0
                   for (let i in response.data.content.loginUrls) {
                     this.$jsonp(`${response.data.content.loginUrls[i]}?` + a.substr(0, a.length - 1), function (err, data) {
-                      if (err) throw err
-                      console.log(data)
+                      if ((++countLink) === response.data.content.loginUrls.length) {
+                        window.location.href = response.data.content.returnUrl || 'http://www.ubtob.com'
+                      }
+                      console.log(err)
                     })
                   }
                   this.isShowLoading = true