feat:更新

This commit is contained in:
dengtongyu committed 2023-11-10 17:11:09 +08:00
1 parent 32922bbf4b
commit e778ec3f66
4 files changed
+19 -10

No files matched your search

+7 -8
View File
@@ -3,15 +3,14 @@
"version": "2.1.2",
"private": true,
"proxy": {
"/netease/*": {
"target": "https://glassplayer.dengtongyu.com",
"/music": {
"target": "https://api.dengtongyu.com",
"secure": true,
"changeOrigin": true
},
"/kugou/*": {
"target": "https://glassplayer.dengtongyu.com",
"secure": true,
"changeOrigin": true
"changeOrigin": true,
"headers": {
"Origin": "https://glassplayer.dengtongyu.com",
"Referer": "https://glassplayer.dengtongyu.com/"
}
}
},
"dependencies": {
+3
View File
@@ -17,6 +17,9 @@ let getKugouSearchSongList = async function(keyWord,page,size) {
let response = await urlFetch(url);
try {
if(!response) {
return Promise.reject("返回数据为空");
}
let data = await response.json();
//console.log(data)
let songs = {};
+1 -1
View File
@@ -4,7 +4,7 @@ const host = 'https://api.dengtongyu.com/music/netease';
const searchUrl = host + '/search';
const rankUrl = host + '/top/list';
const rankUrl = host + '/playlist/detail';
const songDetailUrl = host + '/song/detail';
+8 -1
View File
@@ -4,7 +4,14 @@ let urlFetch = async function (url) {
if(isFetching) return Promise.reject('您点太快了!');
isFetching = true;
let result = await fetch(url)
let result = null;
try {
result = await fetch(url)
}
catch (error){
isFetching = false;
}
isFetching = false;
return result;
}