feat: 更新音乐站功能与资源

重构音乐数据格式,优化标签分类系统
新增多首音乐资源并完善标签关联
调整音频播放路径指向本地静态资源
This commit is contained in:
DESKTOP-RQ919RC\Pc
2025-10-11 11:18:55 +08:00
parent 84b0725720
commit 478e1c357c
11 changed files with 267 additions and 325 deletions

12
static/img/guess-bj-2.svg Normal file
View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="360px" height="128px" xmlns="http://www.w3.org/2000/svg">
<defs>
<linearGradient gradientUnits="userSpaceOnUse" x1="181" y1="128" x2="292" y2="128" id="LinearGradient289">
<stop id="Stop290" stop-color="#9f2c39" offset="0" />
<stop id="Stop291" stop-color="#be3946" offset="1" />
</linearGradient>
</defs>
<g transform="matrix(1 0 0 1 -385 -1255 )">
<path d="M 151 128 L 0 97 L 347 0 L 360 128 L 151 128 Z " fill-rule="nonzero" fill="url(#LinearGradient289)" stroke="none" transform="matrix(1 0 0 1 385 1255 )" />
</g>
</svg>

12
static/img/guess-bj.svg Normal file
View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="1064px" height="280px" xmlns="http://www.w3.org/2000/svg">
<defs>
<linearGradient gradientUnits="userSpaceOnUse" x1="115" y1="0" x2="1064" y2="280" id="LinearGradient295">
<stop id="Stop296" stop-color="#f3974a" offset="0" />
<stop id="Stop297" stop-color="#d73942" offset="1" />
</linearGradient>
</defs>
<g transform="matrix(1 0 0 1 -496 -1103 )">
<path d="M 184 280 L 0 237.125 L 104 0 L 1064 215.125 L 1064 262.5 C 1064 272.3 1055.2 280 1044 280 L 184 280 Z " fill-rule="nonzero" fill="url(#LinearGradient295)" stroke="none" transform="matrix(1 0 0 1 496 1103 )" />
</g>
</svg>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="298px" height="256px" xmlns="http://www.w3.org/2000/svg">
<defs>
<linearGradient gradientUnits="userSpaceOnUse" x1="271.334774788104" y1="21.570942662449" x2="0" y2="256" id="LinearGradient298">
<stop id="Stop299" stop-color="#c3454c" offset="0" />
<stop id="Stop300" stop-color="#eea058" offset="1" />
</linearGradient>
</defs>
<g transform="matrix(1 0 0 1 -424 -1125 )">
<path d="M 156.316964285714 253 C 154.321428571429 255 151.88244047619 256 149 256 C 146.11755952381 256 143.678571428571 255 141.683035714286 253 L 37.9151785714286 152.666666666667 C 36.8065476190476 151.777777777778 35.2821800595238 150.333333333333 33.3420758928571 148.333333333333 C 31.4019717261905 146.333333333333 28.3255208333333 142.694444444444 24.1127232142857 137.416666666667 C 19.8999255952381 132.138888888889 16.1305803571429 126.722222222222 12.8046875 121.166666666667 C 9.47879464285714 115.611111111111 6.5132068452381 108.888888888889 3.90792410714286 101 C 1.30264136904762 93.1111111111111 0 85.4444444444444 0 78 C 0 53.5555555555555 7.03980654761905 34.4444444444444 21.1194196428571 20.6666666666667 C 35.1990327380952 6.88888888888889 54.6555059523809 0 79.4888392857143 0 C 86.3623511904762 0 93.3744419642857 1.19444444444443 100.525111607143 3.58333333333334 C 107.67578125 5.9722222222222 114.327566964286 9.19444444444443 120.48046875 13.25 C 126.633370535714 17.3055555555555 131.927083333333 21.1111111111111 136.361607142857 24.6666666666667 C 140.796130952381 28.2222222222222 145.008928571429 32 149 36 C 152.991071428571 32 157.203869047619 28.2222222222222 161.638392857143 24.6666666666667 C 166.072916666667 21.1111111111111 171.366629464286 17.3055555555555 177.51953125 13.25 C 183.672433035714 9.19444444444443 190.32421875 5.9722222222222 197.474888392857 3.58333333333334 C 204.625558035714 1.19444444444443 211.637648809524 0 218.511160714286 0 C 243.344494047619 0 262.800967261905 6.88888888888889 276.880580357143 20.6666666666667 C 290.960193452381 34.4444444444444 298 53.5555555555555 298 78 C 298 102.555555555556 285.306175595238 127.555555555556 259.918526785714 153 L 156.316964285714 253 Z " fill-rule="nonzero" fill="url(#LinearGradient298)" stroke="none" transform="matrix(1 0 0 1 424 1125 )" />
</g>
</svg>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="173px" height="148px" xmlns="http://www.w3.org/2000/svg">
<defs>
<linearGradient gradientUnits="userSpaceOnUse" x1="45.5970992552194" y1="109.588769917092" x2="167.736885267016" y2="22.4597723935139" id="LinearGradient292">
<stop id="Stop293" stop-color="#c03c49" offset="0" />
<stop id="Stop294" stop-color="#eed680" offset="1" />
</linearGradient>
</defs>
<g transform="matrix(1 0 0 1 -351 -1223 )">
<path d="M 90.7477678571428 146.265625 C 89.5892857142857 147.421875 88.1733630952381 148 86.5 148 C 84.8266369047619 148 83.4107142857143 147.421875 82.2522321428571 146.265625 L 22.0111607142857 88.2604166666667 C 21.3675595238095 87.7465277777778 20.4826078869048 86.9114583333333 19.3563058035714 85.7552083333333 C 18.2300037202381 84.5989583333333 16.4440104166667 82.4952256944445 13.9983258928571 79.4440104166667 C 11.5526413690476 76.3927951388889 9.36439732142857 73.2612847222222 7.43359375 70.0494791666667 C 5.50279017857143 66.8376736111111 3.78115699404762 62.9513888888889 2.26869419642857 58.390625 C 0.756231398809524 53.8298611111111 0 49.3975694444444 0 45.09375 C 0 30.9618055555556 4.08686755952381 19.9131944444444 12.2606026785714 11.9479166666667 C 20.4343377976191 3.98263888888889 31.7295386904762 0 46.1462053571429 0 C 50.1365327380952 0 54.2073102678571 0.690538194444435 58.3585379464286 2.07161458333334 C 62.509765625 3.45269097222221 66.3713727678571 5.31553819444444 69.943359375 7.66015625 C 73.5153459821429 10.0047743055555 76.5885416666667 12.2048611111111 79.1629464285714 14.2604166666667 C 81.7373511904762 16.3159722222222 84.1830357142857 18.5 86.5 20.8125 C 88.8169642857143 18.5 91.2626488095238 16.3159722222222 93.8370535714286 14.2604166666667 C 96.4114583333333 12.2048611111111 99.4846540178572 10.0047743055555 103.056640625 7.66015625 C 106.628627232143 5.31553819444444 110.490234375 3.45269097222221 114.641462053571 2.07161458333334 C 118.792689732143 0.690538194444435 122.863467261905 0 126.853794642857 0 C 141.270461309524 0 152.565662202381 3.98263888888889 160.739397321429 11.9479166666667 C 168.913132440476 19.9131944444444 173 30.9618055555556 173 45.09375 C 173 59.2899305555556 165.630766369048 73.7430555555555 150.892299107143 88.453125 L 90.7477678571428 146.265625 Z " fill-rule="nonzero" fill="url(#LinearGradient292)" stroke="none" transform="matrix(1 0 0 1 351 1223 )" />
</g>
</svg>

18
static/img/guess-text.svg Normal file

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

View File

@@ -23,408 +23,247 @@ createApp({
const init = () => {
let tagsData = [
{
tag: "彩虹泡泡",
songs: [
{ name: "彩虹的微笑", path: "/music/rainbow_smile.mp3" },
{ name: "泡泡飞舞", path: "/music/bubble_dance.mp3" },
{ name: "七彩梦境", path: "/music/colorful_dream.mp3" },
{ name: "泡泡糖世界", path: "/music/bubblegum_world.mp3" },
{ name: "彩虹之光", path: "/music/rainbow_light.mp3" },
],
name: "孤独角落的守望",
path: "孤独角落的守望.MP3",
tags: ["浪漫", "爱情", "悲伤的角落", "复古旋律", "流行"],
},
{
tag: "星际漫游",
songs: [
{ name: "银河漫步", path: "/music/galaxy_walk.mp3" },
{ name: "宇宙之旅", path: "/music/space_journey.mp3" },
{ name: "星际迷航", path: "/music/star_trek.mp3" },
{ name: "太空漫步", path: "/music/space_walk.mp3" },
{ name: "银河系边缘", path: "/music/galaxy_edge.mp3" },
{ name: "星际穿越", path: "/music/interstellar.mp3" },
],
name: "碎梦残爱",
path: "碎梦残爱.MP3",
tags: ["浪漫", "爱情", "悲伤的角落", "复古旋律", "流行"],
},
{
tag: "开心到飞起",
songs: [
{ name: "快乐飞翔", path: "/music/happy_flying.mp3" },
{ name: "笑到飞起", path: "/music/laugh_high.mp3" },
{ name: "开心每一天", path: "/music/happy_everyday.mp3" },
{ name: "飞向快乐", path: "/music/fly_to_happy.mp3" },
],
name: "心碎的声音",
path: "心碎的声音.MP3",
tags: ["浪漫", "爱情", "悲伤的角落", "复古旋律", "流行"],
},
{
tag: "甜蜜时光",
songs: [
{ name: "甜蜜约定", path: "/music/sweet_promise.mp3" },
{ name: "时光慢递", path: "/music/slow_time.mp3" },
{ name: "甜蜜回忆", path: "/music/sweet_memory.mp3" },
{ name: "蜜糖时光", path: "/music/honey_time.mp3" },
{ name: "温柔时刻", path: "/music/gentle_moment.mp3" },
{ name: "甜蜜陪伴", path: "/music/sweet_company.mp3" },
{ name: "幸福时光", path: "/music/happy_time.mp3" },
],
name: "夜尽破晓",
path: "夜尽破晓.MP3",
tags: ["浪漫", "爱情", "悲伤的角落", "梦幻", "自由鼓点", "赛博心跳", "自由摇摆", "微风轻轻吹"],
},
{
tag: "探险",
songs: [
{ name: "丛林探险", path: "/music/jungle_adventure.mp3" },
{ name: "未知旅程", path: "/music/unknown_journey.mp3" },
{ name: "探索新世界", path: "/music/explore_new_world.mp3" },
{ name: "勇往直前", path: "/music/brave_forward.mp3" },
{ name: "神秘岛屿", path: "/music/mystery_island.mp3" },
],
name: "秋江别",
path: "秋江别.mp3",
tags: ["浪漫", "爱情", "相思", "古风", "江湖", "悲伤的角落", "温柔女声"],
},
{
tag: "梦幻",
songs: [
{ name: "梦幻旋律", path: "/music/dream_melody.mp3" },
{ name: "幻想曲", path: "/music/fantasy.mp3" },
{ name: "梦中的世界", path: "/music/dream_world.mp3" },
{ name: "梦幻泡影", path: "/music/dream_bubble.mp3" },
],
name: "锁心劫",
path: "锁心劫.mp3",
tags: ["浪漫", "爱情", "相思", "古风", "江湖", "悲伤的角落", "温柔女声"],
},
{
tag: "幻想曲",
songs: [
{ name: "幻想交响曲", path: "/music/fantasy_symphony.mp3" },
{ name: "幻想即兴曲", path: "/music/fantasy_impromptu.mp3" },
{ name: "幻想变奏曲", path: "/music/fantasy_variations.mp3" },
{ name: "幻想小夜曲", path: "/music/fantasy_serenade.mp3" },
{ name: "幻想曲集", path: "/music/fantasy_collection.mp3" },
{ name: "幻想奏鸣曲", path: "/music/fantasy_sonata.mp3" },
],
name: "大提琴与钢琴",
path: "《大提琴与钢琴》纯音乐.m4a",
tags: ["浪漫", "温柔", "幻想曲", "梦幻", "纯音乐", "自由摇摆", "微风轻轻吹"],
},
{
tag: "自由摇摆",
songs: [
{ name: "自由舞动", path: "/music/free_dance.mp3" },
{ name: "摇摆节奏", path: "/music/swing_rhythm.mp3" },
{ name: "自由爵士", path: "/music/free_jazz.mp3" },
{ name: "摇摆人生", path: "/music/swing_life.mp3" },
{ name: "自由即兴", path: "/music/free_improvisation.mp3" },
],
name: "经典游戏怀旧关卡",
path: "《经典游戏怀旧关卡》纯音乐.mp3",
tags: ["幻想曲", "梦幻", "纯音乐", "节奏大师", "快乐节拍", "自由鼓点", "赛博心跳", "赛博空间"],
},
{
tag: "夏日狂欢",
songs: [
{ name: "夏日派对", path: "/music/summer_party.mp3" },
{ name: "阳光沙滩", path: "/music/sunny_beach.mp3" },
{ name: "海边狂欢", path: "/music/beach_carnival.mp3" },
{ name: "夏日冰饮", path: "/music/summer_drink.mp3" },
{ name: "热带风情", path: "/music/tropical_style.mp3" },
{ name: "夏夜星空", path: "/music/summer_night_sky.mp3" },
],
name: "灵动琴音点亮旅行Vlog之旅",
path: "《灵动琴音点亮旅行Vlog之旅》纯音乐.mp3",
tags: ["彩虹泡泡", "幻想曲", "梦幻", "纯音乐", "节奏大师", "快乐节拍", "自由鼓点", "赛博心跳", "赛博空间"],
},
{
tag: "微风轻轻吹",
songs: [
{ name: "微风拂面", path: "/music/breeze_face.mp3" },
{ name: "轻风细雨", path: "/music/gentle_rain.mp3" },
{ name: "风中絮语", path: "/music/wind_whisper.mp3" },
{ name: "微风山谷", path: "/music/breeze_valley.mp3" },
{ name: "风的私语", path: "/music/wind_secret.mp3" },
],
name: "品牌创新科技",
path: "《品牌创新科技》纯音乐.mp3",
tags: ["纯音乐", "节奏大师", "快乐节拍", "自由鼓点", "赛博心跳", "赛博空间"],
},
{
tag: "江湖",
songs: [
{ name: "侠客行", path: "/music/knight_journey.mp3" },
{ name: "刀剑如梦", path: "/music/sword_dream.mp3" },
{ name: "笑傲江湖", path: "/music/laugh_jianghu.mp3" },
{ name: "侠义情深", path: "/music/knight_love.mp3" },
{ name: "江湖夜雨", path: "/music/jianghu_night_rain.mp3" },
{ name: "沧海一声笑", path: "/music/sea_laugh.mp3" },
],
name: "琴音交织的青春动画恋曲",
path: "《琴音交织的青春动画恋曲》纯音乐.mp3",
tags: ["彩虹泡泡", "浪漫", "温柔", "幻想曲", "梦幻", "纯音乐", "自由摇摆", "微风轻轻吹", "阳光正好", "青草香"],
},
{
tag: "浪漫",
songs: [
{ name: "浪漫星空", path: "/music/romantic_sky.mp3" },
{ name: "浪漫时光", path: "/music/romantic_time.mp3" },
{ name: "浪漫邂逅", path: "/music/romantic_encounter.mp3" },
{ name: "浪漫旋律", path: "/music/romantic_melody.mp3" },
{ name: "浪漫之夜", path: "/music/romantic_night.mp3" },
],
name: "我的金属心跳",
path: "《我的金属心跳》.mp3",
tags: ["流行", "自由摇摆", "赛博心跳", "节奏大师", "摇滚"],
},
{
tag: "阳光正好",
songs: [
{ name: "阳光灿烂", path: "/music/sunshine_bright.mp3" },
{ name: "正好遇见你", path: "/music/just_meet_you.mp3" },
{ name: "阳光路上", path: "/music/sunshine_road.mp3" },
{ name: "温暖阳光", path: "/music/warm_sunshine.mp3" },
{ name: "阳光照进心里", path: "/music/sunshine_heart.mp3" },
],
name: "向前跑",
path: "《向前跑》.mp3",
tags: ["流行", "自由摇摆"],
},
{
tag: "青草香",
songs: [
{ name: "草原晨曲", path: "/music/grassland_morning.mp3" },
{ name: "青草地", path: "/music/grass_land.mp3" },
{ name: "草香四溢", path: "/music/grass_fragrance.mp3" },
{ name: "青草摇曳", path: "/music/grass_swing.mp3" },
{ name: "草原牧歌", path: "/music/grassland_song.mp3" },
],
name: "战斗氛围",
path: "《战斗氛围》纯音乐.m4a",
tags: ["纯音乐", "节奏大师", "快乐节拍", "自由鼓点", "赛博心跳", "赛博空间", "摇滚"],
},
{
tag: "赛博心跳",
songs: [
{ name: "电子脉冲", path: "/music/electronic_pulse.mp3" },
{ name: "数字心跳", path: "/music/digital_heartbeat.mp3" },
{ name: "机械律动", path: "/music/mechanical_rhythm.mp3" },
{ name: "电流涌动", path: "/music/current_surge.mp3" },
{ name: "赛博都市", path: "/music/cyber_city.mp3" },
{ name: "数据流", path: "/music/data_flow.mp3" },
],
name: "长安三万里",
path: "《长安三万里》纯音乐.mp3",
tags: ["彩虹泡泡", "浪漫", "温柔", "幻想曲", "梦幻", "纯音乐", "星际漫游", "自由摇摆", "微风轻轻吹", "古风", "青草香", "阳光正好"],
},
{
tag: "赛博空间",
songs: [
{ name: "虚拟现实", path: "/music/virtual_reality.mp3" },
{ name: "网络漫游", path: "/music/network_roaming.mp3" },
{ name: "数据海洋", path: "/music/data_ocean.mp3" },
{ name: "赛博迷宫", path: "/music/cyber_maze.mp3" },
{ name: "电子宇宙", path: "/music/electronic_universe.mp3" },
],
name: "助眠",
path: "《助眠》纯音乐.mp3",
tags: ["彩虹泡泡", "浪漫", "温柔", "幻想曲", "梦幻", "纯音乐", "星际漫游"],
},
{
tag: "节奏大师",
songs: [
{ name: "节奏之王", path: "/music/rhythm_king.mp3" },
{ name: "鼓点狂欢", path: "/music/drum_carnival.mp3" },
{ name: "节奏游戏", path: "/music/rhythm_game.mp3" },
{ name: "律动人生", path: "/music/rhythm_life.mp3" },
{ name: "节奏与灵魂", path: "/music/rhythm_soul.mp3" },
],
name: "Compass Heart中文版",
path: "Compass Heart中文版.mp3",
tags: ["浪漫", "爱情", "相思", "流行", "悲伤的角落", "温柔女声", "自由鼓点"],
},
{
tag: "快乐节拍",
songs: [
{ name: "欢乐节拍", path: "/music/happy_beat.mp3" },
{ name: "快乐舞曲", path: "/music/happy_dance.mp3" },
{ name: "节拍欢歌", path: "/music/beat_song.mp3" },
{ name: "快乐音符", path: "/music/happy_note.mp3" },
{ name: "跳跃节奏", path: "/music/jumping_rhythm.mp3" },
],
name: "I Remember",
path: "I Remember.mp3",
tags: ["彩虹泡泡", "浪漫", "温柔", "幻想曲", "梦幻", "自由摇摆", "微风轻轻吹", "温柔女声", "青草香", "阳光正好"],
},
{
tag: "自由鼓点",
songs: [
{ name: "自由敲击", path: "/music/free_hit.mp3" },
{ name: "鼓点狂想", path: "/music/drum_fantasy.mp3" },
{ name: "自由节奏", path: "/music/free_rhythm.mp3" },
{ name: "鼓点即兴", path: "/music/drum_improvisation.mp3" },
{ name: "自由打击", path: "/music/free_percussion.mp3" },
],
name: "炒股的人不听慢歌",
path: "炒股的人不听慢歌.MP3",
tags: ["节奏大师", "快乐节拍", "自由鼓点", "赛博心跳", "赛博空间", "摇滚"],
},
{
tag: "悲伤的角落",
songs: [
{ name: "角落里的泪", path: "/music/corner_tears.mp3" },
{ name: "悲伤回忆", path: "/music/sad_memory.mp3" },
{ name: "孤独空间", path: "/music/lonely_space.mp3" },
{ name: "泪的痕迹", path: "/music/tear_trace.mp3" },
{ name: "心碎角落", path: "/music/heartbreak_corner.mp3" },
],
name: "成都真香故事",
path: "成都真香故事.mp3",
tags: ["生日祝福"],
},
{
tag: "一个人的狂欢",
songs: [
{ name: "独自狂欢", path: "/music/alone_carnival.mp3" },
{ name: "一人派对", path: "/music/one_person_party.mp3" },
{ name: "孤独欢乐", path: "/music/lonely_joy.mp3" },
{ name: "一个人的舞台", path: "/music/one_person_stage.mp3" },
{ name: "独自摇摆", path: "/music/alone_swing.mp3" },
],
name: "大闹天宫",
path: "大闹天宫.mp3",
tags: ["自由摇摆", "解压宣泄", "影视配乐", "在路上"],
},
{
tag: "经典金曲",
songs: [
{ name: "永恒经典", path: "/music/eternal_classic.mp3" },
{ name: "金曲回放", path: "/music/golden_replay.mp3" },
{ name: "不朽名曲", path: "/music/immortal_song.mp3" },
{ name: "经典重现", path: "/music/classic_reproduction.mp3" },
{ name: "金曲珍藏", path: "/music/golden_collection.mp3" },
{ name: "经典传承", path: "/music/classic_inheritance.mp3" },
],
name: "都市周末狂欢夜",
path: "都市周末狂欢夜.mp3",
tags: ["阳光正好", "自由摇摆", "摇滚", "解压宣泄", "派对聚会"],
},
{
tag: "民谣",
songs: [
{ name: "乡间小路", path: "/music/country_road.mp3" },
{ name: "吉他与诗", path: "/music/guitar_poem.mp3" },
{ name: "民谣故事", path: "/music/folk_story.mp3" },
{ name: "城市民谣", path: "/music/city_folk.mp3" },
{ name: "民谣之声", path: "/music/folk_voice.mp3" },
{ name: "木吉他旋律", path: "/music/acoustic_melody.mp3" },
],
name: "光耀华夏",
path: "光耀华夏.mp3",
tags: ["江湖", "影视配乐", "相思", "在路上", "流行金曲"],
},
{
tag: "摇滚",
songs: [
{ name: "摇滚精神", path: "/music/rock_spirit.mp3" },
{ name: "电吉他之声", path: "/music/electric_guitar.mp3" },
{ name: "摇滚革命", path: "/music/rock_revolution.mp3" },
{ name: "硬摇滚", path: "/music/hard_rock.mp3" },
{ name: "摇滚青春", path: "/music/rock_youth.mp3" },
{ name: "摇滚传奇", path: "/music/rock_legend.mp3" },
],
name: "广州",
path: "广州.mp3",
tags: ["浪漫", "在路上", "甜蜜时光"],
},
{
tag: "古风",
songs: [
{ name: "千年之约", path: "/music/thousand_year_promise.mp3" },
{ name: "墨香古韵", path: "/music/ink_ancient_rhyme.mp3" },
{ name: "青丝白发", path: "/music/black_white_hair.mp3" },
{ name: "琴瑟和鸣", path: "/music/instruments_harmony.mp3" },
{ name: "长安忆", path: "/music/changan_memory.mp3" },
{ name: "山水清音", path: "/music/landscape_sound.mp3" },
],
name: "蝴蝶与坦克",
path: "蝴蝶与坦克.mp3",
tags: ["星际漫游", "幻想曲", "赛博心跳", "赛博空间", "节奏大师", "快乐节拍", "自由鼓点"],
},
{
tag: "去旅行",
songs: [
{ name: "旅行的意义", path: "/music/travel_meaning.mp3" },
{ name: "背包客", path: "/music/backpacker.mp3" },
{ name: "远方的呼唤", path: "/music/distant_call.mp3" },
{ name: "旅途中", path: "/music/on_journey.mp3" },
{ name: "出发吧", path: "/music/lets_go.mp3" },
],
name: "加速心跳",
path: "加速心跳.mp3",
tags: ["幻想曲", "运动健身", "节奏大师", "快乐节拍"],
},
{
tag: "在路上",
songs: [
{ name: "公路之歌", path: "/music/highway_song.mp3" },
{ name: "一路向前", path: "/music/forward.mp3" },
{ name: "旅途风景", path: "/music/journey_scenery.mp3" },
{ name: "在路上", path: "/music/on_the_road.mp3" },
{ name: "行走的力量", path: "/music/walking_power.mp3" },
],
name: "脚步写下自由",
path: "脚步写下自由.mp3",
tags: ["开心到飞起", "微风轻轻吹", "解压宣泄", "通勤路上"],
},
{
tag: "学习BGM",
songs: [
{ name: "专注时刻", path: "/music/focus_moment.mp3" },
{ name: "学习氛围", path: "/music/study_atmosphere.mp3" },
{ name: "思考空间", path: "/music/thinking_space.mp3" },
{ name: "安静阅读", path: "/music/quiet_reading.mp3" },
{ name: "效率提升", path: "/music/efficiency_improvement.mp3" },
],
name: "经纬线",
path: "经纬线.mp3",
tags: ["温柔", "温柔女声", "民谣", "悲伤的角落", "助眠放松"],
},
{
tag: "运动健身",
songs: [
{ name: "热血沸腾", path: "/music/hot_blood.mp3" },
{ name: "健身节奏", path: "/music/fitness_rhythm.mp3" },
{ name: "运动激情", path: "/music/sports_passion.mp3" },
{ name: "跑步节拍", path: "/music/running_beat.mp3" },
{ name: "力量训练", path: "/music/strength_training.mp3" },
{ name: "健身房热曲", path: "/music/gym_hot_song.mp3" },
],
name: "旧唱片",
path: "旧唱片.mp3",
tags: ["爱情", "相思", "约会浪漫", "悲伤的角落"],
},
{
tag: "派对聚会",
songs: [
{ name: "派对之王", path: "/music/party_king.mp3" },
{ name: "聚会舞曲", path: "/music/party_dance.mp3" },
{ name: "欢乐时光", path: "/music/happy_time.mp3" },
{ name: "派对节奏", path: "/music/party_rhythm.mp3" },
{ name: "狂欢之夜", path: "/music/carnival_night.mp3" },
{ name: "聚会必备", path: "/music/party_essential.mp3" },
],
name: "快乐广场舞",
path: "快乐广场舞.mp3",
tags: ["复古旋律", "节奏大师", "快乐节拍"],
},
{
tag: "约会浪漫",
songs: [
{ name: "浪漫晚餐", path: "/music/romantic_dinner.mp3" },
{ name: "约会之夜", path: "/music/date_night.mp3" },
{ name: "烛光晚餐", path: "/music/candle_dinner.mp3" },
{ name: "浪漫时刻", path: "/music/romantic_moment.mp3" },
{ name: "甜蜜约会", path: "/music/sweet_date.mp3" },
],
name: "梅雨季",
path: "梅雨季.mp3",
tags: ["浪漫", "爱情", "悲伤的角落", "民谣", "微风轻轻吹", "去旅行", "在路上", "学习BGM"],
},
{
tag: "旅行路上",
songs: [
{ name: "旅途风景", path: "/music/journey_scenery.mp3" },
{ name: "公路之歌", path: "/music/highway_song.mp3" },
{ name: "旅行日记", path: "/music/travel_diary.mp3" },
{ name: "异国风情", path: "/music/exotic_style.mp3" },
{ name: "旅途中的歌", path: "/music/song_on_journey.mp3" },
],
name: "人生的过客",
path: "人生的过客.mp3",
tags: ["民谣", "旅行路上", "微风轻轻吹", "在路上", "专注工作/学习"],
},
{
tag: "助眠放松",
songs: [
{ name: "深度睡眠", path: "/music/deep_sleep.mp3" },
{ name: "轻松入眠", path: "/music/easy_sleep.mp3" },
{ name: "安眠曲", path: "/music/lullaby.mp3" },
{ name: "夜晚静谧", path: "/music/night_quiet.mp3" },
{ name: "舒缓心灵", path: "/music/soothe_mind.mp3" },
],
name: "",
path: "殇.mp3",
tags: ["复古旋律", "相思", "江湖"],
},
{
tag: "专注工作/学习",
songs: [
{ name: "专注时刻", path: "/music/focus_moment.mp3" },
{ name: "高效工作", path: "/music/efficient_work.mp3" },
{ name: "思维空间", path: "/music/thinking_space.mp3" },
{ name: "学习氛围", path: "/music/study_atmosphere.mp3" },
{ name: "专注力提升", path: "/music/focus_improvement.mp3" },
],
name: "深夜咖啡馆",
path: "深夜咖啡馆.mp3",
tags: ["浪漫", "爱情", "相思", "悲伤的角落", "助眠放松", "通勤路上"],
},
{
tag: "通勤路上",
songs: [
{ name: "早晨通勤", path: "/music/morning_commute.mp3" },
{ name: "城市节奏", path: "/music/city_rhythm.mp3" },
{ name: "地铁之声", path: "/music/subway_sound.mp3" },
{ name: "公交旅程", path: "/music/bus_journey.mp3" },
{ name: "上下班音乐", path: "/music/commute_music.mp3" },
],
name: "世界在转动",
path: "世界在转动.mp3",
tags: ["温柔", "阳光正好", "解压宣泄", "甜蜜时光"],
},
{
tag: "解压宣泄",
songs: [
{ name: "压力释放", path: "/music/pressure_release.mp3" },
{ name: "情绪宣泄", path: "/music/emotion_vent.mp3" },
{ name: "怒吼一声", path: "/music/roar.mp3" },
{ name: "释放自我", path: "/music/release_self.mp3" },
{ name: "压力消除", path: "/music/pressure_elimination.mp3" },
],
name: "她说",
path: "她说.mp3",
tags: ["悲伤的角落", "温柔女声", "青草香"],
},
{
tag: "生日祝福",
songs: [
{ name: "生日快乐", path: "/music/happy_birthday.mp3" },
{ name: "温馨祝福", path: "/music/warm_blessing.mp3" },
{ name: "生日派对", path: "/music/birthday_party.mp3" },
{ name: "祝福之歌", path: "/music/blessing_song.mp3" },
{ name: "幸福时刻", path: "/music/happy_moment.mp3" },
],
name: "天平行者",
path: "天平行者 .mp3",
tags: ["生日祝福"],
},
{
tag: "影视配乐",
songs: [
{ name: "电影主题", path: "/music/movie_theme.mp3" },
{ name: "剧情转折", path: "/music/plot_twist.mp3" },
{ name: "情感渲染", path: "/music/emotion_rendering.mp3" },
{ name: "史诗场景", path: "/music/epic_scene.mp3" },
{ name: "温情时刻", path: "/music/warm_moment.mp3" },
],
name: "跳楼机-上班版",
path: "跳楼机-上班版.MP3",
tags: ["专注工作/学习", "通勤路上", "解压宣泄"],
},
{
tag: "绘本音乐",
songs: [
{ name: "童话世界", path: "/music/fairy_tale_world.mp3" },
{ name: "绘本旋律", path: "/music/picture_book_melody.mp3" },
{ name: "想象空间", path: "/music/imagination_space.mp3" },
{ name: "童年回忆", path: "/music/childhood_memory.mp3" },
{ name: "故事音乐", path: "/music/story_music.mp3" },
],
name: "童年时光机",
path: "童年时光机.mp3",
tags: ["快乐节拍", "生日祝福", "绘本音乐"],
},
{
name: "无题",
path: "无题.mp3",
tags: ["节奏大师", "自由鼓点", "幻想曲", "纯音乐"],
},
{
name: "五星闪耀(青春)",
path: "五星闪耀(青春).mp3",
tags: ["专注工作/学习", "快乐节拍", "学习BGM"],
},
{
name: "吸烟区",
path: "吸烟区.mp3",
tags: ["通勤路上", "运动健身", "自由摇摆"],
},
{
name: "下一站旅行",
path: "下一站旅行.MP3",
tags: ["旅行路上", "微风轻轻吹"],
},
{
name: "尊重·成长·共赢",
path: "尊重·成长·共赢.mp3",
tags: ["派对聚会", "节奏大师"],
},
{
name: "Phantom in the Code",
path: "Phantom in the Code.mp3",
tags: ["彩虹泡泡", "温柔女声", "影视配乐"],
},
{
name: "We are family",
path: "We are family.MP3",
tags: ["通勤路上", "在路上", "派对聚会"],
},
{
name: "班味退散",
path: "班味退散.MP3",
tags: ["解压宣泄", "通勤路上", "开心到飞起", "自由摇摆"],
},
]; // 提取 tags 数组
// 执行转换
tagsData = transformMusicData(tagsData);
console.log(tagsData);
const redCount = Math.min(5, tagsData.length);
const redIndexes = [];
while (redIndexes.length < redCount) {
@@ -477,6 +316,36 @@ createApp({
});
};
const transformMusicData = (data) => {
// 使用Map存储标签和对应的歌曲
const tagMap = new Map();
// 遍历每首歌
data.forEach((song) => {
// 遍历当前歌曲的所有标签
song.tags.forEach((tag) => {
// 准备歌曲信息仅包含name和path
const songInfo = {
name: song.name,
path: song.path,
};
// 如果标签已存在于Map中添加歌曲否则创建新条目
if (tagMap.has(tag)) {
tagMap.get(tag).push(songInfo);
} else {
tagMap.set(tag, [songInfo]);
}
});
});
// 将Map转换为目标格式的数组
return Array.from(tagMap).map(([tag, songs]) => ({
tag,
songs,
}));
};
// 生成单次随机结果的函数
const getRandomOutcome = () => {
const random = Math.random(); // 生成0-1之间的随机数
@@ -534,8 +403,8 @@ createApp({
closeAll();
setTimeout(() => {
console.log("item", item);
if (audio?.src != item.path) audio.src = item.path;
audio.src = "https://app.gter.net/image/miniApp/mp3/1.mp3";
if (audio?.src != item.path) audio.src = `./static/mp3/station/${item.path}`;
// audio.src = "https://app.gter.net/image/miniApp/mp3/1.mp3";
// audio.src = "/static/mp3/1.MP3";
audio.play().then(() => (playData.value = { ...item, state: true }));
}, 500);