1"use strict"; 2/* eslint-disable no-var */ 3/* globals KbbJS */ 4 5const OrderApp = (function (params) { 6 /* -------------------------------------------------------------------------------- 7 * 기ë¥ëª : KbbJS ì´ê¸°í ì´í ìë¹ì¤ ìì 8 * -------------------------------------------------------------------------------- */ 9 let startupMain = () => { 10 // ê³µíµ í¨ì ì¶ê° 11 Object.assign(order.common, _interfaces); 12 13 KbbJS.ready() 14 .then(core => core.auth.ready()) 15 .then(auth => auth.authorize()) 16 .then(userModel => { 17 if (userModel != null) { 18 order.user.data = userModel.data; 19 order.user.exists = true; 20 order.user.notExists = false; 21 } 22 23 if (authLogin()) { 24 initializeCall(); 25 } 26 }); 27 }; // startupMain() 28 29 /* -------------------------------------------------------------------------------- 30 * 기ë¥ëª : ë¡ê·¸ì¸ 31 * return (bool) true ê³ì, false ì¤ì§ 32 * -------------------------------------------------------------------------------- */ 33 let authLogin = () => { 34 let urlPath = location.pathname; 35 36 // ì¥ë°êµ¬ëì 주문ì, ë¹íìë¡ê·¸ì¸ íì´ì§ì ê²½ì° ë¹ë¡ê·¸ì¸ ê°ë¥ 37 if (urlPath.startsWith("/cart") || urlPath.startsWith("/order") || urlPath.startsWith("/giftcard-reject") || urlPath.startsWith("/nologin")) { 38 return true; 39 } 40 41 // ë¡ê·¸ì¸ì íì ë¡ê·¸ì¸ ëë ë¹íì cookieë¡ íì¸ 42 if (!KbbJS.auth.authorized && Cookies.get("non_member_login") === undefined) { 43 // ë¹íìì => ë¡ê·¸ì¸ ìì² íì 44 45 // KbbJS ë¡ë©ë° ê°ì ì ê±° 46 $("#KbbLoading").removeClass("show"); 47 $("html").removeClass("loading").addClass("kbb_loaded"); 48 49 // ë¡ê·¸ì¸ íì´ì§ë¡ ì´ë 50 KbbJS.auth.redirectLogin(); 51 /* 52 // íì¸ ë²í¼ì í´ë¦íë©´ ë¡ê·¸ì¸ íì´ì§ë¡ ì´ë 53 KbbJS.ui.authorizeWithAlert().then(function (user) { 54 // undefined: ë¡ê·¸ì¸ íì´ì§ë¡ ì´ë 55 // false: ë¹íì (ì·¨ì ë²í¼ í´ë¦) 56 // object: ë¡ê·¸ì¸ íì ì ë³´ 57 if (user === undefined) { 58 // ë¡ê·¸ì¸ íì´ì§ë¡ ì´ëì ì íí ê²½ì° ì¶ê°ì ì¸ ì´ê¸°í ë¶íì 59 return false; 60 } 61 62 // ì´ê¸°í ìí 63 initializeCall(); 64 }); 65 */ 66 return false; 67 } 68 return true; 69 }; // authLogin() 70 71 /* -------------------------------------------------------------------------------- 72 * 기ë¥ëª : ì´ê¸°í ì¸í°íì´ì¤ í¸ì¶ 73 * -------------------------------------------------------------------------------- */ 74 let initializeCall = () => { 75 let promise; 76 if (order.startup['main'] !== undefined) { 77 switch (Object.getPrototypeOf(order.startup['main']).constructor.name) { 78 case 'Function': 79 console.log(">>>>> ì´ê¸°í ì¸í°íì´ì¤ <<<<<"); 80 promise = new Promise(function (resolve, reject) { 81 try { 82 order.startup.main(); 83 resolve(); 84 } catch (e) { 85 reject(e); 86 } 87 }); 88 break; 89 case 'AsyncFunction': 90 console.log(">>>>> ì´ê¸°í ì¸í°íì´ì¤ (ë¹ë기) <<<<<"); 91 promise = order.startup.main(); 92 break; 93 default: 94 console.log(">>>>>
94 ì´ê¸°í ì¸í°íì´ì¤ ìì <<<<<") 95 } 96 } 97 98 if (promise !== undefined && promise instanceof Promise) { 99 promise.then(function () { 100 console.log(">>>>> ì´ê¸°í ì¸í°íì´ì¤ ìë£ <<<<<"); 101 if (order.startup['success'] !== undefined && 102 Object.getPrototypeOf(order.startup['success']).constructor.name === "Function") { 103 order.startup.success(); 104 } 105 }).catch(function (e) { 106 console.log(">>>>> ì´ê¸°í ì¸í°íì´ì¤ ì¤ë¥ <<<<<", e); 107 if (order.startup['error'] !== undefined && 108 Object.getPrototypeOf(order.startup['error']).constructor.name === "Function") { 109 order.startup.error(); 110 } 111 }); 112 } else { 113 console.log(">>>>> ì´ê¸°í ì¸í°íì´ì¤ ìì <<<<<"); 114 } 115 116 }; // initializeCall() 117 118 let _interfaces = { 119 /* 120 pdtImgUri: ìíì´ë¯¸ì§(ì본) 121 - pdtImgUri + "/" + {ìíì½ë(cmdtcode)}.jpg 122 - ìíì½ë(cmdtcode)ê° ìë ê²½ì° (ex> ê²°í©ìí)ìë í매ìíID(saleCmdtid)ë¡ ì¡°í© 123 pdtResizeImgUri: ìíì´ë¯¸ì§(Serverless Image Handler íµí´ì Resizeë ì´ë¯¸ì§) 124 - pdtResizeImgUri + "/" + {ì´ë¯¸ì§í¬ê¸°} + "/" + {ìíì½ë(cmdtcode)}.jpg 125 - ì´ë¯¸ì§í¬ê¸°ë "ê°ë¡í½ì xì¸ë¡í½ì " (ex> 800x1146) 126 127 ì¬ì©ë²: 128 - order.common.getProductImageBase() 129 - order.common.getProductResizeImageBase() 130 */ 131 getProductImageBase: () => { 132 return params.pdtImgUri; 133 }, 134 getProductResizeImageBase: () => { 135 return params.pdtResizeImgUri; 136 }, 137 }; 138 139 startupMain(); 140});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.