Bläddra i källkod

处理来源注册完成后跳转

wangcz 7 år sedan
förälder
incheckning
de17cb8ad1

+ 5 - 1
components/register/EnterpriseRegistration.vue

@@ -847,7 +847,11 @@
                   }
                 }
               } else {
-                window.location.href = '/overRegister/overEnterprise'
+                let returnUrl = ''
+                if (this.$route.query.returnURL) {
+                  returnUrl = decodeURIComponent(this.$route.query.returnURL)
+                }
+                window.location.href = returnUrl || '/overRegister/overEnterprise'
               }
             } else {
               return Promise.reject(response.data)

+ 5 - 2
components/register/PersonalRegistration.vue

@@ -606,8 +606,11 @@
                   }
                 } else {
                   let userUU = response.data.content.userUU
-                  console.log(userUU)
-                  window.location.href = `/overRegister/${userUU}`
+                  let returnUrl = ''
+                  if (this.$route.query.returnURL) {
+                    returnUrl = decodeURIComponent(this.$route.query.returnURL)
+                  }
+                  window.location.href = returnUrl || `/overRegister/${userUU}`
                 }
               } else {
                 return Promise.reject(response.data)

+ 1 - 1
nuxt.config.js

@@ -1,6 +1,6 @@
 const path = require('path')
 const isProdMode = Object.is(process.env.NODE_ENV, 'production')
-const baseUrl = process.env.BASE_URL || (isProdMode ? 'https://sso.ubtob.com/' : 'http://192.168.253.6:23232/')
+const baseUrl = process.env.BASE_URL || (isProdMode ? 'https://sso.usoftchina.com/' : 'http://10.1.51.92:24004/')
 
 module.exports = {
   router: {