diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..524d192 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +*.zip +*.tar.gz +*.mp4 +*.mp3 +*.m4a +node_modules/ +dist/ \ No newline at end of file diff --git a/static/img/guess-bj-2.svg b/static/img/guess-bj-2.svg new file mode 100644 index 0000000..36bcf86 --- /dev/null +++ b/static/img/guess-bj-2.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/static/img/guess-bj.svg b/static/img/guess-bj.svg new file mode 100644 index 0000000..09852e1 --- /dev/null +++ b/static/img/guess-bj.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/static/img/guess-love-big.svg b/static/img/guess-love-big.svg new file mode 100644 index 0000000..dcfdfae --- /dev/null +++ b/static/img/guess-love-big.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/static/img/guess-love-little.svg b/static/img/guess-love-little.svg new file mode 100644 index 0000000..1a86aa8 --- /dev/null +++ b/static/img/guess-love-little.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/static/img/guess-text.svg b/static/img/guess-text.svg new file mode 100644 index 0000000..c24f051 --- /dev/null +++ b/static/img/guess-text.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/img/guess/figure-one.png b/static/img/guess/figure-one.png new file mode 100644 index 0000000..39d57a0 Binary files /dev/null and b/static/img/guess/figure-one.png differ diff --git a/static/img/guess/figure-three.png b/static/img/guess/figure-three.png new file mode 100644 index 0000000..f43b69f Binary files /dev/null and b/static/img/guess/figure-three.png differ diff --git a/static/img/guess/figure-two.png b/static/img/guess/figure-two.png new file mode 100644 index 0000000..538f4f8 Binary files /dev/null and b/static/img/guess/figure-two.png differ diff --git a/static/img/question-mark.png b/static/img/question-mark.png new file mode 100644 index 0000000..82be7bc Binary files /dev/null and b/static/img/question-mark.png differ diff --git a/static/js/song-request-station.js b/static/js/song-request-station.js index 2718a7d..2de3dfa 100644 --- a/static/js/song-request-station.js +++ b/static/js/song-request-station.js @@ -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);