重构用户面板组件,更新删除账号对话框警告信息,优化用户身份验证逻辑
This commit is contained in:
parent
e078a1df93
commit
f66f8a61d7
@ -14,15 +14,15 @@
|
|||||||
</v-sheet>
|
</v-sheet>
|
||||||
</v-carousel-item>
|
</v-carousel-item>
|
||||||
</v-carousel></v-sheet>
|
</v-carousel></v-sheet>
|
||||||
<UserInfo v-else></UserInfo>
|
<UserPanel v-else></UserPanel>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useAuthStore } from '@/store/auth';
|
import { useAuthStore } from '@/store/auth';
|
||||||
import LoginForm from './LoginForm.vue';
|
import LoginForm from './users/LoginForm.vue';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import RegisterForm from './RegisterForm.vue';
|
import RegisterForm from './users/RegisterForm.vue';
|
||||||
import UserInfo from './UserPanel.vue';
|
import UserPanel from './users/UserPanel.vue';
|
||||||
|
|
||||||
const loginMode = ref(0);
|
const loginMode = ref(0);
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
删除账号
|
删除账号
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:subtitle>
|
<template v-slot:subtitle>
|
||||||
<span style="color: red;">警告!您正在进行很危险的事情!</span>
|
<span style="color: red;">警告!不可逆操作!您正在进行很危险的事情!</span>
|
||||||
</template>
|
</template>
|
||||||
<v-card-text>
|
<v-card-text>
|
||||||
<v-row dense>
|
<v-row dense>
|
||||||
|
@ -75,7 +75,7 @@ const authStore = useAuthStore();
|
|||||||
const token = ref(authStore.token);
|
const token = ref(authStore.token);
|
||||||
|
|
||||||
const userId = computed(() => {
|
const userId = computed(() => {
|
||||||
if (authStore.isAuthenticated) {
|
if (token.value != '') {
|
||||||
let data: KqmJwt = jwtDecode(token.value);
|
let data: KqmJwt = jwtDecode(token.value);
|
||||||
return data.user_id;
|
return data.user_id;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user