From d70c0637c26edd8793fe62420bc82ba55b000d93 Mon Sep 17 00:00:00 2001 From: sachinganesh Date: Mon, 24 Apr 2023 18:37:05 +0530 Subject: [PATCH] code added --- dist/Js/index/index.js | 178 ++++++++++++++++++++ dist/Js/main.js | 126 +++++++-------- dist/Js/navbar.js | 4 +- dist/Js/productdetails/productdetails.js | 2 +- dist/Js/products/products.js | 5 +- dist/Js/utils/helpers.js | 8 + index.html | 196 ++++++++++------------- productdetails.html | 31 ++-- 8 files changed, 353 insertions(+), 197 deletions(-) create mode 100644 dist/Js/index/index.js diff --git a/dist/Js/index/index.js b/dist/Js/index/index.js new file mode 100644 index 0000000..876e2cc --- /dev/null +++ b/dist/Js/index/index.js @@ -0,0 +1,178 @@ +function indexInit(){ + function init(){ + initData(); + } + async function initData(){ + const ids = await getProductIdService(); + if(!ids) return; + let dataAcc = []; + for(let i=0;i +
+
+ +

${itemname}

+

Buy Now

+
+
+ `; + return `
+
+ +

${itemname}

+

Buy Now

+ +
+
`; + } + + function getProductIdService(){ + return new Promise(async (reslove,reject)=>{ + let resData =await API_SERVICES_ACTIONS.getAPIService(`apis/v4/bizgaze/integrations/products/getallproducts`,true); + if(resData.isError){ + alert(resData.errorMsg.message); + return; + } + + let res = resData.response; + + res = JSON.parse(res.result); + + + let resultItem = []; + + for(let i=0;i
-