hgh преди 1 година
родител
ревизия
479f050616
променени са 1 файла, в които са добавени 9 реда и са изтрити 3 реда
  1. 9 3
      src/components/Auth/RegisterStep.vue

+ 9 - 3
src/components/Auth/RegisterStep.vue

@@ -346,7 +346,9 @@ export default {
         .then(() => {
           this.loading = false
           this.$emit('login-success', { user: 'ali' })
-          this.$router.push({ name: 'Public.Home' })
+          if (this.redirect) {
+            this.$router.push({ name: 'Public.Home' })
+          }
           // this.$store.commit('Auth/updateAccessToken', response.data.token.access_token)
           // this.$store.commit('Auth/setAccessToken', response.data.token.access_token)
           // this.$emit('register')
@@ -423,7 +425,9 @@ export default {
       })
         .then(() => {
           this.loading = false
-          this.$router.push({ name: 'Public.Home' })
+          if (this.redirect) {
+            this.$router.push({ name: 'Public.Home' })
+          }
           // this.setRegisterStep('information')
         })
         .catch(() => {
@@ -446,7 +450,9 @@ export default {
         .then(() => {
           this.loading = false
           this.$emit('login-success', { user: 'ali' })
-          this.$router.push({ name: 'Public.Home' })
+          if (this.redirect) {
+            this.$router.push({ name: 'Public.Home' })
+          }
           // this.setRegisterStep('information')
         })
         .catch(() => {