Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-CloudComputing
/
D_Team_Khuloud
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Hong
2020-05-27 19:37:44 +0900
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
5c34dcad54f71288f5373218b4425bd9658c5d7e
5c34dcad
2 parents
c92dba19
eacf2da7
Merge branch 'master' of
http://khuhub.khu.ac.kr/2020-1-CloudComputing/D_Team_Khuloud
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
107 additions
and
1 deletions
front-end/src/api/index.js
front-end/src/components/FileList.vue
front-end/src/store/index.js
front-end/src/api/index.js
View file @
5c34dca
...
...
@@ -12,6 +12,7 @@ function registerUser(userData) {
function
loginUser
(
userData
)
{
// const url = 'http://localhost:3000/api/login'
return
axios
.
post
(
'/api/login'
,
userData
);
<<<<<<<
HEAD
}
function
folder
(
curData
)
{
...
...
@@ -27,4 +28,17 @@ function makeFolder(folderData) {
return
axios
.
post
(
'/api/folder/makefolder'
,
folderData
);
}
export
{
registerUser
,
loginUser
,
folder
,
makeFolder
};
\ No newline at end of file
export
{
registerUser
,
loginUser
,
folder
,
makeFolder
};
=======
}
function
dropbox
(
userData
){
return
axios
.
get
(
`/api/folder/show/
${
userData
}
`
);
}
function
makeFolder
(
folderData
){
return
axios
.
post
(
'/api/folder/makefolder'
,
folderData
);
}
export
{
registerUser
,
loginUser
,
dropbox
,
makeFolder
};
>>>>>>>
eacf2da71fd7ae8340b48d4dac8ee121a816fd94
...
...
front-end/src/components/FileList.vue
View file @
5c34dca
...
...
@@ -79,7 +79,11 @@
+{{ files.length - 2 }} File(s)
</span>
</template>
<<<<<<< HEAD
</v-file-input>
=======
</v-file-input>
>>>>>>> eacf2da71fd7ae8340b48d4dac8ee121a816fd94
<v-btn
bottom
color="blue"
...
...
@@ -102,7 +106,11 @@
<v-container>
<div>
<v-icon>mdi-folder</v-icon>
<<<<<<< HEAD
<v-text-field placeholder="name" id="foldername" type="text" v-model="foldername"></v-text-field>
=======
<v-text-field placeholder="name" id="foldername" type="text" v-model="foldername" ></v-text-field>
>>>>>>> eacf2da71fd7ae8340b48d4dac8ee121a816fd94
</div>
</v-container>
<v-card-actions>
...
...
@@ -123,6 +131,7 @@
</template>
<script>
<<<<<<< HEAD
import { folder, makeFolder } from '../api/index';
export default {
data() {
...
...
@@ -131,11 +140,25 @@ import { folder, makeFolder } from '../api/index';
folders: [],
files: [],
search:'',
id: '',
dialog:false
=======
import { dropbox, makeFolder } from '../api/index';
export default {
data() {
return {
foldername: '',
folders: [],
files: [],
search:'',
id: '',
dialog: false,
>>>>>>> eacf2da71fd7ae8340b48d4dac8ee121a816fd94
}
},
async created(){
try {
<<<<<<< HEAD
const curData = {
id : this.$store.state.id,
cur: this.$store.state.cur
...
...
@@ -143,11 +166,21 @@ import { folder, makeFolder } from '../api/index';
const response = await folder(curData);
console.log(response);
this.$store.commit('setFolder', response.data.folders);
=======
const userData = this.$store.state.id;
console.log(this.id);
const response = await dropbox(userData);
console.log(response);
this.$store.commit('setFolder', response.data.folders);
this.$store.commit('setFile', response.data.files);
>>>>>>> eacf2da71fd7ae8340b48d4dac8ee121a816fd94
} catch (error) {
console.log("에러");
console.log(error.response.data);
}
},
<<<<<<< HEAD
methods: {
initFolderName(){
this.foldername = '';
...
...
@@ -173,5 +206,30 @@ import { folder, makeFolder } from '../api/index';
}
}
=======
methods: {
initFolderName(){
this.foldername = '';
},
async makeF(){
try {
const folderData = {
user_id : this.$store.state.id,
cur : this.$store.state.id,
folder_name : this.foldername
};
const response = await makeFolder(folderData);
this.$store.commit('setFolder', response.data.folders);
console.log("폴더 생성 완료");
} catch (error) {
console.log("에러");
console.log(error.response.data);
} finally{
this.initFolderName();
this.dialog = false;
}
}
}
>>>>>>> eacf2da71fd7ae8340b48d4dac8ee121a816fd94
}
</script>
...
...
front-end/src/store/index.js
View file @
5c34dca
...
...
@@ -4,11 +4,23 @@ import Vuex from 'vuex'
Vue
.
use
(
Vuex
)
export
default
new
Vuex
.
Store
({
<<<<<<<
HEAD
state
:
{
id
:
''
,
folders
:
{},
files
:
{},
cur
:
'/'
,
=======
state
:
{
id
:
''
,
folders
:
[],
files
:
[],
cur
:
'/'
,
},
mutations
:
{
setId
(
state
,
userid
){
state
.
id
=
userid
;
>>>>>>>
eacf2da71fd7ae8340b48d4dac8ee121a816fd94
},
mutations
:
{
setId
(
state
,
userid
)
{
...
...
@@ -27,6 +39,7 @@ export default new Vuex.Store({
state
.
cur
=
cur
;
}
},
<<<<<<<
HEAD
getters
:
{
isLogin
(
state
)
{
return
state
.
id
!==
''
;
...
...
@@ -43,5 +56,26 @@ export default new Vuex.Store({
cur
(
state
)
{
return
state
.
cur
;
}
=======
setFolder
(
state
,
folderlist
){
state
.
folders
=
folderlist
;
},
setFile
(
state
,
filelist
){
state
.
files
=
filelist
;
},
},
getters
:
{
isLogin
(
state
){
return
state
.
id
!==
''
;
},
userID
(
state
){
return
state
.
id
;
},
folderL
(
state
){
return
state
.
folders
;
},
fileL
(
state
){
return
state
.
files
;
>>>>>>>
eacf2da71fd7ae8340b48d4dac8ee121a816fd94
}
})
\ No newline at end of file
...
...
Please
register
or
login
to post a comment