11import { gameLevels } from '../constants.js' ;
22import selectSongItem_mp3 from 'assets/audio/selectSongItem.mp3' ;
3- import { DB } from '../utils/DB.js' ;
3+ import { DB } from '../utils/DB.js' ;
4+ import { chartSource } from '../utils/chartSource.js' ;
45
56function SongList ( { defaultLevel = 'ez' } ) {
67 const listElement = document . createElement ( 'div' ) ;
@@ -103,7 +104,7 @@ function SongList({ defaultLevel = 'ez' }) {
103104 currentLevelSelected = [ nextLevel ] ;
104105 }
105106 fetch (
106- `https://charts.phicm.focalors.ltd /${ codename } /${ songMeta [ 'illustration' ] } `
107+ `${ chartSource } /${ codename } /${ songMeta [ 'illustration' ] } `
107108 )
108109 . then ( ( response ) => response . blob ( ) )
109110 . then ( ( blob ) => {
@@ -115,14 +116,14 @@ function SongList({ defaultLevel = 'ez' }) {
115116 document . querySelector ( 'img.illustration' ) . src = imgUrl ;
116117 } )
117118 . catch ( ( err ) => {
118- console . err (
119+ console . error (
119120 '获取曲绘失败!' ,
120- `url: https://charts.phicm.focalors.ltd /${ codename } /${ songMeta [ 'illustration' ] } ` ,
121+ `url: ${ chartSource } /${ codename } /${ songMeta [ 'illustration' ] } ` ,
121122 err
122123 ) ;
123124 } ) ;
124125 fetch (
125- `https://charts.phicm.focalors.ltd /${ codename } /${ songMeta [ 'musicFile' ] } `
126+ `${ chartSource } /${ codename } /${ songMeta [ 'musicFile' ] } `
126127 )
127128 . then ( ( response ) => response . blob ( ) )
128129 . then ( ( blob ) => {
@@ -195,9 +196,9 @@ function SongList({ defaultLevel = 'ez' }) {
195196 } ) ;
196197 } )
197198 . catch ( ( err ) => {
198- console . err (
199+ console . error (
199200 '获取歌曲失败!' ,
200- `url: https://charts.phicm.focalors.ltd /${ codename } /${ songMeta [ 'musicFile' ] } ` ,
201+ `url: ${ chartSource } /${ codename } /${ songMeta [ 'musicFile' ] } ` ,
201202 err
202203 ) ;
203204 } ) ;
0 commit comments