|
|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div class="go-register register">
|
|
|
<div class="container">
|
|
|
- <div class="content">
|
|
|
+ <div class="content" v-if="isSuccess">
|
|
|
<div class="content-top">
|
|
|
<h3>注册</h3>
|
|
|
</div>
|
|
|
@@ -47,6 +47,12 @@
|
|
|
</el-form>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="content" v-else>
|
|
|
+ <div class="register-success">
|
|
|
+ <i class="iconfont icon-zhucechenggong1"></i>
|
|
|
+ <p>注册成功</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div class="login">已有账号?<a :href="returnLogin">立即登录</a></div>
|
|
|
<loading v-show="isShowLoading"/>
|
|
|
</div>
|
|
|
@@ -190,6 +196,7 @@
|
|
|
}
|
|
|
}
|
|
|
return {
|
|
|
+ isSuccess: true,
|
|
|
speediness: false,
|
|
|
ImgCode: '',
|
|
|
item: {
|
|
|
@@ -263,8 +270,9 @@
|
|
|
checkboxChecked () {
|
|
|
this.checked = !this.checked
|
|
|
},
|
|
|
- // 快速登录
|
|
|
+ // 快速注册
|
|
|
waySubmit () {
|
|
|
+ console.log(this.$route.params.baseUrl)
|
|
|
if (this.mobileChecked && this.codeChecked && this.checked) {
|
|
|
this.isShowLoading = true
|
|
|
let param = new FormData()
|
|
|
@@ -286,61 +294,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)
|
|
|
}
|
|
|
@@ -424,62 +380,43 @@
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
- },
|
|
|
- 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(() => {
|
|
|
- crossAfter(returnUrl || 'http://www.ubtob.com', timeout)
|
|
|
- }).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) {
|
|
|
- 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>
|
|
|
- .register {
|
|
|
+ .go-register.register {
|
|
|
+ position: relative;
|
|
|
+ bottom: -18px;
|
|
|
margin: 0 auto;
|
|
|
width: 100%;
|
|
|
background: #eee;
|
|
|
.container{
|
|
|
- padding-top: 50px;
|
|
|
+ padding-top: 38px!important;
|
|
|
margin: 0 auto;
|
|
|
width: 980px;
|
|
|
text-align: center;
|
|
|
background: #fff;
|
|
|
+ box-shadow: none!important;
|
|
|
.content{
|
|
|
padding: 0 50px;
|
|
|
margin: 50px auto 0;
|
|
|
width: 100%;
|
|
|
text-align: center;
|
|
|
+ .register-success {
|
|
|
+ padding-top: 40px;
|
|
|
+ width: 100%;
|
|
|
+ height: 380px;
|
|
|
+ i.icon-zhucechenggong1{
|
|
|
+ font-size: 148px;
|
|
|
+ color: #00BB00;
|
|
|
+ }
|
|
|
+ p{
|
|
|
+ margin-top: 20px;
|
|
|
+ font-size: 28px;
|
|
|
+ color: #333;
|
|
|
+ }
|
|
|
+ }
|
|
|
.content-top{
|
|
|
position: relative;
|
|
|
height: 80px;
|