Hong

Cur추가

...@@ -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) {
...@@ -28,17 +27,4 @@ function makeFolder(folderData) { ...@@ -28,17 +27,4 @@ function makeFolder(folderData) {
28 return axios.post('/api/folder/makefolder', folderData); 27 return axios.post('/api/folder/makefolder', folderData);
29 } 28 }
30 29
31 -export { registerUser, loginUser, folder, makeFolder }; 30 +export { registerUser, loginUser, folder, makeFolder };
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
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -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,34 +123,20 @@ ...@@ -131,34 +123,20 @@
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() {
138 - return { 129 + return {
139 foldername:'', 130 foldername:'',
140 folders: [], 131 folders: [],
141 files: [], 132 files: [],
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 = '';
...@@ -192,7 +161,7 @@ import { dropbox, makeFolder } from '../api/index'; ...@@ -192,7 +161,7 @@ import { dropbox, makeFolder } from '../api/index';
192 cur : this.$store.state.cur, 161 cur : this.$store.state.cur,
193 folder_name : this.foldername 162 folder_name : this.foldername
194 }; 163 };
195 - const response = await makeFolder(folderData); 164 + const response = await makeFolder(folderData);
196 console.log(response.data) 165 console.log(response.data)
197 console.log("폴더 생성 완료"); 166 console.log("폴더 생성 완료");
198 this.$store.commit('setFolder', response.data.folders); 167 this.$store.commit('setFolder', response.data.folders);
...@@ -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
......