Skip to content

Commit 35255ee

Browse files
authored
Merge pull request #9 from MarketPlace-O2O-Platform/Feature#6/MapView
[Feat] MapView 핀 표시 및 매장 리스트 보여주기
2 parents 6f8efd6 + 6e4d5c5 commit 35255ee

50 files changed

Lines changed: 995 additions & 810 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.DS_Store

0 Bytes
Binary file not shown.

MarketPlace.xcodeproj/project.pbxproj

Lines changed: 130 additions & 60 deletions
Large diffs are not rendered by default.

MarketPlace.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 11 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MarketPlace/.DS_Store

0 Bytes
Binary file not shown.

MarketPlace/API/Endpoint/CouponEndpoint.swift

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99

1010
enum CouponEndpoint: Endpoint {
11-
case fetchValidCoupon
11+
case fetchValidCoupon(marketId: Int, couponId: Int?, size: Int?)
1212
case fetchPopularCoupon(lastIssuedCount: Int?, lastCouponId: Int?, pageSize: Int?)
1313
case fetchLatestCoupon(lastCreatedAt: String?, lastCouponId: Int?, pageSize: Int?)
1414
case fetchClosingCoupon
@@ -55,6 +55,18 @@ enum CouponEndpoint: Endpoint {
5555
].compactMap { $0 })
5656

5757
return items
58+
59+
case .fetchValidCoupon(let marketId, let couponId, let size):
60+
var items: [URLQueryItem] = []
61+
62+
items.append(contentsOf: [
63+
URLQueryItem(name: "marketId", value: String(marketId)),
64+
couponId.map { URLQueryItem(name: "couponId", value: String($0)) },
65+
size.map { URLQueryItem(name: "size", value: String($0)) }
66+
].compactMap { $0 })
67+
68+
return items
69+
5870
default:
5971
return nil
6072
}

MarketPlace/API/Endpoint/MarketEndpoint.swift

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ enum MarketEndpoint: Endpoint {
1313
case fetchMarketsWithSearching(lastPageIndex: Int?, pageSize: Int?, content: String)
1414
case fetchOwnFavoriteMarkets
1515
case fetchMarketsForMap
16+
case postFavoriteMarket(marketId: Int)
1617

1718
var baseURL: URL { URLManager.shared.baseURL }
1819

@@ -23,11 +24,17 @@ enum MarketEndpoint: Endpoint {
2324
case .fetchMarketsWithSearching: return "api/markets/search"
2425
case .fetchOwnFavoriteMarkets: return "api/markets/my-favorite"
2526
case .fetchMarketsForMap: return "api/markets/map"
27+
case .postFavoriteMarket: return "api/favorites"
2628
}
2729
}
2830

2931
var method: HTTPMethod {
30-
.get
32+
switch self {
33+
case .postFavoriteMarket:
34+
.post
35+
default:
36+
.get
37+
}
3138
}
3239

3340
var headers: [String : String]? { ["Content-Type": "application/json"] }
@@ -57,6 +64,11 @@ enum MarketEndpoint: Endpoint {
5764
].compactMap { $0 })
5865

5966
return items
67+
68+
case .postFavoriteMarket(let marketId):
69+
var items: [URLQueryItem] = []
70+
items.append(URLQueryItem(name: "marketId", value: String(marketId)))
71+
return items
6072
default:
6173
return nil
6274
}

MarketPlace/Assets.xcassets/logo.imageset/Contents.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"images" : [
33
{
4-
"filename" : "logo.png",
4+
"filename" : "Group 48097560.png",
55
"idiom" : "universal",
66
"scale" : "1x"
77
},
2 KB
Loading
-862 Bytes
Binary file not shown.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "bxs_map.png",
5+
"idiom" : "universal",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"scale" : "2x"
11+
},
12+
{
13+
"idiom" : "universal",
14+
"scale" : "3x"
15+
}
16+
],
17+
"info" : {
18+
"author" : "xcode",
19+
"version" : 1
20+
}
21+
}

0 commit comments

Comments
 (0)