|
|
@@ -31,7 +31,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-checkbox name="type" v-model="checked" @click="checkboxIsChecked"></el-checkbox>
|
|
|
- <span class="agree">我已阅读并同意 <a href="/common/agreement">《JSON.parse(loginStyle.terms).name》</a></span>
|
|
|
+ <span class="agree">我已阅读并同意 <a href="/common/agreement">《优软云服务条款》</a></span>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
@@ -102,7 +102,7 @@
|
|
|
|
|
|
<el-form-item>
|
|
|
<el-checkbox name="type" v-model="checked" @click="checkboxIsChecked"></el-checkbox>
|
|
|
- <span class="agree">我已阅读并同意 <a href="/common/agreement">《JSON.parse(loginStyle.terms).name》</a></span>
|
|
|
+ <span class="agree">我已阅读并同意 <a href="/common/agreement">《优软云服务条款》</a></span>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
@@ -547,7 +547,6 @@
|
|
|
},
|
|
|
computed: {
|
|
|
loginStyle () {
|
|
|
- console.log('44444', this.$store.state.login.loginStyle.data)
|
|
|
return this.$store.state.login.loginStyle.data.content
|
|
|
}
|
|
|
},
|
|
|
@@ -760,7 +759,34 @@
|
|
|
.then(response => {
|
|
|
this.isShowLoading = false
|
|
|
if (response.data.success) {
|
|
|
- window.location.href = '/overRegister/overEnterprise'
|
|
|
+ if (response.data.content) {
|
|
|
+ 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 {
|
|
|
+ window.location.href = '/overRegister/overEnterprise'
|
|
|
+ }
|
|
|
+ console.log('response.data', response.data)
|
|
|
} else {
|
|
|
return Promise.reject(response.data)
|
|
|
}
|
|
|
@@ -768,6 +794,41 @@
|
|
|
this.isShowLoading = false
|
|
|
this.$message.error(err.errMsg)
|
|
|
})
|
|
|
+ },
|
|
|
+ getJsonp: function (url, timeout = 500) {
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+ this.$jsonp(url, {
|
|
|
+ name: 'successCallback',
|
|
|
+ timeout: timeout
|
|
|
+ }, function (err, data) {
|
|
|
+ if (err) {
|
|
|
+ reject(err)
|
|
|
+ throw err
|
|
|
+ } else {
|
|
|
+ resolve(data)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ 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) {
|
|
|
+ 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)
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|