1$(document).ready(function () { 2 3 const sec5Interest = [{ title: "", state: "", point: "", gap: "", rate: "" }, 4 { title: "", state: "", point: "", gap: "", rate: "" }, 5 { title: "", state: "", point: "", gap: "", rate: "" }, 6 { title: "", state: "", point: "", gap: "", rate: "" }, 7 { title: "", state: "", point: "", gap: "", rate: "" }, 8 { title: "", state: "", point: "", gap: "", rate: "" } 9 ]; 10 11 rateData('722Y001', '0101000', '0'); 12 rateData('817Y002', '010502000', '1'); 13 rateData('817Y002', '010190000', '2'); 14 rateData('817Y002', '010300000', '3'); 15 16 rateData2(); 17 18 function rateData(gbn1, gbn2, inum) { 19 $.ajax({ 20 type: 'POST', 21 async: false, 22 url: '/portal/getRateSec.do', 23 data: { gbn1: gbn1, gbn2: gbn2 }, 24 success: function (data) { 25 //console.log(data); 26 if(data != null){ 27 var obj = JSON.parse(data); 28 var firstValue = parseFloat(obj.StatisticSearch.row[0].DATA_VALUE); // old 29 var secondValue = parseFloat(obj.StatisticSearch.row[1].DATA_VALUE); // new 30 31 var oInt = Math.floor(firstValue * 100) / 100; // old 32 var nInt = Math.floor(secondValue * 100) / 100; // new 33 // var oInt = (firstValue + 0.0001).toFixed(2); // old 34 // var nInt = (secondValue + 0.0001).toFixed(2); // new 35 36 // var arrowText = (secondValue > firstValue) ? 'â²' : (secondValue < firstValue) ? 'â¼' : 'â'; 37 // var state = (secondValue > firstValue) ? 'ì¦ê°' : (secondValue < firstValue) ? 'ê°ì' : 'ì ì²´'; 38 // var classNm = (secondValue > firstValue) ? 'state-sec5-intr-blue' : (secondValue < firstValue) ? 'state-sec5-intr-red' : 'state-sec5-intr-black'; 39 // var calData = (secondValue - firstValue == 0) ? '0.00' : (secondValue - firstValue).toFixed(2); 40 41 var state = ""; 42 var calData = ""; 43 var rate = ""; 44 45 if(nInt > oInt){ 46 state = 'ì¦ê°'; 47 var cal1 = nInt - oInt; 48 calData = cal1.toFixed(2); 49 var r = calData / nInt * 100; 50 rate = r.toFixed(2); 51 } else if(nInt < oInt){ 52 state = 'ê°ì'; 53 var cal1 = oInt - nInt; 54 calData = cal1.toFixed(2); 55 var r = calData / oInt * 100; 56 rate = r.toFixed(2); 57 } else if(nInt == oInt){ 58 state = 'ì ì²´'; 59 calData = '0.00'; 60 rate = '0.00'; 61 } 62 63 if(calData == 0){ 64 calData = "0.00"; 65 } 66 if(rate == 0){ 67 rate = "0.00"; 68 } 69 70 if(obj.StatisticSearch.row[0].ITEM_NAME1 == "íì¬ì±(3ë , AA-)"){ 71 sec5Interest[inum].title = obj.StatisticSearch.row[0].ITEM_NAME1.substr(0, 6)+")" 72 } else{ 73 sec5Interest[inum].title = obj.StatisticSearch.row[0].ITEM_NAME1; 74 } 75 sec5Interest[inum].state = state; 76 sec5Interest[inum].point = nInt; 77 sec5Interest[inum].gap = calData; 78 sec5Interest[inum].rate = rate; 79 // console.log("title",obj.StatisticSearch.row[0].ITEM_NAME1); 80 // console.log("firstValue", Math.floor(firstValue * 100) / 100); 81 // console.log("secondValue", Math.floor(secondValue * 100) / 100); 82 } 83 }, 84 error: function (request, status, error) { 85 console.log("code:" + request.ststus + "\n error: 주ì ê¸ë¦¬ ì§í ë°ì´í° ì ì¡ ì¤ë¥"); 86// alert("code:" + request.status + "\n" + "message:" + request.responseText + "\n" + "error:" + error); 87 } 88 }); 89 } 90 91 function rateData2() { 92 $.ajax({
93 type: 'POST', 94 async: false, 95 url: '/portal/getRateSec2.do', 96 success: function (data) { 97// var obj = JSON.parse(data); 98 // 1 : ìì¡, 2 : ì ê· 99 var nCofix1 = data[3].td.substr(4,4); 100 var oCofix1 = data[8].td.substr(4,4); 101 var nCofix2 = data[2].td.substr(4,4); 102 var oCofix2 = data[7].td.substr(4,4); 103 104 var nCoInt1 = parseFloat(data[3].td.substr(4,4)); 105 var oCoInt1 = parseFloat(data[8].td.substr(4,4)); 106 var nCoInt2 = parseFloat(data[2].td.substr(4,4)); 107 var oCoInt2 = parseFloat(data[7].td.substr(4,4)); 108 109 var state1 = ""; 110 var calData1 = ""; 111 var rate1 = ""; 112 113 var state2 = ""; 114 var calData2 = ""; 115 var rate2 = ""; 116 117if(nCoInt1 > oCoInt1){ 118 state1 = 'ì¦ê°'; 119 calData1 = nCoInt1 - oCoInt1; 120 rate1 = calData1 / nCoInt1 * 100; 121 122} else if(nCoInt1 < oCoInt1){ 123 state1 = 'ê°ì'; 124 calData1 = oCoInt1 - nCoInt1; 125 rate1 = calData1 / oCoInt1 * 100; 126 127} else { 128 state1 = 'ì ì²´'; 129 calData1 = 0; 130 rate1 = 0; 131} 132if(nCoInt2 > oCoInt2){ 133 state2 = 'ì¦ê°'; 134 calData2 = nCoInt2 - oCoInt2; 135 rate2 = calData2 / nCoInt2 * 100; 136 137} else if(nCoInt2 < oCoInt2){ 138 state2 = 'ê°ì'; 139 calData2 = oCoInt2 - nCoInt2; 140 rate2 = calData2 / oCoInt2 * 100; 141 142} else { 143 state2 = 'ì ì²´'; 144 calData2 = 0; 145 rate2 = 0; 146} 147 148 sec5Interest[4].title = "COFIX ìì¡"; 149 sec5Interest[4].state = state1; 150 sec5Interest[4].point = nCofix1; 151 sec5Interest[4].gap = calData1.toFixed(2); 152 sec5Interest[4].rate = rate1.toFixed(2); 153 154 sec5Interest[5].title = "COFIX ì ê·"; 155 sec5Interest[5].state = state2; 156 sec5Interest[5].point = nCofix2; 157 sec5Interest[5].gap = calData2.toFixed(2); 158 sec5Interest[5].rate = rate2.toFixed(2); 159 }, 160 error: function (request, status, error) { 161// console.log("code:" + request.ststus + "\n error: 주ì ê¸ë¦¬ ì§í ë°ì´í° ì ì¡ ì¤ë¥"); 162// alert("code:" + request.status + "\n" + "message:" + request.responseText + "\n" + "error:" + error); 163 } 164 }); 165 } 166 167 168// console.log(sec5Interest); 169 sec5Interest.map((item, i) => { 170 const slideCont = document.createElement("div"); 171 slideCont.classList.add("swiper-slide"); 172 slideCont.innerHTML = ` 173 <div key=${i} class="sec5-intr-slide-cont"> 174 <h5 class="title-sec5-intr"> 175 ${item.title} 176 </h5> 177 <div class="slide-cont-left"> 178 <p class=${ 179 item.state === "ì¦ê°" 180 ? "state-sec5-intr-blue"
181 : item.state === "ì ì²´" 182 ? "state-sec5-intr-black" 183 : "state-sec5-intr-red" 184 }> 185 <span>${item.point}</span> 186 <span>${ 187 item.state === "ì¦ê°" ? "â²" : item.state === "ì ì²´" ? "â" : "â¼" 188 }</span> 189 <span> 190 ${item.gap} 191 (${ 192 item.state === "ì¦ê°" ? "+" : item.state === "ì ì²´" ? "" : "-" 193 }${item.rate}%) 194 </span> 195 </p> 196 </div> 197 </div> 198 `; 199 document.querySelector(".wrapper-intr").append(slideCont); 200 }); 201 202});
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.