system.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import { myFetch, download, commonUpload } from "../utils/fetch";
  2. import { httpApi } from "@/common/js/baseUrl";
  3. import zlbApi from "@/api/zlbApi";
  4. // 字典查询接口 '/system/getDictionaryByName'
  5. export function getDictionaryByName(data) {
  6. const url = zlbApi.getDictionaryByName; // '/system/getDictionaryByName'
  7. return myFetch(url, "get", data, "json");
  8. }
  9. // 批量查询字典内容 '/system/getDicByNameList'
  10. export function getDicByNameList(data) {
  11. const url = zlbApi.getDicByNameList; // '/system/getDicByNameList'
  12. return myFetch(url, "get", data, "json");
  13. }
  14. // 查询地区 '/system/listArea'
  15. export function listArea(data) {
  16. const url = zlbApi.listArea; // '/system/listArea'
  17. return myFetch(url, "get", data, "json");
  18. }
  19. // 上传文件 '/file/upload'
  20. export function uploadFile(config = { tempFilePath: "", fileBase64Vos: '', catalog: '' }) {
  21. console.log("上传文件配置", config);
  22. const url = zlbApi.uploadBase64; // '/file/upload'
  23. return myFetch(url, "post", config, "json");
  24. }
  25. // 下载文件 '/file/download?fileUuid'
  26. export function downloadFile(data) {
  27. const url = zlbApi.fileDownload; // '/file/download?fileUuid'
  28. return download(url, "get", data);
  29. }
  30. /**
  31. * 浙政钉 获取用户信息
  32. * /system/ZzdLogin
  33. */
  34. export function ZzdLogin(data) {
  35. const url = zlbApi.ZzdLogin;
  36. return myFetch(url, "get", data, "json");
  37. }