apiurljs.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //首先: special命名为sp
  2. var apiurljs = window.NameSpace || {};
  3. apiurljs.login = "http://192.168.3.152:8088/glwork/";
  4. apiurljs.login1 = "http://192.168.3.152:8088/glwork1/";
  5. apiurljs.onePic = "http://10.149.1.56:8077/"
  6. apiurljs.yzFcscloud = "http://192.168.3.152:8088/glwork/"
  7. apiurljs.yzFileWo = "http://192.168.3.152:8088/wo/";
  8. //老OA公文地址
  9. apiurljs.seeyon = "http://192.168.1.113:86/seeyon"
  10. apiurljs.refineapi = "";
  11. nexe = "";
  12. apiurljs.dpt = "http://10.149.1.35:8001/api/"
  13. //sm4解码字符串转对象
  14. function strToJson(str) {
  15. 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, "")
  16. var json = eval('(' + obj + ')');
  17. return json;
  18. }
  19. if (sessionStorage.getItem("GlWorkPlatform-uploadformat") == null) {
  20. $.ajax({
  21. url: apiurljs.login + "g2app/dataabse/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. }
  33. })
  34. } else {
  35. apiurljs.uploadformat = sessionStorage.getItem("GlWorkPlatform-uploadformat")
  36. }
  37. apiurljs.zwType = ["doc", "docx", "wps", "xls", "xlsx", "et"]