king
2019-10-29 d4f4804aeedb44d81b7518cd5469abcb0c215d6b
src/api/index.js
@@ -9,7 +9,7 @@
axios.interceptors.request.use((config) => {
  config.method = 'post'
  if (config.url.includes('LoginAndRedirect')) {
  if (config.url.includes('LoginAndRedirect') || config.url.includes('getjsonresult')) {
    config.data = qs.stringify(config.data)
  } else {
    config.headers.token = sessionStorage.getItem('TOKEN') || ''
@@ -64,6 +64,20 @@
      }
    })
  }
  /**
   * @description 登录系统
   */
  getusermsg (username, password) {
    return axios({
      url: 'webapi/getjsonresult',
      data: {
        DBT: 'proc',
        DBS: 'webapi_login',
        DBP: JSON.stringify({ 'UserName': username, 'Password': password })
      }
    })
  }
  
  /**
   * @description 登出系统