king
2024-12-24 5f69e3bf213ccc377dc118b89bb8db348eafbc1d
2024-12-24
6个文件已修改
54 ■■■■■ 已修改文件
public/README.txt 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/options.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/index.js 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/header/index.jsx 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/index.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils-custom.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/README.txt
@@ -24,4 +24,5 @@
execType          -- 脚本传输方式,值为x时,启用AES加密
SysNotice         -- 是否开启系统消息
updateStatus      -- 是否更新开发状态,默认开启,当值为 false 时禁用
forcedUpdate      -- 传输号升级时,是否自动退出,格式为(YYYY-MM-DD),用于升级后刷新用户本地配置
forcedUpdate      -- 传输号升级时,是否自动退出,格式为(YYYY-MM-DD),用于升级后刷新用户本地配置
errorLog          -- 记录500、504时的报错日志,值为 true 时开启,业务系统有效
public/options.json
@@ -21,6 +21,7 @@
  "keepPwd": "true",
  "execType": "x",
  "SysNotice": "false",
  "errorLog": "false",
  "host": "http://qingqiumarket.cn",
  "service": "MKWMS/"
}
src/api/index.js
@@ -74,9 +74,31 @@
      placement: 'bottomRight',
      duration: 15
    })
    if ([404, 500, 504].includes(response.status) && error.config && error.config.url) {
    if ([500, 504].includes(response.status) && error.config && error.config.url && error.config.data) {
      window.mkInfo(error.config.url)
      error.config.data && window.mkInfo(error.config.data)
      window.mkInfo(error.config.data)
      if (window.GLOB.errorLog && !sessionStorage.getItem('local_error')) {
        let urlReg = new RegExp('^(' + window.GLOB.baseurl + '|/)webapi/(exstars|dostars)', 'ig')
        if (urlReg.test(response.config.url) && !/s_special_error_note_log/.test(response.config.url)) {
          let res = null
          try {
            let data = JSON.parse(error.config.data)
            if (!data.rduri) {
              res = {
                api_url: error.config.url,
                error_code: response.status,
                error_time: moment().format('YYYY-MM-DD HH:mm:ss'),
                api_param: error.config.data
              }
            }
          } catch (e) {
            res = null
          }
          if (res) {
            sessionStorage.setItem('local_error', JSON.stringify(res))
          }
        }
      }
    }
  }
src/components/header/index.jsx
@@ -83,6 +83,24 @@
        }
      }
    })
    if (sessionStorage.getItem('local_error')) {
      try {
        let param = JSON.parse(sessionStorage.getItem('local_error'))
        setTimeout(() => {
          Api.genericInterface({
            func: 's_special_error_note_log',
            ...param
          }).then(res => {
            if (res.status) {
              sessionStorage.removeItem('local_error')
            }
          })
        }, 3000)
      } catch (e) {
        sessionStorage.removeItem('local_error')
      }
    }
  }
  shouldComponentUpdate (nextProps, nextState) {
src/index.js
@@ -166,6 +166,10 @@
      
        GLOB.mainSystemApi = systemApi
      }
      if (config.errorLog === 'true' && /#\/(login|main|billprint|docprint|tab|iframe|view|ssologin)/.test(window.location.href)) {
        GLOB.errorLog = true
      }
    }
    if (/#\/hs$/.test(window.location.href)) { // hs下不打印脚本
src/utils/utils-custom.js
@@ -4707,7 +4707,7 @@
        } else if (['mk_address'].includes(s)) {
          decSql.push(`@mk_address nvarchar(100)`)
        } else if (['mk_deleted'].includes(s)) {
          secSql.push(`@mk_deleted int`)
          decSql.push(`@mk_deleted int`)
        } else {
          decSql.push(`@${s} nvarchar(50)`)
        }