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-28 14:14:14 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
677e924ea1f8968d4b256c5c0ca83390eb370802
677e924e
1 parent
5c34dcad
Cur추가
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 additions
and
105 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 @
677e924
...
...
@@ -12,7 +12,6 @@ function registerUser(userData) {
function
loginUser
(
userData
)
{
// const url = 'http://localhost:3000/api/login'
return
axios
.
post
(
'/api/login'
,
userData
);
<<<<<<<
HEAD
}
function
folder
(
curData
)
{
...
...
@@ -29,16 +28,3 @@ function makeFolder(folderData) {
}
export
{
registerUser
,
loginUser
,
folder
,
makeFolder
};
\ No newline at end of file
=======
}
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 @
677e924
...
...
@@ -79,11 +79,7 @@
+{{ files.length - 2 }} File(s)
</span>
</template>
<<<<<<< HEAD
</v-file-input>
=======
</v-file-input>
>>>>>>> eacf2da71fd7ae8340b48d4dac8ee121a816fd94
<v-btn
bottom
color="blue"
...
...
@@ -106,11 +102,7 @@
<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>
...
...
@@ -131,7 +123,6 @@
</template>
<script>
<<<<<<< HEAD
import { folder, makeFolder } from '../api/index';
export default {
data() {
...
...
@@ -142,23 +133,10 @@ import { folder, makeFolder } from '../api/index';
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
...
...
@@ -166,21 +144,12 @@ import { dropbox, 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
this.$store.commit('setCur', response.data.cur);
} catch (error) {
console.log("에러");
console.log(error.response.data);
}
},
<<<<<<< HEAD
methods: {
initFolderName(){
this.foldername = '';
...
...
@@ -206,30 +175,5 @@ import { dropbox, 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 @
677e924
...
...
@@ -4,23 +4,11 @@ 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
)
{
...
...
@@ -39,7 +27,6 @@ export default new Vuex.Store({
state
.
cur
=
cur
;
}
},
<<<<<<<
HEAD
getters
:
{
isLogin
(
state
)
{
return
state
.
id
!==
''
;
...
...
@@ -56,26 +43,5 @@ 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