提交 acb49aca 编写于 作者: B binaryify

修复依赖问题

上级 8e49998a
# 更新日志
### 3.37.1 | 2020.08.04
- 修复依赖问题
### 3.37.0 | 2020.08.03
- 新增`更新头像`,`歌单封面上传`接口和相关例子 [#403](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/403) [#857](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/857)
- 加入`axios`依赖
......
{
"name": "NeteaseCloudMusicApi",
"version": "3.37.0",
"version": "3.37.1",
"description": "网易云音乐 NodeJS 版 API",
"scripts": {
"start": "node app.js",
......@@ -37,6 +37,7 @@
"dependencies": {
"axios": "^0.19.2",
"express": "^4.17.1",
"express-fileupload": "^1.1.9",
"pac-proxy-agent": "^3.0.1",
"request": "^2.88.0"
},
......
......@@ -33,7 +33,7 @@
false
)
const res = await axios({
url: `http://localhost:${port}/user/detail?uid=32953014`,
url: `http://localhost:${port}/user/detail?uid=32953014&timestamp=${Date.now()}`,
withCredentials: true, //关键
})
document.querySelector('#avatar').src = res.data.profile.avatarUrl
......@@ -51,7 +51,7 @@
const imgSize = await getImgSize(file)
const res = await axios({
method: 'post',
url: `http://localhost:3000/avatar/upload?cookie=${cookieToken}&imgSize=${imgSize.width}&imgX=0&imgY=0`,
url: `http://localhost:3000/avatar/upload?cookie=${cookieToken}&imgSize=${imgSize.width}&imgX=0&imgY=0&timestamp=${Date.now()}`,
headers: {
'Content-Type': 'multipart/form-data',
},
......
......@@ -40,7 +40,7 @@
false
)
const res = await axios({
url: `http://localhost:${port}/playlist/detail?id=${playlist_id}`,
url: `http://localhost:${port}/playlist/detail?id=${playlist_id}&timestamp=${Date.now()}`,
})
document.querySelector('#playlist_cover').src = res.data.playlist.coverImgUrl
}
......@@ -57,7 +57,7 @@
const imgSize = await getImgSize(file)
const res = await axios({
method: 'post',
url: `http://localhost:3000/playlist/cover/update?id=${playlist_id}&cookie=${cookieToken}&imgSize=${imgSize.width}&imgX=0&imgY=0`,
url: `http://localhost:3000/playlist/cover/update?id=${playlist_id}&cookie=${cookieToken}&imgSize=${imgSize.width}&imgX=0&imgY=0&timestamp=${Date.now()}`,
headers: {
'Content-Type': 'multipart/form-data',
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册