|
@@ -5,19 +5,35 @@
|
|
|
* 创建日期: 2024/8/16
|
|
|
* 编写者: JutarryWu
|
|
|
*/
|
|
|
+import GameAPI, { type GameVO } from '@/api/game'
|
|
|
+
|
|
|
const router = useRouter()
|
|
|
+const route = useRoute()
|
|
|
|
|
|
-const subjectInfo = ref({
|
|
|
- name: '空间定向训练',
|
|
|
- id: 1,
|
|
|
-})
|
|
|
-const urlList = ['/cognitiveTasks/spatialOrientationAbility']
|
|
|
+const taskId = ref('')
|
|
|
+const userId = ref('')
|
|
|
+
|
|
|
+const subjectInfo = ref<GameVO>({})
|
|
|
+const urlList = [
|
|
|
+ '/cognitiveTasks/spatialOrientationAbility',
|
|
|
+ '/cognitiveTasks/spatialOrientationAbility',
|
|
|
+ '',
|
|
|
+ '/cognitiveTasks/BreadthTraining',
|
|
|
+ '/cognitiveTasks/spatialOrientationAbility',
|
|
|
+]
|
|
|
|
|
|
function startTest() {
|
|
|
- router.push(urlList[subjectInfo.value.id - 1])
|
|
|
+ router.push(urlList[Number(subjectInfo.value.id) - 1])
|
|
|
}
|
|
|
|
|
|
-async function exec() {}
|
|
|
+async function exec() {
|
|
|
+ taskId.value = route.query.taskId as string
|
|
|
+ userId.value = route.query.userId as string
|
|
|
+ GameAPI.findById(taskId.value).then((res) => {
|
|
|
+ subjectInfo.value = res.data
|
|
|
+ sessionStorage.setItem('userId', res.data.id.toString())
|
|
|
+ })
|
|
|
+}
|
|
|
|
|
|
onMounted(() => {
|
|
|
exec()
|
|
@@ -38,7 +54,7 @@ onMounted(() => {
|
|
|
操作提示:
|
|
|
</div>
|
|
|
<div class="text-[15px] text-[#999999] line-height-[20px]">
|
|
|
- 空间定向是测试者在所处环境中根据参照点或者绝对坐标系统定位正确辨识方向的知觉反应,要求主体编码并记住环境中不同地点的相对位置,然后利用自身的认知结构和空间表征对自己所在的空间的感知觉线索进行迅速而准确的分析和加工,从而对自己姿态、位置和运动做出判断。
|
|
|
+ {{ subjectInfo.intro }}
|
|
|
</div>
|
|
|
</div>
|
|
|
<van-button type="primary" color="#00AABD" class="bottom-block-btn" @click="startTest">
|
|
@@ -49,6 +65,7 @@ onMounted(() => {
|
|
|
|
|
|
<style scoped lang="less">
|
|
|
.app-container {
|
|
|
+ background-color: #f0f6f6 !important;
|
|
|
background-image: url('@/assets/images/bg-main.png');
|
|
|
background-size: cover;
|
|
|
background-repeat: no-repeat;
|