import util from "../utils/util.js";
import config from "../config.js";

export default {
  // 上传文件
  upload(filePath) {
    if (!filePath) {
      return null;
    }
    return util.upload({
        url: config.urls.unloadSign,
        filePath: filePath,
      })
      .then((res) => {
        res.data =
          typeof res.data == "string" ? JSON.parse(res.data) : res.data;
        return res;
      });
  },
};
