diff --git a/src/common/UrlTool.js b/src/common/UrlTool.js index 3648323dc..6f4adbd3e 100644 --- a/src/common/UrlTool.js +++ b/src/common/UrlTool.js @@ -34,6 +34,21 @@ export function getImage(path) { } } +export function getTestImage(path) { + // https://www.educoder.net + // https://testbdweb.trustie.net + // const local = 'http://localhost:3000' + const local = 'http://117.50.100.12:49999'; + if(path.indexOf("http://")===-1){ + if (isDev) { + return `${local}${path}` + } + return `${path}`; + }else{ + return path; + } +} + export function getLogoImageUrl(path) { const local = 'http://117.50.100.12:49999'; diff --git a/src/common/educoder.js b/src/common/educoder.js index a67a6d441..3756b1d78 100644 --- a/src/common/educoder.js +++ b/src/common/educoder.js @@ -6,7 +6,7 @@ export { getUploadLogoActionUrl as getUploadLogoActionUrl, getImageUrl as getImageUrl,getImage as getImage, getmyUrl as getmyUrl, getRandomNumber as getRandomNumber, getUrl as getUrl, publicSearchs as publicSearchs, getRandomcode as getRandomcode, getUrlmys as getUrlmys, getUrl2 as getUrl2, setImagesUrl as setImagesUrl , getUploadActionUrl as getUploadActionUrl, getUploadActionUrltwo as getUploadActionUrltwo, getUploadActionUrlthree as getUploadActionUrlthree, getUploadActionUrlOfAuth as getUploadActionUrlOfAuth - , getTaskUrlById as getTaskUrlById, TEST_HOST, htmlEncode as htmlEncode, getupload_git_file as getupload_git_file, getcdnImageUrl as getcdnImageUrl,getLogoImageUrl as getLogoImageUrl + , getTaskUrlById as getTaskUrlById, TEST_HOST, htmlEncode as htmlEncode, getupload_git_file as getupload_git_file, getcdnImageUrl as getcdnImageUrl,getTestImage as getTestImage,getLogoImageUrl as getLogoImageUrl } from './UrlTool'; export { setmiyah as setmiyah } from './Component'; diff --git a/src/home/FifthSection/index.jsx b/src/home/FifthSection/index.jsx index 4fee6b129..b6c8bffa3 100644 --- a/src/home/FifthSection/index.jsx +++ b/src/home/FifthSection/index.jsx @@ -14,8 +14,6 @@ for (const item of taskModeIdArr) { } - - let taskArrMock = [ { id: 447, @@ -53,7 +51,7 @@ function getSomeDayAfter(initailDate, nDay) { return moment(new Date(initailDate).setDate(new Date(initailDate).getDate() + nDay)).format('YYYY-MM-DD'); } -function FifthSection({ fifth }) { +function FifthSection({ fifth,history }) { const [taskCategoryArr, setTaskCategoryArr] = useState([]); const [taskArr, serTaskArr] = useState(taskArrMock); @@ -244,7 +242,7 @@ function FifthSection({ fifth }) {