青鸟ai,pc版仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

42 lines
1.1 KiB

<script lang="ts" setup>
import { onBeforeMount, ref } from 'vue'
import { TaskList } from '../TaskList/index.ts'
import type { TaskType } from './index.d'
import { noviceTask } from '@/api/task/index'
import { useTaskListStore } from '@/store/moules/taskListStore'
const taskListStore = useTaskListStore()
const totalScore = ref(0)
const list = ref<TaskType[]>([])
const finishedTaskCount = ref(0)
function getTaskList() {
noviceTask().then((res) => {
list.value = res.taskCenterList
totalScore.value = res.totalPoints
finishedTaskCount.value = res.finishedTaskCount
taskListStore.changeNoviceTask(res.existFinishedTask)
})
}
onBeforeMount(() => {
getTaskList()
})
</script>
<template>
<TaskList v-if="list" title="新手任务" :list="list" :total-score="totalScore" :finished-task-count="finishedTaskCount" @update-list="getTaskList()" />
</template>
<style lang="scss" scoped>
.nvoice-task-box {
width: 95%;
.title {
font-size: 14px;
font-weight: bold;
color: #000000;
line-height: 22px;
letter-spacing: 1px;
margin: 16px 0;
}
}
</style>