Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/sw/temp #10

Open
wants to merge 22 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
7232799
Merge pull request #2 from Booda-YAMYAM/develop
IGhost-P Jun 23, 2022
718a24e
feat : 통신을 위함
IGhost-P Jun 23, 2022
ce8580e
Merge pull request #3 from Booda-YAMYAM/feature/sw/webViewcheck
IGhost-P Jun 23, 2022
453e2e5
feat : web<->RN 통신 성공
IGhost-P Jun 23, 2022
75b9963
Merge pull request #4 from Booda-YAMYAM/feature/sw/webViewcheck
IGhost-P Jun 23, 2022
e94602b
feat : utils & soket
IGhost-P Jun 23, 2022
723cfa5
Merge pull request #5 from Booda-YAMYAM/feature/sw/makeDynamicRouter
IGhost-P Jun 23, 2022
23bd80f
hot fix : 객체 확인용
IGhost-P Jun 23, 2022
b9e0a3c
Merge pull request #6 from Booda-YAMYAM/feature/sw/makeDynamicRouter
IGhost-P Jun 23, 2022
6afccf2
hot fix : [ object Object] 오류 해결
IGhost-P Jun 23, 2022
5d5344c
Merge branch 'main' of https://github.com/Booda-YAMYAM/YAMYMA_WEBVIEW
IGhost-P Jun 23, 2022
3187c0a
hot fix : filter Data 확인
IGhost-P Jun 23, 2022
1eed3a6
feat : filter 기능 구현
IGhost-P Jun 23, 2022
3207a23
feat : star는 표시되나, 클릭이 안되는 상황
IGhost-P Jun 23, 2022
f95b698
build : webView 확인
IGhost-P Jun 23, 2022
ae38c2d
feat : temp
IGhost-P Jun 23, 2022
b83e461
feat : click 이벤트 성공
IGhost-P Jun 23, 2022
7a0d804
feat: modal 바텀시트처럼 보여지게함
IGhost-P Jun 23, 2022
adbd437
feat : 상세보기 구현 완료
IGhost-P Jun 23, 2022
0faa34e
feat : 즐겼찾기, 하트 까지 완성
IGhost-P Jun 23, 2022
4e8689e
feat : 즐겨찾기 추가
IGhost-P Jun 23, 2022
20dd682
feat : data 와 위치정보 추가
IGhost-P Jun 23, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
534 changes: 534 additions & 0 deletions yam-view/public/DUMMY_DATA.json

Large diffs are not rendered by default.

29 changes: 1 addition & 28 deletions yam-view/src/App.js
Original file line number Diff line number Diff line change
@@ -1,40 +1,13 @@
import React from "react";
import React, { useEffect, useState } from "react";
import { HashRouter as Router, Switch, Route } from "react-router-dom";
import WebView from "./pages/WebView";
import axios from "axios";

//axios.defaults.withCredentials = true;
/**
* RN에서 온 정보를 듣는 함수
*/
const RNListener = () => {
/** react native 환경에서만 가능 */
const listener = (event) => {
const { data, type } = JSON.parse(event.data);
console.log(data);
if (type === "TOKEN") {
// type이 TOKEN이기 때문에 이곳에 콘솔이 찍히게 됩니다.
console.log(data); // xxxxx
} else if (type === "NOTIFICATION") {
console.log("NOTIFICATION");
}
};

if (window.ReactNativeWebView) {
/** android */
document.addEventListener("message", listener);
/** ios */
window.addEventListener("message", listener);
} else {
// 모바일이 아니라면 모바일 아님을 alert로 띄웁니다.
alert({ message: "모바일이 아님" });
}
};

function App() {
return (
<Router>
<RNListener />
<Switch>
<Route exact path="/" component={WebView} />
</Switch>
Expand Down
Binary file added yam-view/src/assets/bookmark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added yam-view/src/assets/emptyStar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added yam-view/src/assets/fullStar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added yam-view/src/assets/heart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added yam-view/src/assets/storedummy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
109 changes: 108 additions & 1 deletion yam-view/src/components/Data/markerData.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,116 @@
// latitude : y축
// longitude : x축

//template
// restaurantId: 1,
// restaurantName: "콜드스퀘어", // 이름
// restaurantNumber: "010-1111-1111", // 전화번호
// y_coordinate: 37.62197524055062, // 위도
// x_coordinate: 127.16017523675508, // 경도
// address: "대전광역시 00구 00동",
// heart: 3,
// category: "korea",
// menus: [
// {
// menuId: 1,
// menuName: "비빔밥",
// price: 10000,
// category: "korea",
// menuNum: 0,
// },
// ],
// OPEN_TIME: "오전 11:00 ~ 오후 11:00",
// SECTOR: "분식",
// MAIN_MENU: "돼지국밥, 돼지찜, 돼지전골",
// LAST_UPDATED: Date(),
// DATE_CREATED: Date(),
//
export const dummyData = [
{
restaurantId: 1,
restaurantName: "한국집", // 이름
restaurantNumber: "010-1111-1111", // 전화번호
y_coordinate: 37.62197524055062, // 위도
x_coordinate: 127.16017523675508, // 경도
address: "대전광역시 00구 00동",
heart: 3,
star: true,
category: "korea",
menus: [
{
menuId: 1,
menuName: "비빔밥",
price: 10000,
category: "korea",
menuNum: 0,
},
],
},
{
restaurantId: 2,
restaurantName: "카페", // 이름
restaurantNumber: "010-1111-1111", // 전화번호
y_coordinate: 37.620842424005616, // 위도
x_coordinate: 127.1583774403176, // 경도
address: "대전광역시 00구 00동",
heart: 3,
star: true,
category: "cafe",
menus: [
{
menuId: 1,
menuName: "비빔밥",
price: 10000,
category: "korea",
menuNum: 0,
},
],
},
{
restaurantId: 1,
restaurantName: "일본집", // 이름
restaurantNumber: "010-1111-1111", // 전화번호
y_coordinate: 37.624915253753194, // 위도
x_coordinate: 127.15122688059974, // 경도
address: "대전광역시 00구 00동",
heart: 3,
star: false,
category: "japan",
menus: [
{
menuId: 1,
menuName: "비빔밥",
price: 10000,
category: "korea",
menuNum: 0,
},
],
},
{
restaurantId: 3,
restaurantName: "중국집", // 이름
restaurantNumber: "010-1111-1111", // 전화번호
y_coordinate: 37.62456273069659, // 위도
x_coordinate: 127.15211256646381, // 경도
address: "대전광역시 00구 00동",
heart: 3,
star: false,
category: "china",
menus: [
{
menuId: 1,
menuName: "비빔밥",
price: 10000,
category: "korea",
menuNum: 0,
},
],
},
];

export const markerdata = [
{
RESTARANT_ID: 1,
RESTARANT_ID: 4,
USER_ID: 1,
NAME: "콜드스퀘어", // 이름
PHONE_NUMBER: "010-1111-1111", // 전화번호
Expand Down
20 changes: 20 additions & 0 deletions yam-view/src/components/DetiaModal.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
export default function DetailModal() {
return (
// <div>
// <div className="modal-wrapper">
// <div className="modal-content">
// <div className="modal-header">
// <div className="modal-title">
// <h1>상세정보</h1>
// </div>
// <div className="modal-close">
// <button className="modal-close-btn">
// <img src={require("../assets/close.png")} alt="close" />
// </button>
// </div>
// </div>
// <div className="modal-body">
// <div className="modal-info">
<div>안녕하세요?</div>
);
}
Loading