裂变星小程序-25.03.04
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

20 lines
379 B

import api from './api.js'
const fetch = (key, data = {}, transform = true, loadingTitle) => {
return new Promise(resolve => {
const callback = (res) => {
if (!transform) {
resolve(res)
return
}
if (res.code == 200) {
resolve(res.result)
}
}
api(key, data, callback, loadingTitle)
})
}
export default fetch