"use strict";const e=require("../../../common/vendor.js"),i=require("../../config/index.js"),n={uploadFile:n=>(e.index.getStorageSync("token"),e.index.showLoading({title:"上传中"}),new Promise(((t,o)=>{e.index.uploadFile({url:i.baseUrl+i.apiPath+"/infra/file/upload",filePath:n,name:"file",header:{Accept:"*/*","tenant-id":i.tenantId},success:i=>{const n=JSON.parse(i.data);if(1!==n.error)return t(n);e.index.showToast({icon:"none",title:n.msg})},fail:e=>t(!1),complete:()=>{e.index.hideLoading()}})})))};exports.FileApi=n;