From 15adc605a20c218239e5333cc19d8935d3b4d826 Mon Sep 17 00:00:00 2001 From: imsyy Date: Tue, 7 Feb 2023 09:56:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BE=9B=20api=20=E9=83=A8=E7=BD=B2?= =?UTF-8?q?=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 4 +++- src/api/index.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.env b/.env index dc0ed63..76d52b8 100644 --- a/.env +++ b/.env @@ -25,8 +25,10 @@ VITE_WEATHER_KEY = "57eaea5833ff1616cfd1ff2c4cf9b58a" VITE_SITE_START = "2020-10-24" # 歌曲 API 地址 +## 请参照 https://github.com/imsyy/Meting-API#cloudflare-workers 进行 API 服务部署 +## 此处提供的服务可能会超量从而无法访问,请自行部署 ## 备用:https://api.wuenci.com/meting/api/ -VITE_SONG_API = "https://api-meting.imsyy.top" +VITE_SONG_API = "https://api-meting.imsyy.top/api" # 歌曲服务器 ( netease-网易云, tencent-qq音乐 ) VITE_SONG_SERVER = "netease" # 播放类型 ( song-歌曲, playlist-播放列表, album-专辑, search-搜索, artist-艺术家 ) diff --git a/src/api/index.js b/src/api/index.js index b057490..3bfb168 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -6,7 +6,7 @@ // 获取音乐播放列表 export const getPlayerList = async (server, type, id) => { - const res = await fetch(`${import.meta.env.VITE_SONG_API}/?server=${server}&type=${type}&id=${id}`); + const res = await fetch(`${import.meta.env.VITE_SONG_API}?server=${server}&type=${type}&id=${id}`); return await res.json(); }