Showing
3 changed files
with
1 additions
and
105 deletions
... | @@ -12,7 +12,6 @@ function registerUser(userData) { | ... | @@ -12,7 +12,6 @@ function registerUser(userData) { |
12 | function loginUser(userData) { | 12 | function loginUser(userData) { |
13 | // const url = 'http://localhost:3000/api/login' | 13 | // const url = 'http://localhost:3000/api/login' |
14 | return axios.post('/api/login', userData); | 14 | return axios.post('/api/login', userData); |
15 | -<<<<<<< HEAD | ||
16 | } | 15 | } |
17 | 16 | ||
18 | function folder(curData) { | 17 | function folder(curData) { |
... | @@ -29,16 +28,3 @@ function makeFolder(folderData) { | ... | @@ -29,16 +28,3 @@ function makeFolder(folderData) { |
29 | } | 28 | } |
30 | 29 | ||
31 | export { registerUser, loginUser, folder, makeFolder }; | 30 | export { registerUser, loginUser, folder, makeFolder }; |
... | \ No newline at end of file | ... | \ No newline at end of file |
32 | -======= | ||
33 | - } | ||
34 | - | ||
35 | -function dropbox(userData){ | ||
36 | - return axios.get(`/api/folder/show/${userData}`); | ||
37 | -} | ||
38 | - | ||
39 | -function makeFolder(folderData){ | ||
40 | - return axios.post('/api/folder/makefolder', folderData); | ||
41 | -} | ||
42 | - | ||
43 | - export { registerUser, loginUser, dropbox, makeFolder }; | ||
44 | ->>>>>>> eacf2da71fd7ae8340b48d4dac8ee121a816fd94 | ... | ... |
... | @@ -79,11 +79,7 @@ | ... | @@ -79,11 +79,7 @@ |
79 | +{{ files.length - 2 }} File(s) | 79 | +{{ files.length - 2 }} File(s) |
80 | </span> | 80 | </span> |
81 | </template> | 81 | </template> |
82 | -<<<<<<< HEAD | ||
83 | </v-file-input> | 82 | </v-file-input> |
84 | -======= | ||
85 | - </v-file-input> | ||
86 | ->>>>>>> eacf2da71fd7ae8340b48d4dac8ee121a816fd94 | ||
87 | <v-btn | 83 | <v-btn |
88 | bottom | 84 | bottom |
89 | color="blue" | 85 | color="blue" |
... | @@ -106,11 +102,7 @@ | ... | @@ -106,11 +102,7 @@ |
106 | <v-container> | 102 | <v-container> |
107 | <div> | 103 | <div> |
108 | <v-icon>mdi-folder</v-icon> | 104 | <v-icon>mdi-folder</v-icon> |
109 | -<<<<<<< HEAD | ||
110 | <v-text-field placeholder="name" id="foldername" type="text" v-model="foldername"></v-text-field> | 105 | <v-text-field placeholder="name" id="foldername" type="text" v-model="foldername"></v-text-field> |
111 | -======= | ||
112 | - <v-text-field placeholder="name" id="foldername" type="text" v-model="foldername" ></v-text-field> | ||
113 | ->>>>>>> eacf2da71fd7ae8340b48d4dac8ee121a816fd94 | ||
114 | </div> | 106 | </div> |
115 | </v-container> | 107 | </v-container> |
116 | <v-card-actions> | 108 | <v-card-actions> |
... | @@ -131,7 +123,6 @@ | ... | @@ -131,7 +123,6 @@ |
131 | </template> | 123 | </template> |
132 | 124 | ||
133 | <script> | 125 | <script> |
134 | -<<<<<<< HEAD | ||
135 | import { folder, makeFolder } from '../api/index'; | 126 | import { folder, makeFolder } from '../api/index'; |
136 | export default { | 127 | export default { |
137 | data() { | 128 | data() { |
... | @@ -142,23 +133,10 @@ import { folder, makeFolder } from '../api/index'; | ... | @@ -142,23 +133,10 @@ import { folder, makeFolder } from '../api/index'; |
142 | search:'', | 133 | search:'', |
143 | id: '', | 134 | id: '', |
144 | dialog:false | 135 | dialog:false |
145 | -======= | ||
146 | -import { dropbox, makeFolder } from '../api/index'; | ||
147 | - export default { | ||
148 | - data() { | ||
149 | - return { | ||
150 | - foldername: '', | ||
151 | - folders: [], | ||
152 | - files: [], | ||
153 | - search:'', | ||
154 | - id: '', | ||
155 | - dialog: false, | ||
156 | ->>>>>>> eacf2da71fd7ae8340b48d4dac8ee121a816fd94 | ||
157 | } | 136 | } |
158 | }, | 137 | }, |
159 | async created(){ | 138 | async created(){ |
160 | try { | 139 | try { |
161 | -<<<<<<< HEAD | ||
162 | const curData = { | 140 | const curData = { |
163 | id : this.$store.state.id, | 141 | id : this.$store.state.id, |
164 | cur: this.$store.state.cur | 142 | cur: this.$store.state.cur |
... | @@ -166,21 +144,12 @@ import { dropbox, makeFolder } from '../api/index'; | ... | @@ -166,21 +144,12 @@ import { dropbox, makeFolder } from '../api/index'; |
166 | const response = await folder(curData); | 144 | const response = await folder(curData); |
167 | console.log(response); | 145 | console.log(response); |
168 | this.$store.commit('setFolder', response.data.folders); | 146 | this.$store.commit('setFolder', response.data.folders); |
169 | -======= | 147 | + this.$store.commit('setCur', response.data.cur); |
170 | - const userData = this.$store.state.id; | ||
171 | - console.log(this.id); | ||
172 | - | ||
173 | - const response = await dropbox(userData); | ||
174 | - console.log(response); | ||
175 | - this.$store.commit('setFolder', response.data.folders); | ||
176 | - this.$store.commit('setFile', response.data.files); | ||
177 | ->>>>>>> eacf2da71fd7ae8340b48d4dac8ee121a816fd94 | ||
178 | } catch (error) { | 148 | } catch (error) { |
179 | console.log("에러"); | 149 | console.log("에러"); |
180 | console.log(error.response.data); | 150 | console.log(error.response.data); |
181 | } | 151 | } |
182 | }, | 152 | }, |
183 | -<<<<<<< HEAD | ||
184 | methods: { | 153 | methods: { |
185 | initFolderName(){ | 154 | initFolderName(){ |
186 | this.foldername = ''; | 155 | this.foldername = ''; |
... | @@ -206,30 +175,5 @@ import { dropbox, makeFolder } from '../api/index'; | ... | @@ -206,30 +175,5 @@ import { dropbox, makeFolder } from '../api/index'; |
206 | } | 175 | } |
207 | 176 | ||
208 | } | 177 | } |
209 | -======= | ||
210 | - methods: { | ||
211 | - initFolderName(){ | ||
212 | - this.foldername = ''; | ||
213 | - }, | ||
214 | - async makeF(){ | ||
215 | - try { | ||
216 | - const folderData = { | ||
217 | - user_id : this.$store.state.id, | ||
218 | - cur : this.$store.state.id, | ||
219 | - folder_name : this.foldername | ||
220 | - }; | ||
221 | - const response = await makeFolder(folderData); | ||
222 | - this.$store.commit('setFolder', response.data.folders); | ||
223 | - console.log("폴더 생성 완료"); | ||
224 | - } catch (error) { | ||
225 | - console.log("에러"); | ||
226 | - console.log(error.response.data); | ||
227 | - } finally{ | ||
228 | - this.initFolderName(); | ||
229 | - this.dialog = false; | ||
230 | - } | ||
231 | - } | ||
232 | - } | ||
233 | ->>>>>>> eacf2da71fd7ae8340b48d4dac8ee121a816fd94 | ||
234 | } | 178 | } |
235 | </script> | 179 | </script> | ... | ... |
... | @@ -4,23 +4,11 @@ import Vuex from 'vuex' | ... | @@ -4,23 +4,11 @@ import Vuex from 'vuex' |
4 | Vue.use(Vuex) | 4 | Vue.use(Vuex) |
5 | 5 | ||
6 | export default new Vuex.Store({ | 6 | export default new Vuex.Store({ |
7 | -<<<<<<< HEAD | ||
8 | state: { | 7 | state: { |
9 | id: '', | 8 | id: '', |
10 | folders: {}, | 9 | folders: {}, |
11 | files: {}, | 10 | files: {}, |
12 | cur: '/', | 11 | cur: '/', |
13 | -======= | ||
14 | - state: { | ||
15 | - id: '', | ||
16 | - folders: [], | ||
17 | - files: [], | ||
18 | - cur:'/', | ||
19 | - }, | ||
20 | - mutations: { | ||
21 | - setId(state, userid){ | ||
22 | - state.id = userid; | ||
23 | ->>>>>>> eacf2da71fd7ae8340b48d4dac8ee121a816fd94 | ||
24 | }, | 12 | }, |
25 | mutations: { | 13 | mutations: { |
26 | setId(state, userid) { | 14 | setId(state, userid) { |
... | @@ -39,7 +27,6 @@ export default new Vuex.Store({ | ... | @@ -39,7 +27,6 @@ export default new Vuex.Store({ |
39 | state.cur = cur; | 27 | state.cur = cur; |
40 | } | 28 | } |
41 | }, | 29 | }, |
42 | -<<<<<<< HEAD | ||
43 | getters: { | 30 | getters: { |
44 | isLogin(state) { | 31 | isLogin(state) { |
45 | return state.id !== ''; | 32 | return state.id !== ''; |
... | @@ -56,26 +43,5 @@ export default new Vuex.Store({ | ... | @@ -56,26 +43,5 @@ export default new Vuex.Store({ |
56 | cur(state) { | 43 | cur(state) { |
57 | return state.cur; | 44 | return state.cur; |
58 | } | 45 | } |
59 | -======= | ||
60 | - setFolder(state, folderlist){ | ||
61 | - state.folders = folderlist; | ||
62 | - }, | ||
63 | - setFile(state, filelist){ | ||
64 | - state.files = filelist; | ||
65 | - }, | ||
66 | - }, | ||
67 | - getters: { | ||
68 | - isLogin(state){ | ||
69 | - return state.id !== ''; | ||
70 | - }, | ||
71 | - userID(state){ | ||
72 | - return state.id; | ||
73 | - }, | ||
74 | - folderL(state){ | ||
75 | - return state.folders; | ||
76 | - }, | ||
77 | - fileL(state){ | ||
78 | - return state.files; | ||
79 | ->>>>>>> eacf2da71fd7ae8340b48d4dac8ee121a816fd94 | ||
80 | } | 46 | } |
81 | }) | 47 | }) |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or login to post a comment