Skip to content

Commit

Permalink
πŸ› κ°•μ˜κ³„νšμ„œ, μˆ˜κ°•μΈμ› λ‚΄ 인증번호 우회 κΈ°λŠ₯ 제거 및 μƒˆ μ°½ μ—΄κΈ° κΈ°λŠ₯ μΆ”κ°€ (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
mirusu400 committed Jun 24, 2023
1 parent 752be45 commit 6f9476e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 78 deletions.
46 changes: 0 additions & 46 deletions src/routes/lecture-plan-std.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,51 +4,5 @@
*/

export default () => {
// μŠ€νƒ€μΌλ§
$('#appModule > div > div:nth-child(1)').after(`
<div>
* Klas-Helperλ₯Ό μ΄μš©ν•˜μ‹œλ©΄ μΈμ¦μ½”λ“œ μž…λ ₯이 ν•„μš” μ—†μŠ΅λ‹ˆλ‹€ πŸ˜‰
<div>
`);
$('.lft').children().eq(3).css('display', 'none');
$('.lft').children().eq(3).after(`
<button type="button" id="custom-search-btn" class="btn2 btn-gray" style="float: right; margin-right: 10px;">쑰회</button>
`);
$('.lft').children().eq(1).css('display', 'none');
$('.lft').children().eq(0).css('display', 'none');
$('#appModule > div > div:nth-child(1)').css('display', 'none');
$('.lft').children().eq(2).css('width', '45%');
$('.lft').children().eq(4).css('width', '45%');

// μΈμ¦μ½”λ“œ μžλ™ μž…λ ₯ 및 제거
appModule.numText = appModule.randomNum;

// 쑰회 λ²„νŠΌ ν›„ν‚Ή
// Method 1: 쑰회 λ²„νŠΌ λˆ„λ₯Όλ•Œλ§ˆλ‹€ μΈμ¦μ½”λ“œ μƒˆλ‘œ λ°œκΈ‰ν•΄ ν™•μΈν•˜κΈ°
// λ°˜λ³΅ν•΄μ„œ λˆ„λ₯΄λ©΄ μ„œλ²„ λΆ€ν•˜κ°€ 일어날 κ°€λŠ₯성이 μžˆμ–΄, μš°μ„  주석 처리 ν–ˆμŠ΅λ‹ˆλ‹€.
// $(".lft").children().eq(3).bind("click", function () {
// appModule.numText = appModule.randomNum;
// });

// Method 2: μ»€μŠ€ν…€ λ²„νŠΌ μƒμ„±ν•˜κΈ°
// 2μ΄ˆλ§ˆλ‹€ 1λ²ˆμ”© λˆ„λ₯Ό 수 μžˆλ„λ‘ ν–ˆμŠ΅λ‹ˆλ‹€.
$('#custom-search-btn').click(() => {
axios.post('/std/cps/atnlc/popup/LectrePlanStdCrtNum.do', appModule.$data)
.then(function (response) {
if (response.data === null && response.data === '') {
return false;
}
appModule.currentNum = response.data.currentNum;
appModule.randomNumber();
appModule.numText = appModule.randomNum;

// 2μ΄ˆκ°„ ν•΄λ‹Ή λ²„νŠΌ disabled ν•΄λ†“μŒ.
$('#custom-search-btn').attr('disabled', true);
$('#custom-search-btn').addClass('btn-lightgray').removeClass('btn-gray');
setTimeout(() => {
$('#custom-search-btn').attr('disabled', false);
$('#custom-search-btn').addClass('btn-gray').removeClass('btn-lightgray');
}, 2000);
});
});
};
1 change: 0 additions & 1 deletion src/routes/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

const handleCapsLock = () => {
// Capslock ν‚€λ₯Ό λˆŒλ €μ„ λ•Œ κ²½κ³  λ©”μ‹œμ§€ 좜λ ₯
console.log('load');
const password = $('#loginPwd');
const message = $("<span style='display: block; text-align: left; color: red;'> </span>");

Expand Down
53 changes: 22 additions & 31 deletions src/routes/syllabus.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,32 @@
*/

export default () => {
let waitSearch = false;
// μ—”ν„°λ‘œ κ°•μ˜ κ³„νšμ„œ 검색
$('table:nth-of-type(1) input[type="text"]').keydown((event) => {
if (event.keyCode === 13) appModule.getSearch();
});

// 검색 ν•¨μˆ˜ μ—…κ·Έλ ˆμ΄λ“œ
appModule.getSearch = function () {
this.selectYearHakgi = this.selectYear + ',' + this.selecthakgi;
// κ°•μ˜κ³„νšμ„œ 쑰회 μ‹œ μƒˆ 창으둜 μ—΄κΈ°
appModule.goLectrePlan = function (item) {
const selectSubj = 'U' + item.thisYear + item.hakgi + item.openGwamokNo + item.openMajorCode + item.bunbanNo + item.openGrade;

// μ„œλ²„ λΆ€ν•˜ 문제둜 λͺ¨λ“  κ°•μ˜ κ³„νšμ„œ 검색 κΈˆμ§€
if (
this.selectRadio === 'all' && this.selectText === '' && this.selectProfsr === '' && this.cmmnGamok === '' && this.selecthakgwa === ''
) {
alert('κ³Όλͺ©λͺ… λ˜λŠ” λ‹΄λ‹Ή ꡐ수λ₯Ό μž…λ ₯ν•˜μ§€ μ•Šμ€ 경우 λ°˜λ“œμ‹œ κ³Όλͺ©μ΄λ‚˜ ν•™κ³Όλ₯Ό μ„ νƒν•˜μ…”μ•Ό ν•©λ‹ˆλ‹€.');
return;
if (item.closeOpt == 'Y') {
alert('νκ°•λœ κ°•μ˜ μž…λ‹ˆλ‹€.');
return false;
}

// μ„œλ²„ λΆ€ν•˜ 문제둜 5μ΄ˆκ°„ 검색 κΈˆμ§€
if (waitSearch) {
alert('μ„œλ²„ λΆ€ν•˜ 문제λ₯Ό λ°©μ§€ν•˜κΈ° μœ„ν•΄ 5초 뒀에 검색이 κ°€λŠ₯ν•©λ‹ˆλ‹€.');
return;
if (item.summary == null) {
alert('κ°•μ˜ κ³„νšμ„œ 정보가 μ—†μŠ΅λ‹ˆλ‹€!');
return false;
}

// 5초 타이머
waitSearch = true;
setTimeout(() => { waitSearch = false; }, 5000);

// 데이터 μš”μ²­
axios.post('LectrePlanStdList.do', this.$data).then((response) => {
this.list = response.data;
});
axios.post('CultureOptOneInfo.do', appModule.$data)
.then(function (response) {
if (response.data.cultureOpt == null) {
window.open('https://klas.kw.ac.kr/std/cps/atnlc/popup/LectrePlanStdView.do?selectSubj=' + selectSubj, '', 'width=1000, height=800, scrollbars=yes, title=κ°•μ˜κ³„νšμ„œ 쑰회');
}
else {
window.open('https://klas.kw.ac.kr/std/cps/atnlc/popup/LectrePlanStdFixedView.do?selectSubj=' + selectSubj, '', 'width=1000, height=800, scrollbars=yes, title=κ°•μ˜κ³„νšμ„œ 쑰회');
}
});
};

// μ—”ν„°λ‘œ κ°•μ˜ κ³„νšμ„œ 검색
$('table:nth-of-type(1) input[type="text"]').keydown((event) => {
if (event.keyCode === 13) appModule.getSearch();
});

// μ•ˆλ‚΄ 문ꡬ λ Œλ”λ§
$('table:nth-of-type(1) tr:nth-of-type(5) > td').text('인증 μ½”λ“œλ₯Ό μž…λ ₯ν•˜μ‹€ ν•„μš”κ°€ μ—†μŠ΅λ‹ˆλ‹€.');
};

0 comments on commit 6f9476e

Please sign in to comment.