king
2021-01-21 115a6ae906c22af00efa6734a129ca6500be001c
src/api/index.js
@@ -41,12 +41,11 @@
axios.defaults.withCredentials = true
axios.interceptors.request.use((config) => {
  config.method = 'post'
  if (config.url.includes('LoginAndRedirect') || config.url.includes('getjsonresult') || config.url.includes('wxNativePay')) {
    config.data = qs.stringify(config.data)
  } else if (config.url.includes('Upload') || config.url.includes('doupload') || config.url.includes('dopreload')) {
    config.headers = { 'Content-Type': 'multipart/form-data' }
  } else {
  } else if (config.method === 'post') {
    // config.headers.token = sessionStorage.getItem('TOKEN') || ''
    config.data = JSON.stringify(config.data)
  }
@@ -112,7 +111,21 @@
    return axios({
      url: '/webapi/dostar',
      method: 'post',
      data: param
    })
  }
  /**
   * @description 直接请求
   * @param {Object} param 查询及提交参数
   */
  directRequest (url, method, param) {
    return axios({
      url: url,
      method: method,
      params: param
    })
  }
@@ -128,6 +141,7 @@
    return axios({
      url: '/webapi/dostar',
      method: 'post',
      data: param
    })
  }
@@ -161,6 +175,7 @@
    return axios({
      url: '/webapi/dologon',
      method: 'post',
      data: param
    })
  }
@@ -192,6 +207,7 @@
    return axios({
      url: '/webapi/dologon',
      method: 'post',
      data: param
    })
  }
@@ -222,6 +238,7 @@
    return axios({
      url: '/webapi/dologon',
      method: 'post',
      data: param
    })
  }
@@ -284,6 +301,7 @@
      return new Promise((resolve, reject) => {
        axios({
          url: `/webapi/dostars${param.func ? '/' + param.func : ''}`,
          method: 'post',
          data: param
        }).then(res => {
          if (!res.status) {
@@ -414,6 +432,7 @@
    return axios({
      url: `/webapi/dostars${param.func ? '/' + param.func : ''}`,
      method: 'post',
      data: param
    })
  }
@@ -454,6 +473,7 @@
      return new Promise(resolve => {
        axios({
          url: `/webapi/dostars${param.func ? '/' + param.func : ''}`,
          method: 'post',
          data: param
        }).then(res => {
          if (res.status) {
@@ -487,6 +507,7 @@
    return axios({
      url: `/webapi/dostars${param.func ? '/' + param.func : ''}`,
      method: 'post',
      data: param
    })
  }
@@ -505,6 +526,7 @@
    return axios({
      url: `/webapi/dostars${param.func ? '/' + param.func : ''}`,
      method: 'post',
      data: param
    })
  }
@@ -558,6 +580,7 @@
            } else {
              axios({
                url: `/webapi/dostars${param.func ? '/' + param.func : ''}`,
                method: 'post',
                data: param
              }).then(res => {
                if (res.status) {
@@ -572,6 +595,7 @@
            axios({
              url: `/webapi/dostars${param.func ? '/' + param.func : ''}`,
              method: 'post',
              data: param
            }).then(res => {
              if (res.status) {
@@ -590,6 +614,7 @@
      return new Promise(resolve => {
        axios({
          url: `/webapi/dostars${param.func ? '/' + param.func : ''}`,
          method: 'post',
          data: param
        }).then(res => {
          if (res.status) {
@@ -702,6 +727,7 @@
      return new Promise(resolve => {
        axios({
          url: `/webapi/dostars${param.func ? '/' + param.func : ''}`,
          method: 'post',
          data: param
        }).then(res => {
          if (res.status) {
@@ -732,6 +758,7 @@
    return axios({
      url: `/webapi/dostars${param.func ? '/' + param.func : ''}`,
      method: 'post',
      data: param
    })
  }
@@ -750,6 +777,7 @@
      axios({
        url: '/webapi/doexcel',
        responseType: 'blob',
        method: 'post',
        data: param
      }).then(res => {
@@ -821,11 +849,13 @@
      return axios({
        url: '/webapi/dostars',
        method: 'post',
        data: param
      })
    } else {
      return axios({
        url: '/webapi/SaveBase64Image',
        method: 'post',
        data: param
      })
    }
@@ -837,6 +867,7 @@
  getLargeFileUpload (param) {
    return axios({
      url: '/webapi/doupload',
      method: 'post',
      data: param
    })
  }
@@ -847,6 +878,7 @@
  getFilePreUpload (param) {
    return axios({
      url: '/webapi/dopreload',
      method: 'post',
      data: param
    })
  }
@@ -857,6 +889,7 @@
  getWxNativePay (param) {
    return axios({
      url: '/wxpay/wxNativePay',
      method: 'post',
      data: param
    })
  }
@@ -867,6 +900,7 @@
  getFileUpload (param) {
    return axios({
      url: '/zh-CN/Home/Upload',
      method: 'post',
      data: param
    })
  }
@@ -885,6 +919,7 @@
    
    return axios({
      url: '/webapi/dostar',
      method: 'post',
      data: param
    })
  }
@@ -901,6 +936,7 @@
    return axios({
      url: '/webapi/dostar',
      method: 'post',
      data: param
    })
  }