Showing
9 changed files
with
54 additions
and
113 deletions
... | @@ -4,7 +4,7 @@ const AWS = require("aws-sdk"); | ... | @@ -4,7 +4,7 @@ const AWS = require("aws-sdk"); |
4 | const moment = require("moment"); | 4 | const moment = require("moment"); |
5 | AWS.config.loadFromPath(__dirname + "/modules/awsconfig.json"); | 5 | AWS.config.loadFromPath(__dirname + "/modules/awsconfig.json"); |
6 | 6 | ||
7 | -const BUCKET_NAME = "qkrrlqja-test"; | 7 | +const BUCKET_NAME = "khuloud"; |
8 | let curPath = ""; | 8 | let curPath = ""; |
9 | let user_id = ""; | 9 | let user_id = ""; |
10 | let parentPath = ""; | 10 | let parentPath = ""; | ... | ... |
1 | { | 1 | { |
2 | - "accessKeyId": "ASIAXZL2SWFEVX2QLC2C", | 2 | + "accessKeyId": "", |
3 | - "secretAccessKey": "xLT4QyCqNlgTNQvFP4oW6aVq04kLRkFPw3DO87hW", | 3 | + "secretAccessKey": "", |
4 | - "sessionToken": "FwoGZXIvYXdzEMr//////////wEaDJbPF1ZfC7m53f7t+CLDAQrg8xWLOlDP3orR6rIbCbXVHihhuEjZsOzAEsU9w3pMwCrUHvMNFFColA5OMcJC3AhZUCE0MkpsyIA/LJ/f17TJiNIePpnrynfhU+e/q5Mvc8TWDdNemHG9IW8jfXY950DtLXz2RPErVzWDYux2kGcSmvDpWmOP7hueZzsjZONjmbHU3jG3Godhg5HvGuariYm9h/msyipIQ3QPoqdum/3YEanjkKZqyk8bzqqeU3rNVUJTFOi4mX68H0h4tFpNlPIlYiimjYT3BTItwf48W22vdxtEZOnwYyIZJpXQIUmLOlzSzjwWoLkLsXGhJA9aoGJyM1ADziVY", | 4 | + "sessionToken": "", |
5 | "region": "ap-northeast-2" | 5 | "region": "ap-northeast-2" |
6 | } | 6 | } | ... | ... |
... | @@ -6,7 +6,7 @@ AWS.config.loadFromPath(__dirname + "/../modules/awsconfig.json"); | ... | @@ -6,7 +6,7 @@ AWS.config.loadFromPath(__dirname + "/../modules/awsconfig.json"); |
6 | var cryptoM = require('./../../routes/modules/cryptoM.js'); | 6 | var cryptoM = require('./../../routes/modules/cryptoM.js'); |
7 | const moment = require("moment"); | 7 | const moment = require("moment"); |
8 | 8 | ||
9 | -const BUCKET_NAME = "hong-s3-cloud"; | 9 | +const BUCKET_NAME = "khuloud"; |
10 | const s3 = new AWS.S3(); | 10 | const s3 = new AWS.S3(); |
11 | 11 | ||
12 | var router = express.Router(); | 12 | var router = express.Router(); |
... | @@ -105,4 +105,4 @@ router.post('/', function(req, res, next) { | ... | @@ -105,4 +105,4 @@ router.post('/', function(req, res, next) { |
105 | }); | 105 | }); |
106 | }); | 106 | }); |
107 | 107 | ||
108 | -module.exports = router; | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
108 | +module.exports = router; | ... | ... |
... | @@ -384,6 +384,7 @@ export default { | ... | @@ -384,6 +384,7 @@ export default { |
384 | }, | 384 | }, |
385 | computed: { | 385 | computed: { |
386 | calData() { | 386 | calData() { |
387 | + console.log(this.$store.getters.folderL); | ||
387 | return this.folders | 388 | return this.folders |
388 | .filter(data => { | 389 | .filter(data => { |
389 | return data.folder_name | 390 | return data.folder_name |
... | @@ -675,6 +676,7 @@ export default { | ... | @@ -675,6 +676,7 @@ export default { |
675 | cur: this.cfilename.location, | 676 | cur: this.cfilename.location, |
676 | fileName: this.cfilename.file_name, | 677 | fileName: this.cfilename.file_name, |
677 | }; | 678 | }; |
679 | + console.log(curentData.cur); | ||
678 | const detailData = await detailFile(currentData); | 680 | const detailData = await detailFile(currentData); |
679 | this.current_filename = detailData.data.file_name; | 681 | this.current_filename = detailData.data.file_name; |
680 | this.current_filedata = detailData.data.content; | 682 | this.current_filedata = detailData.data.content; | ... | ... |
... | @@ -63,14 +63,6 @@ | ... | @@ -63,14 +63,6 @@ |
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: 'Main' }" exact> | ||
67 | - <v-list-item-action> | ||
68 | - <v-icon>mdi-help-circle</v-icon> | ||
69 | - </v-list-item-action> | ||
70 | - <v-list-item-content> | ||
71 | - <v-list-item-title>도움말</v-list-item-title> | ||
72 | - </v-list-item-content> | ||
73 | - </v-list-item> | ||
74 | </v-list> | 66 | </v-list> |
75 | </v-navigation-drawer> | 67 | </v-navigation-drawer> |
76 | 68 | ||
... | @@ -88,14 +80,6 @@ | ... | @@ -88,14 +80,6 @@ |
88 | <span class="hidden-sm-and-down">KhuLoud</span> | 80 | <span class="hidden-sm-and-down">KhuLoud</span> |
89 | </v-toolbar-title> | 81 | </v-toolbar-title> |
90 | <template v-if="isUserLogin"> | 82 | <template v-if="isUserLogin"> |
91 | - <v-text-field | ||
92 | - flat | ||
93 | - solo-inverted | ||
94 | - hide-details | ||
95 | - prepend-inner-icon="mdi-magnify" | ||
96 | - label="전체 검색" | ||
97 | - class="hidden-sm-and-down" | ||
98 | - ></v-text-field> | ||
99 | </template> | 83 | </template> |
100 | <template v-else> | 84 | <template v-else> |
101 | <div></div> | 85 | <div></div> |
... | @@ -140,8 +124,10 @@ export default { | ... | @@ -140,8 +124,10 @@ export default { |
140 | ], | 124 | ], |
141 | }), | 125 | }), |
142 | computed: { | 126 | computed: { |
127 | + | ||
143 | isUserLogin() { | 128 | isUserLogin() { |
144 | return this.$store.getters.isLogin; | 129 | return this.$store.getters.isLogin; |
130 | + console.log(thks.$store.getters.folderL) | ||
145 | }, | 131 | }, |
146 | }, | 132 | }, |
147 | methods: { | 133 | methods: { | ... | ... |
1 | <template lang="html"> | 1 | <template lang="html"> |
2 | <v-flex> | 2 | <v-flex> |
3 | - <h1>빠른액세스</h1> | 3 | + <v-toolbar flat> |
4 | + <v-toolbar-title>빠른 액세스</v-toolbar-title> | ||
5 | + </v-toolbar> | ||
4 | <v-simple-table> | 6 | <v-simple-table> |
5 | <template v-slot:default> | 7 | <template v-slot:default> |
6 | <thead> | 8 | <thead> |
... | @@ -12,7 +14,7 @@ | ... | @@ -12,7 +14,7 @@ |
12 | </tr> | 14 | </tr> |
13 | </thead> | 15 | </thead> |
14 | <tbody> | 16 | <tbody> |
15 | - <tr v-for="item in recent_list" :key="item.name"> | 17 | + <tr v-for="item in recent_list" :key="item.name" @dblclick.stop = "dialog = true;download_file(item.file_name, item.location); "> |
16 | <td>{{ item.file_id }}</td> | 18 | <td>{{ item.file_id }}</td> |
17 | <td>{{ item.file_name }}</td> | 19 | <td>{{ item.file_name }}</td> |
18 | <td>{{ item.location }}</td> | 20 | <td>{{ item.location }}</td> |
... | @@ -22,16 +24,28 @@ | ... | @@ -22,16 +24,28 @@ |
22 | </template> | 24 | </template> |
23 | </v-simple-table> | 25 | </v-simple-table> |
24 | <v-divider></v-divider> | 26 | <v-divider></v-divider> |
27 | + <v-dialog | ||
28 | + v-model="dialog" | ||
29 | + max-width="290" | ||
30 | + > | ||
31 | + <v-card> | ||
32 | + <v-card-title class="headline">알림</v-card-title> | ||
33 | + <v-card-text> | ||
34 | + 다운로드에 성공했습니다! | ||
35 | + </v-card-text> | ||
36 | + </v-card> | ||
37 | + </v-dialog> | ||
25 | </v-flex> | 38 | </v-flex> |
26 | </template> | 39 | </template> |
27 | 40 | ||
28 | <script> | 41 | <script> |
29 | -import { accessedList } from '../api/index'; | 42 | +import { accessedList, downloadFile } from '../api/index'; |
30 | import Axios from 'axios'; | 43 | import Axios from 'axios'; |
31 | export default { | 44 | export default { |
32 | data() { | 45 | data() { |
33 | return { | 46 | return { |
34 | recent_list: [], | 47 | recent_list: [], |
48 | + dialog :false, | ||
35 | }; | 49 | }; |
36 | }, | 50 | }, |
37 | async created() { | 51 | async created() { |
... | @@ -49,7 +63,22 @@ export default { | ... | @@ -49,7 +63,22 @@ export default { |
49 | console.log(error); | 63 | console.log(error); |
50 | } | 64 | } |
51 | }, | 65 | }, |
52 | - methods: {}, | 66 | + methods: { |
67 | + async download_file(name, dir) { | ||
68 | + try { | ||
69 | + const currentData = { | ||
70 | + fileName: name, | ||
71 | + id: this.$store.state.id, | ||
72 | + cur: dir | ||
73 | + }; | ||
74 | + const result = await downloadFile(currentData); | ||
75 | + console.log(result); | ||
76 | + } catch (error) { | ||
77 | + console.log('에러'); | ||
78 | + console.log(error); | ||
79 | + } | ||
80 | + }, | ||
81 | + }, | ||
53 | }; | 82 | }; |
54 | </script> | 83 | </script> |
55 | 84 | ... | ... |
... | @@ -672,6 +672,7 @@ export default { | ... | @@ -672,6 +672,7 @@ export default { |
672 | cur: this.cfilename.location, | 672 | cur: this.cfilename.location, |
673 | fileName: this.cfilename.file_name, | 673 | fileName: this.cfilename.file_name, |
674 | }; | 674 | }; |
675 | + console.log(currentData.cur); | ||
675 | const detailData = await detailFile(currentData); | 676 | const detailData = await detailFile(currentData); |
676 | this.current_filename = detailData.data.file_name; | 677 | this.current_filename = detailData.data.file_name; |
677 | this.current_filedata = detailData.data.content; | 678 | this.current_filedata = detailData.data.content; | ... | ... |
1 | <template lang="html"> | 1 | <template lang="html"> |
2 | <v-flex> | 2 | <v-flex> |
3 | - <h1>연락처</h1> | 3 | + <v-toolbar flat> |
4 | + <v-toolbar-title>연락처</v-toolbar-title> | ||
5 | + </v-toolbar> | ||
4 | <v-text-field | 6 | <v-text-field |
5 | v-model="search" | 7 | v-model="search" |
6 | append-icon="mdi-magnify" | 8 | append-icon="mdi-magnify" | ... | ... |
1 | <template> | 1 | <template> |
2 | - <div> | 2 | + <accesslist></accesslist> |
3 | - <v-toolbar flat> | ||
4 | - <v-toolbar-title>빠른액세스</v-toolbar-title> | ||
5 | - | ||
6 | - <v-spacer></v-spacer> | ||
7 | - <v-text-field | ||
8 | - v-model="search" | ||
9 | - append-icon="mdi-magnify" | ||
10 | - label="검색" | ||
11 | - single-line | ||
12 | - hide-details | ||
13 | - ></v-text-field> | ||
14 | - </v-toolbar> | ||
15 | - | ||
16 | - <v-list two-line subheader> | ||
17 | - <v-list-item v-for="item in items" :key="item.title" @click=""> | ||
18 | - <v-list-item-avatar> | ||
19 | - <v-icon>{{ item.iconClass }}</v-icon> | ||
20 | - </v-list-item-avatar> | ||
21 | - | ||
22 | - <v-list-item-content> | ||
23 | - <v-list-item-title v-text="item.title"></v-list-item-title> | ||
24 | - <v-list-item-subtitle v-text="item.subtitle"></v-list-item-subtitle> | ||
25 | - </v-list-item-content> | ||
26 | - | ||
27 | - <v-list-item-action> | ||
28 | - <v-btn icon> | ||
29 | - <v-icon color="grey lighten-1">mdi-information</v-icon> | ||
30 | - </v-btn> | ||
31 | - </v-list-item-action> | ||
32 | - </v-list-item> | ||
33 | - | ||
34 | - <v-list-item v-for="item in items2" :key="item.title" @click=""> | ||
35 | - <v-list-item-avatar> | ||
36 | - <v-icon> {{ item.iconClass }}</v-icon> | ||
37 | - </v-list-item-avatar> | ||
38 | - | ||
39 | - <v-list-item-content> | ||
40 | - <v-list-item-title v-text="item.title"></v-list-item-title> | ||
41 | - <v-list-item-subtitle v-text="item.subtitle"></v-list-item-subtitle> | ||
42 | - </v-list-item-content> | ||
43 | - | ||
44 | - <v-list-item-action> | ||
45 | - <v-btn icon> | ||
46 | - <v-icon color="grey lighten-1">mdi-information</v-icon> | ||
47 | - </v-btn> | ||
48 | - </v-list-item-action> | ||
49 | - </v-list-item> | ||
50 | - </v-list> | ||
51 | - </div> | ||
52 | </template> | 3 | </template> |
53 | 4 | ||
54 | <script> | 5 | <script> |
6 | +import accesslist from '@/components/accessList' | ||
55 | export default { | 7 | export default { |
56 | - data: () => ({ | 8 | + components: { |
57 | - items: [ | 9 | + accesslist, |
58 | - { | 10 | + }, |
59 | - icon: 'folder', | 11 | + |
60 | - iconClass: 'mdi-folder', | ||
61 | - title: 'Photos', | ||
62 | - subtitle: 'Jan 9, 2014', | ||
63 | - }, | ||
64 | - { | ||
65 | - icon: 'folder', | ||
66 | - iconClass: 'mdi-folder', | ||
67 | - title: 'Recipes', | ||
68 | - subtitle: 'Jan 17, 2014', | ||
69 | - }, | ||
70 | - { | ||
71 | - icon: 'folder', | ||
72 | - iconClass: 'mdi-folder', | ||
73 | - title: 'Work', | ||
74 | - subtitle: 'Jan 28, 2014', | ||
75 | - }, | ||
76 | - ], | ||
77 | - items2: [ | ||
78 | - { | ||
79 | - icon: 'assignment', | ||
80 | - iconClass: 'mdi-file', | ||
81 | - title: 'Vacation itinerary', | ||
82 | - subtitle: 'Jan 20, 2014', | ||
83 | - }, | ||
84 | - { | ||
85 | - icon: 'call_to_action', | ||
86 | - iconClass: 'mdi-PdfBox', | ||
87 | - title: 'Kitchen remodel', | ||
88 | - subtitle: 'Jan 10, 2014', | ||
89 | - }, | ||
90 | - ], | ||
91 | - }), | ||
92 | }; | 12 | }; |
93 | </script> | 13 | </script> |
14 | +<style></style> | ... | ... |
-
Please register or login to post a comment