1var notCookie = "Y"; 2var reloadInterval = 5; 3var HTTP_URL = "http://" + window.location.host; 4var HTTPS_URL = "https://" + window.location.host; 5var NOW_HTTP_URL = (document.location.protocol == "https:" ? HTTPS_URL : HTTP_URL); 6var IMG_HOST_SYS = "//image.yes24.com"; 7 8var _frontApiUrl = (function () { 9 var url = ""; 10 11 if (typeof YesData !== "undefined" 12 && YesData 13 && typeof YesData.FRONT_API_URL === "function") { 14 url = YesData.FRONT_API_URL(); 15 16 if (url) { 17 return url; 18 } 19 } 20 21 if (typeof FRONT_API_URL !== "undefined" && FRONT_API_URL) { 22 return FRONT_API_URL; 23 } 24 25 return "https://frontapi.yes24.com"; 26})(); 27 28// ìµê·¼ë³¸ ìí ê´ë¦¬ ì¤í¬ë¦½í¸ 29function RecentViewGoods(memNo) { 30 if (memNo != undefined && memNo != null) { 31 this.cookieName = "RecentViewGoods" + memNo.toString(); 32 this.cookieInfo = "RecentViewInfo" + memNo.toString(); 33 } 34 else { 35 this.cookieName = "RecentViewGoods"; 36 this.cookieInfo = "RecentViewInfo"; 37 } 38 this.delimiter = '`'; 39 this.cookieValue = ""; 40 this.maxLength = 30; 41 this.index = 0; 42 this.list = new Array(); 43 44 // ì«ì ì²´í¬(ìì°ì) 45 this._isNum = function (val) { 46 var chars = "0123456789"; 47 for (var inx = 0; inx < val.length; inx++) { 48 if (chars.indexOf(val.charAt(inx)) == -1) 49 return false; 50 } 51 return true; 52 }; 53 54 // ìí ì¶ê° í기 55 this._add = function (goodsNo) { 56 this.sort(); 57 58 var findIndex = this._find(goodsNo); 59 if (findIndex >= 0) { 60 this.list[findIndex].seq = this.list.length; 61 } 62 else { 63 if (this.maxLength <= this.index) { 64 this.list.shift(); 65 this.list.push({ seq: this.index, item: goodsNo }); 66 } 67 else { 68 this.list.push({ seq: this.index, item: goodsNo }); 69 } 70 this.index++; 71 } 72 73 this.sort(); 74 75 for (var i in this.list) { 76 this.list[i].seq = parseInt(i); 77 } 78 79 this._setCookie(); 80 }; 81 82 // ì¿ í¤ì ì í 83 this._setCookie = function () { 84 var value = ''; 85 for (var i = 0; i < this.list.length; i++) { 86 if (this._isNum(this.list[i].item.toString())) { 87 if (value == '') 88 value = this.list[i].item.toString(); 89 else 90 value += this.delimiter + this.list[i].item.toString(); 91 } 92 } 93 94 var todayDate = new Date(); 95 todayDate.setDate(todayDate.getDate() + 1); 96 document.cookie = this.cookieName + '=' + escape(value) + '; path=/;domain=.yes24.com;expires=' + todayDate.toGMTString() + ';'; 97 }; 98 99 // ìíë²í¸ë¡ ìí ìí 찾기 100 this._find = function (goodsNo) { 101 var findIndex = -1; 102 try { 103 $.each(this.list, function (e, i) { 104 if (goodsNo == i.item) 105 findIndex = e; 106 }); 107 } catch (e) { } 108 return findIndex; 109 }; 110 111 // ìµê·¼ë³¸ìí ë±ë¡ 112 this._addRecentViewGoods = function (goodsNo, callBackFun, useCache) { 113 114 $.ajax({
115 cache: false, 116 type: 'POST', 117 url: _frontApiUrl + "/api/goods/addRecentGoods", 118 data: JSON.stringify(Number(goodsNo)), 119 contentType: "application/json; charset=utf-8", 120 dataType: 'json', 121 xhrFields: { withCredentials: true }, 122 success: function (data) { 123 SetReloadTimeExtend(); 124 if (callBackFun != null) { 125 callBackFun(useCache); 126 } 127 }, 128 error: function (xhr, textStatus, thrownError) { 129 } 130 }); 131 }; 132 133 // ìµê·¼ë³¸ìí ìì 134 this._delRecentViewGoods = function (goodsNo, callBackFun, useCache) { 135 var url = NOW_HTTP_URL; 136 if (url.includes("ssl.yes24.com")) { 137 url = url.replaceAll("devssl", "ramses").replaceAll("qassl", "it-qatest").replaceAll("ssl", "www"); 138 } 139 140 // ì´ë²¤í¸ ëë©ì¸ ìì¸ì²ë¦¬ ì¶ê° 141 if (url.includes("event-dev.yes24.com") || url.includes("event.yes24.com")) { 142 url = url.replaceAll("event-dev", "it-qatest").replaceAll("event", "www"); 143 } 144 145 // ì ì¡í ë°ì´í°ë¥¼ ê°ì²´ë¡ ì ì 146 var requestData = { 147 goodsNo: goodsNo 148 }; 149 150 fetch( 151 url + "/product/goods/DelRecentViewGoods", { 152 method: 'POST', 153 mode: 'cors', 154 credentials: 'include', // withCredentials ìµì ì¶ê° 155 body: new URLSearchParams(requestData), 156 headers: { 157 "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8" 158 } 159 }) 160 .then((response) => response.json()) 161 .then((data) => { 162 SetReloadTimeExtend(); 163 if (callBackFun != null) { 164 callBackFun(useCache); 165 } 166 }); 167 }; 168 169 this.cookieValue = getCookie(this.cookieName) || ''; 170 if (this.cookieValue != '') { 171 var splitItems = this.cookieValue.split(this.delimiter); 172 173 for (var i = 0; i < splitItems.length; i++) { 174 if (splitItems[i] != '') { 175 if (this._isNum(splitItems[i].toString())) { 176 this._add(splitItems[i]); 177 } 178 } 179 } 180 } 181 else { 182 this._setCookie(); 183 } 184 185 var todayDate = new Date(); 186 todayDate.setDate(todayDate.getDate() + 1); 187 var valueInfo = "NotCookie=" + notCookie; 188 valueInfo += "&Interval=" + reloadInterval; 189 var reloadTime = GetKeyValue(getCookie(this.cookieInfo), "ReloadTime"); 190 if (reloadTime != null) { 191 valueInfo += "&ReloadTime=" + reloadTime; 192 } 193 var first = GetKeyValue(getCookie(this.cookieInfo), "First"); 194 if (first != null && notCookie == "Y") { 195 valueInfo += "&First=" + first; 196 } 197 document.cookie = this.cookieInfo + '=' + escape(valueInfo) + '; path=/;domain=.yes24.com;expires=' + todayDate.toGMTString() + ';'; 198} 199 200// ìí ì¶ê° 201RecentViewGoods.prototype.add = function (goodsNo) { 202 this._add(goodsNo); 203}; 204 205// ìí ìì 206RecentViewGoods.prototype.remove = function (index) { 207 this.list.splice(index, 1); 208 209 this._setCookie(); 210 return this.list; 211}; 212 213// ìí ìì 214RecentViewGoods.prototype.removeByGoodsNo = function (goodsNo) { 215 // SORT ASC 216 this.list.sort(function (a, b) { 217 return a.seq - b.seq; 218 }); 219 220 var index = this._find(goodsNo); 221 return this.remove(index); 222}; 223 224// í¹ì ìí ê°ì ¸ì¤ê¸° 225RecentViewGoods.prototype.get = function (index) { 226 227 if (this.list.length - 1 > index) { 228 this.descSort(); 229 return this.list[index]; 230 } 231 else 232 return null; 233}; 234 235// 첫ë²ì§¸ ìí ê°ì ¸ì¤ê¸° ììì -1 ë°í 236RecentViewGoods.prototype.getFirst = function () { 237 if (this.list.length > 0) { 238 this.descSort(); 239 return this.list[0].item || -1; 240 } 241 else 242 return -1; 243}; 244 245// ë§ì§ë§ ìí ê°ì ¸ì¤ê¸° ììì -1 ë°í 246RecentViewGoods.prototype.getLast = function () { 247 if (this.list.length > 0) { 248 this.descSort(); 249 return this.list[this.list.length - 1].item || -1; 250 } 251 else 252 return -1; 253};
254 255// í¹ì ë²ì ìí ê°ì ¸ì¤ê¸° ë²ì ì¸ ê²ìì null ë°í 256RecentViewGoods.prototype.getRange = function (start, end) { 257 this.descSort(); 258 //if (start > end || this.list.length - 1 < start || this.list.length - 1 < end) { 259 // return null; 260 //} 261 262 return this.getAll().filter( 263 function (e, i, a) { 264 return (i >= start && i <= end); 265 } 266 ); 267}; 268 269// ìí ì ì ê°ì ¸ì¤ê¸° 270RecentViewGoods.prototype.getAll = function () { 271 this.descSort(); 272 return this.list; 273}; 274 275// ìí 본 ììëë¡ ì ë ¬í기 ( ìµê·¼ë³¸ ìí ìë¨ ) 276RecentViewGoods.prototype.descSort = function () { 277 // SORT DESC 278 this.list.sort(function (a, b) { 279 return b.seq - a.seq; 280 }); 281}; 282 283// ìí 본 ììëë¡ ì ë ¬í기 ( ìµê·¼ë³¸ ìí íë¨ ) 284RecentViewGoods.prototype.sort = function () { 285 // SORT ASC 286 this.list.sort(function (a, b) { 287 return a.seq - b.seq; 288 }); 289}; 290 291// ìí ë²í¸ê° ì¡´ì¬íë í¹ì í목 ê°ì ¸ì¤ê¸° 292RecentViewGoods.prototype.find = function (goodsNo) { 293 return this._find(goodsNo); 294}; 295 296// ìíë²í¸ ë°°ì´ë¡ ë°ê¸° 297RecentViewGoods.prototype.getGoodsNo = function () { 298 var array = new Array(); 299 300 this.descSort(); 301 302 for (var i = 0; i < this.list.length; i++) { 303 array.push(this.list[i].item); 304 } 305 306 return array; 307} 308 309// ìíë²í¸ ë°°ì´ë¡ ë°ê¸° 310RecentViewGoods.prototype.getGoodsNo = function (startIndex, increaseCount) { 311 var array = new Array(); 312 313 this.descSort(); 314 315 var _tempList = this.getRange(startIndex, parseInt(startIndex) + parseInt(increaseCount)); 316 317 for (var i = 0; i < _tempList.length; i++) { 318 array.push(_tempList[i].item); 319 } 320 321 return array; 322} 323 324// ì ì²´ê°¯ì 325RecentViewGoods.prototype.length = function () { return this.list.length; } 326 327// ìí ì¶ê° 328RecentViewGoods.prototype.addRecentViewGoods = function (params) { 329 if (params.isLogin.toString().toLowerCase() == "true" && notCookie == "Y" && this._find(params.goodsNo) == -1) { 330 this._add(params.goodsNo); 331 this._addRecentViewGoods(params.goodsNo, params.callBackFun, params.useCache); 332 } 333 else { 334 this._add(params.goodsNo); 335 SetReloadTimeExtend(); 336 if (params.callBackFun != null) { 337 params.callBackFun(params.useCache); 338 } 339 } 340}; 341 342// ìí ìì 343RecentViewGoods.prototype.delRecentViewGoods = function (params) { 344 this.removeByGoodsNo(params.goodsNo); 345 346 if (params.isLogin.toString().toLowerCase() == "true" && notCookie == "Y") { 347 this._delRecentViewGoods(params.goodsNo, params.callBackFun, params.useCache); 348 } 349 else { 350 SetReloadTimeExtend(); 351 if (params.callBackFun != null) { 352 params.callBackFun(params.useCache); 353 } 354 } 355}; 356 357 358/** 359 * XhrUtil 360 * @param url 361 * @param params : ë¡ê·¸ì¸ìí(isLogin:"true"/"false"), ìºì±ì¬ì©(useCache:true/false) 362 * @param callbackmethod 363 * @param responseType : JSON 364 * @returns 365 * 366 * @example 367 * new XhrUtil(url, params ,callbackmethod , responseType); 368 */ 369var XhrUtil = function (url, params, callbackmethod, responseType) { 370 371 var actionUrl = url; 372 var xmlHttp = window.ActiveXObject ? new ActiveXObject('Microsoft.XMLHTTP') : new XMLHttpRequest(); 373 374 xmlHttp.onreadystatechange = function () { 375 if (xmlHttp.readyState == 0) { 376 //UNINITIALIZED :: open()ì´ ìì§ í¸ì¶ëì§ ìì ìí 377 } else if (xmlHttp.readyState == 1) { 378 //LOADING :: send()ê° í¸ì¶ëì§ ìì ìí (loadì¤) 379 } else if (xmlHttp.readyState == 2) { 380 //LOADED::send() í¸ì¶ ìë£íì¬ header ì status ì¬ì©ì´ ê°ë¥í ìíì´ë©°, loadìë£ 381 382 } else if (xmlHttp.readyState == 3) { 383 //INTERACTIVE :: ì¼ë¶ data 를 ë°ì ì ìë ìíë¡ ì²ë¦¬ì¤ 384 385 } else if (xmlHttp.readyState == "4") { 386 //COMPLETE :: 모ë ë°ì´í°ë¥¼ ë°ì ì ìë ìíë¡ ìë£ 387 if (xmlHttp.status == "200") { 388 //this.handleResponse(xmlHttp, callbackmethod, responseType); 389 new AjaxResponseUtil(xmlHttp, callbackmethod, responseType); 390 } else if (xmlHttp.status == "304") { 391 } else if (xmlHttp.status == "404") { 392 } else if (xmlHttp.status == "500") { 393 } 394 } 395 }; 396 397 var newCachingString = new Date().getTime().toString().substring(0, 10); 398 var reloadTime = GetKeyValue(getCookie("RecentViewInfo"), "ReloadTime"); 399 400 if (params.useCache && reloadTime != null) { 401 var utcNow = new Date(new Date().toUTCString()); 402 var outputReloadTime = new Date(reloadTime); 403 outputReloadTime.setMinutes(outputReloadTime.getMinutes() + reloadInterval); 404 405 if (utcNow > outputReloadTime) { 406 actionUrl = actionUrl + "?_=" + newCachingString; 407 } 408 else { 409 var cachingString = new Date(reloadTime).getTime().toString().substring(0, 10); 410 actionUrl = actionUrl + "?_=" + cachingString; 411 } 412 } 413 else { 414 actionUrl = actionUrl + "?_=" + newCachingString; 415 } 416 417 xmlHttp.open("GET", actionUrl, true); 418 419 //xmlHttp.setRequestHeader("Pragma", "cache");
420 xmlHttp.setRequestHeader("Cache-Control", "private"); 421 xmlHttp.setRequestHeader("Cache-Control", "max-age=" + (reloadInterval * 60).toString()); 422 423 xmlHttp.send(null); 424}; 425XhrUtil.prototype = { 426 handleResponse: function (response, callbackmethod) { 427 }, 428 429 uninitialized: function () {//readyState 0 430 }, 431 432 open: function () {//readyState 1 433 }, 434 435 sent: function () {//readyState 2 436 }, 437 438 receiving: function () {//readyState 3 439 }, 440 441 loaded: function () {//readyState 4 442 } 443}; 444 445var newXhrUtil = function (url, params, callbackmethod, responseType) { 446 if (url.indexOf("ssl.yes24.com") > 0) { 447 url = url.replaceAll("devssl", "ramses").replaceAll("qassl", "it-qatest").replaceAll("ssl", "www"); 448 } 449 450 var actionUrl = url; 451 var newCachingString = new Date().getTime().toString().substring(0, 10); 452 var reloadTime = GetKeyValue(getCookie("RecentViewInfo"), "ReloadTime"); 453 454 if (params.useCache && reloadTime != null) { 455 var utcNow = new Date(new Date().toUTCString()); 456 var outputReloadTime = new Date(reloadTime); 457 outputReloadTime.setMinutes(outputReloadTime.getMinutes() + reloadInterval); 458 459 if (utcNow > outputReloadTime) { 460 actionUrl = actionUrl + "?_=" + newCachingString; 461 } 462 else { 463 var cachingString = new Date(reloadTime).getTime().toString().substring(0, 10); 464 actionUrl = actionUrl + "?_=" + cachingString; 465 } 466 } 467 else { 468 actionUrl = actionUrl + "?_=" + newCachingString; 469 } 470 471 $.ajax({
472 cache: false, 473 url: actionUrl, 474 data: params, 475 dataType: "json", 476 xhrFields: { 477 withCredentials: true 478 }, 479 success: function (data) { 480 callbackmethod(data); 481 }, 482 error: function (xhr, status, errorMsg) { 483 console.log(xhr); 484 } 485 }); 486}; 487 488/** 489 *기본 response Handling Ajaxutil 490 * 491 *@param response 492 *@param callbackmethod ì¢ ë£í ì¤í function 493 *@param responseType json 494 */ 495var AjaxResponseUtil = function (response, callbackmethod, responseType) { 496 497 var handlingData = this.responseHandling(response, responseType) 498 499 if (callbackmethod != null) { 500 callbackmethod(handlingData); 501 } 502 503 var reload = GetKeyValue(getCookie("RecentViewInfo"), "Reload"); 504 if (reload != null && reload.toString().toLowerCase() == "true" && typeof(recentViewGoods) == "object") { 505 recentViewGoods = new RecentViewGoods(); 506 } 507} 508 509AjaxResponseUtil.prototype = { 510 responseHandling: function (response, responseType) { 511 var resJSON = eval('(' + response.responseText + ')'); //JSON 512 var resXML = response.responseXML; //XML 513 var resText = response.responseText; //Text 514 515 var resObj = new Object(); 516 switch (responseType.toLowerCase()) { 517 case "json": resObj = resJSON; 518 break; 519 case "xml": resObj = resXML; 520 break; 521 case "text": resObj = resText; 522 break; 523 default: resObj = resJSON; 524 break; 525 526 } 527 return resObj; 528 } 529} 530 531/** 532 * JsonpUtil 533 * @param params : isLogin(ë¡ê·¸ì¸ìí:true/false), useCache(ìºì±ì¬ì©:true/false) 534 * @returns 535 * 536 * @example 537 * var params = { "isLogin": "false", "useCache": true }; 538 * GetRecentViewGoodsSelect(params); 539 */ 540function GetRecentViewGoodsSelect(params) { 541 if (getCookie("RecentViewGoods").length > 0 || (params.isLogin.toString().toLowerCase() == "true" && notCookie == "Y")) { 542 var actionUrl = NOW_HTTP_URL + "/product/goods/RecentViewGoodsDisplay"; 543 var newCachingString = new Date().getTime().toString().substring(0, 10); 544 var reloadTime = GetKeyValue(getCookie("RecentViewInfo"), "ReloadTime"); 545 546 if (params.useCache && reloadTime != null) { 547 var utcNow = new Date(new Date().toUTCString()); 548 var outputReloadTime = new Date(reloadTime); 549 outputReloadTime.setMinutes(outputReloadTime.getMinutes() + reloadInterval); 550 551 if (utcNow > outputReloadTime) { 552 actionUrl = actionUrl + "?_=" + newCachingString; 553 } 554 else { 555 var cachingString = new Date(reloadTime).getTime().toString().substring(0, 10); 556 actionUrl = actionUrl + "?_=" + cachingString; 557 } 558 } 559 else { 560 actionUrl = actionUrl + "?_=" + newCachingString; 561 } 562 563 $.ajax({
564 type: "GET", 565 contentType: "application/json", 566 crossdomain: true, 567 dataType: "jsonp", 568 url: actionUrl, 569 jsonpCallback: "myCalback", 570 cache: params.useCache, 571 success: function (data) { 572 573 try { 574 575 if (data.recentGoodsCount > 0) { 576 $("#remoRctGCont").css("display", ""); 577 578 var shtml = ""; 579 var shtmlhide = ""; 580 var j = 0; 581 var idx = 0; 582 for (var i = data.recentGoodsCount - 1; i >= 0; i--) { 583 584 if (j % 3 == 0) { 585 shtml += "<ul class='rctGLi' style='display:none'>"; 586 } 587 idx++; 588 589 if (idx > 2) { 590 shtml += "<li " + shtmlhide + ">\n" + 591 "<a href=\"" + HTTP_URL + "/product/goods/" + data.recentGoods[i].goodsNo + "\" onclick=\"setWcode('003_003_002')\" class=\"rctLnk\"><img class=\"lazy\" data-original='"+IMG_HOST_SYS+"/goods/" + data.recentGoods[i].goodsNo + "/S' border=\"0\" alt=\"" + data.recentGoods[i].goodsName + "\"/></a>\n" + 592 "<span class=\"rctInfo\">\n" + 593 "<p class=\"rctName\"><a href=\"" + HTTP_URL + "/product/goods/" + data.recentGoods[i].goodsNo + "\" onclick=\"setWcode('003_003_002')\" >" + data.recentGoods[i].goodsName + "</a></p>\n" + 594 "<p class=\"rctPrice\">" + data.recentGoods[i].Price + "</p>\n" + 595 "</span>\n" + 596 "<a href='javascript:void(0);' onclick='SetRecentViewGoodsDelete(" + data.recentGoods[i].goodsNo + ", \"" + params.isLogin.toString() + "\")' class=\"btnDel\">ìµê·¼ë³¸ìí ìì </a>\n" + 597 "</li>\n"; 598 } 599 else { 600 shtml += "<li " + shtmlhide + ">\n" + 601 "<a href=\"" + HTTP_URL + "/product/goods/" + data.recentGoods[i].goodsNo + "\" onclick=\"setWcode('003_003_002')\" class=\"rctLnk\"><img src='"+IMG_HOST_SYS+"/goods/" + data.recentGoods[i].goodsNo + "/S' border=\"0\" alt=\"" + data.recentGoods[i].goodsName + "\"/></a>\n" + 602 "<span class=\"rctInfo\">\n" + 603 "<p class=\"rctName\"><a href=\"" + HTTP_URL + "/product/goods/" + data.recentGoods[i].goodsNo + "\" onclick=\"setWcode('003_003_002')\" >" + data.recentGoods[i].goodsName + "</a></p>\n" + 604 "<p class=\"rctPrice\">" + data.recentGoods[i].Price + "</p>\n" + 605 "</span>\n" + 606 "<a href='javascript:void(0);' onclick='SetRecentViewGoodsDelete(" + data.recentGoods[i].goodsNo + ", \"" + params.isLogin.toString() + "\")' class=\"btnDel\">ìµê·¼ë³¸ìí ìì </a>\n" + 607 "</li>\n"; 608 } 609 610 if (j % 3 == 2 || j == data.recentGoodsCount - 1) { 611 shtml += "</ul>"; 612 } 613 j++; 614 } 615 616 $("#ulRecentViewGoods").html(shtml); 617 618 if (data.recentGoodsCount > 9) { 619 $("#RecentViewGoodsCount").html("9+"); 620 } else { 621 $("#RecentViewGoodsCount").html(data.recentGoodsCount); 622 } 623 624 $('#ulRecentViewGoods').switchDiv({ 625 current: 0, 626 pageBtnsClassSelector: ".gnbSquareBtn", 627 pageNumTextSelector: ".yPgNum", 628 isShowBtn: true 629 }); 630 631 $("#remoRctGCont li").bind("mouseover focus", function () { 632 $(this).attr("class", "on"); 633 }); 634 $("#remoRctGCont li").bind("mouseleave", function () { 635 $(this).attr("class", ""); 636 }); 637 638 $(".rctPrice").each(function (index) { 639 $(this).text($(this).text().split(/(?=(?:\d{3})+(?:\.|$))/g).join(',') + "ì"); 640 }); 641 642 $("#remoThemGCont").hide(); 643 } 644 else { 645 $("#RecentViewGoodsNodata").show(); 646 $("#ulRecentViewGoods").hide(); 647 $(".skyPagen").html(""); 648 $("#RecentViewGoodsCount").html(""); 649 } 650 651 $(".rctGLi").lazyload({ 652 failure_limit: 10, 653 threshold: 200, 654 placeholder: "data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==", 655 skip_invisible: true 656 }); 657 } 658 catch (e) { } 659 }, 660 error: function (data) { 661 } 662 }); 663 } 664 else { 665 $("#RecentViewGoodsNodata").show(); 666 $("#ulRecentViewGoods").hide(); 667 $(".skyPagen").html(""); 668 $("#RecentViewGoodsCount").html(""); 669 $("#remoRctGCont").hide(); 670 } 671} 672 673/** 674 * JsonpUtil 675 * @param goodsNo : ìíë²í¸ 676 * @param isLogin : ë¡ê·¸ì¸ìí("true"/"false") 677 * @returns 678 * 679 * @example 680 * SetRecentViewGoodsDelete(0, 'false'); 681 */ 682function SetRecentViewGoodsDelete(goodsNo, isLogin) { 683 var recentViewGoods = new RecentViewGoods(); 684 685 recentViewGoods.removeByGoodsNo(goodsNo); 686 687 if (isLogin.toString().toLowerCase() == "true" && notCookie == "Y") { 688 $.ajax({
689 type: "GET", 690 contentType: "application/json", 691 crossdomain: true, 692 dataType: "jsonp", 693 url: NOW_HTTP_URL + "/product/goods/RecentViewGoodsDel", 694 data: { 'goodsNo': goodsNo }, 695 success: function (data) { 696 SetReloadTimeExtend(); 697 var params = { "isLogin": isLogin, "useCache": true }; 698 GetRecentViewGoodsSelect(params); 699 }, 700 error: function (data) { 701 } 702 }); 703 } 704 else { 705 SetReloadTimeExtend(); 706 var params = { "isLogin": isLogin, "useCache": true }; 707 GetRecentViewGoodsSelect(params); 708 } 709} 710 711//Keyê° ê°ì ¸ì¤ê¸° 712function GetKeyValue(url, name) { 713 if (!url) url = window.location.href; 714 var regex = new RegExp(name + "(=([^&#]*)|&|#|$)"), 715 results = regex.exec(url); 716 if (!results) return null; 717 if (!results[2]) return ''; 718 return decodeURIComponent(results[2].replace(/\+/g, " ")); 719} 720 721//ì¿ í¤ê° ê°ì ¸ì¤ê¸° 722function getCookie(name) { 723 var cookieValue = "; " + document.cookie; 724 var cookieParts = cookieValue.split("; " + name + "="); 725 if (cookieParts.length == 2) { 726 return decodeURIComponent(cookieParts.pop().split(";").shift()); 727 } 728 return ''; 729} 730 731//ReloadTime ì°ì¥ 732function SetReloadTimeExtend() { 733 var cookieName = "RecentViewInfo"; 734 var todayDate = new Date(); 735 var newReloadTime = todayDate.toUTCString(); 736 todayDate.setDate(todayDate.getDate() + 1); 737 738 var valueInfo = "NotCookie=" + notCookie; 739 valueInfo += "&Interval=" + reloadInterval; 740 valueInfo += "&ReloadTime=" + newReloadTime; 741 var first = GetKeyValue(getCookie(cookieName), "First"); 742 if (first != null && notCookie == "Y") { 743 valueInfo += "&First=" + first; 744 } 745 document.cookie = cookieName + '=' + escape(valueInfo) + '; path=/;domain=.yes24.com;expires=' + todayDate.toGMTString() + ';'; 746}
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.