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-06-10 01:22:00 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a178308d89ea5a7af97a96cbae9f903b16802e1b
a178308d
1 parent
e0a9f8fc
.
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
89 additions
and
85 deletions
front-end/src/api/index.js
front-end/src/components/FileList.vue
front-end/src/components/folderc.vue
front-end/src/api/index.js
View file @
a178308
import
axios
from
'axios'
;
const
instance
=
axios
.
create
({
baseURL
:
process
.
env
.
VUE_APP_API_URL
,
baseURL
:
process
.
env
.
VUE_APP_API_URL
,
});
function
registerUser
(
userData
)
{
// const url = 'http://localhost:3000/api/signup'
return
axios
.
post
(
'/api/RegistUser'
,
userData
);
// const url = 'http://localhost:3000/api/signup'
return
axios
.
post
(
'/api/RegistUser'
,
userData
);
}
function
loginUser
(
userData
)
{
// const url = 'http://localhost:3000/api/login'
return
axios
.
post
(
'/api/login'
,
userData
);
// const url = 'http://localhost:3000/api/login'
return
axios
.
post
(
'/api/login'
,
userData
);
}
function
folder
(
curData
)
{
return
axios
.
get
(
'/api/folder/show'
,
{
params
:
{
id
:
curData
.
id
,
folder_id
:
curData
.
folder_id
,
},
});
return
axios
.
get
(
'/api/folder/show'
,
{
params
:
{
id
:
curData
.
id
,
folder_id
:
curData
.
folder_id
,
},
});
}
function
makeFolder
(
folderData
)
{
return
axios
.
post
(
'/api/folder/makefolder'
,
folderData
);
return
axios
.
post
(
'/api/folder/makefolder'
,
folderData
);
}
function
deleteFolder
(
folderData
)
{
return
axios
.
post
(
'/api/folder/delfolder'
,
folderData
);
return
axios
.
post
(
'/api/folder/delfolder'
,
folderData
);
}
function
moveFolder
(
folderData
)
{
return
axios
.
post
(
'/api/folder/move'
,
folderData
);
return
axios
.
post
(
'/api/folder/move'
,
folderData
);
}
function
file
(
curData
)
{
return
axios
.
get
(
'/api/file'
,
{
params
:
{
id
:
curData
.
id
,
folder_id
:
curData
.
cur
,
},
});
return
axios
.
get
(
'/api/file'
,
{
params
:
{
id
:
curData
.
id
,
folder_id
:
curData
.
cur
,
},
});
}
function
uploadFile
(
fileData
)
{
return
axios
.
post
(
'/api/file/upload'
,
fileData
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
,
},
});
return
axios
.
post
(
'/api/file/upload'
,
fileData
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
,
},
});
}
function
detailFile
(
fileData
)
{
return
axios
.
get
(
`/api/file/
${
fileData
.
fileName
}
`
,
{
params
:
{
id
:
fileData
.
id
,
cur
:
fileData
.
cur
,
},
});
return
axios
.
get
(
`/api/file/
${
fileData
.
fileName
}
`
,
{
params
:
{
id
:
fileData
.
id
,
cur
:
fileData
.
cur
,
},
});
}
function
deleteFile
(
fileData
)
{
return
axios
.
get
(
`/api/file/delete/
${
fileData
.
fileName
}
`
,
{
params
:
{
//현재 접속한 사람의 id와 삭제할 파일의 이름, 현재 폴더위치를 파라미터로 넘긴다.
id
:
fileData
.
user_id
,
cur
:
fileData
.
cur
,
},
});
return
axios
.
get
(
`/api/file/delete/
${
fileData
.
fileName
}
`
,
{
params
:
{
//현재 접속한 사람의 id와 삭제할 파일의 이름, 현재 폴더위치를 파라미터로 넘긴다.
id
:
fileData
.
user_id
,
cur
:
fileData
.
cur
,
},
});
}
function
downloadFile
(
fileData
)
{
return
axios
.
get
(
`
api/file/download/
${
fileData
.
fileName
}
`
,
{
params
:
{
//현재 접속한 사람의 id와 다운로드를 위해 선택한 파일의 이름을 파라미터로 넘긴다.
id
:
fileData
.
id
,
cur
:
fileData
.
cur
,
},
});
return
axios
.
get
(
`/
api/file/download/
${
fileData
.
fileName
}
`
,
{
params
:
{
//현재 접속한 사람의 id와 다운로드를 위해 선택한 파일의 이름을 파라미터로 넘긴다.
id
:
fileData
.
id
,
cur
:
fileData
.
cur
,
},
});
}
function
accessedList
(
curData
)
{
return
axios
.
get
(
'
api/quick'
,
{
params
:
{
id
:
curData
.
id
,
},
});
return
axios
.
get
(
'/
api/quick'
,
{
params
:
{
id
:
curData
.
id
,
},
});
}
function
modifyFile
(
fileData
)
{
return
axios
.
post
(
`/api/file/modify/
${
fileData
.
name
}
`
,
fileData
);
return
axios
.
post
(
`/api/file/modify/
${
fileData
.
name
}
`
,
fileData
);
}
function
delFavorite
(
folderData
)
{
return
axios
.
post
(
'
api/favorites/delfolder'
,
folderData
);
return
axios
.
post
(
'/
api/favorites/delfolder'
,
folderData
);
}
function
addFavorite
(
folderData
)
{
return
axios
.
post
(
'
api/favorites/addfolder'
,
folderData
);
return
axios
.
post
(
'/
api/favorites/addfolder'
,
folderData
);
}
function
moveFile
(
fileData
)
{
return
axios
.
post
(
'/api/folder/move'
,
fileData
);
return
axios
.
post
(
'/api/folder/move'
,
fileData
);
}
function
delFavoriteFile
(
fileData
)
{
return
axios
.
post
(
'
api/favorites/delfile'
,
fileData
);
return
axios
.
post
(
'/
api/favorites/delfile'
,
fileData
);
}
function
addFavoriteFile
(
fileData
)
{
return
axios
.
post
(
'
api/favorites/addfile'
,
fileData
);
return
axios
.
post
(
'/
api/favorites/addfile'
,
fileData
);
}
function
getFavoriteList
(
userId
)
{
return
axios
.
get
(
'
api/favorites/show'
,
{
params
:
{
id
:
userId
,
},
});
return
axios
.
get
(
'/
api/favorites/show'
,
{
params
:
{
id
:
userId
,
},
});
}
export
{
registerUser
,
loginUser
,
folder
,
makeFolder
,
deleteFolder
,
moveFolder
,
file
,
uploadFile
,
deleteFile
,
downloadFile
,
delFavorite
,
addFavorite
,
moveFile
,
delFavoriteFile
,
addFavoriteFile
,
accessedList
,
detailFile
,
modifyFile
,
getFavoriteList
,
};
registerUser
,
loginUser
,
folder
,
makeFolder
,
deleteFolder
,
moveFolder
,
file
,
uploadFile
,
deleteFile
,
downloadFile
,
delFavorite
,
addFavorite
,
moveFile
,
delFavoriteFile
,
addFavoriteFile
,
accessedList
,
detailFile
,
modifyFile
,
getFavoriteList
,
};
\ No newline at end of file
...
...
front-end/src/components/FileList.vue
View file @
a178308
...
...
@@ -14,9 +14,6 @@
<v-list two-line subheader>
<!-- <v-subheader inset>Folders</v-subheader> -->
<!-- Folder view -->
<v-list-item v-if="this.$store.state.cur !== '/'" @click="moveParent"
>...</v-list-item
>
<v-list-item
v-for="item in this.$store.getters.folderL"
:key="item.folder_id"
...
...
front-end/src/components/folderc.vue
View file @
a178308
...
...
@@ -14,7 +14,10 @@
<v-list two-line subheader>
<!-- <v-subheader inset>Folders</v-subheader> -->
<!-- Folder view -->
<v-list-item @click="$router.go(-1)">...</v-list-item>
<v-list-item
@click=""
@dblclick="$router.go(-1)"
>...</v-list-item>
<v-list-item
v-for="item in this.$store.getters.folderL"
:key="item.folder_id"
...
...
Please
register
or
login
to post a comment