mirror of
https://github.com/ikun0014/lx-music-mobile.git
synced 2025-05-23 22:37:41 +08:00
修复打开kg源歌单链接失败的问题
This commit is contained in:
parent
269b0f113a
commit
5e15f20d67
@ -8,3 +8,4 @@
|
||||
- 修复打开歌单失败时会导致应用崩溃的问题
|
||||
- 修复打开kw歌单失败时会无限重试的问题
|
||||
- 尝试修复弹出菜单、列表位置不正确的问题
|
||||
- 修复打开kg源歌单链接失败的问题
|
||||
|
@ -154,6 +154,7 @@ export default {
|
||||
async createHttp(url, options, retryNum = 0) {
|
||||
if (retryNum > 2) throw new Error('try max num')
|
||||
let result
|
||||
options.cache = 'default'
|
||||
try {
|
||||
result = await httpFetch(url, options).promise
|
||||
} catch (err) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// import crypto from 'crypto'
|
||||
import crypto from 'crypto'
|
||||
|
||||
/**
|
||||
* 获取音乐音质
|
||||
@ -18,4 +18,4 @@ export const getMusicType = (info, type) => {
|
||||
return '128k'
|
||||
}
|
||||
|
||||
// export const toMD5 = str => crypto.createHash('md5').update(str).digest('hex')
|
||||
export const toMD5 = str => crypto.createHash('md5').update(str).digest('hex')
|
||||
|
@ -101,13 +101,14 @@ const handleRequestData = async(url, {
|
||||
method = 'get',
|
||||
headers = {},
|
||||
format = 'json',
|
||||
cache = 'no-store',
|
||||
...options
|
||||
}) => {
|
||||
// console.log(url, options)
|
||||
headers = Object.assign({
|
||||
Accept: 'application/json',
|
||||
}, headers)
|
||||
options.cache = 'no-store'
|
||||
options.cache = cache
|
||||
if (method.toLocaleLowerCase() === 'post' && !headers['Content-Type']) {
|
||||
if (options.form) {
|
||||
headers['Content-Type'] = 'application/x-www-form-urlencoded'
|
||||
|
Loading…
x
Reference in New Issue
Block a user