<template>
  <NuxtPage />
</template>

<script setup>
import { reactive } from 'vue';
import { useRouter } from 'vue-router';

const router = useRouter();

const token = useToken()
const user = useUser()
const userId = useUserId()
const projectId = useProjectId()
const taskId = useTaskId()
const projectName = useProjectName()
const taskName = useTaskName()

// 获取路径上的参数
const routeValue = router.currentRoute.value;
console.log('routeValue: ', routeValue);
token.value = routeValue && routeValue.query && routeValue.query.token ? routeValue.query.token : '';
userId.value = routeValue && routeValue.query && routeValue.query.userId ? routeValue.query.userId : '';
projectId.value = routeValue && routeValue.query && routeValue.query.projectId ? routeValue.query.projectId : '';
taskId.value = routeValue && routeValue.query && routeValue.query.id ? routeValue.query.id : '';
projectName.value = routeValue && routeValue.query && routeValue.query.pn ? routeValue.query.pn : '';
taskName.value = routeValue && routeValue.query && routeValue.query.tn ? routeValue.query.tn : '';

</script>
