mirror of
https://git.meshkee.com/cssd/cssd-front.git
synced 2026-10-10 19:23:38 +03:30
fix : redirect after change password
This commit is contained in:
@@ -12,7 +12,7 @@
|
|||||||
v-model="form.code"
|
v-model="form.code"
|
||||||
label="Verify Code Number"
|
label="Verify Code Number"
|
||||||
color="black"
|
color="black"
|
||||||
></v-text-field>
|
/>
|
||||||
</v-flex>
|
</v-flex>
|
||||||
</v-layout>
|
</v-layout>
|
||||||
<v-layout row wrap class="px-3">
|
<v-layout row wrap class="px-3">
|
||||||
@@ -40,9 +40,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions('auth', [
|
...mapActions('auth', ['verifyCodeSMS']),
|
||||||
'verifyCodeSMS'
|
|
||||||
]),
|
|
||||||
submitVerifyCode() {
|
submitVerifyCode() {
|
||||||
if (this.form.code != '') {
|
if (this.form.code != '') {
|
||||||
this.verifyCodeSMS({form: this.form});
|
this.verifyCodeSMS({form: this.form});
|
||||||
|
|||||||
@@ -50,7 +50,11 @@ export default {
|
|||||||
var response = await ApiService.post(urls.changePassword, form);
|
var response = await ApiService.post(urls.changePassword, form);
|
||||||
if(response && response.status == 200 ) {
|
if(response && response.status == 200 ) {
|
||||||
commit('modal/closeModal', {}, {root: true});
|
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