king
2022-12-06 0245e64a9dff794903e546c3bdf9fef7efeefdf1
src/api/index.js
@@ -32,7 +32,7 @@
axios.defaults.withCredentials = false
axios.interceptors.request.use((config) => {
  if (config.url.includes('LoginAndRedirect') || config.url.includes('getjsonresult') || config.url.includes('wxNativePay')) {
  if (/LoginAndRedirect|getjsonresult|wxNativePay|postek/ig.test(config.url)) {
    config.data = qs.stringify(config.data)
  } else if (/\/doupload|\/dopreload|\/upload/.test(config.url)) {
    config.headers = { 'Content-Type': 'multipart/form-data' }
@@ -832,12 +832,15 @@
      delete param.rduri
    }
    let _param = JSON.parse(JSON.stringify(param)) // 缓存校验,去除时间和加密字符
    delete _param.timestamp
    delete _param.secretkey
    delete _param.open_key
    _param = JSON.stringify(_param)
    _param  = md5(_param)
    let _param = ''
    if (cache) {
      _param = JSON.parse(JSON.stringify(param)) // 缓存校验,去除时间和加密字符
      delete _param.timestamp
      delete _param.secretkey
      delete _param.open_key
      _param = JSON.stringify(_param)
      _param  = md5(_param)
    }
    if (cache && window.GLOB.CacheMap.has(_param)) {
      return Promise.resolve(window.GLOB.CacheMap.get(_param))
@@ -1216,6 +1219,14 @@
    })
  }
  postekPrint (data) {
    return axios({
      url: 'http://127.0.0.1:888/postek/print',
      method: 'post',
      data: data
    })
  }
  // /**
  //  * @description 文件上传
  //  */