-
Notifications
You must be signed in to change notification settings - Fork 0
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/#8 home section UI, API implementation #12
Open
LaonCoder
wants to merge
10
commits into
develop
Choose a base branch
from
feature/#8-home-section-ui-implementation
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+3,241
โ14
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
cfd48f9
[feat] #8 implement home main banner
LaonCoder db9d2af
[feat] #8 implement home category section
LaonCoder dacadce
[feat] #8 implement home wish list section
LaonCoder bf7ecd4
[feat] #8 implement home mid banner cell
LaonCoder 032eba6
[feat] #8 implement home ranking section subviews
LaonCoder 26112d5
[feat] #8 implement home ranking list section
LaonCoder c5603cb
[feat] #8 implement home recommend list section
LaonCoder 31f2d32
[feat] implement home api
LaonCoder 8e1470c
Merge branch 'develop' into feature/#8-home-section-ui-implementation
LaonCoder d839a75
Merge branch 'develop' into feature/#8-home-section-ui-implementation
LaonCoder File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// | ||
// Formatter+.swift | ||
// MarketKurly | ||
// | ||
// Created by ์ต์ง์ on 11/24/24. | ||
// | ||
|
||
import Foundation | ||
|
||
extension Formatter { | ||
static let currency: NumberFormatter = { | ||
let formatter = NumberFormatter() | ||
formatter.numberStyle = .decimal // ์ฒ ๋จ์๋ก ',' ์ถ๊ฐ | ||
formatter.maximumFractionDigits = 0 // ์์์ ์๋ฆฌ๋ ์๋๋ก ์ค์ | ||
formatter.minimumFractionDigits = 0 | ||
return formatter | ||
}() | ||
} |
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,26 @@ | ||
// | ||
// HomeApi.swift | ||
// MarketKurly | ||
// | ||
// Created by ์ต์ง์ on 11/28/24. | ||
// | ||
|
||
import Foundation | ||
|
||
struct HomeApi { | ||
static let shared = HomeApi() | ||
|
||
private let client = KurlyClient.shared | ||
|
||
func getHomeData(completion: @escaping (Result<HomeDto, NetworkError>) -> Void) { | ||
client.request(HomeDto.self, target: HomeTarget.getHomeData) { result in | ||
switch result { | ||
case .success(let data): | ||
completion(.success(data)) | ||
case .failure(let error): | ||
completion(.failure(error)) | ||
} | ||
} | ||
} | ||
} | ||
|
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,14 @@ | ||
// | ||
// HomeDTO.swift | ||
// MarketKurly | ||
// | ||
// Created by ์ต์ง์ on 11/28/24. | ||
// | ||
|
||
import Foundation | ||
|
||
struct HomeDto: Codable, Hashable { | ||
let mainBottomData: [HomeRecommendListItem]? | ||
let mainTopProducts: [HomeWishListItem]? | ||
let mainMiddleProducts: [HomeRankingListItem]? | ||
} |
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,41 @@ | ||
// | ||
// HomeTarget.swift | ||
// MarketKurly | ||
// | ||
// Created by ์ต์ง์ on 11/28/24. | ||
// | ||
|
||
import Foundation | ||
import Alamofire | ||
|
||
enum HomeTarget { | ||
case getHomeData | ||
} | ||
|
||
extension HomeTarget: TargetType { | ||
var baseURL: String { | ||
return "http://211.188.50.209:8080" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ์๊ฑฐ ์์จ๊ฒจ๋ ๊ด์ฐฎ์๊น์ฌ |
||
} | ||
|
||
var method: Alamofire.HTTPMethod { | ||
switch self { | ||
case .getHomeData: return .get | ||
} | ||
} | ||
var path: String { | ||
switch self { | ||
case .getHomeData: return "/api/v1/products/main" | ||
} | ||
} | ||
|
||
var parameters: RequestParameters { | ||
switch self { | ||
case .getHomeData: return .none | ||
} | ||
} | ||
|
||
var encoding: ParameterEncoding { | ||
return JSONEncoding.default | ||
} | ||
} | ||
|
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// | ||
// ResponseData.swift | ||
// MarketKurly | ||
// | ||
// Created by ์ต์ง์ on 11/28/24. | ||
// | ||
|
||
struct ResponseData<T: Decodable>: Decodable { | ||
let success: Bool | ||
let message: String | ||
let data: T | ||
} |
6 changes: 6 additions & 0 deletions
6
MarketKurly/Core/UI/Resources/Assets.xcassets/CategoryBannerImages/Contents.json
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,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
...UI/Resources/Assets.xcassets/CategoryBannerImages/icn_home_fashion.imageset/Contents.json
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,21 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "icn_home_fashion.svg", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
...ts.xcassets/CategoryBannerImages/icn_home_fashion.imageset/icn_home_fashion.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
...Resources/Assets.xcassets/CategoryBannerImages/icn_home_homeliving.imageset/Contents.json
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,21 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "icn_home_homeliving.svg", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
...ssets/CategoryBannerImages/icn_home_homeliving.imageset/icn_home_homeliving.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
...sources/Assets.xcassets/CategoryBannerImages/icn_home_kurlycurator.imageset/Contents.json
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,21 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "icn_home_kurlycurator.svg", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...s/CategoryBannerImages/icn_home_kurlycurator.imageset/icn_home_kurlycurator.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
...sources/Assets.xcassets/CategoryBannerImages/icn_home_kurlymembers.imageset/Contents.json
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,21 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "icn_home_kurlymembers.svg", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
...s/CategoryBannerImages/icn_home_kurlymembers.imageset/icn_home_kurlymembers.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
...sources/Assets.xcassets/CategoryBannerImages/icn_home_livecommerce.imageset/Contents.json
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,21 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "icn_home_livecommerce.svg", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...s/CategoryBannerImages/icn_home_livecommerce.imageset/icn_home_livecommerce.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
...esources/Assets.xcassets/CategoryBannerImages/icn_home_lowestprice.imageset/Contents.json
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,21 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "icn_home_lowestprice.svg", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
...ets/CategoryBannerImages/icn_home_lowestprice.imageset/icn_home_lowestprice.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
...re/UI/Resources/Assets.xcassets/CategoryBannerImages/icn_home_luck.imageset/Contents.json
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,21 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "icn_home_luck.svg", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
...s/Assets.xcassets/CategoryBannerImages/icn_home_luck.imageset/icn_home_luck.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
...UI/Resources/Assets.xcassets/CategoryBannerImages/icn_home_members.imageset/Contents.json
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,21 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "icn_home_members.svg", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ด๊ฑฐ discard ํด๋ ๋์ง ์๋์ ?!