From 9f3fc4b906d96c359f837659530a245021fb2899 Mon Sep 17 00:00:00 2001 From: Starlight-0208 <89368027+Starlight0208@users.noreply.github.com> Date: Fri, 9 Dec 2022 23:02:58 +0800 Subject: [PATCH] Partial upload-202212092302 --- index.html | 31 +------------------------------ js/main.js | 39 ++++++++++++++++++++++++++------------- 2 files changed, 27 insertions(+), 43 deletions(-) diff --git a/index.html b/index.html index 7c340e1..134fd71 100644 --- a/index.html +++ b/index.html @@ -31,36 +31,7 @@
以下是查询 None 的结果
- +
diff --git a/js/main.js b/js/main.js index 2a2f32c..1ed0fc0 100644 --- a/js/main.js +++ b/js/main.js @@ -24,19 +24,20 @@ function getsongs(){ artiststr = getArtist(list[i]); console.log({"songid":list[i].id, "songname":list[i].name, "artist":artiststr}); if(list[i].fee == 0 || list[i].fee == 8){ - reslist.innerHTML += `
  • ${list[i].name} - ${getArtist(list[i])}`+ + reslist.innerHTML += `
  • ${list[i].name} - ${getArtist(list[i])}` + `` + - `
  • ` + - ``; + `` + + ``; }else{ reslist.innerHTML += `
  • ${list[i].name} - ${getArtist(list[i])}`+ `` + - `
  • ` + - ``; + `` + + ``; } } }else{ //alert(xhr.statusText); + console.warn("WARNNING:API服务器响应失败"); } } document.getElementById("keyword").innerHTML = search.value; @@ -230,7 +231,7 @@ function getplaylist(){ var reslist = document.getElementById("reslist"); reslist.innerHTML = ""; for(var i = 0; i < list.size(); i++){ - reslist.innerHTML += `
  • ${list.items[i].songname} - ${list.items[i].artist}
  • `; + reslist.innerHTML += `
  • ${list.items[i].songname} - ${list.items[i].artist}
  • `; //console.log(`${list.items[i].songname} - ${list.items[i].artist}`); } document.getElementById('keyword').innerHTML = "当前播放列表"; @@ -291,8 +292,8 @@ function gethistory(){ for(var i = 0; i < historyList.length; i++){ reslist.innerHTML += `
  • ${historyList[i].songname} - ${historyList[i].artist}` + `` + - `` + - `
  • ` + + `` + + `` + ``; } document.getElementById('keyword').innerHTML = "历史记录"; @@ -409,8 +410,10 @@ function PullToCloud(){ reslist.innerHTML = ""; for(var i = 0; i < obj.list.length; i++){ reslist.innerHTML += `
  • ${obj.list[i].name} - ${obj.list[i].author}` + - `
  • `; - } + `` + + `` + + ``; + } }else{ ; } @@ -448,12 +451,22 @@ function deleteHistory( count ) { for( var i = 0; i < historyList.length; i++ ){ reslist.innerHTML += `
  • ${historyList[i].songname} - ${historyList[i].artist}` + `` + - `` + - `
  • ` + - ``; + `` + + `` + + ``; } document.getElementById( 'keyword' ).innerHTML = "历史记录"; // put the HistoryList back into the LocalStorage localStorage.setItem( "historyList", JSON.stringify( historyList ) ); +} + +function jumpTo163CM( songid ) { + console.log("因为没钱,所以放不了,要不你自己去官网开会员听?"); + if ( confirm( "因为没钱,所以放不了,要不你自己去官网开会员听?" ) ){ + window.open( 'https://music.163.com/#/song?id=' + songid ); + console.log("感谢你的理解!^_^"); + } else { + console.log("好吧,那我也没有办法了,总之是放不了。\(sad") + } } \ No newline at end of file