停车场项目web, 互联网仓库, 开发完成后, 需要将代码回传云桌面.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
859 B

  1. function getYSC () {
  2. const isInstance = createIS();
  3. const ciphertext = 'M1JyMHpsbXpPMUlUQWVZUQ==';
  4. const xhr = new XMLHttpRequest();
  5. if (typeof yscUrl === 'undefined') {
  6. window.location.href = globalLoginUrl;
  7. return false;
  8. }
  9. xhr.open('get', yscUrl, false);
  10. xhr.send(null);
  11. if (xhr.status === 200) {
  12. const data = JSON.parse(xhr.responseText)
  13. if (data.status === 0) {
  14. const dataType = Object.prototype.toString.call(data.data);
  15. if (dataType === '[object String]') {
  16. window.YISACONF = isInstance.aesUtil.decrypt(data.data, atob(ciphertext));
  17. } else {
  18. window.YISACONF = data.data;
  19. }
  20. }else if(data.status === 4){
  21. window.location.href = data.jumpUrl
  22. }else {
  23. window.location.href = globalLoginUrl;
  24. }
  25. } else {
  26. window.location.href = globalLoginUrl;
  27. }
  28. }
  29. getYSC();