Loading src/components/SingleFile.vue +13 −4 Original line number Diff line number Diff line Loading @@ -25,6 +25,8 @@ import axios from 'axios'; const backend_url = process.env.VUE_APP_BACKEND_URL; let upload_url1 = `${backend_url}/upload_file`; let key1 = 'Secret Key 1', key2 = 'Secret Key 2'; export default { data() { return { Loading @@ -48,10 +50,17 @@ export default { }) .then(response => { console.log('SUCCESS!!'); let key = response.data; alert(`비밀키는 ${key}입니다.`); if (key1 == 'Secret Key 1') { key1 = response.data; alert(`비밀키는 ${key1}입니다.`); } else if (key2 == 'Secret Key 2') { key2 = response.data; alert(`비밀키는 ${key2}입니다.`); } else { alert('이미 파일을 2번 업로드 하셨습니다.'); } this.uploadCount++; // 업로드 카운트 증가 window.location.href = '#/first'; // window.location.href = '#/first'; }) .catch(function () { console.log('FAILURE!!'); Loading @@ -59,7 +68,7 @@ export default { }); }, goToFinalRouter() { window.location.href = '#/last'; window.location.href = `#/last?key1=${key1}&key2=${key2}`; } } }; Loading Loading
src/components/SingleFile.vue +13 −4 Original line number Diff line number Diff line Loading @@ -25,6 +25,8 @@ import axios from 'axios'; const backend_url = process.env.VUE_APP_BACKEND_URL; let upload_url1 = `${backend_url}/upload_file`; let key1 = 'Secret Key 1', key2 = 'Secret Key 2'; export default { data() { return { Loading @@ -48,10 +50,17 @@ export default { }) .then(response => { console.log('SUCCESS!!'); let key = response.data; alert(`비밀키는 ${key}입니다.`); if (key1 == 'Secret Key 1') { key1 = response.data; alert(`비밀키는 ${key1}입니다.`); } else if (key2 == 'Secret Key 2') { key2 = response.data; alert(`비밀키는 ${key2}입니다.`); } else { alert('이미 파일을 2번 업로드 하셨습니다.'); } this.uploadCount++; // 업로드 카운트 증가 window.location.href = '#/first'; // window.location.href = '#/first'; }) .catch(function () { console.log('FAILURE!!'); Loading @@ -59,7 +68,7 @@ export default { }); }, goToFinalRouter() { window.location.href = '#/last'; window.location.href = `#/last?key1=${key1}&key2=${key2}`; } } }; Loading