liushengqiang 2 gadi atpakaļ
vecāks
revīzija
4e4de9a127

+ 1 - 1
src/page-instrument/router.ts

@@ -34,7 +34,7 @@ const routes: RouteRecordRaw[] = [
 ];
 
 const router = createRouter({
-	history: createWebHashHistory('/notation/'),
+	history: createWebHashHistory(),
 	routes,
 });
 

+ 1 - 1
src/page-instrument/view-figner/index.tsx

@@ -53,7 +53,7 @@ export default defineComponent({
 				// console.log("🚀 ~ note:", note)
 				// console.log(`/soundfonts/${data.subject}/${note.name}${note.octave}.mp3`)
 				const noteAudio = new Howl({
-					src: `/soundfonts/${data.subject}/${note.name}${note.octave}.mp3`,
+					src: `${location.pathname.replace('.html', '/')}/soundfonts/${data.subject}/${note.name}${note.octave}.mp3`,
 					loop: true,
 				});
 				data.soundFonts[note.realKey] = noteAudio;