提交 e2142fe5 编写于 作者: View Design's avatar View Design

更新用户信息

上级 27350b1e
......@@ -7,7 +7,11 @@
<UNotifications />
</template>
<script setup>
const { $updateUserInfo } = useUserStore()
useHead({
title: 'GitBot AI'
})
nextTick(() => {
$updateUserInfo()
})
</script>
......@@ -19,5 +19,10 @@ export const useUserStore = defineStore('user', () => {
userInfo.value = null
}
return { $info, $isSignIn, $signOut }
async function $updateUserInfo () {
const { data } = await useRequest('/v1/user/user_info')
userInfo.value = JSON.stringify(data.value.data)
}
return { $info, $isSignIn, $signOut, $updateUserInfo }
})
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册