| | |
| | | SysNotice -- 是否开启系统消息 |
| | | updateStatus -- 是否更新开发状态,默认开启,当值为 false 时禁用 |
| | | forcedUpdate -- 传输号升级时,是否自动退出,格式为(YYYY-MM-DD),用于升级后刷新用户本地配置 |
| | | errorLog -- 记录500、504时的报错日志,值为 true 时开启,业务系统有效 |
| | |
| | | "keepPwd": "true", |
| | | "execType": "x", |
| | | "SysNotice": "false", |
| | | "errorLog": "false", |
| | | "host": "http://qingqiumarket.cn", |
| | | "service": "MKWMS/" |
| | | } |
| | |
| | | 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)) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | }) |
| | | |
| | | 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) { |
| | |
| | | |
| | | 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下不打印脚本 |
| | |
| | | } 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)`) |
| | | } |