mirror of
https://git.meshkee.com/cssd/cssd-front.git
synced 2026-10-10 19:03:19 +03:30
fix : redirect after change password
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
v-model="form.code"
|
||||
label="Verify Code Number"
|
||||
color="black"
|
||||
></v-text-field>
|
||||
/>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row wrap class="px-3">
|
||||
@@ -40,9 +40,7 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
...mapActions('auth', [
|
||||
'verifyCodeSMS'
|
||||
]),
|
||||
...mapActions('auth', ['verifyCodeSMS']),
|
||||
submitVerifyCode() {
|
||||
if (this.form.code != '') {
|
||||
this.verifyCodeSMS({form: this.form});
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user