|
|
@@ -415,7 +415,7 @@
|
|
|
.then(response => {
|
|
|
this.isShowLoading = false
|
|
|
if (response.data.success) {
|
|
|
- if (response.data.content.data) {
|
|
|
+ if (response.data.content.type === 'mall') {
|
|
|
let param = response.data.content.data
|
|
|
let a = ''
|
|
|
for (let n in param) {
|
|
|
@@ -439,9 +439,32 @@
|
|
|
} else {
|
|
|
this.loginOther(response, params, 3000)
|
|
|
}
|
|
|
+ } else if (response.data.content.type === 'city') {
|
|
|
+ let param = response.data.content.data
|
|
|
+ let a = ''
|
|
|
+ for (let n in param) {
|
|
|
+ a += (n + '=' + encodeURIComponent(param[n]) + '&')
|
|
|
+ }
|
|
|
+ let params = a.substr(0, a.length - 1)
|
|
|
+ this.isShowLoading = true
|
|
|
+ if (response.data.content.currentUrl) {
|
|
|
+ this.$jsonp(`${response.data.content.currentUrl}?${params}`, {
|
|
|
+ name: 'successCallback',
|
|
|
+ timeout: 3000
|
|
|
+ }, (err, data) => {
|
|
|
+ if (err) {
|
|
|
+ this.$message.error('注册成功,请点击下方“立即登录”完成登录')
|
|
|
+ this.isShowLoading = false
|
|
|
+ throw err
|
|
|
+ } else {
|
|
|
+ this.loginCityOther(response, params)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.loginCityOther(response, params, 3000)
|
|
|
+ }
|
|
|
} else {
|
|
|
- let userUU = response.data.content.userUU
|
|
|
- window.location.href = `/overRegister/${userUU}`
|
|
|
+ window.location.href = '/overRegister/overEnterprise'
|
|
|
}
|
|
|
} else {
|
|
|
return Promise.reject(response.data)
|
|
|
@@ -550,6 +573,18 @@
|
|
|
}).catch(() => {
|
|
|
crossAfter(returnUrl || 'http://www.ubtob.com', timeout)
|
|
|
})
|
|
|
+ },
|
|
|
+ loginCityOther (response, a, timeout) {
|
|
|
+ const crossAfter = this.crossAfter
|
|
|
+ let promises = []
|
|
|
+ for (let i in response.data.content.loginUrls) {
|
|
|
+ promises.push(this.getJsonp(`${response.data.content.loginUrls[i]}?${a}`))
|
|
|
+ }
|
|
|
+ Promise.all(promises).then(() => {
|
|
|
+ crossAfter('/overRegister/cityRegisterOver/' + this.$store.state.option.fullPath || '/overRegister/cityRegisterOver/' + this.$store.state.option.fullPath, timeout)
|
|
|
+ }).catch(() => {
|
|
|
+ crossAfter('/overRegister/cityRegisterOver/' + this.$store.state.option.fullPath || '/overRegister/cityRegisterOver/' + this.$store.state.option.fullPath, timeout)
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|