| | |
| | | // }); |
| | | }, |
| | | search_core : function(token,searchUrl,payload,callback,component) { |
| | | console.log('token = ' + token); |
| | | console.log('searchUrl = ' + searchUrl); |
| | | console.log('payload = ' + payload); |
| | | fetch(searchUrl, { |
| | | method: 'POST', |
| | | body: payload, |
| | |
| | | component.set('v.login',false); |
| | | if(callback)callback(result); |
| | | }).catch(error => { |
| | | console.log('error = ' + JSON.stringify(error)); |
| | | this.error('AWS search error.'); |
| | | component.set('v.login',false); |
| | | }); |
| | |
| | | fileData : component.get("v.fileContentData"), |
| | | }); |
| | | action1.setCallback(this, function(response) { |
| | | console.log('response = ' + JSON.stringify(response)); |
| | | var state = response.getState(); |
| | | if (state === "SUCCESS") { |
| | | var ress = response.getReturnValue(); |
| | | console.log('ress = ' + JSON.stringify(ress)); |
| | | if(ress){ |
| | | var valur =ress.split('error1'); |
| | | if(valur.length<=1){ |
| | | var res = JSON.parse(response.getReturnValue()); |
| | | console.log('res = ' + JSON.stringify(res)); |
| | | var dataArr = new Array(); |
| | | var dataMap = new Map(); |
| | | res.forEach(item => { |