新增列表多选操作功能
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { httpFatch } from '../../request'
|
||||
import { requestMsg } from '../../message'
|
||||
|
||||
const api_messoer = {
|
||||
getMusicUrl(songInfo, type) {
|
||||
@@ -7,7 +8,7 @@ const api_messoer = {
|
||||
timeout: 5000,
|
||||
})
|
||||
requestObj.promise = requestObj.promise.then(({ body }) => {
|
||||
return body.code === 200 ? Promise.resolve({ type, url: body.data }) : Promise.reject(new Error(body.msg))
|
||||
return body.code === 200 ? Promise.resolve({ type, url: body.data }) : Promise.reject(new Error(requestMsg.fail))
|
||||
})
|
||||
return requestObj
|
||||
},
|
||||
@@ -17,7 +18,7 @@ const api_messoer = {
|
||||
timeout: 5000,
|
||||
})
|
||||
requestObj.promise = requestObj.promise.then(({ body }) => {
|
||||
return body.code === 200 ? Promise.resolve(body.data) : Promise.reject(new Error(body.msg))
|
||||
return body.code === 200 ? Promise.resolve(body.data) : Promise.reject(new Error(requestMsg.fail))
|
||||
})
|
||||
return requestObj
|
||||
},
|
||||
|
||||
@@ -7,11 +7,6 @@ const api_temp = {
|
||||
})
|
||||
requestObj.promise = requestObj.promise.then(({ body }) => {
|
||||
return body.code === 0 ? Promise.resolve({ type, url: body.data }) : Promise.reject(new Error(body.msg))
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
if (err.message === 'socket hang up') return Promise.reject(new Error('接口挂了'))
|
||||
if (err.code === 'ENOTFOUND') return Promise.reject(new Error('无法连接网络'))
|
||||
return Promise.reject(err)
|
||||
})
|
||||
return requestObj
|
||||
},
|
||||
@@ -21,10 +16,6 @@ const api_temp = {
|
||||
})
|
||||
requestObj.promise = requestObj.promise.then(({ body }) => {
|
||||
return body.code === 0 ? Promise.resolve(body.data) : Promise.reject(new Error(body.msg))
|
||||
}).catch(err => {
|
||||
if (err.message === 'socket hang up') return Promise.reject(new Error('接口挂了'))
|
||||
if (err.code === 'ENOTFOUND') return Promise.reject(new Error('无法连接网络'))
|
||||
return Promise.reject(err)
|
||||
})
|
||||
return requestObj
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user