|
|
@@ -235,6 +235,7 @@
|
|
|
this.$nextTick(() => {
|
|
|
this.getUrl()
|
|
|
this.getCode()
|
|
|
+ console.log(decodeURIComponent(this.$route.query.baseUrl))
|
|
|
})
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -272,6 +273,7 @@
|
|
|
},
|
|
|
// 快速注册
|
|
|
waySubmit () {
|
|
|
+ console.log(this.$route.params.baseUrl)
|
|
|
if (this.mobileChecked && this.codeChecked && this.checked) {
|
|
|
this.isShowLoading = true
|
|
|
let param = new FormData()
|
|
|
@@ -293,61 +295,9 @@
|
|
|
.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
|
|
|
- console.log(userUU)
|
|
|
- window.location.href = `/overRegister/${userUU}`
|
|
|
- }
|
|
|
+ this.isSuccess = false
|
|
|
+ this.isShowLoading = false
|
|
|
+ this.getJsonp(decodeURIComponent(this.$route.query.baseUrl))
|
|
|
} else {
|
|
|
return Promise.reject(response.data)
|
|
|
}
|
|
|
@@ -431,52 +381,14 @@
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
- },
|
|
|
- // crossAfter (url) {
|
|
|
- // try {
|
|
|
- // window.location.href = url
|
|
|
- // } catch (err) {
|
|
|
- // console.log(err)
|
|
|
- // }
|
|
|
- // },
|
|
|
- loginOther (response, a, timeout) {
|
|
|
- // const crossAfter = this.crossAfter
|
|
|
- let promises = []
|
|
|
- for (let i in response.data.content.loginUrls) {
|
|
|
- if (response.data.content.currentUrl !== response.data.content.loginUrls[i]) {
|
|
|
- promises.push(this.getJsonp(`${response.data.content.loginUrls[i]}?${a}`))
|
|
|
- }
|
|
|
- }
|
|
|
- // let returnUrl = decodeURIComponent(this.$route.query.returnURL)
|
|
|
- Promise.all(promises).then(() => {
|
|
|
- this.isSuccess = false
|
|
|
- this.isShowLoading = false
|
|
|
- // crossAfter(returnUrl || 'http://www.ubtob.com', timeout)
|
|
|
- }).catch(() => {
|
|
|
- this.isSuccess = false
|
|
|
- this.isShowLoading = false
|
|
|
- // 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) {
|
|
|
- if (response.data.content.currentUrl !== response.data.content.loginUrls[i]) {
|
|
|
- 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)
|
|
|
- })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
.go-register {
|
|
|
+ position: relative;
|
|
|
+ bottom: -50px;
|
|
|
margin: 0 auto;
|
|
|
width: 100%;
|
|
|
background: #eee;
|