import { http, uploadOne, uploadImage } from '@/api/request/index.js'; import { url_config } from '@/config/index.js' const api = { send(opts = {}){ const {url, method='GET',data={},auth = 'auth',loading = false} = opts return http(loading)(url,method,data,auth); }, sendOne(url, method='GET',data={},loading = false,auth = 'auth'){ return http(loading)(url,method,data,auth); }, uploadPath: () => (url_config + "/oss/upload"), uploadFile: (path, msg) => uploadImage("/oss/upload", path, msg), uploadOne: (msg) => uploadOne("/oss/upload", msg), homeInfo: (data, show = false, loadingText) => http(show, loadingText)(`/ums/api/v1/home/pageInfo`, 'GET', data), }