From 91f6ef0348f346e9a4a73e086dfd747fd71b4d56 Mon Sep 17 00:00:00 2001 From: Ssuhyeong Date: Sat, 10 Jun 2023 14:36:43 +0900 Subject: [PATCH 1/3] =?UTF-8?q?feat=20:=20localstorage=20busData=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/passenger/StationListView.vue | 13 +++++++++++-- src/views/passenger/StopBusListView.vue | 13 ++++++++++++- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/views/passenger/StationListView.vue b/src/views/passenger/StationListView.vue index 513762f..06bf7f8 100644 --- a/src/views/passenger/StationListView.vue +++ b/src/views/passenger/StationListView.vue @@ -77,11 +77,20 @@ navigator.geolocation.getCurrentPosition(locationSuccess, locationFail); const ridingReserve = busData => { - // localStorage.setItem(); + if (localStorage.getItem('history') == null) { + const history = []; + + history.push(busData); + localStorage.setItem('history', JSON.stringify(history)); + } else { + var newHistory = JSON.parse(localStorage.getItem('history')); + newHistory.push(busData); + localStorage.setItem('history', JSON.stringify(newHistory)); + } router.push({ name: 'RidingView', - params: {busData: busData}, + params: {busData: JSON.stringify(busData)}, }); }; diff --git a/src/views/passenger/StopBusListView.vue b/src/views/passenger/StopBusListView.vue index e55f01c..286fed4 100644 --- a/src/views/passenger/StopBusListView.vue +++ b/src/views/passenger/StopBusListView.vue @@ -114,9 +114,20 @@ }; const ridingReserve = busData => { + if (localStorage.getItem('history') == null) { + const history = []; + + history.push(busData); + localStorage.setItem('history', JSON.stringify(history)); + } else { + var newHistory = JSON.parse(localStorage.getItem('history')); + newHistory.push(busData); + localStorage.setItem('history', JSON.stringify(newHistory)); + } + router.push({ name: 'RidingView', - params: {busData: busData}, + params: {busData: JSON.stringify(busData)}, }); }; From 7421555bdfc301936e6bdff913916ed5cb1fe153 Mon Sep 17 00:00:00 2001 From: leecr1215 Date: Sat, 10 Jun 2023 16:35:15 +0900 Subject: [PATCH 2/3] =?UTF-8?q?feat:=20=EC=8A=B9=EC=B0=A8=EB=B2=A8=20?= =?UTF-8?q?=EC=82=AC=EC=9A=A9=20=EC=9D=B4=EB=A0=A5=20UI=20=EB=B0=8F=20?= =?UTF-8?q?=EB=8D=94=EB=AF=B8=20=EB=8D=B0=EC=9D=B4=ED=84=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/passenger/FavoriteStopView.vue | 421 ++++++++++++++++++++- src/views/passenger/KeyboardSearchView.vue | 6 +- src/views/passenger/NearStopView.vue | 2 +- 3 files changed, 410 insertions(+), 19 deletions(-) diff --git a/src/views/passenger/FavoriteStopView.vue b/src/views/passenger/FavoriteStopView.vue index c160cf1..05ea4e8 100644 --- a/src/views/passenger/FavoriteStopView.vue +++ b/src/views/passenger/FavoriteStopView.vue @@ -3,16 +3,37 @@
-
+ +

이력이 없습니다.

+
-
-
- {{ i }} +
+
+
+
+
+
{{ stop.stationNm }}
+
{{ stop.direction }}행
+
+ 역에서 탑승가능한 버스를 보는 버튼 +
+
+
+
+ 탑승 가능 버스 +
+ {{ bus.busRouteNm }}   +
+
+ 역에서 탑승가능한 버스를 보는 버튼 +
+
+
@@ -21,6 +42,7 @@ diff --git a/src/views/passenger/landing/BusLandingSearchView.vue b/src/views/passenger/landing/BusLandingSearchView.vue new file mode 100644 index 0000000..9d12a68 --- /dev/null +++ b/src/views/passenger/landing/BusLandingSearchView.vue @@ -0,0 +1,187 @@ + + + + + diff --git a/src/views/passenger/landing/KeyboardLandingSearchView.vue b/src/views/passenger/landing/KeyboardLandingSearchView.vue new file mode 100644 index 0000000..186cc9b --- /dev/null +++ b/src/views/passenger/landing/KeyboardLandingSearchView.vue @@ -0,0 +1,335 @@ + + + + + diff --git a/src/views/passenger/landing/LandingStationListView.vue b/src/views/passenger/landing/LandingStationListView.vue new file mode 100644 index 0000000..2bfb9a7 --- /dev/null +++ b/src/views/passenger/landing/LandingStationListView.vue @@ -0,0 +1,279 @@ + + + + + diff --git a/src/views/passenger/landing/LandingStopBusListView.vue b/src/views/passenger/landing/LandingStopBusListView.vue new file mode 100644 index 0000000..435ef5a --- /dev/null +++ b/src/views/passenger/landing/LandingStopBusListView.vue @@ -0,0 +1,314 @@ + + + + +