|
|
@@ -439,64 +439,7 @@
|
|
|
.then(response => {
|
|
|
this.isShowLoading = false
|
|
|
if (response.data.success) {
|
|
|
- if (response.data.content.type) {
|
|
|
- if (response.data.content.type === 'mall') {
|
|
|
- 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.loginOther(response, params)
|
|
|
- }
|
|
|
- })
|
|
|
- } 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
|
|
|
- let returnUrl = ''
|
|
|
- if (this.$route.query.returnURL) {
|
|
|
- returnUrl = decodeURIComponent(this.$route.query.returnURL)
|
|
|
- }
|
|
|
- window.location.href = returnUrl || `/overRegister/${userUU}`
|
|
|
- }
|
|
|
+ this.loginStepOther(response)
|
|
|
} else {
|
|
|
return Promise.reject(response.data)
|
|
|
}
|
|
|
@@ -557,64 +500,14 @@
|
|
|
.then(response => {
|
|
|
this.isShowLoading = false
|
|
|
if (response.data.success) {
|
|
|
- if (response.data.content.type) {
|
|
|
- if (response.data.content.type === 'mall') {
|
|
|
- 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.loginOther(response, params)
|
|
|
- }
|
|
|
- })
|
|
|
- } 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
|
|
|
- let returnUrl = ''
|
|
|
- if (this.$route.query.returnURL) {
|
|
|
- returnUrl = decodeURIComponent(this.$route.query.returnURL)
|
|
|
- }
|
|
|
- window.location.href = returnUrl || `/overRegister/${userUU}`
|
|
|
- }
|
|
|
+ this.$message({
|
|
|
+ message: '注册成功。登陆密码已发送至您的手机,请妥善保管!',
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ let _this = this
|
|
|
+ setTimeout(function () {
|
|
|
+ _this.loginStepOther(response)
|
|
|
+ }, 5000)
|
|
|
} else {
|
|
|
return Promise.reject(response.data)
|
|
|
}
|
|
|
@@ -715,9 +608,44 @@
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
- crossAfter (url) {
|
|
|
+ loginStepOther (response) {
|
|
|
+ if (response.data.content.type) {
|
|
|
+ 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 {
|
|
|
+ response.data.content.type === 'city' ? this.loginCityOther(response, params) : this.loginOther(response, params)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ response.data.content.type === 'city' ? this.loginCityOther(response, params, 5000) : this.loginOther(response, params, 5000)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ window.location.href = `https://www.usoftchina.com/`
|
|
|
+ }
|
|
|
+ },
|
|
|
+ crossAfter (url, time) {
|
|
|
try {
|
|
|
- window.location.href = url
|
|
|
+ if (time) {
|
|
|
+ setTimeout(function () {
|
|
|
+ window.location.href = url
|
|
|
+ }, time)
|
|
|
+ } else {
|
|
|
+ window.location.href = url
|
|
|
+ }
|
|
|
} catch (err) {
|
|
|
console.log(err)
|
|
|
}
|
|
|
@@ -730,11 +658,11 @@
|
|
|
promises.push(this.getJsonp(`${response.data.content.loginUrls[i]}?${a}`))
|
|
|
}
|
|
|
}
|
|
|
- let returnUrl = decodeURIComponent(this.$route.query.returnURL)
|
|
|
+ let returnUrl = this.$route.query.returnURL ? decodeURIComponent(this.$route.query.returnURL) : 'https://www.usoftchina.com/'
|
|
|
Promise.all(promises).then(() => {
|
|
|
- crossAfter(returnUrl || 'http://www.ubtob.com', timeout)
|
|
|
+ crossAfter(returnUrl, timeout)
|
|
|
}).catch(() => {
|
|
|
- crossAfter(returnUrl || 'http://www.ubtob.com', timeout)
|
|
|
+ crossAfter(returnUrl, timeout)
|
|
|
})
|
|
|
},
|
|
|
loginCityOther (response, a, timeout) {
|