mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-07 02:46:55 +08:00
nothing
This commit is contained in:
13
src/views/view/IndexView.vue
Normal file
13
src/views/view/IndexView.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<div style="display: flex;justify-content: center;">
|
||||
<div>
|
||||
<NText strong tag="h1">
|
||||
vtsuru
|
||||
</NText>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { NButton, NText } from 'naive-ui'
|
||||
</script>
|
||||
7
src/views/view/QuestionBoxView.vue
Normal file
7
src/views/view/QuestionBoxView.vue
Normal file
@@ -0,0 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
1
|
||||
</template>
|
||||
59
src/views/view/SongListView.vue
Normal file
59
src/views/view/SongListView.vue
Normal file
@@ -0,0 +1,59 @@
|
||||
<script setup lang="ts">
|
||||
import { SongsInfo } from '@/api/api-models'
|
||||
import { QueryGetPaginationAPI } from '@/api/query'
|
||||
import SongList from '@/components/SongList.vue'
|
||||
import { USER_URL } from '@/data/constants'
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { useRouteParams } from '@vueuse/router'
|
||||
|
||||
const songs = ref<SongsInfo[]>()
|
||||
const uId = useRouteParams('id', '-1', { transform: Number })
|
||||
|
||||
async function RequestData() {
|
||||
songs.value = [
|
||||
{
|
||||
id: '1',
|
||||
name: 'test',
|
||||
author: '雪路',
|
||||
url: 'https://music.163.com/song/media/outer/url?id=1995844771.mp3',
|
||||
cover: 'https://ukamnads.icu/file/components.png',
|
||||
from: '网易云',
|
||||
language: '中文',
|
||||
desc: 'xuelu',
|
||||
tags: ['hao'],
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
name: 'test2',
|
||||
author: '雪路2',
|
||||
url: 'https://music.163.com/song/media/outer/url?id=1995844771.mp3',
|
||||
cover: 'https://ukamnads.icu/file/components.png',
|
||||
from: '网易云2',
|
||||
language: '中文2',
|
||||
desc: 'xuelu',
|
||||
tags: ['hao'],
|
||||
},
|
||||
]
|
||||
await QueryGetPaginationAPI<SongsInfo[]>(`${USER_URL}info`, {
|
||||
uId: uId.value,
|
||||
})
|
||||
.then((result) => {
|
||||
if (result.code == 200) {
|
||||
songs.value = result.data.datas
|
||||
} else {
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err)
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await RequestData()
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
歌单
|
||||
<SongList :songs="songs ?? []" />
|
||||
</template>
|
||||
Reference in New Issue
Block a user