|
|
@@ -607,20 +607,29 @@
|
|
|
// const crossAfter = this.crossAfter
|
|
|
let promises = []
|
|
|
for (let i in response.data.content.loginUrls) {
|
|
|
- if (response.data.content.currentUrl === response.data.content.loginUrls[i]) {
|
|
|
- let baseContent = response.data.content.currentUrl
|
|
|
- let flag = '?'
|
|
|
- if (baseContent.indexOf('?') !== -1) {
|
|
|
- flag = '&'
|
|
|
- }
|
|
|
- promises.push(this.getJsonp(`${response.data.content.loginUrls[i]}${flag}${a}`))
|
|
|
- } else {
|
|
|
+ if (response.data.content.currentUrl !== response.data.content.loginUrls[i]) {
|
|
|
promises.push(this.getJsonp(`${response.data.content.loginUrls[i]}?${a}`))
|
|
|
}
|
|
|
}
|
|
|
Promise.all(promises).then(() => {
|
|
|
- this.loginIsSuccess = true
|
|
|
- this.isShowLoading = false
|
|
|
+ let baseContent = response.data.content.currentUrl
|
|
|
+ let flag = '?'
|
|
|
+ if (baseContent.indexOf('?') !== -1) {
|
|
|
+ flag = '&'
|
|
|
+ }
|
|
|
+ this.$jsonp(`${response.data.content.currentUrl}${flag}${a}`, {
|
|
|
+ name: 'successCallback',
|
|
|
+ timeout: 3000
|
|
|
+ }, (err, data) => {
|
|
|
+ if (err) {
|
|
|
+ this.$message.error('登录超时,请重试')
|
|
|
+ this.isShowLoading = false
|
|
|
+ throw err
|
|
|
+ } else {
|
|
|
+ this.loginIsSuccess = true
|
|
|
+ this.isShowLoading = false
|
|
|
+ }
|
|
|
+ })
|
|
|
// crossAfter(response.data.content.returnUrl || 'http://www.ubtob.com', timeout)
|
|
|
}).catch(() => {
|
|
|
this.loginIsSuccess = true
|