| | |
| | | |
| | | 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') || '' |
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * @description 登录系统 |
| | | */ |
| | | getusermsg (username, password) { |
| | | return axios({ |
| | | url: 'webapi/getjsonresult', |
| | | data: { |
| | | DBT: 'proc', |
| | | DBS: 'webapi_login', |
| | | DBP: JSON.stringify({ 'UserName': username, 'Password': password }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * @description 登出系统 |