--- client/views/Login.vue
+++ client/views/Login.vue
... | ... | @@ -152,6 +152,8 @@ |
152 | 152 |
<script> |
153 | 153 |
import SvgIcon from '@jamescoyle/vue-icon'; |
154 | 154 |
import { mdiMagnify, mdiWindowClose } from '@mdi/js'; |
155 |
+import axios from "axios"; |
|
156 |
+ |
|
155 | 157 |
export default { |
156 | 158 |
data() { |
157 | 159 |
return { |
... | ... | @@ -168,6 +170,19 @@ |
168 | 170 |
// 여기에 로그인 로직을 추가하세요. |
169 | 171 |
console.log('Username:', this.username); |
170 | 172 |
console.log('Password:', this.password); |
173 |
+ axios({ |
|
174 |
+ url: "/auth/login.json", |
|
175 |
+ method: "post", |
|
176 |
+ data: { |
|
177 |
+ loginId: this.username, |
|
178 |
+ password: this.password, |
|
179 |
+ }, |
|
180 |
+ }).then(function (response) { |
|
181 |
+ alert("성공!") |
|
182 |
+ }).catch(function (error) { |
|
183 |
+ console.log(error); |
|
184 |
+ }); |
|
185 |
+ |
|
171 | 186 |
}, |
172 | 187 |
goToPage(page) { |
173 | 188 |
this.$router.push({ name: page }); |
--- package-lock.json
+++ package-lock.json
... | ... | @@ -10,6 +10,7 @@ |
10 | 10 |
"@jamescoyle/vue-icon": "^0.1.2", |
11 | 11 |
"@mdi/js": "^7.4.47", |
12 | 12 |
"@mdi/light-js": "^0.2.63", |
13 |
+ "axios": "^1.7.3", |
|
13 | 14 |
"babel-loader": "8.2.5", |
14 | 15 |
"css-loader": "6.7.1", |
15 | 16 |
"express": "^4.18.1", |
... | ... | @@ -846,6 +847,21 @@ |
846 | 847 |
"integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", |
847 | 848 |
"license": "MIT" |
848 | 849 |
}, |
850 |
+ "node_modules/asynckit": { |
|
851 |
+ "version": "0.4.0", |
|
852 |
+ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", |
|
853 |
+ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" |
|
854 |
+ }, |
|
855 |
+ "node_modules/axios": { |
|
856 |
+ "version": "1.7.3", |
|
857 |
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.3.tgz", |
|
858 |
+ "integrity": "sha512-Ar7ND9pU99eJ9GpoGQKhKf58GpUOgnzuaB7ueNQ5BMi0p+LZ5oaEnfF999fAArcTIBwXTCHAmGcHOZJaWPq9Nw==", |
|
859 |
+ "dependencies": { |
|
860 |
+ "follow-redirects": "^1.15.6", |
|
861 |
+ "form-data": "^4.0.0", |
|
862 |
+ "proxy-from-env": "^1.1.0" |
|
863 |
+ } |
|
864 |
+ }, |
|
849 | 865 |
"node_modules/babel-loader": { |
850 | 866 |
"version": "8.2.5", |
851 | 867 |
"resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.2.5.tgz", |
... | ... | @@ -1148,6 +1164,17 @@ |
1148 | 1164 |
"integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", |
1149 | 1165 |
"license": "MIT" |
1150 | 1166 |
}, |
1167 |
+ "node_modules/combined-stream": { |
|
1168 |
+ "version": "1.0.8", |
|
1169 |
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", |
|
1170 |
+ "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", |
|
1171 |
+ "dependencies": { |
|
1172 |
+ "delayed-stream": "~1.0.0" |
|
1173 |
+ }, |
|
1174 |
+ "engines": { |
|
1175 |
+ "node": ">= 0.8" |
|
1176 |
+ } |
|
1177 |
+ }, |
|
1151 | 1178 |
"node_modules/commander": { |
1152 | 1179 |
"version": "4.1.1", |
1153 | 1180 |
"resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", |
... | ... | @@ -1313,6 +1340,14 @@ |
1313 | 1340 |
}, |
1314 | 1341 |
"funding": { |
1315 | 1342 |
"url": "https://github.com/sponsors/ljharb" |
1343 |
+ } |
|
1344 |
+ }, |
|
1345 |
+ "node_modules/delayed-stream": { |
|
1346 |
+ "version": "1.0.0", |
|
1347 |
+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", |
|
1348 |
+ "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", |
|
1349 |
+ "engines": { |
|
1350 |
+ "node": ">=0.4.0" |
|
1316 | 1351 |
} |
1317 | 1352 |
}, |
1318 | 1353 |
"node_modules/depd": { |
... | ... | @@ -1750,6 +1785,38 @@ |
1750 | 1785 |
"license": "BSD-3-Clause", |
1751 | 1786 |
"bin": { |
1752 | 1787 |
"flat": "cli.js" |
1788 |
+ } |
|
1789 |
+ }, |
|
1790 |
+ "node_modules/follow-redirects": { |
|
1791 |
+ "version": "1.15.6", |
|
1792 |
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", |
|
1793 |
+ "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", |
|
1794 |
+ "funding": [ |
|
1795 |
+ { |
|
1796 |
+ "type": "individual", |
|
1797 |
+ "url": "https://github.com/sponsors/RubenVerborgh" |
|
1798 |
+ } |
|
1799 |
+ ], |
|
1800 |
+ "engines": { |
|
1801 |
+ "node": ">=4.0" |
|
1802 |
+ }, |
|
1803 |
+ "peerDependenciesMeta": { |
|
1804 |
+ "debug": { |
|
1805 |
+ "optional": true |
|
1806 |
+ } |
|
1807 |
+ } |
|
1808 |
+ }, |
|
1809 |
+ "node_modules/form-data": { |
|
1810 |
+ "version": "4.0.0", |
|
1811 |
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", |
|
1812 |
+ "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", |
|
1813 |
+ "dependencies": { |
|
1814 |
+ "asynckit": "^0.4.0", |
|
1815 |
+ "combined-stream": "^1.0.8", |
|
1816 |
+ "mime-types": "^2.1.12" |
|
1817 |
+ }, |
|
1818 |
+ "engines": { |
|
1819 |
+ "node": ">= 6" |
|
1753 | 1820 |
} |
1754 | 1821 |
}, |
1755 | 1822 |
"node_modules/forwarded": { |
... | ... | @@ -2862,6 +2929,11 @@ |
2862 | 2929 |
"node": ">= 0.10" |
2863 | 2930 |
} |
2864 | 2931 |
}, |
2932 |
+ "node_modules/proxy-from-env": { |
|
2933 |
+ "version": "1.1.0", |
|
2934 |
+ "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", |
|
2935 |
+ "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" |
|
2936 |
+ }, |
|
2865 | 2937 |
"node_modules/punycode": { |
2866 | 2938 |
"version": "2.3.1", |
2867 | 2939 |
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", |
--- package.json
+++ package.json
... | ... | @@ -5,6 +5,7 @@ |
5 | 5 |
"@jamescoyle/vue-icon": "^0.1.2", |
6 | 6 |
"@mdi/js": "^7.4.47", |
7 | 7 |
"@mdi/light-js": "^0.2.63", |
8 |
+ "axios": "^1.7.3", |
|
8 | 9 |
"babel-loader": "8.2.5", |
9 | 10 |
"css-loader": "6.7.1", |
10 | 11 |
"express": "^4.18.1", |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?