| | |
| | | config.method = 'post' |
| | | if (config.url.includes('LoginAndRedirect') || config.url.includes('getjsonresult')) { |
| | | config.data = qs.stringify(config.data) |
| | | } else if (config.url.includes('Upload')) { |
| | | } else if (config.url.includes('Upload') || config.url.includes('doupload')) { |
| | | config.headers = { 'Content-Type': 'multipart/form-data' } |
| | | } else { |
| | | // config.headers.token = sessionStorage.getItem('TOKEN') || '' |
| | |
| | | param.Password = Utils.formatOptions(param.Password) |
| | | param.appkey = window.GLOB.appkey || '' |
| | | |
| | | if (isCloud && options.cloudLoginApi) { |
| | | param.rduri = options.cloudLoginApi |
| | | if (isCloud) { |
| | | param.debug = 'Y' |
| | | if (options.cloudLoginApi) { |
| | | param.rduri = options.cloudLoginApi |
| | | } |
| | | } else if (!isCloud && window.GLOB.mainSystemApi) { |
| | | param.rduri = window.GLOB.mainSystemApi.replace(/\/webapi(.*)/, '/webapi/dologon') |
| | | } |
| | |
| | | param.LoginUID = sessionStorage.getItem('LoginUID') || '' |
| | | param.appkey = window.GLOB.appkey || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true' && param.rduri === options.cloudServiceApi) { // HS下菜单 |
| | | if (sessionStorage.getItem('isEditState') === 'true') { // HS下菜单 |
| | | param.userid = sessionStorage.getItem('CloudUserID') |
| | | param.SessionUid = sessionStorage.getItem('CloudSessionUid') || '' |
| | | param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | |
| | | } |
| | | |
| | | /** |
| | | * @description 大文件上传 |
| | | */ |
| | | getLargeFileUpload (param) { |
| | | return axios({ |
| | | url: '/webapi/doupload', |
| | | data: param |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * @description 文件上传 |
| | | */ |
| | | getFileUpload (param) { |