import { ACCESSTOKEN, config } from '@/common/config.js' export default (url, method, params) => { // if(!showLoading){ // uni.showLoading({ // title:"" // }) // } return new Promise((resolve, reject) => { uni.request({ url: config.VITE_APP_BASE + url, method: method, header: { 'Accept': 'application/json, text/plain, */*', 'content-type' : 'application/json', "responseType": "stream", 'connection': 'keep-alive', }, data: { ...params }, success(res) { if (res.data.code == 401) { } resolve(res.data); }, fail(err) { reject(err); }, complete() { } }); }); };