apiurljs2.js 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. //首先: special命名为sp
  2. var apiurljs = window.NameSpace || {};
  3. apiurljs.login = "http://192.168.3.152:8088/glwork/";
  4. apiurljs.onePic = "http://10.149.1.56:8077/"
  5. apiurljs.yzFcscloud = "http://192.168.3.152:8088/glwork/"
  6. apiurljs.yzFileWo = "http://192.168.3.152:8088/wo/";
  7. //老OA公文地址
  8. apiurljs.seeyon = "http://192.168.1.113:86/seeyon"
  9. apiurljs.refineapi = "";
  10. nexe = "";
  11. apiurljs.dpt = "http://10.149.1.35:8001/api/"
  12. //sm4解码字符串转对象
  13. function strToJson(str) {
  14. var obj = str.replace(/\u0000|\u0001|\u0002|\u0003|\u0004|\u0005|\u0006|\u0007|\u0008|\u0009|\u000a|\u000b|\u000c|\u000d|\u000e|\u000f|\u0010|\u0011|\u0012|\u0013|\u0014|\u0015|\u0016|\u0017|\u0018|\u0019|\u001a|\u001b|\u001c|\u001d|\u001e|\u001f|\u007F/g, "")
  15. var json = eval('(' + obj + ')');
  16. return json;
  17. }
  18. if (sessionStorage.getItem("GlWorkPlatform-uploadformat") == null) {
  19. $.ajax({
  20. //url: apiurljs.login + "g2app/Data/queryCodeData",
  21. url: apiurljs.login + "g2app/dataabase/queryCodeData",
  22. type: 'post',
  23. dataType: 'json',
  24. contentType: 'application/json',
  25. headers: { Authorization: "Bearer " + localStorage.getItem("GlWorkPlatform-AccessToken") },
  26. data: JSON.stringify({
  27. tablename: "CODE_UPLOADFORMAT"
  28. }),
  29. success: function (res) {
  30. apiurljs.uploadformat = res.data;
  31. sessionStorage.setItem("GlWorkPlatform-uploadformat", apiurljs.uploadformat)
  32. console.log(apiurljs.uploadformat)
  33. }
  34. })
  35. } else {
  36. apiurljs.uploadformat = sessionStorage.getItem("GlWorkPlatform-uploadformat")
  37. }
  38. apiurljs.zwType = ["doc", "docx", "wps", "xls", "xlsx", "et"]
  39. apiurljs.zhType = ["doc", "docx", "wps", "xls", "xlsx", "et", "pdf", "ofd", "png", "jpg", "jpeg", "gif", "bmp", "jfif", "svg", "tif", "tiff"]//, "DOC", "DOCX", "WPS", "XLS", "XLSX", "ET", "PDF", "OFD", "PNG", "JPG", "JPEG", "GIF", "BMP", "JFIF", "SVG", "TIF", "TIFF"]