瀏覽代碼

url转义

skyblued 2 年之前
父節點
當前提交
7be36b503e
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/subpages/colexiu/uses/use-app.ts

+ 2 - 2
src/subpages/colexiu/uses/use-app.ts

@@ -64,9 +64,9 @@ export const useMp3s = async (detail: MusicSheelDetail) => {
     } catch (error) {}
   }
   // 伴奏
-  const backgroundSong = detail.metronomeUrl || ''
+  const backgroundSong = encodeURI(detail.metronomeUrl || '')
   // 原音
-  const musicSong = activebg?.audioFileUrl|| ''
+  const musicSong = encodeURI(activebg?.audioFileUrl|| '')
   // 兼容未修改之前
   runtime.songs = {
     background: backgroundSong ? backgroundSong + '?t=background' : '',