diff --git a/src/components/modal/auth/VerifyCode.vue b/src/components/modal/auth/VerifyCode.vue index eac8e9c..2bac842 100644 --- a/src/components/modal/auth/VerifyCode.vue +++ b/src/components/modal/auth/VerifyCode.vue @@ -12,7 +12,7 @@ v-model="form.code" label="Verify Code Number" color="black" - > + /> @@ -40,9 +40,7 @@ export default { }; }, methods: { - ...mapActions('auth', [ - 'verifyCodeSMS' - ]), + ...mapActions('auth', ['verifyCodeSMS']), submitVerifyCode() { if (this.form.code != '') { this.verifyCodeSMS({form: this.form}); diff --git a/src/store/modules/auth/actions.js b/src/store/modules/auth/actions.js index c866251..c02151a 100644 --- a/src/store/modules/auth/actions.js +++ b/src/store/modules/auth/actions.js @@ -50,7 +50,11 @@ export default { var response = await ApiService.post(urls.changePassword, form); if(response && response.status == 200 ) { commit('modal/closeModal', {}, {root: true}); - router.push({ name: `Dashboard` }); + // router.push({ name: `Dashboard` }); + const redirectPath = router.history.current.query.redirect || '/'; + if (router.currentRoute.path !== redirectPath) { + router.push(redirectPath); + } } },