From 3d29090cfcde7bfb1b72de7e9d470a6a32931f3a Mon Sep 17 00:00:00 2001 From: Li Jun <buli@deloitte.com.cn> Date: 星期四, 17 三月 2022 21:32:18 +0800 Subject: [PATCH] PIPLFunctionDeployV3 --- force-app/main/default/pages/SearchLeadPage.page | 32 ++++++++++++++++++++------------ 1 files changed, 20 insertions(+), 12 deletions(-) diff --git a/force-app/main/default/pages/SearchLeadPage.page b/force-app/main/default/pages/SearchLeadPage.page index 64275ca..e90b950 100644 --- a/force-app/main/default/pages/SearchLeadPage.page +++ b/force-app/main/default/pages/SearchLeadPage.page @@ -1,5 +1,6 @@ <apex:page controller="SearchLeadController" showHeader="false" id="page"> <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" /> + <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/> <head> </head> @@ -48,20 +49,27 @@ let requestSearchPayload = preparePayloadForSearchLead(); console.log('request payload body:'+requestSearchPayload); //2. Invoke AWS Service - fetch(staticResources.searchUrl, { - method: 'POST', - body: requestSearchPayload, - headers: { - 'Content-Type': 'application/json', - 'pi-token': staticResources.token - } - }).then((data) => { - return data.json(); - }).then((result) => { + + // fetch(staticResources.searchUrl, { + // method: 'POST', + // body: requestSearchPayload, + // headers: { + // 'Content-Type': 'application/json', + // 'pi-token': staticResources.token + // } + // }).then((data) => { + // return data.json(); + // }).then((result) => { + // if(result.object&&result.object.length>0){ + // initContactTable(result); + // } + // }) + let queryLeadBack = function(result){ if(result.object&&result.object.length>0){ initContactTable(result); - } - }) + } + } + AWSService.search(staticResources.searchUrl, requestSearchPayload, queryLeadBack, staticResources.token); } function redirectToParentPage(obj) { -- Gitblit v1.9.1