File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
src/components/common/UserAvatar Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 1
1
<script setup lang='ts'>
2
- import { computed , ref } from ' vue'
2
+ import { computed , onMounted , ref } from ' vue'
3
3
import { NAvatar , NButton } from ' naive-ui'
4
+ import { useRoute } from ' vue-router'
4
5
import { useAuthStore , useUserStore } from ' @/store'
5
6
import defaultAvatar from ' @/assets/avatar.jpg'
6
7
import { isString } from ' @/utils/is'
7
8
import Permission from ' @/views/chat/layout/Permission.vue'
8
9
import { useBasicLayout } from ' @/hooks/useBasicLayout'
9
10
11
+ const route = useRoute ()
10
12
const userStore = useUserStore ()
11
13
const authStore = useAuthStore ()
12
14
const { isMobile } = useBasicLayout ()
@@ -15,6 +17,12 @@ const showPermission = ref(false)
15
17
const needPermission = computed (() => !! authStore .session ?.auth && ! authStore .token && (isMobile .value || showPermission .value ))
16
18
17
19
const userInfo = computed (() => userStore .userInfo )
20
+
21
+ onMounted (async () => {
22
+ const sign = route .query .verifyresetpassword as string
23
+ if (sign )
24
+ showPermission .value = true
25
+ })
18
26
</script >
19
27
20
28
<template >
You can’t perform that action at this time.
0 commit comments