feat: 파일다운로드 추가

main
Lim Jonguk 3 years ago
parent e4d4be276f
commit 8749884a69

@ -8,11 +8,18 @@ import {
GET_PUBLIC_BOARD,
GET_CMM_CODE_LIST,
SAVE_PUBLIC_BOARD,
DELETE_PUBLIC_BOARD
DELETE_PUBLIC_BOARD,
GET_FILE_DOWNLOAD
} from 'commons/ApiUrl';
import axios from 'utils/axios';
class OpstBizService {
// eslint-disable-next-line no-return-await
getComboCodeList = async (params) => await axios.get(GET_CMM_CODE_LIST, { params });
// eslint-disable-next-line no-return-await
fileDownload = async (id) => await axios.get(GET_FILE_DOWNLOAD + id);
setRowId = (params, idx) => {
if (params && params.page && params.size) return params.page * params.size + idx + 1;
return idx + 1;
@ -91,9 +98,6 @@ class OpstBizService {
return res;
};
// eslint-disable-next-line no-return-await
getComboCodeList = async (params) => await axios.get(GET_CMM_CODE_LIST, { params });
// getComboCodeList(params) {
// return reqApi.get(CMM_CODE_LIST_URL, { params });
// .then(r => console.log(r))

@ -2,6 +2,7 @@
// console.log(process.env.NODE_ENV)
export const LOGIN_URL = '/api/v1/ctgy/account/login';
export const GET_CMM_CODE_LIST = '/api/v1/biz/cmm/combo';
export const GET_FILE_DOWNLOAD = '/api/v1/ctgy/file/download/';
// 공지사항
export const GET_PUBLIC_BOARD_LIST = '/api/v1/ctgy/pboard';

@ -117,7 +117,7 @@ const PublicBoardForm = (props) => {
};
const handleFileDownload = (e) => {
alert('download');
opstBizService.fileDownload(inCode);
};
return (
<>

Loading…
Cancel
Save