| | |
| | | config.method = 'post' |
| | | if (config.url.includes('LoginAndRedirect') || config.url.includes('getjsonresult')) { |
| | | config.data = qs.stringify(config.data) |
| | | } else if (config.url.includes('Upload')) { |
| | | config.headers = { 'Content-Type': 'multipart/form-data' } |
| | | } else { |
| | | config.headers.token = sessionStorage.getItem('TOKEN') || '' |
| | | config.data = JSON.stringify(config.data) |
| | |
| | | } |
| | | |
| | | /** |
| | | * @description 文件上传 |
| | | */ |
| | | getFileUpload (file) { |
| | | const param = new FormData() |
| | | param.append('file', file) |
| | | param.append('RootPath', 'Content/images/upload/') |
| | | |
| | | return axios({ |
| | | url: '/zh-CN/Home/Upload', |
| | | data: param |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * @description 获取页面配置信息 |
| | | * @param {String} MenuNo 页面菜单参数 |
| | | */ |