您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 

1 行
17 KiB

  1. {"ast":null,"code":"\"use strict\";\n\nvar _apollo = _interopRequireDefault(require(\"../../lib/apollo.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nasync function GetDetailProduct(id, token = \"\") {\n var res = await _apollo.default.query(`\n query($input: ID!){\n products(where:{id:$input})\n {\n id\n name\n price\n price1\n price2\n product_otrs {\n id\n name\n price\n }\n description\n spesifikasi_mesin\n spesifikasi_dimensi\n spesifikasi_rangka\n spesifikasi_kelistrikan\n film\n stock\n\n img{\n url\n }\n overview1\n img_overview1{\n url\n }\n overview2\n img_overview2{\n url\n }\n overview3\n img_overview3{\n url\n }\n overview4\n img_overview4{\n url\n }\n overview5\n img_overview5{\n url\n }\n overview6\n img_overview6{\n url\n }\n overview7\n img_overview7{\n url\n }\n overview8\n img_overview8{\n url\n }\n overview9\n img_overview9{\n url\n }\n overview10\n img_overview10{\n url\n }\n }\n }\t`, token, {\n \"input\": id\n });\n return res;\n}\n\nasync function GetProductImgColor(id, token = \"\") {\n var res = await _apollo.default.query(`\n query($input: ID!) {\n productImageColors(where:{id:$input}) {\n id\n name\n img{\n url\n }\n }\n }\n `, token, {\n \"input\": id\n });\n return res;\n}\n\nasync function GetProduct(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products{\n id\n name\n price\n price1\n price2\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nasync function GetProductMatic(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { categories: \"matic\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nasync function GetProductMaxi(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { categories: \"maxi\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nasync function GetProductNaked(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { categories: \"naked\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nasync function GetProductSport(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { categories: \"sport\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nasync function GetProductOffRoad(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { categories: \"offroad\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nasync function GetProductMoped(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { categories: \"moped\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nasync function GetProductMonsterEnergy(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { categories: \"monsterenergy\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nasync function GetProductCBU(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { categories: \"cbu\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nasync function GetProductATV(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { categories: \"atv\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nasync function GetProductPowerProduct(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { categories: \"powerproduct\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nasync function GetProductHonda(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { business_partner: \"3\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nasync function GetProductHino(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { business_partner: \"4\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nmodule.exports = {\n GetProductImgColor: GetProductImgColor,\n GetProduct: GetProduct,\n //yamaha\n GetProductMatic: GetProductMatic,\n GetProductMaxi: GetProductMaxi,\n GetProductNaked: GetProductNaked,\n GetProductSport: GetProductSport,\n GetProductOffRoad: GetProductOffRoad,\n GetProductMoped: GetProductMoped,\n GetProductMonsterEnergy: GetProductMonsterEnergy,\n GetProductCBU: GetProductCBU,\n GetProductATV: GetProductATV,\n GetProductPowerProduct: GetProductPowerProduct,\n //honda\n GetProductHonda: GetProductHonda,\n //hino\n GetProductHino: GetProductHino,\n //detail\n GetDetailProduct: GetDetailProduct\n};","map":{"version":3,"sources":["E:/Project/tbg-ecomm-nextjs/api/product/product.js"],"names":["GetDetailProduct","id","token","res","apollo","query","GetProductImgColor","GetProduct","GetProductMatic","GetProductMaxi","GetProductNaked","GetProductSport","GetProductOffRoad","GetProductMoped","GetProductMonsterEnergy","GetProductCBU","GetProductATV","GetProductPowerProduct","GetProductHonda","GetProductHino","module","exports"],"mappings":";;AAAA;;;;AAEA,eAAeA,gBAAf,CAAgCC,EAAhC,EAAoCC,KAAK,GAAG,EAA5C,EAAgD;AAC9C,MAAIC,GAAG,GAAG,MAAMC,gBAAOC,KAAP,CACb;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAnEkB,EAoEdH,KApEc,EAoEP;AACL,aAASD;AADJ,GApEO,CAAhB;AAwEA,SAAOE,GAAP;AACD;;AAED,eAAeG,kBAAf,CAAkCL,EAAlC,EAAsCC,KAAK,GAAG,EAA9C,EAAkD;AAChD,MAAIC,GAAG,GAAG,MAAMC,gBAAOC,KAAP,CACb;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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AP,CACb;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAXkB,EAYdH,KAZc,CAAhB;AAcA,SAAOC,GAAP;AACD;;AAED,eAAegB,cAAf,CAA8BjB,KAAK,GAAG,EAAtC,EAA0C;AACxC,MAAIC,GAAG,GAAG,MAAMC,gBAAOC,KAAP,CACb;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAXkB,EAYdH,KAZc,CAAhB;AAcA,SAAOC,GAAP;AACD;;AAEDiB,MAAM,CAACC,OAAP,GAAiB;AAEff,EAAAA,kBAAkB,EAAEA,kBAFL;AAGfC,EAAAA,UAAU,EAAEA,UAHG;AAKf;AACAC,EAAAA,eAAe,EAAEA,eANF;AAOfC,EAAAA,cAAc,EAAEA,cAPD;AAQfC,EAAAA,eAAe,EAAEA,eARF;AASfC,EAAAA,eAAe,EAAEA,eATF;AAUfC,EAAAA,iBAAiB,EAAEA,iBAVJ;AAWfC,EAAAA,eAAe,EAAEA,eAXF;AAYfC,EAAAA,uBAAuB,EAAEA,uBAZV;AAafC,EAAAA,aAAa,EAAEA,aAbA;AAcfC,EAAAA,aAAa,EAAEA,aAdA;AAefC,EAAAA,sBAAsB,EAAEA,sBAfT;AAiBf;AACAC,EAAAA,eAAe,EAACA,eAlBD;AAoBf;AACAC,EAAAA,cAAc,EAACA,cArBA;AAuBf;AACAnB,EAAAA,gBAAgB,EAAEA;AAxBH,CAAjB","sourcesContent":["import apollo from \"../../lib/apollo.js\";\r\n\r\nasync function GetDetailProduct(id, token = \"\") {\r\n var res = await apollo.query(\r\n `\r\n query($input: ID!){\r\n products(where:{id:$input})\r\n {\r\n id\r\n name\r\n price\r\n price1\r\n price2\r\n product_otrs {\r\n id\r\n name\r\n price\r\n }\r\n description\r\n spesifikasi_mesin\r\n spesifikasi_dimensi\r\n spesifikasi_rangka\r\n spesifikasi_kelistrikan\r\n film\r\n stock\r\n\r\n img{\r\n url\r\n }\r\n overview1\r\n img_overview1{\r\n url\r\n }\r\n overview2\r\n img_overview2{\r\n url\r\n }\r\n overview3\r\n img_overview3{\r\n url\r\n }\r\n overview4\r\n img_overview4{\r\n url\r\n }\r\n overview5\r\n img_overview5{\r\n url\r\n }\r\n overview6\r\n img_overview6{\r\n url\r\n }\r\n overview7\r\n img_overview7{\r\n url\r\n }\r\n overview8\r\n img_overview8{\r\n url\r\n }\r\n overview9\r\n img_overview9{\r\n url\r\n }\r\n overview10\r\n img_overview10{\r\n url\r\n }\r\n }\r\n }\t`,\r\n token, {\r\n \"input\": id\r\n }\r\n );\r\n return res;\r\n}\r\n\r\nasync function GetProductImgColor(id, token = \"\") {\r\n var res = await apollo.query(\r\n `\r\n query($input: ID!) {\r\n productImageColors(where:{id:$input}) {\r\n id\r\n name\r\n img{\r\n url\r\n }\r\n }\r\n }\r\n `,\r\n token, {\r\n \"input\": id\r\n }\r\n );\r\n return res;\r\n}\r\n\r\nasync function GetProduct(token = \"\") {\r\n var res = await apollo.query(\r\n `\r\n query {\r\n products{\r\n id\r\n name\r\n price\r\n price1\r\n price2\r\n img {\r\n url\r\n }\r\n }\r\n }`,\r\n token\r\n );\r\n return res;\r\n}\r\n\r\nasync function GetProductMatic(token = \"\") {\r\n var res = await apollo.query(\r\n `\r\n query {\r\n products(where: { categories: \"matic\" }) {\r\n id\r\n name\r\n price\r\n img {\r\n url\r\n }\r\n }\r\n }`,\r\n token\r\n );\r\n return res;\r\n}\r\n\r\nasync function GetProductMaxi(token = \"\") {\r\n var res = await apollo.query(\r\n `\r\n query {\r\n products(where: { categories: \"maxi\" }) {\r\n id\r\n name\r\n price\r\n img {\r\n url\r\n }\r\n }\r\n }`,\r\n token\r\n );\r\n return res;\r\n}\r\n\r\nasync function GetProductNaked(token = \"\") {\r\n var res = await apollo.query(\r\n `\r\n query {\r\n products(where: { categories: \"naked\" }) {\r\n id\r\n name\r\n price\r\n img {\r\n url\r\n }\r\n }\r\n }`,\r\n token\r\n );\r\n return res;\r\n}\r\n\r\nasync function GetProductSport(token = \"\") {\r\n var res = await apollo.query(\r\n `\r\n query {\r\n products(where: { categories: \"sport\" }) {\r\n id\r\n name\r\n price\r\n img {\r\n url\r\n }\r\n }\r\n }`,\r\n token\r\n );\r\n return res;\r\n}\r\n\r\nasync function GetProductOffRoad(token = \"\") {\r\n var res = await apollo.query(\r\n `\r\n query {\r\n products(where: { categories: \"offroad\" }) {\r\n id\r\n name\r\n price\r\n img {\r\n url\r\n }\r\n }\r\n }`,\r\n token\r\n );\r\n return res;\r\n}\r\n\r\nasync function GetProductMoped(token = \"\") {\r\n var res = await apollo.query(\r\n `\r\n query {\r\n products(where: { categories: \"moped\" }) {\r\n id\r\n name\r\n price\r\n img {\r\n url\r\n }\r\n }\r\n }`,\r\n token\r\n );\r\n return res;\r\n}\r\n\r\nasync function GetProductMonsterEnergy(token = \"\") {\r\n var res = await apollo.query(\r\n `\r\n query {\r\n products(where: { categories: \"monsterenergy\" }) {\r\n id\r\n name\r\n price\r\n img {\r\n url\r\n }\r\n }\r\n }`,\r\n token\r\n );\r\n return res;\r\n}\r\n\r\nasync function GetProductCBU(token = \"\") {\r\n var res = await apollo.query(\r\n `\r\n query {\r\n products(where: { categories: \"cbu\" }) {\r\n id\r\n name\r\n price\r\n img {\r\n url\r\n }\r\n }\r\n }`,\r\n token\r\n );\r\n return res;\r\n}\r\n\r\nasync function GetProductATV(token = \"\") {\r\n var res = await apollo.query(\r\n `\r\n query {\r\n products(where: { categories: \"atv\" }) {\r\n id\r\n name\r\n price\r\n img {\r\n url\r\n }\r\n }\r\n }`,\r\n token\r\n );\r\n return res;\r\n}\r\n\r\nasync function GetProductPowerProduct(token = \"\") {\r\n var res = await apollo.query(\r\n `\r\n query {\r\n products(where: { categories: \"powerproduct\" }) {\r\n id\r\n name\r\n price\r\n img {\r\n url\r\n }\r\n }\r\n }`,\r\n token\r\n );\r\n return res;\r\n}\r\n\r\nasync function GetProductHonda(token = \"\") {\r\n var res = await apollo.query(\r\n `\r\n query {\r\n products(where: { business_partner: \"3\" }) {\r\n id\r\n name\r\n price\r\n img {\r\n url\r\n }\r\n }\r\n }`,\r\n token\r\n );\r\n return res;\r\n}\r\n\r\nasync function GetProductHino(token = \"\") {\r\n var res = await apollo.query(\r\n `\r\n query {\r\n products(where: { business_partner: \"4\" }) {\r\n id\r\n name\r\n price\r\n img {\r\n url\r\n }\r\n }\r\n }`,\r\n token\r\n );\r\n return res;\r\n}\r\n\r\nmodule.exports = {\r\n\r\n GetProductImgColor: GetProductImgColor,\r\n GetProduct: GetProduct,\r\n\r\n //yamaha\r\n GetProductMatic: GetProductMatic,\r\n GetProductMaxi: GetProductMaxi,\r\n GetProductNaked: GetProductNaked,\r\n GetProductSport: GetProductSport,\r\n GetProductOffRoad: GetProductOffRoad,\r\n GetProductMoped: GetProductMoped,\r\n GetProductMonsterEnergy: GetProductMonsterEnergy,\r\n GetProductCBU: GetProductCBU,\r\n GetProductATV: GetProductATV,\r\n GetProductPowerProduct: GetProductPowerProduct,\r\n\r\n //honda\r\n GetProductHonda:GetProductHonda,\r\n\r\n //hino\r\n GetProductHino:GetProductHino,\r\n\r\n //detail\r\n GetDetailProduct: GetDetailProduct,\r\n};\r\n"]},"metadata":{},"sourceType":"script"}