-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/2022-Sejong-Creative-Semest…
…er/Traffic-Information-Service-for-the-Disabled into feature/Backend
- Loading branch information
Showing
15 changed files
with
219 additions
and
184 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import axios from "axios" | ||
|
||
export const api = axios.create({ | ||
baseURL: "https://34.145.39.241:3005" | ||
baseURL: "https://www.easy-taza.site:3005" | ||
}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 0 additions & 34 deletions
34
.../Frontend/creative/src/component/subway-component/subwayElevator/SubwayElevatorDetail.tsx
This file was deleted.
Oops, something went wrong.
60 changes: 0 additions & 60 deletions
60
...nd/Frontend/creative/src/component/subway-component/subwayElevator/SubwayElevatorItem.tsx
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
...end/Frontend/creative/src/component/subway-component/subwayElevator/SubwayElevatorMap.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
.../Frontend/creative/src/component/subway-component/subwaytransfer/SubwayTransferDetail.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import React,{useEffect, useState} from "react"; | ||
import styled from "styled-components"; | ||
import { api } from "../../auth/Api.ts" | ||
|
||
const StyledSubwayTransferDetail = styled.main` | ||
display:flex; | ||
flex-direction:column; | ||
align-items: start; | ||
justify-content: space-evenly; | ||
width: 98vw; | ||
height: 40vh; | ||
border: 4px solid #FFD12D; | ||
overflow: auto; | ||
` | ||
const StyledTransferDetailLi = styled.span` | ||
font-family: 'Pretendard-Regular'; | ||
font-weight: 600; | ||
margin: 2%; | ||
font-size: 1em; | ||
` | ||
|
||
const SubwayTranferDetail = ({param,setImage}:any) => { | ||
const [tranferInfo,setTransferInfo] = useState<any>(); | ||
useEffect(() => { | ||
const stCd = param.stCd; | ||
const stNm = param.stNm; | ||
const railCd = param.railCd; | ||
const lnCd = param.lnCd; | ||
const prevStinCd = param.prevStinCd; | ||
const chthTgtLn = param.chthTgtLn; | ||
const chtnNextStinCd = param.chtnNextStinCd; | ||
const getDetail = async () => { | ||
await api.get(`/subway/transferMove/transferInfo/${stCd}/${stNm}/${railCd}/${lnCd}/${prevStinCd}/${chthTgtLn}/${chtnNextStinCd}`) | ||
.then(res => { | ||
const { data } = res; | ||
setTransferInfo(data) | ||
setImage(data[0].imgPath) | ||
}).catch(error=>{ | ||
console.log(error) | ||
}) | ||
} | ||
getDetail() | ||
}, [param]) | ||
return( | ||
<StyledSubwayTransferDetail> | ||
{tranferInfo&&( | ||
<StyledTransferDetailLi> | ||
{tranferInfo[0].stMovePath} {">>"} {tranferInfo[0].edMovePath} | ||
</StyledTransferDetailLi>)} | ||
{tranferInfo&&tranferInfo.map((ele:any,index:number)=>( | ||
<StyledTransferDetailLi key={index}> | ||
{ele.mvContDtl} | ||
</StyledTransferDetailLi> | ||
))} | ||
</StyledSubwayTransferDetail> | ||
) | ||
} | ||
|
||
export default SubwayTranferDetail |
73 changes: 73 additions & 0 deletions
73
...nd/Frontend/creative/src/component/subway-component/subwaytransfer/SubwayTransferLIst.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
import React,{useEffect, useState} from "react"; | ||
import styled from "styled-components"; | ||
import { api } from "../../auth/Api.ts" | ||
import { Link } from "react-router-dom"; | ||
|
||
const StyledSubwayTransferDetail = styled.main` | ||
display:flex; | ||
flex-direction:column; | ||
align-items: start; | ||
justify-content: space-evenly; | ||
width: 98vw; | ||
height: 40vh; | ||
background-color:white; | ||
border: 4px solid #FFD12D; | ||
overflow: auto; | ||
.TransferLink{ | ||
width: 100%; | ||
text-decoration:none; | ||
list-style:none; | ||
color: #000000; | ||
} | ||
` | ||
|
||
const StyledTransferDetailLi = styled.span` | ||
font-family: 'Pretendard-Regular'; | ||
font-weight: 600; | ||
margin-left: 5%; | ||
border-bottom: 1px solid; | ||
font-size: 1em; | ||
` | ||
/* | ||
/subway/transferMove/transferInfo/:stCd/:stNm/:railCd/:lnCd/:prevStinCd/:chthTgtLn/:chtnNextStinCd | ||
*/ | ||
|
||
const SubwayTranferDetail = ({param}:any) => { | ||
const [source,setSource] = useState<[]>() | ||
const [transfer,setTransfer] = useState<[]>() | ||
useEffect(() => { | ||
const stCd = param.stCd; | ||
const stNm = param.stNm; | ||
const railCd = param.railCd; | ||
const lnCd = param.lnCd; | ||
const getDetail = async () => { | ||
await api.get(`/subway/transferMove/transferList/${stCd}/${stNm}/${railCd}/${lnCd}`) | ||
.then(res => { | ||
const { data } = res; | ||
const {sourceStation,transferStation} = data | ||
setSource(sourceStation); | ||
setTransfer(transferStation); | ||
}).catch(error=>{ | ||
alert("환승역이 아닙니다!") | ||
window.location.href = `/subway/detail/${stCd}/${stNm}` | ||
}) | ||
} | ||
getDetail() | ||
}, [param]) | ||
return( | ||
<StyledSubwayTransferDetail> | ||
{source&&source.map((sor:any)=>( | ||
(transfer&&transfer.map((tran:any)=>( | ||
<Link to={`/subway/transfer/detail/${param.stCd}/${param.stNm}/${param.railCd}/${param.lnCd}/${sor.stCd}/${tran.lnCd}/${tran.stCd}`} key={sor.stCd+tran.stCd} className="TransferLink"> | ||
<StyledTransferDetailLi> | ||
{sor.stNm} - {tran.stNm} | ||
</StyledTransferDetailLi> | ||
</Link> | ||
))) | ||
))} | ||
</StyledSubwayTransferDetail> | ||
) | ||
} | ||
|
||
export default SubwayTranferDetail |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 0 additions & 54 deletions
54
Backend/Frontend/creative/src/page/subwaypage/SubwayTransfer.module.css
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.