🐞 fix: 修复 bodian 无法发送的问题

This commit is contained in:
zhiyu1998 2024-06-23 17:21:53 +08:00
parent df37390108
commit 7ae76b6143

View File

@ -21,18 +21,14 @@ async function getBodianAudio(id, path) {
"Cache-Control": "no-cache",
channel: "appstore",
};
return await axios
.get(API, {
headers,
})
.then(async resp => {
const respJson = resp.data;
const audioUrl = respJson.data.audioUrl;
await downloadAudio(audioUrl, path)
.catch(err => {
console.error(`下载音乐失败,错误信息为: ${err.message}`);
});
return respJson;
const resp = await axios.get(API, {
headers,
});
const respJson = resp.data;
const audioUrl = respJson.data.audioUrl;
return await downloadAudio(audioUrl, path)
.catch(err => {
console.error(`下载音乐失败,错误信息为: ${ err.message }`);
});
}