| | |
| | | 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' } |
| | |
| | | }) |
| | | } |
| | | |
| | | postekPrint (data) { |
| | | return axios({ |
| | | url: 'http://127.0.0.1:888/postek/print', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // /** |
| | | // * @description 文件上传 |
| | | // */ |