修改密码重载

This commit is contained in:
miao 2022-12-02 10:05:25 +08:00
parent c9439b7e78
commit 56edac496e
1 changed files with 8 additions and 2 deletions

View File

@ -1024,7 +1024,7 @@
<q-tab-panel name="user" class="_panel"> <q-tab-panel name="user" class="_panel">
<q-card class="fit"> <q-card class="fit">
<q-card-section> <q-card-section>
<q-form ref="user_form" @submit="applyUser"> <q-form ref="user_form" @submit="applyUser()">
<q-list> <q-list>
<q-item class="q-pa-none"> <q-item class="q-pa-none">
<q-item-section avatar class="width_5_1">{{ <q-item-section avatar class="width_5_1">{{
@ -1343,7 +1343,7 @@
<script lang="ts"> <script lang="ts">
import { defineComponent, ref, Ref, watch, computed } from "vue"; import { defineComponent, ref, Ref, watch, computed } from "vue";
import { useStore } from "src/store"; import { useStore } from "src/store";
import { useQuasar, SessionStorage } from "quasar"; import { useQuasar, SessionStorage, Cookies } from "quasar";
import TimingTaskDialog from "src/components/TimingTaskDialog.vue"; import TimingTaskDialog from "src/components/TimingTaskDialog.vue";
@ -1986,6 +1986,12 @@ export default defineComponent({
if (new_pwd != old_pwd) { if (new_pwd != old_pwd) {
GlobalData.getInstance().getCurrentClient()?.setPassword(new_pwd); GlobalData.getInstance().getCurrentClient()?.setPassword(new_pwd);
Cookies.remove("auto_login");
SessionStorage.clear();
try {
$q.fullscreen.exit();
} catch {}
window.location.reload();
} }
success = true; success = true;
} else { } else {