Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
18 changes: 6 additions & 12 deletions MarketPlace.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1381,13 +1381,11 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_ASSET_PATHS = "\"MarketPlace/Preview Content\"";
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = AANGG4Q668;
DEVELOPMENT_TEAM = 7RR74CRWQW;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = MarketPlace/Info.plist;
Expand All @@ -1408,10 +1406,9 @@
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.5;
PRODUCT_BUNDLE_IDENTIFIER = com.appcenter.MarketPlace1;
PRODUCT_BUNDLE_IDENTIFIER = com.appcenter.MarketPlace5;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = currumi;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
Expand All @@ -1425,12 +1422,10 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"MarketPlace/Preview Content\"";
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = AANGG4Q668;
DEVELOPMENT_TEAM = 7RR74CRWQW;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = MarketPlace/Info.plist;
Expand All @@ -1451,10 +1446,9 @@
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.5;
PRODUCT_BUNDLE_IDENTIFIER = com.appcenter.MarketPlace1;
PRODUCT_BUNDLE_IDENTIFIER = com.appcenter.MarketPlace5;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = currumi;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down
65 changes: 41 additions & 24 deletions MarketPlace/View/Main/View/CategoryDetailView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,48 @@ struct CategoryDetailView: View {
VStack {
// MARK: - Category 목록 상단 TabView
CategoryTabView(selectedTab: $selectedTab)

ScrollView {
LazyVStack(spacing: 16) {
ForEach(Array(viewModel.markets.enumerated()), id: \.offset) { index, shop in
NavigationLink(destination: MarketDetailView(marketId: shop.marketId, isBookmarked: shop.isFavorite)) {
VStack {
MarketInfoCell(
isBookmarked: shop.isFavorite,
viewModel: MarketInfoCellViewModel(marketData: shop)
)

Divider()
.background(Color.gray.opacity(0.5))
.padding(.horizontal, -20)

if viewModel.markets.isEmpty {
/// - NOTE: 매장이 없을 때
VStack(spacing: 20) {
Spacer()

Text("아직 입점된 매장이 없습니다.\n공감화면에서 원하는 매장을 요청해보세요!")
.pretendardFont(size: 16, weight: .regular)
.foregroundColor(Colors.gray_600)
.multilineTextAlignment(.center)
.lineSpacing(8)

Spacer()
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
} else {
// MARK: - 매장 목록
ScrollView {
LazyVStack(spacing: 16) {
ForEach(Array(viewModel.markets.enumerated()), id: \.offset) { index, shop in
NavigationLink(destination: MarketDetailView(marketId: shop.marketId, isBookmarked: shop.isFavorite)) {
VStack {
MarketInfoCell(
isBookmarked: shop.isFavorite,
viewModel: MarketInfoCellViewModel(marketData: shop)
)

Divider()
.background(Color.gray.opacity(0.5))
.padding(.horizontal, -20)
}
}
}
.onAppear {
guard index == viewModel.markets.count - 1,
let lastId = viewModel.lastMarketId
else { return }
viewModel.currentCategory = Category(index: selectedTab)?.toString()

Task {
await viewModel.fetchMarkets(lastPageIndex: lastId, category: Category(index: selectedTab)?.toString() ?? nil)
.onAppear {
guard index == viewModel.markets.count - 1,
let lastId = viewModel.lastMarketId
else { return }

viewModel.currentCategory = Category(index: selectedTab)?.toString()

Task {
await viewModel.fetchMarkets(lastPageIndex: lastId, category: Category(index: selectedTab)?.toString() ?? nil)
}
}
}
}
Expand Down
17 changes: 14 additions & 3 deletions MarketPlace/View/Map/View/MapMarketListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ struct MapMarketListView: View {
ProgressView()
.progressViewStyle(CircularProgressViewStyle())
.padding()
} else if viewModel.markets.isEmpty {
/// - NOTE: 매장이 없을 때
VStack(spacing: 20) {
Text("아직 입점된 매장이 없습니다.\n공감화면에서 원하는 매장을 요청해보세요!")
.pretendardFont(size: 16, weight: .regular)
.foregroundColor(Colors.gray_600)
.multilineTextAlignment(.center)
.lineSpacing(8)
}
.frame(maxWidth: .infinity)
.padding(.top, 40)
} else {
ForEach(Array(viewModel.markets.enumerated()), id: \.offset) { index, shop in
NavigationLink(destination:
Expand All @@ -22,7 +33,7 @@ struct MapMarketListView: View {
isBookmarked: shop.isFavorite,
viewModel: MarketInfoCellViewModel(marketData: shop)
).padding(.bottom, 10)

Divider()
.background(Color.gray.opacity(0.5))
.padding(.horizontal, -20)
Expand All @@ -32,9 +43,9 @@ struct MapMarketListView: View {
guard index == viewModel.markets.count - 1,
let lastId = viewModel.lastMarketId
else { return }

viewModel.currentCategory = Category(index: selectedIndex)?.toString()

Task {
await viewModel.fetchMarkets(lastPageIndex: lastId, category: Category(index: selectedIndex)?.toString() ?? nil)
}
Expand Down
86 changes: 52 additions & 34 deletions MarketPlace/View/MyPage/View/MyFavoriteShopListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,58 @@ struct MyFavoriteShopListView: View {
@StateObject var viewModel = MyFavoriteMarketListViewModel()

var body: some View {
ScrollView {
LazyVStack(spacing: 16) {
ForEach(Array(viewModel.favoriteMarkets.enumerated()),id: \.offset) { index, shop in
NavigationLink(destination:
MarketDetailView(marketId: shop.marketId, isBookmarked: shop.isFavorite)
) {
let market = MarketModel(
marketId: shop.marketId,
marketName: shop.marketName,
marketDescription: shop.marketDescription,
address: shop.address,
thumbnail: shop.thumbnail,
isFavorite: shop.isFavorite,
isNewCoupon: shop.isNewCoupon
)

VStack {
MarketInfoCell(
isBookmarked: shop.isFavorite,
viewModel: MarketInfoCellViewModel(marketData: market)
)

Divider()
.background(Color.gray.opacity(0.5))
.padding(.horizontal, -20)
}
}
.onAppear {
guard index == viewModel.favoriteMarkets.count - 1,
let lastModified = viewModel.lastModified
else { return }

Task {
await viewModel.fetchFavoriteMarket(lastModifiedAt: lastModified)
Group {
if viewModel.favoriteMarkets.isEmpty {
/// - NOTE: 저장한 매장이 없을 때
VStack(spacing: 20) {
Spacer()

Text("내가 저장한 매장이 없습니다.\n카테고리 페이지에서 관심있는 매장을 저장해보세요.")
.pretendardFont(size: 16, weight: .regular)
.foregroundColor(Colors.gray_600)
.multilineTextAlignment(.center)
.lineSpacing(8)

Spacer()
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
} else {
ScrollView {
LazyVStack(spacing: 16) {
ForEach(Array(viewModel.favoriteMarkets.enumerated()),id: \.offset) { index, shop in
NavigationLink(destination:
MarketDetailView(marketId: shop.marketId, isBookmarked: shop.isFavorite)
) {
let market = MarketModel(
marketId: shop.marketId,
marketName: shop.marketName,
marketDescription: shop.marketDescription,
address: shop.address,
thumbnail: shop.thumbnail,
isFavorite: shop.isFavorite,
isNewCoupon: shop.isNewCoupon
)

VStack {
MarketInfoCell(
isBookmarked: shop.isFavorite,
viewModel: MarketInfoCellViewModel(marketData: market)
)

Divider()
.background(Color.gray.opacity(0.5))
.padding(.horizontal, -20)
}
}
.onAppear {
guard index == viewModel.favoriteMarkets.count - 1,
let lastModified = viewModel.lastModified
else { return }

Task {
await viewModel.fetchFavoriteMarket(lastModifiedAt: lastModified)
}
}
}
}
}
Expand Down