luma page, upload image and remove image function is ready

This commit is contained in:
RockYang
2024-08-26 17:59:05 +08:00
parent f71a2f5263
commit ab421f2185
7 changed files with 200 additions and 81 deletions

View File

@@ -69,3 +69,17 @@ export function httpPost(url, data = {}, options = {}) {
})
})
}
export function httpDownload(url) {
return new Promise((resolve, reject) => {
axios({
method: 'GET',
url: url,
responseType: 'blob' // 将响应类型设置为 `blob`
}).then(response => {
resolve(response)
}).catch(err => {
reject(err)
})
})
}