Skip to content

Commit 6430a0b

Browse files
author
Kerwin
committed
fix: reset password show modal (Close #83)
1 parent fcf476d commit 6430a0b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/components/common/UserAvatar/index.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
<script setup lang='ts'>
2-
import { computed, ref } from 'vue'
2+
import { computed, onMounted, ref } from 'vue'
33
import { NAvatar, NButton } from 'naive-ui'
4+
import { useRoute } from 'vue-router'
45
import { useAuthStore, useUserStore } from '@/store'
56
import defaultAvatar from '@/assets/avatar.jpg'
67
import { isString } from '@/utils/is'
78
import Permission from '@/views/chat/layout/Permission.vue'
89
import { useBasicLayout } from '@/hooks/useBasicLayout'
910
11+
const route = useRoute()
1012
const userStore = useUserStore()
1113
const authStore = useAuthStore()
1214
const { isMobile } = useBasicLayout()
@@ -15,6 +17,12 @@ const showPermission = ref(false)
1517
const needPermission = computed(() => !!authStore.session?.auth && !authStore.token && (isMobile.value || showPermission.value))
1618
1719
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+
})
1826
</script>
1927

2028
<template>

0 commit comments

Comments
 (0)