This commit is contained in:
2025-08-21 14:31:59 +08:00
parent 5fda2cfeaf
commit 1ede8c33a2

View File

@@ -109,6 +109,7 @@
<form id="musicPromptForm"> <form id="musicPromptForm">
<div class="form-group"> <div class="form-group">
<label for="style" class="form-label">1. 音乐风格与时代</label> <label for="style" class="form-label">1. 音乐风格与时代</label>
<!-- 修复音乐风格下拉菜单中的空格问题 -->
<select id="style" class="form-select" required> <select id="style" class="form-select" required>
<option value="">请选择音乐风格</option> <option value="">请选择音乐风格</option>
<option value="华语流行">华语流行</option> <option value="华语流行">华语流行</option>
@@ -116,7 +117,7 @@
<option value="古风">古风</option> <option value="古风">古风</option>
<option value="民谣">民谣</option> <option value="民谣">民谣</option>
<option value="电子 R&B">电子 R&B</option> <option value="电子 R&B">电子 R&B</option>
<option value=" Classical">古典</option> <option value="Classical">古典</option> <!-- 移除前置空格 -->
<option value="爵士">爵士</option> <option value="爵士">爵士</option>
<option value="摇滚">摇滚</option> <option value="摇滚">摇滚</option>
</select> </select>
@@ -230,6 +231,7 @@
<script> <script>
document.addEventListener('DOMContentLoaded', function() { document.addEventListener('DOMContentLoaded', function() {
// 音乐示例数据 // 音乐示例数据
// 修复musicSamples数组中的vocal属性值
const musicSamples = [ const musicSamples = [
{ {
style: "华语流行", style: "华语流行",
@@ -254,7 +256,7 @@
{ {
style: "Classical", style: "Classical",
mood: "安静学习", mood: "安静学习",
vocal: "钢琴弦乐", vocal: "清澈男声", // 将"钢琴弦乐"改为下拉菜单中存在的值
tempo: "3/4 拍 90 BPM", tempo: "3/4 拍 90 BPM",
instruments: "钢琴弦乐", instruments: "钢琴弦乐",
theme: "数学的旋律", theme: "数学的旋律",
@@ -268,7 +270,8 @@
tempo: "4/4 拍 100 BPM", tempo: "4/4 拍 100 BPM",
instruments: "木吉他主奏", instruments: "木吉他主奏",
theme: "自然科学的奥秘", theme: "自然科学的奥秘",
teachingSubject: "科学" teachingSubject: "科学", // 保留一个teachingSubject属性
duration: 2
}, },
{ {
style: "City Pop", style: "City Pop",
@@ -277,7 +280,8 @@
tempo: "4/4 拍 120 BPM", tempo: "4/4 拍 120 BPM",
instruments: "电子合成器", instruments: "电子合成器",
theme: "阳光沙滩海浪", theme: "阳光沙滩海浪",
teachingSubject: "地理" teachingSubject: "地理", // 保留一个teachingSubject属性
duration: 2
}, },
{ {
style: "电子 R&B", style: "电子 R&B",
@@ -286,7 +290,8 @@
tempo: "6/8 拍 85 BPM 慢摇", tempo: "6/8 拍 85 BPM 慢摇",
instruments: "808 鼓点+萨克斯", instruments: "808 鼓点+萨克斯",
theme: "历史的回声", theme: "历史的回声",
teachingSubject: "历史" teachingSubject: "历史", // 保留一个teachingSubject属性
duration: 2
}, },
{ {
style: "摇滚", style: "摇滚",
@@ -295,7 +300,8 @@
tempo: "4/4 拍 140 BPM", tempo: "4/4 拍 140 BPM",
instruments: "吉他+贝斯+鼓", instruments: "吉他+贝斯+鼓",
theme: "运动精神", theme: "运动精神",
teachingSubject: "体育" teachingSubject: "体育", // 保留一个teachingSubject属性
duration: 2
}, },
{ {
style: "爵士", style: "爵士",
@@ -304,7 +310,8 @@
tempo: "4/4 拍 100 BPM", tempo: "4/4 拍 100 BPM",
instruments: "钢琴弦乐", instruments: "钢琴弦乐",
theme: "艺术欣赏", theme: "艺术欣赏",
teachingSubject: "美术" teachingSubject: "美术", // 保留一个teachingSubject属性
duration: 2
} }
]; ];