feat: 파일다운로드 추가

main
Lim Jonguk 3 years ago
parent e4d4be276f
commit 8749884a69

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

@ -2,6 +2,7 @@
// console.log(process.env.NODE_ENV) // console.log(process.env.NODE_ENV)
export const LOGIN_URL = '/api/v1/ctgy/account/login'; export const LOGIN_URL = '/api/v1/ctgy/account/login';
export const GET_CMM_CODE_LIST = '/api/v1/biz/cmm/combo'; 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'; export const GET_PUBLIC_BOARD_LIST = '/api/v1/ctgy/pboard';

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

Loading…
Cancel
Save