|
|
@@ -611,30 +611,31 @@
|
|
|
promises.push(this.getJsonp(`${response.data.content.loginUrls[i]}?${a}`))
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
Promise.all(promises).then(() => {
|
|
|
- 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)
|
|
|
+ this.loginCurrent(response, a)
|
|
|
}).catch(() => {
|
|
|
- this.loginIsSuccess = true
|
|
|
- this.isShowLoading = false
|
|
|
- // crossAfter(response.data.content.returnUrl || 'http://www.ubtob.com', timeout)
|
|
|
+ this.loginCurrent(response, a)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ loginCurrent (response, a) {
|
|
|
+ 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
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
getCheckCode () {
|