Merge branch 'file_additional' of ssh://khuhub.khu.ac.kr:12959/2020-1-CloudCompu…
…ting/D_Team_Khuloud into new_file
Showing
12 changed files
with
262 additions
and
128 deletions
... | @@ -20,19 +20,40 @@ router.post('/update', function(req, res, next) { | ... | @@ -20,19 +20,40 @@ router.post('/update', function(req, res, next) { |
20 | console.log("updating user failed"); | 20 | console.log("updating user failed"); |
21 | next(err); | 21 | next(err); |
22 | } else { | 22 | } else { |
23 | - console.log("user updated successfully"); | 23 | + res.status(200).send('update'); |
24 | - res.redirect('back'); | ||
25 | } | 24 | } |
26 | }); | 25 | }); |
27 | } | 26 | } |
28 | else | 27 | else |
29 | { | 28 | { |
30 | - console.log("password not match"); | 29 | + res.status(404).send(err); |
31 | - res.redirect('back'); | ||
32 | } | 30 | } |
33 | }); | 31 | }); |
34 | 32 | ||
33 | +router.post('/delete', function(req, res, next) { | ||
34 | + var user_id=req.body.user_id; | ||
35 | + var user_pw=req.body.user_pw; | ||
36 | + var user_pw_temp =cryptoM.encrypt(user_pw); //받아온 비밀번호를 암호화화여 임시변수에 저장 | ||
37 | + | ||
38 | + var sqlquery = "SELECT user_pw FROM users WHERE user_id = ?"; // user_id의 비밀번호를 가져옴 | ||
39 | + connection.query(sqlquery, [user_id], function (err, rows) { | ||
40 | + if (rows[0].user_pw == user_pw_temp) { // 받아온 비밀번호와 user_id의 비밀번호가 같은지 대조 | ||
41 | + var sql = 'delete from users where user_id = ?'; // 만약 같다면 삭제 진행 | ||
42 | + var values = [user_id]; | ||
43 | + connection.query(sql, values, function (err) { | ||
44 | + if (err) { | ||
45 | + console.log("delete user failed"); | ||
46 | + throw err; | ||
47 | + } else { | ||
48 | + res.status(200).send('delete'); | ||
35 | 49 | ||
50 | + } | ||
51 | + }); | ||
52 | + } else { | ||
53 | + res.status(404).send(err); | ||
54 | + } | ||
55 | + }); | ||
36 | 56 | ||
57 | +}); | ||
37 | 58 | ||
38 | module.exports = router; | 59 | module.exports = router; | ... | ... |
front-end/.eslintrc.js
0 → 100644
1 | +module.exports = { | ||
2 | + root: true, | ||
3 | + env: { | ||
4 | + node: true, | ||
5 | + }, | ||
6 | + extends: [ | ||
7 | + 'eslint:recommended', | ||
8 | + 'plugin:vue/essential', | ||
9 | + 'prettier', | ||
10 | + 'plugin:prettier/recommended', | ||
11 | + ], | ||
12 | + | ||
13 | + parserOptions: { | ||
14 | + parser: 'babel-eslint', | ||
15 | + }, | ||
16 | + rules: { | ||
17 | + 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', | ||
18 | + 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', | ||
19 | + 'prettier/prettier': [ | ||
20 | + 'error', | ||
21 | + { | ||
22 | + singleQuote: true, | ||
23 | + semi: true, | ||
24 | + useTabs: true, | ||
25 | + tabWidth: 2, | ||
26 | + trailingComma: 'all', | ||
27 | + printWidth: 80, | ||
28 | + bracketSpacing: true, | ||
29 | + arrowParens: 'avoid', | ||
30 | + }, | ||
31 | + ], | ||
32 | + }, | ||
33 | + overrides: [ | ||
34 | + { | ||
35 | + files: [ | ||
36 | + '**/__tests__/*.{j,t}s?(x)', | ||
37 | + '**/tests/unit/**/*.spec.{j,t}s?(x)', | ||
38 | + ], | ||
39 | + env: { | ||
40 | + jest: true, | ||
41 | + }, | ||
42 | + }, | ||
43 | + ], | ||
44 | +}; |
... | @@ -2147,6 +2147,20 @@ | ... | @@ -2147,6 +2147,20 @@ |
2147 | } | 2147 | } |
2148 | } | 2148 | } |
2149 | }, | 2149 | }, |
2150 | + "babel-eslint": { | ||
2151 | + "version": "10.1.0", | ||
2152 | + "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz", | ||
2153 | + "integrity": "sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg==", | ||
2154 | + "dev": true, | ||
2155 | + "requires": { | ||
2156 | + "@babel/code-frame": "^7.0.0", | ||
2157 | + "@babel/parser": "^7.7.0", | ||
2158 | + "@babel/traverse": "^7.7.0", | ||
2159 | + "@babel/types": "^7.7.0", | ||
2160 | + "eslint-visitor-keys": "^1.0.0", | ||
2161 | + "resolve": "^1.12.0" | ||
2162 | + } | ||
2163 | + }, | ||
2150 | "babel-loader": { | 2164 | "babel-loader": { |
2151 | "version": "8.1.0", | 2165 | "version": "8.1.0", |
2152 | "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.1.0.tgz", | 2166 | "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.1.0.tgz", |
... | @@ -4422,9 +4436,9 @@ | ... | @@ -4422,9 +4436,9 @@ |
4422 | "dev": true | 4436 | "dev": true |
4423 | }, | 4437 | }, |
4424 | "cross-spawn": { | 4438 | "cross-spawn": { |
4425 | - "version": "7.0.2", | 4439 | + "version": "7.0.3", |
4426 | - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.2.tgz", | 4440 | + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", |
4427 | - "integrity": "sha512-PD6G8QG3S4FK/XCGFbEQrDqO2AnMMsy0meR7lerlIOHAAbkuavGU/pOqprrlvfTNjvowivTeBsjebAL0NSoMxw==", | 4441 | + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", |
4428 | "dev": true, | 4442 | "dev": true, |
4429 | "requires": { | 4443 | "requires": { |
4430 | "path-key": "^3.1.0", | 4444 | "path-key": "^3.1.0", |
... | @@ -4596,14 +4610,14 @@ | ... | @@ -4596,14 +4610,14 @@ |
4596 | "dev": true | 4610 | "dev": true |
4597 | }, | 4611 | }, |
4598 | "espree": { | 4612 | "espree": { |
4599 | - "version": "7.0.0", | 4613 | + "version": "7.1.0", |
4600 | - "resolved": "https://registry.npmjs.org/espree/-/espree-7.0.0.tgz", | 4614 | + "resolved": "https://registry.npmjs.org/espree/-/espree-7.1.0.tgz", |
4601 | - "integrity": "sha512-/r2XEx5Mw4pgKdyb7GNLQNsu++asx/dltf/CI8RFi9oGHxmQFgvLbc5Op4U6i8Oaj+kdslhJtVlEZeAqH5qOTw==", | 4615 | + "integrity": "sha512-dcorZSyfmm4WTuTnE5Y7MEN1DyoPYy1ZR783QW1FJoenn7RailyWFsq/UL6ZAAA7uXurN9FIpYyUs3OfiIW+Qw==", |
4602 | "dev": true, | 4616 | "dev": true, |
4603 | "requires": { | 4617 | "requires": { |
4604 | - "acorn": "^7.1.1", | 4618 | + "acorn": "^7.2.0", |
4605 | "acorn-jsx": "^5.2.0", | 4619 | "acorn-jsx": "^5.2.0", |
4606 | - "eslint-visitor-keys": "^1.1.0" | 4620 | + "eslint-visitor-keys": "^1.2.0" |
4607 | }, | 4621 | }, |
4608 | "dependencies": { | 4622 | "dependencies": { |
4609 | "acorn": { | 4623 | "acorn": { |
... | @@ -4611,6 +4625,12 @@ | ... | @@ -4611,6 +4625,12 @@ |
4611 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.2.0.tgz", | 4625 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.2.0.tgz", |
4612 | "integrity": "sha512-apwXVmYVpQ34m/i71vrApRrRKCWQnZZF1+npOD0WV5xZFfwWOmKGQ2RWlfdy9vWITsenisM8M0Qeq8agcFHNiQ==", | 4626 | "integrity": "sha512-apwXVmYVpQ34m/i71vrApRrRKCWQnZZF1+npOD0WV5xZFfwWOmKGQ2RWlfdy9vWITsenisM8M0Qeq8agcFHNiQ==", |
4613 | "dev": true | 4627 | "dev": true |
4628 | + }, | ||
4629 | + "eslint-visitor-keys": { | ||
4630 | + "version": "1.2.0", | ||
4631 | + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.2.0.tgz", | ||
4632 | + "integrity": "sha512-WFb4ihckKil6hu3Dp798xdzSfddwKKU3+nGniKF6HfeW6OLd2OUDEPP7TcHtB5+QXOKg2s6B2DaMPE1Nn/kxKQ==", | ||
4633 | + "dev": true | ||
4614 | } | 4634 | } |
4615 | } | 4635 | } |
4616 | }, | 4636 | }, |
... | @@ -10644,9 +10664,9 @@ | ... | @@ -10644,9 +10664,9 @@ |
10644 | "dev": true | 10664 | "dev": true |
10645 | }, | 10665 | }, |
10646 | "v8-compile-cache": { | 10666 | "v8-compile-cache": { |
10647 | - "version": "2.1.0", | 10667 | + "version": "2.1.1", |
10648 | - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", | 10668 | + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz", |
10649 | - "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", | 10669 | + "integrity": "sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ==", |
10650 | "dev": true | 10670 | "dev": true |
10651 | }, | 10671 | }, |
10652 | "validate-npm-package-license": { | 10672 | "validate-npm-package-license": { | ... | ... |
... | @@ -4,7 +4,8 @@ | ... | @@ -4,7 +4,8 @@ |
4 | "private": true, | 4 | "private": true, |
5 | "scripts": { | 5 | "scripts": { |
6 | "serve": "vue-cli-service serve", | 6 | "serve": "vue-cli-service serve", |
7 | - "build": "vue-cli-service build" | 7 | + "build": "vue-cli-service build", |
8 | + "lint": "vue-cli-service lint" | ||
8 | }, | 9 | }, |
9 | "dependencies": { | 10 | "dependencies": { |
10 | "axios": "^0.19.2", | 11 | "axios": "^0.19.2", |
... | @@ -19,6 +20,7 @@ | ... | @@ -19,6 +20,7 @@ |
19 | "@vue/cli-plugin-router": "~4.3.0", | 20 | "@vue/cli-plugin-router": "~4.3.0", |
20 | "@vue/cli-plugin-vuex": "~4.3.0", | 21 | "@vue/cli-plugin-vuex": "~4.3.0", |
21 | "@vue/cli-service": "~4.3.0", | 22 | "@vue/cli-service": "~4.3.0", |
23 | + "babel-eslint": "^10.1.0", | ||
22 | "eslint": "^7.1.0", | 24 | "eslint": "^7.1.0", |
23 | "eslint-config-prettier": "^6.11.0", | 25 | "eslint-config-prettier": "^6.11.0", |
24 | "eslint-plugin-prettier": "^3.1.3", | 26 | "eslint-plugin-prettier": "^3.1.3", | ... | ... |
1 | -import axios from 'axios' | 1 | +import axios from 'axios'; |
2 | 2 | ||
3 | const instance = axios.create({ | 3 | const instance = axios.create({ |
4 | baseURL: process.env.VUE_APP_API_URL, | 4 | baseURL: process.env.VUE_APP_API_URL, |
... | @@ -18,8 +18,8 @@ function folder(curData) { | ... | @@ -18,8 +18,8 @@ function folder(curData) { |
18 | return axios.get('/api/folder/show', { | 18 | return axios.get('/api/folder/show', { |
19 | params: { | 19 | params: { |
20 | id: curData.id, | 20 | id: curData.id, |
21 | - cur: curData.cur | 21 | + cur: curData.cur, |
22 | - } | 22 | + }, |
23 | }); | 23 | }); |
24 | } | 24 | } |
25 | 25 | ||
... | @@ -35,52 +35,60 @@ function moveFolder(folderData) { | ... | @@ -35,52 +35,60 @@ function moveFolder(folderData) { |
35 | return axios.post('/api/folder/move', folderData); | 35 | return axios.post('/api/folder/move', folderData); |
36 | } | 36 | } |
37 | 37 | ||
38 | -function file(curData){ | 38 | +function file(curData) { |
39 | return axios.get('/api/file', { | 39 | return axios.get('/api/file', { |
40 | params: { | 40 | params: { |
41 | id: curData.id, | 41 | id: curData.id, |
42 | - cur: curData.cur | 42 | + cur: curData.cur, |
43 | - } | 43 | + }, |
44 | }); | 44 | }); |
45 | } | 45 | } |
46 | 46 | ||
47 | - | 47 | +function uploadFile(fileData) { |
48 | -function uploadFile(fileData){ | ||
49 | return axios.post('/api/file/upload', fileData, { | 48 | return axios.post('/api/file/upload', fileData, { |
50 | - headers :{ | 49 | + headers: { |
51 | - 'Content-Type' : 'multipart/form-data' | 50 | + 'Content-Type': 'multipart/form-data', |
52 | - } | 51 | + }, |
53 | }); | 52 | }); |
54 | } | 53 | } |
55 | 54 | ||
56 | -function detailFile(fileData){ | 55 | +function detailFile(fileData) { |
57 | return axios.get(`/api/file/${fileData.name}`, { | 56 | return axios.get(`/api/file/${fileData.name}`, { |
58 | - params:{ | 57 | + params: { |
59 | id: fileData.id, | 58 | id: fileData.id, |
60 | - cur: fileData.cur | 59 | + cur: fileData.cur, |
61 | - } | 60 | + }, |
62 | - }) | 61 | + }); |
63 | } | 62 | } |
64 | -function deleteFile(fileData){ | 63 | + |
64 | +function deleteFile(fileData) { | ||
65 | return axios.get(`/api/file/delete/${fileData.fileName}`, { | 65 | return axios.get(`/api/file/delete/${fileData.fileName}`, { |
66 | - params:{ | 66 | + params: { |
67 | //현재 접속한 사람의 id와 삭제할 파일의 이름, 현재 폴더위치를 파라미터로 넘긴다. | 67 | //현재 접속한 사람의 id와 삭제할 파일의 이름, 현재 폴더위치를 파라미터로 넘긴다. |
68 | id: fileData.user_id, | 68 | id: fileData.user_id, |
69 | - cur: fileData.cur | 69 | + cur: fileData.cur, |
70 | - } | 70 | + }, |
71 | }); | 71 | }); |
72 | } | 72 | } |
73 | -function downloadFile(fileData){ | 73 | +function downloadFile(fileData) { |
74 | return axios.get(`api/file/download/${fileData.fileName}`, { | 74 | return axios.get(`api/file/download/${fileData.fileName}`, { |
75 | - params:{ | 75 | + params: { |
76 | //현재 접속한 사람의 id와 다운로드를 위해 선택한 파일의 이름을 파라미터로 넘긴다. | 76 | //현재 접속한 사람의 id와 다운로드를 위해 선택한 파일의 이름을 파라미터로 넘긴다. |
77 | id: fileData.id, | 77 | id: fileData.id, |
78 | - cur: fileData.cur | 78 | + cur: fileData.cur, |
79 | - } | 79 | + }, |
80 | }); | 80 | }); |
81 | } | 81 | } |
82 | 82 | ||
83 | - | 83 | +export { |
84 | - | 84 | + registerUser, |
85 | -export { registerUser, loginUser, folder, makeFolder, deleteFolder, moveFolder, | 85 | + loginUser, |
86 | - file, uploadFile, deleteFile, downloadFile }; | 86 | + folder, |
87 | + makeFolder, | ||
88 | + deleteFolder, | ||
89 | + moveFolder, | ||
90 | + file, | ||
91 | + uploadFile, | ||
92 | + deleteFile, | ||
93 | + downloadFile, | ||
94 | +}; | ... | ... |
This diff is collapsed. Click to expand it.
... | @@ -7,7 +7,7 @@ | ... | @@ -7,7 +7,7 @@ |
7 | v-if="isUserLogin" | 7 | v-if="isUserLogin" |
8 | > | 8 | > |
9 | <v-list dense> | 9 | <v-list dense> |
10 | - <v-list-item router :to="{name: 'Main'}" exact> | 10 | + <v-list-item router :to="{ name: 'Main' }" exact> |
11 | <v-list-item-action> | 11 | <v-list-item-action> |
12 | <v-icon>mdi-home</v-icon> | 12 | <v-icon>mdi-home</v-icon> |
13 | </v-list-item-action> | 13 | </v-list-item-action> |
... | @@ -15,7 +15,7 @@ | ... | @@ -15,7 +15,7 @@ |
15 | <v-list-item-title>홈</v-list-item-title> | 15 | <v-list-item-title>홈</v-list-item-title> |
16 | </v-list-item-content> | 16 | </v-list-item-content> |
17 | </v-list-item> | 17 | </v-list-item> |
18 | - <v-list-item router :to="{name: 'File'}" exact> | 18 | + <v-list-item router :to="{ name: 'File' }" exact> |
19 | <v-list-item-action> | 19 | <v-list-item-action> |
20 | <v-icon>mdi-file</v-icon> | 20 | <v-icon>mdi-file</v-icon> |
21 | </v-list-item-action> | 21 | </v-list-item-action> |
... | @@ -23,7 +23,7 @@ | ... | @@ -23,7 +23,7 @@ |
23 | <v-list-item-title>파일</v-list-item-title> | 23 | <v-list-item-title>파일</v-list-item-title> |
24 | </v-list-item-content> | 24 | </v-list-item-content> |
25 | </v-list-item> | 25 | </v-list-item> |
26 | - <v-list-item router :to="{name: 'Fav'}" exact> | 26 | + <v-list-item router :to="{ name: 'Fav' }" exact> |
27 | <v-list-item-action> | 27 | <v-list-item-action> |
28 | <v-icon>mdi-heart</v-icon> | 28 | <v-icon>mdi-heart</v-icon> |
29 | </v-list-item-action> | 29 | </v-list-item-action> |
... | @@ -31,7 +31,7 @@ | ... | @@ -31,7 +31,7 @@ |
31 | <v-list-item-title>즐겨찾기</v-list-item-title> | 31 | <v-list-item-title>즐겨찾기</v-list-item-title> |
32 | </v-list-item-content> | 32 | </v-list-item-content> |
33 | </v-list-item> | 33 | </v-list-item> |
34 | - <v-list-item router :to="{name: 'Quick'}" exact> | 34 | + <v-list-item router :to="{ name: 'Quick' }" exact> |
35 | <v-list-item-action> | 35 | <v-list-item-action> |
36 | <v-icon>mdi-history</v-icon> | 36 | <v-icon>mdi-history</v-icon> |
37 | </v-list-item-action> | 37 | </v-list-item-action> |
... | @@ -39,7 +39,7 @@ | ... | @@ -39,7 +39,7 @@ |
39 | <v-list-item-title>빠른 액세스</v-list-item-title> | 39 | <v-list-item-title>빠른 액세스</v-list-item-title> |
40 | </v-list-item-content> | 40 | </v-list-item-content> |
41 | </v-list-item> | 41 | </v-list-item> |
42 | - <v-list-item router :to="{name: 'Contact'}" exact> | 42 | + <v-list-item router :to="{ name: 'Contact' }" exact> |
43 | <v-list-item-action> | 43 | <v-list-item-action> |
44 | <v-icon>mdi-contacts</v-icon> | 44 | <v-icon>mdi-contacts</v-icon> |
45 | </v-list-item-action> | 45 | </v-list-item-action> |
... | @@ -47,7 +47,7 @@ | ... | @@ -47,7 +47,7 @@ |
47 | <v-list-item-title>연락처</v-list-item-title> | 47 | <v-list-item-title>연락처</v-list-item-title> |
48 | </v-list-item-content> | 48 | </v-list-item-content> |
49 | </v-list-item> | 49 | </v-list-item> |
50 | - <v-list-item router :to="{name: 'Main'}" exact> | 50 | + <v-list-item router :to="{ name: 'Main' }" exact> |
51 | <v-list-item-action> | 51 | <v-list-item-action> |
52 | <v-icon>mdi-settings</v-icon> | 52 | <v-icon>mdi-settings</v-icon> |
53 | </v-list-item-action> | 53 | </v-list-item-action> |
... | @@ -63,7 +63,7 @@ | ... | @@ -63,7 +63,7 @@ |
63 | <v-list-item-title>휴지통</v-list-item-title> | 63 | <v-list-item-title>휴지통</v-list-item-title> |
64 | </v-list-item-content> | 64 | </v-list-item-content> |
65 | </v-list-item> | 65 | </v-list-item> |
66 | - <v-list-item router :to="{name: 'Feedback'}" exact> | 66 | + <v-list-item router :to="{ name: 'Feedback' }" exact> |
67 | <v-list-item-action> | 67 | <v-list-item-action> |
68 | <v-icon>mdi-message</v-icon> | 68 | <v-icon>mdi-message</v-icon> |
69 | </v-list-item-action> | 69 | </v-list-item-action> |
... | @@ -71,7 +71,7 @@ | ... | @@ -71,7 +71,7 @@ |
71 | <v-list-item-title>피드백</v-list-item-title> | 71 | <v-list-item-title>피드백</v-list-item-title> |
72 | </v-list-item-content> | 72 | </v-list-item-content> |
73 | </v-list-item> | 73 | </v-list-item> |
74 | - <v-list-item router :to="{name: 'Main'}" exact> | 74 | + <v-list-item router :to="{ name: 'Main' }" exact> |
75 | <v-list-item-action> | 75 | <v-list-item-action> |
76 | <v-icon>mdi-help-circle</v-icon> | 76 | <v-icon>mdi-help-circle</v-icon> |
77 | </v-list-item-action> | 77 | </v-list-item-action> |
... | @@ -82,19 +82,17 @@ | ... | @@ -82,19 +82,17 @@ |
82 | </v-list> | 82 | </v-list> |
83 | </v-navigation-drawer> | 83 | </v-navigation-drawer> |
84 | 84 | ||
85 | - | ||
86 | <v-app-bar | 85 | <v-app-bar |
87 | :clipped-left="$vuetify.breakpoint.lgAndUp" | 86 | :clipped-left="$vuetify.breakpoint.lgAndUp" |
88 | app | 87 | app |
89 | color="blue darken-3" | 88 | color="blue darken-3" |
90 | dark | 89 | dark |
91 | > | 90 | > |
92 | - | 91 | + <v-app-bar-nav-icon |
93 | - <v-app-bar-nav-icon @click.stop="drawer = !drawer" v-if="isUserLogin"></v-app-bar-nav-icon> | 92 | + @click.stop="drawer = !drawer" |
94 | - <v-toolbar-title | 93 | + v-if="isUserLogin" |
95 | - style="width: 300px" | 94 | + ></v-app-bar-nav-icon> |
96 | - class="ml-0 pl-4" | 95 | + <v-toolbar-title style="width: 300px" class="ml-0 pl-4"> |
97 | - > | ||
98 | <span class="hidden-sm-and-down">KhuLoud</span> | 96 | <span class="hidden-sm-and-down">KhuLoud</span> |
99 | </v-toolbar-title> | 97 | </v-toolbar-title> |
100 | <template v-if="isUserLogin"> | 98 | <template v-if="isUserLogin"> |
... | @@ -112,23 +110,21 @@ | ... | @@ -112,23 +110,21 @@ |
112 | </template> | 110 | </template> |
113 | <v-spacer></v-spacer> | 111 | <v-spacer></v-spacer> |
114 | <template v-if="isUserLogin"> | 112 | <template v-if="isUserLogin"> |
115 | - <v-btn icon @click = "logoutUser"> | 113 | + <v-btn icon @click="logoutUser"> |
116 | <v-icon>mdi-login</v-icon> | 114 | <v-icon>mdi-login</v-icon> |
117 | </v-btn> | 115 | </v-btn> |
118 | </template> | 116 | </template> |
119 | <template v-else> | 117 | <template v-else> |
120 | - <v-btn icon @click = "$router.push({name: 'Login'})"> | 118 | + <v-btn icon @click="$router.push({ name: 'Login' })"> |
121 | <v-icon>mdi-login</v-icon> | 119 | <v-icon>mdi-login</v-icon> |
122 | </v-btn> | 120 | </v-btn> |
123 | - <v-btn icon @click = "$router.push({name: 'RegistUser'})"> | 121 | + <v-btn icon @click="$router.push({ name: 'RegistUser' })"> |
124 | <v-icon>mdi-account</v-icon> | 122 | <v-icon>mdi-account</v-icon> |
125 | </v-btn> | 123 | </v-btn> |
126 | </template> | 124 | </template> |
127 | </v-app-bar> | 125 | </v-app-bar> |
128 | <v-content> | 126 | <v-content> |
129 | - <v-container | 127 | + <v-container> |
130 | - | ||
131 | - > | ||
132 | <router-view></router-view> | 128 | <router-view></router-view> |
133 | </v-container> | 129 | </v-container> |
134 | </v-content> | 130 | </v-content> |
... | @@ -144,7 +140,7 @@ export default { | ... | @@ -144,7 +140,7 @@ export default { |
144 | { icon: 'mdi-home', text: '홈' }, | 140 | { icon: 'mdi-home', text: '홈' }, |
145 | { icon: 'mdi-file', text: '파일' }, | 141 | { icon: 'mdi-file', text: '파일' }, |
146 | { icon: 'mdi-heart', text: '즐겨찾기' }, | 142 | { icon: 'mdi-heart', text: '즐겨찾기' }, |
147 | - { icon: 'mdi-history', text: '빠른 액세스'}, | 143 | + { icon: 'mdi-history', text: '빠른 액세스' }, |
148 | { icon: 'mdi-contacts', text: '연락처' }, | 144 | { icon: 'mdi-contacts', text: '연락처' }, |
149 | { icon: 'mdi-settings', text: '설정' }, | 145 | { icon: 'mdi-settings', text: '설정' }, |
150 | { icon: 'mdi-message', text: '피드백' }, | 146 | { icon: 'mdi-message', text: '피드백' }, |
... | @@ -152,19 +148,17 @@ export default { | ... | @@ -152,19 +148,17 @@ export default { |
152 | ], | 148 | ], |
153 | }), | 149 | }), |
154 | computed: { | 150 | computed: { |
155 | - isUserLogin(){ | 151 | + isUserLogin() { |
156 | return this.$store.getters.isLogin; | 152 | return this.$store.getters.isLogin; |
157 | }, | 153 | }, |
158 | }, | 154 | }, |
159 | methods: { | 155 | methods: { |
160 | - logoutUser(){ | 156 | + logoutUser() { |
161 | this.$store.commit('clearid'); | 157 | this.$store.commit('clearid'); |
162 | this.$router.push('/'); | 158 | this.$router.push('/'); |
163 | - } | 159 | + }, |
164 | - } | 160 | + }, |
165 | -} | 161 | +}; |
166 | </script> | 162 | </script> |
167 | 163 | ||
168 | -<style> | ||
169 | - | ||
170 | -</style> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
164 | +<style></style> | ... | ... |
front-end/src/components/accessList.vue
0 → 100644
1 | +<template lang="html"> | ||
2 | + <v-flex> | ||
3 | + <h1>빠른액세스</h1> | ||
4 | + <v-simple-table> | ||
5 | + <template v-slot:default> | ||
6 | + <thead> | ||
7 | + <tr> | ||
8 | + <th class="text-left">Name</th> | ||
9 | + <th class="text-left">Date</th> | ||
10 | + </tr> | ||
11 | + </thead> | ||
12 | + <tbody> | ||
13 | + <tr v-for="item in recent_list" :key="item.name"> | ||
14 | + <td>{{ item.file_id }}</td> | ||
15 | + <td>{{ item.file_name}}</td> | ||
16 | + <td>{{ item.location }}</td> | ||
17 | + <td>{{ item.date }}</td> | ||
18 | + </tr> | ||
19 | + </tbody> | ||
20 | + </template> | ||
21 | + </v-simple-table> | ||
22 | + <v-divider></v-divider> | ||
23 | + </v-flex> | ||
24 | +</template> | ||
25 | + | ||
26 | +<script> | ||
27 | + import { accessed_list } from '../api/index'; | ||
28 | + import Axios from 'axios'; | ||
29 | + export default { | ||
30 | + data() { | ||
31 | + return { | ||
32 | + recent_list = [] | ||
33 | + } | ||
34 | + }, | ||
35 | + async created(){ | ||
36 | + try { | ||
37 | + const curData = { | ||
38 | + id : this.$store.state.id, | ||
39 | + } | ||
40 | + console.log(curData); | ||
41 | + const list_reponse = await accessed_list(curData); | ||
42 | + this.$store.commit('setRecentList', list_reponse.data) | ||
43 | + this.recent_list = this.$stroe.getters.recentL; | ||
44 | + console.log(this.$store.getters.recentL); | ||
45 | + } catch (error) { | ||
46 | + console.log("에러"); | ||
47 | + console.log(error); | ||
48 | + } | ||
49 | + }, | ||
50 | + methods:{ | ||
51 | + | ||
52 | + } | ||
53 | + } | ||
54 | +</script> | ||
55 | + | ||
56 | +<style lang="css" scoped> | ||
57 | +</style> |
1 | -import Vue from 'vue' | 1 | +import Vue from 'vue'; |
2 | -import VueRouter from 'vue-router' | 2 | +import VueRouter from 'vue-router'; |
3 | // import Home from '../views/Home.vue' | 3 | // import Home from '../views/Home.vue' |
4 | // import Login from '../views/Login.vue' | 4 | // import Login from '../views/Login.vue' |
5 | // import Main from '../views/Main.vue' | 5 | // import Main from '../views/Main.vue' |
... | @@ -12,65 +12,64 @@ import VueRouter from 'vue-router' | ... | @@ -12,65 +12,64 @@ import VueRouter from 'vue-router' |
12 | // import RegistUser from '../views/RegistUser' | 12 | // import RegistUser from '../views/RegistUser' |
13 | Vue.use(VueRouter); | 13 | Vue.use(VueRouter); |
14 | 14 | ||
15 | - | 15 | +export default new VueRouter({ |
16 | - | ||
17 | -export default new VueRouter ({ | ||
18 | mode: 'history', | 16 | mode: 'history', |
17 | + | ||
19 | base: process.env.BASE_URL, | 18 | base: process.env.BASE_URL, |
20 | - routes : [ | 19 | + routes: [ |
21 | { | 20 | { |
22 | path: '/', | 21 | path: '/', |
23 | - redirect: '/Login' | 22 | + redirect: '/Login', |
24 | }, | 23 | }, |
25 | { | 24 | { |
26 | path: '/home', | 25 | path: '/home', |
27 | name: 'Home', | 26 | name: 'Home', |
28 | - component: () => import('../views/Home.vue') | 27 | + component: () => import('../views/Home.vue'), |
29 | }, | 28 | }, |
30 | { | 29 | { |
31 | path: '/main', | 30 | path: '/main', |
32 | - name:'Main', | 31 | + name: 'Main', |
33 | - component: () => import('../views/Main.vue') | 32 | + component: () => import('../views/Main.vue'), |
34 | }, | 33 | }, |
35 | { | 34 | { |
36 | path: '/contact', | 35 | path: '/contact', |
37 | - name:'Contact', | 36 | + name: 'Contact', |
38 | - component: () => import('../views/Contact.vue') | 37 | + component: () => import('../views/Contact.vue'), |
39 | }, | 38 | }, |
40 | { | 39 | { |
41 | path: '/registuser', | 40 | path: '/registuser', |
42 | name: 'RegistUser', | 41 | name: 'RegistUser', |
43 | - component: () => import('../views/SignupPage.vue') | 42 | + component: () => import('../views/SignupPage.vue'), |
44 | }, | 43 | }, |
45 | { | 44 | { |
46 | path: '/login', | 45 | path: '/login', |
47 | name: 'Login', | 46 | name: 'Login', |
48 | - component: () => import('../views/LoginPage.vue') | 47 | + component: () => import('../views/LoginPage.vue'), |
49 | }, | 48 | }, |
50 | { | 49 | { |
51 | - path:'/file', | 50 | + path: '/file', |
52 | - name:'File', | 51 | + name: 'File', |
53 | - component: () => import('../views/File.vue') | 52 | + component: () => import('../views/File.vue'), |
54 | }, | 53 | }, |
55 | { | 54 | { |
56 | - path:'/fav', | 55 | + path: '/fav', |
57 | - name:'Fav', | 56 | + name: 'Fav', |
58 | - component: () => import('../views/FavList.vue') | 57 | + component: () => import('../views/FavList.vue'), |
59 | }, | 58 | }, |
60 | { | 59 | { |
61 | - path:'/quick', | 60 | + path: '/quick', |
62 | - name:'Quick', | 61 | + name: 'Quick', |
63 | - component : () => import('../views/QuickList.vue') | 62 | + component: () => import('../views/QuickList.vue'), |
64 | }, | 63 | }, |
65 | { | 64 | { |
66 | - path:'/feedback', | 65 | + path: '/feedback', |
67 | - name:'Feedback', | 66 | + name: 'Feedback', |
68 | - component: () => import('../views/Feedback.vue') | 67 | + component: () => import('../views/Feedback.vue'), |
69 | }, | 68 | }, |
70 | { | 69 | { |
71 | path: '/folder', | 70 | path: '/folder', |
72 | name: 'Folder', | 71 | name: 'Folder', |
73 | - component: () => import('../views/FolderPage.vue') | 72 | + component: () => import('../views/FolderPage.vue'), |
74 | }, | 73 | }, |
75 | - ] | 74 | + ], |
76 | -}) | 75 | +}); | ... | ... |
... | @@ -9,7 +9,8 @@ export default new Vuex.Store({ | ... | @@ -9,7 +9,8 @@ export default new Vuex.Store({ |
9 | folders: [], | 9 | folders: [], |
10 | files: [], | 10 | files: [], |
11 | cur: '/', | 11 | cur: '/', |
12 | - parent: '/' | 12 | + parent: '/', |
13 | + recentList:[] | ||
13 | }, | 14 | }, |
14 | mutations: { | 15 | mutations: { |
15 | setId(state, userid) { | 16 | setId(state, userid) { |
... | @@ -29,6 +30,9 @@ export default new Vuex.Store({ | ... | @@ -29,6 +30,9 @@ export default new Vuex.Store({ |
29 | }, | 30 | }, |
30 | setParent(state, parent) { | 31 | setParent(state, parent) { |
31 | state.parent = parent; | 32 | state.parent = parent; |
33 | + }, | ||
34 | + setRecentList(state, list){ | ||
35 | + state.recentList = list; | ||
32 | } | 36 | } |
33 | }, | 37 | }, |
34 | getters: { | 38 | getters: { |
... | @@ -44,6 +48,9 @@ export default new Vuex.Store({ | ... | @@ -44,6 +48,9 @@ export default new Vuex.Store({ |
44 | fileL(state) { | 48 | fileL(state) { |
45 | return state.files; | 49 | return state.files; |
46 | }, | 50 | }, |
51 | + recentL(state){ | ||
52 | + return state.recentList; | ||
53 | + }, | ||
47 | cur(state) { | 54 | cur(state) { |
48 | return state.cur; | 55 | return state.cur; |
49 | }, | 56 | }, | ... | ... |
... | @@ -20,26 +20,9 @@ | ... | @@ -20,26 +20,9 @@ |
20 | <v-spacer></v-spacer> | 20 | <v-spacer></v-spacer> |
21 | </v-flex> | 21 | </v-flex> |
22 | <v-flex><br><v-divider></v-divider><br></v-flex> | 22 | <v-flex><br><v-divider></v-divider><br></v-flex> |
23 | - <v-flex> | 23 | + <v-container> |
24 | - <h1>빠른액세스</h1> | 24 | + |
25 | - <v-simple-table> | 25 | + </v-container> |
26 | - <template v-slot:default> | ||
27 | - <thead> | ||
28 | - <tr> | ||
29 | - <th class="text-left">Name</th> | ||
30 | - <th class="text-left">Date</th> | ||
31 | - </tr> | ||
32 | - </thead> | ||
33 | - <tbody> | ||
34 | - <tr v-for="item in favorite" :key="item.name"> | ||
35 | - <td>{{ item.name }}</td> | ||
36 | - <td>{{ item.date }}</td> | ||
37 | - </tr> | ||
38 | - </tbody> | ||
39 | - </template> | ||
40 | - </v-simple-table> | ||
41 | - <v-divider></v-divider> | ||
42 | - </v-flex> | ||
43 | </v-flex> | 26 | </v-flex> |
44 | <v-flex><br><v-divider></v-divider><br></v-flex> | 27 | <v-flex><br><v-divider></v-divider><br></v-flex> |
45 | <v-flex xs6> | 28 | <v-flex xs6> |
... | @@ -72,6 +55,7 @@ | ... | @@ -72,6 +55,7 @@ |
72 | 55 | ||
73 | 56 | ||
74 | <script> | 57 | <script> |
58 | + import Filecard from '@/components/accessList.vue' | ||
75 | export default { | 59 | export default { |
76 | data () { | 60 | data () { |
77 | return { | 61 | return { | ... | ... |
-
Please register or login to post a comment