import urlConfig from './config.js' const promise = {} promise.asyncRequest = (url, options = {}, power) => { return new Promise((resolve, reject) => { uni.request({ url: url, ...options, //data,method... header: { "content-type": "application/json", 'withCredentials': true, 'Authorization': localStorage.token_type, // 'Authorization': localStorage.token_type, ...options.header, }, success: (res) => { resolve(res.data); }, fail: (err) => { reject(err) } }); }) } export default promise.asyncRequest