apiurljs1.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //首先: special命名为sp
  2. var apiurljs = window.NameSpace || {};
  3. apiurljs.login = "http://10.233.22.204:8088/glwork/";
  4. apiurljs.onePic = "http://10.149.1.56:8077/"
  5. apiurljs.yzFcscloud = "http://10.233.22.204:8088/glwork/"
  6. apiurljs.yzFileWo = "http://10.233.22.204:18080/";//永中在线编辑
  7. //老OA公文地址
  8. apiurljs.seeyon = "http://192.168.1.113:86/seeyon"
  9. apiurljs.refineapi = "";
  10. nexe = "";
  11. //sm4解码字符串转对象
  12. function strToJson(str) {
  13. 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, "")
  14. var json = eval('(' + obj + ')');
  15. return json;
  16. }
  17. if (sessionStorage.getItem("GlWorkPlatform-uploadformat") == null) {
  18. $.ajax({
  19. url: apiurljs.login + "g2app/DangAn/queryCodeData",
  20. type: 'post',
  21. dataType: 'json',
  22. contentType: 'application/json',
  23. headers: { Authorization: "Bearer " + localStorage.getItem("GlWorkPlatform-AccessToken") },
  24. data: JSON.stringify({
  25. tablename: "CODE_UPLOADFORMAT"
  26. }),
  27. success: function (res) {
  28. apiurljs.uploadformat = res.data;
  29. sessionStorage.setItem("GlWorkPlatform-uploadformat", apiurljs.uploadformat)
  30. console.log(apiurljs.uploadformat)
  31. }
  32. })
  33. } else {
  34. apiurljs.uploadformat = sessionStorage.getItem("GlWorkPlatform-uploadformat")
  35. }