linwe
2024-06-03 625b99aaaa484ccfb629ae7b49ec6e07b9541ba1
src/util/util.js
@@ -77,7 +77,12 @@
 * 加密处理
 */
export const encryption = (params) => {
  let { data, type, param, key } = params;
  let {
    data,
    type,
    param,
    key
  } = params;
  let result = JSON.parse(JSON.stringify(data));
  if (type == "Base64") {
    param.forEach((ele) => {
@@ -285,16 +290,16 @@
  const dualScreenTop =
    window.screenTop !== undefined ? window.screenTop : screen.top;
  const width = window.innerWidth
    ? window.innerWidth
    : document.documentElement.clientWidth
    ? document.documentElement.clientWidth
    : screen.width;
  const height = window.innerHeight
    ? window.innerHeight
    : document.documentElement.clientHeight
    ? document.documentElement.clientHeight
    : screen.height;
  const width = window.innerWidth ?
    window.innerWidth :
    document.documentElement.clientWidth ?
    document.documentElement.clientWidth :
    screen.width;
  const height = window.innerHeight ?
    window.innerHeight :
    document.documentElement.clientHeight ?
    document.documentElement.clientHeight :
    screen.height;
  const left = width / 2 - w / 2 + dualScreenLeft;
  const top = height / 2 - h / 2 + dualScreenTop;
@@ -409,7 +414,9 @@
    link.click();
  } else if (typeof window.navigator.msSaveBlob !== "undefined") {
    // IE
    var blob = new Blob([data], { type: "application/force-download" });
    var blob = new Blob([data], {
      type: "application/force-download"
    });
    window.navigator.msSaveBlob(blob, filename);
  } else {
    // Firefox