├── .gitignore
├── .gitmodules
├── CHANGELOG.md
├── GKCommerce.xcodeproj
├── project.pbxproj
└── project.xcworkspace
│ └── contents.xcworkspacedata
├── GKCommerce.xcworkspace
└── contents.xcworkspacedata
├── GKCommerce
├── AssetCatalog
│ ├── Application.xcassets
│ │ ├── tabbar_features.imageset
│ │ │ ├── Contents.json
│ │ │ ├── tabbar_features.png
│ │ │ ├── tabbar_features@2x.png
│ │ │ └── tabbar_features@3x.png
│ │ ├── tabbar_list.imageset
│ │ │ ├── Contents.json
│ │ │ ├── tabbar_list.png
│ │ │ ├── tabbar_list@2x.png
│ │ │ └── tabbar_list@3x.png
│ │ ├── tabbar_round.imageset
│ │ │ ├── Contents.json
│ │ │ ├── round.png
│ │ │ ├── round@2x.png
│ │ │ └── round@3x.png
│ │ └── tabbar_shopping.imageset
│ │ │ ├── Contents.json
│ │ │ ├── tab_shopping.png
│ │ │ ├── tab_shopping@2x.png
│ │ │ └── tab_shopping@3x.png
│ ├── Cart.xcassets
│ │ ├── cart_decrement.imageset
│ │ │ ├── Contents.json
│ │ │ ├── cart_decrement.png
│ │ │ └── cart_decrement@2x.png
│ │ ├── cart_increment.imageset
│ │ │ ├── Contents.json
│ │ │ ├── cart_increment.png
│ │ │ └── cart_increment@2x.png
│ │ ├── cart_select.imageset
│ │ │ ├── Contents.json
│ │ │ ├── cart_select.png
│ │ │ └── cart_select@2x.png
│ │ ├── cart_selected.imageset
│ │ │ ├── Contents.json
│ │ │ ├── cart_selected.png
│ │ │ └── cart_selected@2x.png
│ │ └── checkout_location.imageset
│ │ │ ├── Contents.json
│ │ │ └── booking_location@3x.png
│ ├── Images.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── Icon-40.png
│ │ │ ├── Icon-40@2x.png
│ │ │ ├── Icon-40@3x.png
│ │ │ ├── Icon-60@2x.png
│ │ │ ├── Icon-60@3x.png
│ │ │ ├── Icon-72.png
│ │ │ ├── Icon-72@2x.png
│ │ │ ├── Icon-76.png
│ │ │ ├── Icon-76@2x.png
│ │ │ ├── Icon-Small-20.png
│ │ │ ├── Icon-Small-20@2x.png
│ │ │ ├── Icon-Small-30.png
│ │ │ ├── Icon-Small-30@2x.png
│ │ │ ├── Icon-Small-50.png
│ │ │ ├── Icon-Small-50@2x.png
│ │ │ ├── Icon-Small.png
│ │ │ ├── Icon-Small@2x.png
│ │ │ ├── Icon-Small@3x.png
│ │ │ ├── Icon.png
│ │ │ ├── Icon@2x.png
│ │ │ ├── apple-touch-icon-114x114-precomposed.png
│ │ │ ├── apple-touch-icon-144x144-precomposed.png
│ │ │ ├── apple-touch-icon-72x72-precomposed.png
│ │ │ ├── apple-touch-icon-precomposed.png
│ │ │ ├── iTunesArtwork.png
│ │ │ └── iTunesArtwork@2x.png
│ │ └── LaunchImage.launchimage
│ │ │ └── Contents.json
│ ├── Mine.xcassets
│ │ ├── mine_header_photo.imageset
│ │ │ ├── Contents.json
│ │ │ ├── mine_header_photo.png
│ │ │ └── mine_header_photo@2x.png
│ │ ├── mine_icon_about.imageset
│ │ │ ├── Contents.json
│ │ │ ├── mine_icon_about.png
│ │ │ └── mine_icon_about@2x.png
│ │ ├── mine_icon_account.imageset
│ │ │ ├── Contents.json
│ │ │ ├── mine_icon_charge.png
│ │ │ └── mine_icon_charge@2x.png
│ │ ├── mine_icon_address.imageset
│ │ │ ├── Contents.json
│ │ │ ├── mine_icon_address.png
│ │ │ └── mine_icon_address@2x.png
│ │ ├── mine_icon_community.imageset
│ │ │ ├── Contents.json
│ │ │ ├── mine_icon_community.png
│ │ │ └── mine_icon_community@2x.png
│ │ ├── mine_icon_favor.imageset
│ │ │ ├── Contents.json
│ │ │ ├── mine_icon_favor.png
│ │ │ └── mine_icon_favor@2x.png
│ │ ├── mine_icon_feedback.imageset
│ │ │ ├── Contents.json
│ │ │ ├── mine_icon_feedback.png
│ │ │ └── mine_icon_feedback@2x.png
│ │ └── mine_icon_order.imageset
│ │ │ ├── Contents.json
│ │ │ ├── mine_icon_order.png
│ │ │ └── mine_icon_order@2x.png
│ └── Product.xcassets
│ │ ├── product_favor.imageset
│ │ ├── Contents.json
│ │ ├── product_favor.png
│ │ └── product_favor@2x.png
│ │ └── product_favor_selected.imageset
│ │ ├── Contents.json
│ │ ├── product_favor_selected.png
│ │ └── product_favor_selected@2x.png
├── Base.lproj
│ └── LaunchScreen.xib
├── GKCommerce-Prefix.pch
├── GKCommerce.xcdatamodeld
│ ├── .xccurrentversion
│ └── GKCommerce.xcdatamodel
│ │ └── contents
├── GKCommerce
│ ├── Address
│ │ ├── Address
│ │ │ ├── Controller
│ │ │ │ ├── AddressController.h
│ │ │ │ └── AddressController.m
│ │ │ ├── TableViewCell
│ │ │ │ ├── AddressTableViewCell.h
│ │ │ │ ├── AddressTableViewCell.m
│ │ │ │ └── AddressTableViewCell.xib
│ │ │ └── View
│ │ │ │ └── AddressView.xib
│ │ ├── AddressDefines.h
│ │ ├── AddressEdit
│ │ │ ├── Controller
│ │ │ │ ├── AddressEditController.h
│ │ │ │ └── AddressEditController.m
│ │ │ ├── RegionPickerView
│ │ │ │ ├── RegionPickerViewController.h
│ │ │ │ └── RegionPickerViewController.m
│ │ │ ├── TableViewCell
│ │ │ │ ├── AddressEditInputTableViewCell.h
│ │ │ │ ├── AddressEditInputTableViewCell.m
│ │ │ │ └── AddressEditInputTableViewCell.xib
│ │ │ └── View
│ │ │ │ └── AddressEditView.xib
│ │ ├── AddressList
│ │ │ ├── Controller
│ │ │ │ ├── AddressListController.h
│ │ │ │ └── AddressListController.m
│ │ │ ├── TableView
│ │ │ │ ├── AddressListTableViewCell.h
│ │ │ │ ├── AddressListTableViewCell.m
│ │ │ │ ├── AddressListTableViewCell.xib
│ │ │ │ ├── AddressListTableViewCellSelected.h
│ │ │ │ └── AddressListTableViewCellSelected.m
│ │ │ └── View
│ │ │ │ └── AddressListView.xib
│ │ ├── AddressService.h
│ │ ├── AddressServiceDelegate.h
│ │ ├── Backend
│ │ │ ├── AddressBackend.h
│ │ │ └── AddressBackendDelegate.h
│ │ ├── Infrastructure
│ │ │ ├── PDAddressBackend.h
│ │ │ ├── PDAddressBackend.m
│ │ │ ├── PDRegionAssembler.h
│ │ │ └── PDRegionAssembler.m
│ │ └── Model
│ │ │ ├── Address.h
│ │ │ ├── Address.m
│ │ │ ├── Region.h
│ │ │ └── Region.m
│ ├── App
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── GKAppView.xib
│ │ ├── GKServiceMock.h
│ │ ├── GKServiceMock.m
│ │ ├── Model
│ │ │ ├── App.h
│ │ │ ├── App.m
│ │ │ ├── GKConfig.h
│ │ │ └── GKConfig.m
│ │ ├── ViewController.h
│ │ └── ViewController.m
│ ├── Backend
│ │ ├── Backend.h
│ │ ├── Backend.m
│ │ ├── ECBackendAssembler.h
│ │ └── ECBackendAssembler.m
│ ├── Cart
│ │ ├── Backend
│ │ │ ├── CartBackend.h
│ │ │ ├── CartBackendDelegate.h
│ │ │ ├── ECCartBackend.h
│ │ │ ├── ECCartBackend.m
│ │ │ ├── ECCartBackendAssembler.h
│ │ │ ├── ECCartBackendAssembler.m
│ │ │ └── GKCartBackend.h
│ │ ├── CartRepository.h
│ │ ├── CartRepository.m
│ │ ├── Controller
│ │ │ ├── CartEmptyViewController.h
│ │ │ ├── CartEmptyViewController.m
│ │ │ ├── CartViewController.h
│ │ │ ├── CartViewController.m
│ │ │ └── Model
│ │ │ │ ├── CartItemListViewModel.h
│ │ │ │ ├── CartItemListViewModel.m
│ │ │ │ ├── CartViewModel.h
│ │ │ │ └── CartViewModel.m
│ │ ├── GKCartBackendImpl.h
│ │ ├── GKCartBackendImpl.m
│ │ ├── GKCartService.h
│ │ ├── GKCartServiceImpl.h
│ │ ├── GKCartServiceImpl.m
│ │ ├── GKCartServiceMock.h
│ │ ├── GKCartServiceMock.m
│ │ ├── Model
│ │ │ ├── Cart.h
│ │ │ ├── Cart.m
│ │ │ ├── CartItem.h
│ │ │ ├── CartItem.m
│ │ │ ├── CartItemList.h
│ │ │ ├── CartItemList.m
│ │ │ ├── Invoice.h
│ │ │ ├── Invoice.m
│ │ │ ├── InvoiceContent.h
│ │ │ └── InvoiceContent.m
│ │ ├── TableViewCell
│ │ │ ├── CartItemOverviewTableViewCell.h
│ │ │ ├── CartItemOverviewTableViewCell.m
│ │ │ ├── CartItemOverviewTableViewCell.xib
│ │ │ ├── CartItemTableViewCell.h
│ │ │ ├── CartItemTableViewCell.m
│ │ │ ├── CartItemTableViewCell.xib
│ │ │ ├── CartStoreNameTableViewCell.h
│ │ │ ├── CartStoreNameTableViewCell.m
│ │ │ └── CartStoreNameTableViewCell.xib
│ │ └── View
│ │ │ ├── CartEmptyView.xib
│ │ │ ├── CartView.xib
│ │ │ ├── GKQuantityView.h
│ │ │ └── GKQuantityView.m
│ ├── Checkout
│ │ ├── Backend
│ │ │ ├── GKCheckoutBackend.h
│ │ │ ├── GKCheckoutBackendDemostration.h
│ │ │ └── GKCheckoutBackendDemostration.m
│ │ ├── Controller
│ │ │ ├── CheckoutChoiceAddressController.h
│ │ │ ├── CheckoutChoiceAddressController.m
│ │ │ ├── CheckoutViewController.h
│ │ │ ├── CheckoutViewController.m
│ │ │ ├── InvoiceViewController.h
│ │ │ ├── InvoiceViewController.m
│ │ │ ├── ShippingViewController.h
│ │ │ └── ShippingViewController.m
│ │ ├── GKCheckoutService.h
│ │ ├── GKCheckoutServiceImpl.h
│ │ ├── GKCheckoutServiceImpl.m
│ │ ├── Provider
│ │ │ ├── CheckoutViewControllerProvider.h
│ │ │ └── CheckoutViewControllerProvider.m
│ │ ├── TableViewCell
│ │ │ ├── CheckoutAddressTableViewCell.h
│ │ │ ├── CheckoutAddressTableViewCell.m
│ │ │ ├── CheckoutAddressTableViewCell.xib
│ │ │ ├── CheckoutCartOverviewTableViewCell.h
│ │ │ ├── CheckoutCartOverviewTableViewCell.m
│ │ │ ├── CheckoutCartOverviewTableViewCell.xib
│ │ │ ├── CheckoutChoiceAddressTableViewCell.h
│ │ │ ├── CheckoutChoiceAddressTableViewCell.m
│ │ │ ├── CheckoutChoiceAddressTableViewCell.xib
│ │ │ ├── CheckoutInputTableViewCell.h
│ │ │ ├── CheckoutInputTableViewCell.m
│ │ │ ├── CheckoutInputTableViewCell.xib
│ │ │ ├── CheckoutInvoiceTableViewCell.h
│ │ │ ├── CheckoutInvoiceTableViewCell.m
│ │ │ ├── CheckoutInvoiceTableViewCell.xib
│ │ │ ├── CheckoutMessageTableViewCell.h
│ │ │ ├── CheckoutMessageTableViewCell.m
│ │ │ ├── CheckoutMessageTableViewCell.xib
│ │ │ ├── CheckoutPaymentTableViewCell.h
│ │ │ ├── CheckoutPaymentTableViewCell.m
│ │ │ ├── CheckoutPaymentTableViewCell.xib
│ │ │ ├── CheckoutProductTableViewCell.h
│ │ │ ├── CheckoutProductTableViewCell.m
│ │ │ ├── CheckoutProductTableViewCell.xib
│ │ │ ├── CheckoutShippingTableViewCell.h
│ │ │ ├── CheckoutShippingTableViewCell.m
│ │ │ ├── CheckoutShippingTableViewCell.xib
│ │ │ ├── CheckoutStoreNameTableViewCell.h
│ │ │ ├── CheckoutStoreNameTableViewCell.m
│ │ │ └── CheckoutStoreNameTableViewCell.xib
│ │ └── View
│ │ │ ├── CheckoutCheckBox.h
│ │ │ ├── CheckoutCheckBox.m
│ │ │ ├── CheckoutChoiceAddressView.xib
│ │ │ ├── CheckoutView.h
│ │ │ ├── CheckoutView.m
│ │ │ ├── CheckoutView.xib
│ │ │ └── InvoiceView.xib
│ ├── Context
│ │ ├── GKCommerceApplicationContext.h
│ │ └── GKCommerceApplicationContext.m
│ ├── Feature
│ │ ├── Backend
│ │ │ ├── FeatureBackend.h
│ │ │ ├── FeatureBackendDelegate.h
│ │ │ ├── GKFeatureBackend.h
│ │ │ ├── GKFeatureBackend.m
│ │ │ ├── GKFeatureBackendAssembler.h
│ │ │ └── GKFeatureBackendAssembler.m
│ │ ├── Controller
│ │ │ ├── FeatureViewController.h
│ │ │ └── FeatureViewController.m
│ │ ├── FeatureService.h
│ │ ├── FeatureServiceDelegate.h
│ │ ├── FeatureTableViewCell
│ │ │ ├── FeatureCarouselTableViewCell.h
│ │ │ ├── FeatureCarouselTableViewCell.m
│ │ │ ├── FeatureCarouselTableViewCell.xib
│ │ │ ├── FeatureOneColumnTableViewCell.h
│ │ │ ├── FeatureOneColumnTableViewCell.m
│ │ │ ├── FeatureOneColumnTableViewCell.xib
│ │ │ ├── FeatureTableViewCell.h
│ │ │ ├── FeatureTableViewCell.m
│ │ │ ├── FeatureTableViewCellColumn.h
│ │ │ ├── FeatureTableViewCellColumn.m
│ │ │ ├── FeatureThreeColumnTableViewCell.h
│ │ │ ├── FeatureThreeColumnTableViewCell.m
│ │ │ └── FeatureThreeColumnTableViewCell.xib
│ │ ├── GKFeatureService.h
│ │ ├── GKFeatureService.m
│ │ ├── Mock
│ │ │ ├── Feature.json
│ │ │ ├── feature_iPhone.png
│ │ │ ├── feature_iPhone@2x.png
│ │ │ ├── feature_three_column_0.jpg
│ │ │ ├── feature_three_column_1.jpg
│ │ │ └── feature_three_column_2.jpg
│ │ ├── Model
│ │ │ ├── FeatureCarouselModel.h
│ │ │ ├── FeatureCarouselModel.m
│ │ │ ├── FeatureColumnModel.h
│ │ │ ├── FeatureColumnModel.m
│ │ │ ├── FeatureModelFactory.h
│ │ │ ├── FeatureModelFactory.m
│ │ │ ├── FeatureOneColumnModel.h
│ │ │ ├── FeatureOneColumnModel.m
│ │ │ ├── FeatureThreeColumnModel.h
│ │ │ ├── FeatureThreeColumnModel.m
│ │ │ ├── FeatureViewModel.h
│ │ │ └── FeatureViewModel.m
│ │ └── View
│ │ │ └── FeatureView.xib
│ ├── Fixtures.h
│ ├── Fixtures.m
│ ├── GKAddressKit
│ │ ├── Address
│ │ │ ├── Controller
│ │ │ │ ├── AddressController.h
│ │ │ │ └── AddressController.m
│ │ │ ├── TableViewCell
│ │ │ │ ├── AddressTableViewCell.h
│ │ │ │ ├── AddressTableViewCell.m
│ │ │ │ └── AddressTableViewCell.xib
│ │ │ └── View
│ │ │ │ └── AddressView.xib
│ │ ├── AddressEdit
│ │ │ ├── Controller
│ │ │ │ ├── AddressEditController.h
│ │ │ │ └── AddressEditController.m
│ │ │ ├── TableViewCell
│ │ │ │ ├── AddressEditInputTableViewCell.h
│ │ │ │ ├── AddressEditInputTableViewCell.m
│ │ │ │ └── AddressEditInputTableViewCell.xib
│ │ │ └── View
│ │ │ │ └── AddressEditView.xib
│ │ ├── AddressList
│ │ │ ├── Controller
│ │ │ │ ├── GKAddressListController.h
│ │ │ │ └── GKAddressListController.m
│ │ │ ├── GKRegionPickerViewController.h
│ │ │ ├── GKRegionPickerViewController.m
│ │ │ ├── TableView
│ │ │ │ ├── AddressListTableViewCell.h
│ │ │ │ ├── AddressListTableViewCell.m
│ │ │ │ ├── AddressListTableViewCell.xib
│ │ │ │ ├── AddressListTableViewCellSelected.h
│ │ │ │ └── AddressListTableViewCellSelected.m
│ │ │ └── View
│ │ │ │ └── AddressListView.xib
│ │ ├── GKAddress.h
│ │ ├── GKAddress.m
│ │ ├── GKAddressBackend.h
│ │ ├── GKAddressBackendImpl.h
│ │ ├── GKAddressBackendImpl.m
│ │ ├── GKAddressBackendMock.h
│ │ ├── GKAddressBackendMock.m
│ │ ├── GKAddressCommon.h
│ │ ├── GKAddressKit.h
│ │ ├── GKAddressRepository.h
│ │ ├── GKAddressRepositoryMock.h
│ │ ├── GKAddressRepositoryMock.m
│ │ ├── GKAddressService.h
│ │ ├── GKAddressServiceImpl.h
│ │ ├── GKAddressServiceImpl.m
│ │ ├── GKAddressSynchronization.h
│ │ ├── GKAddressSynchronization.m
│ │ ├── GKCity.h
│ │ ├── GKCity.m
│ │ ├── GKCounty.h
│ │ ├── GKCounty.m
│ │ ├── GKProvince.h
│ │ ├── GKProvince.m
│ │ ├── GKRegion.h
│ │ ├── GKRegion.m
│ │ ├── GKRegionBackend.h
│ │ ├── GKRegionBackendImpl.h
│ │ ├── GKRegionBackendImpl.m
│ │ ├── GKRegionPickerViewController.h
│ │ ├── GKRegionPickerViewController.m
│ │ ├── GKTown.h
│ │ ├── GKTown.m
│ │ ├── GKVillage.h
│ │ └── GKVillage.m
│ ├── GKCommerce-Prefix.pch
│ ├── GKSegment
│ │ ├── GKSegmentView.h
│ │ ├── GKSegmentView.m
│ │ └── GKSegmentViewDelegate.h
│ ├── GKUserKit
│ │ ├── GKForgotPassword
│ │ │ ├── GKForgotPasswordController.h
│ │ │ ├── GKForgotPasswordController.m
│ │ │ ├── GKForgotPasswordController.xib
│ │ │ ├── GKVerificationTableViewCell.h
│ │ │ ├── GKVerificationTableViewCell.m
│ │ │ └── GKVerificationTableViewCell.xib
│ │ ├── GKHUD.h
│ │ ├── GKHUD.m
│ │ ├── GKMine
│ │ │ └── Controller
│ │ │ │ ├── GKMineViewController.h
│ │ │ │ └── GKMineViewController.m
│ │ ├── GKRegistration
│ │ │ ├── Controller
│ │ │ │ ├── GKRegistrationController.h
│ │ │ │ └── GKRegistrationController.m
│ │ │ ├── TableViewCell
│ │ │ │ ├── GKRegistrationTableViewCell.h
│ │ │ │ ├── GKRegistrationTableViewCell.m
│ │ │ │ └── GKRegistrationTableViewCell.xib
│ │ │ └── View
│ │ │ │ └── GKRegistrationController.xib
│ │ ├── GKUserApplicationContext.h
│ │ ├── GKUserApplicationContext.m
│ │ ├── GKUserAuthentication
│ │ │ ├── Controller
│ │ │ │ ├── GKUserAuthenticationController.h
│ │ │ │ └── GKUserAuthenticationController.m
│ │ │ ├── TableVIewCell
│ │ │ │ ├── GKUserAuthenticationTableViewCell.h
│ │ │ │ ├── GKUserAuthenticationTableViewCell.m
│ │ │ │ └── GKUserAuthenticationTableViewCell.xib
│ │ │ └── View
│ │ │ │ └── GKUserAuthenticationView.xib
│ │ ├── GKUserForgotPassword.h
│ │ ├── GKUserForgotPassword.m
│ │ └── Model
│ │ │ ├── GKUser.h
│ │ │ ├── GKUser.m
│ │ │ ├── GKUserAccessToken.h
│ │ │ ├── GKUserAccessToken.m
│ │ │ ├── GKUserAuthentication.h
│ │ │ ├── GKUserAuthentication.m
│ │ │ ├── GKUserBackend
│ │ │ ├── GKUserBackend.h
│ │ │ ├── GKUserBackendImpl.h
│ │ │ ├── GKUserBackendImpl.m
│ │ │ ├── GKUserBackendMock.h
│ │ │ └── GKUserBackendMock.m
│ │ │ ├── GKUserEntity.h
│ │ │ ├── GKUserEntity.m
│ │ │ ├── GKUserModel.xcdatamodeld
│ │ │ └── GKUserModel.xcdatamodel
│ │ │ │ └── contents
│ │ │ ├── GKUserRegistration.h
│ │ │ ├── GKUserRegistration.m
│ │ │ ├── GKUserRepository.h
│ │ │ ├── GKUserRepositoryImpl.h
│ │ │ ├── GKUserRepositoryImpl.m
│ │ │ ├── GKUserService.h
│ │ │ ├── GKUserServiceImpl.h
│ │ │ └── GKUserServiceImpl.m
│ ├── Mine
│ │ └── MineDefault
│ │ │ ├── Controller
│ │ │ ├── MineDefaultViewController.h
│ │ │ └── MineDefaultViewController.m
│ │ │ ├── TableViewCell
│ │ │ ├── MineDefaultTableViewCell.h
│ │ │ ├── MineDefaultTableViewCell.m
│ │ │ ├── MineDefaultTableViewCell.xib
│ │ │ ├── MineHeaderPhotoTableViewCell.h
│ │ │ ├── MineHeaderPhotoTableViewCell.m
│ │ │ └── MineHeaderPhotoTableViewCell.xib
│ │ │ └── View
│ │ │ └── MineDefaultView.xib
│ ├── Order
│ │ ├── GKOrderBackend.h
│ │ ├── GKOrderService.h
│ │ ├── GKOrderServiceImpl.h
│ │ ├── GKOrderServiceImpl.m
│ │ ├── Model
│ │ │ ├── Order.h
│ │ │ ├── Order.m
│ │ │ ├── OrderItem.h
│ │ │ └── OrderItem.m
│ │ ├── OrderDetail
│ │ │ ├── Controller
│ │ │ │ ├── OrderDetailViewController.h
│ │ │ │ └── OrderDetailViewController.m
│ │ │ └── View
│ │ │ │ ├── OrderDetailDefaultTableViewCell.h
│ │ │ │ ├── OrderDetailDefaultTableViewCell.m
│ │ │ │ ├── OrderDetailDefaultTableViewCell.xib
│ │ │ │ ├── OrderDetailProductTableViewCell.h
│ │ │ │ ├── OrderDetailProductTableViewCell.m
│ │ │ │ ├── OrderDetailProductTableViewCell.xib
│ │ │ │ ├── OrderDetailTableViewCell.h
│ │ │ │ └── OrderDetailTableViewCell.m
│ │ └── OrderList
│ │ │ ├── Controller
│ │ │ ├── GKOrderListController.h
│ │ │ └── GKOrderListController.m
│ │ │ └── View
│ │ │ └── GKOrderListView.xib
│ ├── Payment
│ │ ├── Model
│ │ │ ├── Payment.h
│ │ │ ├── Payment.m
│ │ │ ├── PaymentBalance.h
│ │ │ └── PaymentBalance.m
│ │ ├── PaymentFailure
│ │ │ ├── Controller
│ │ │ │ ├── PaymentFailureViewController.h
│ │ │ │ └── PaymentFailureViewController.m
│ │ │ └── View
│ │ │ │ └── PaymentFailureView.xib
│ │ └── PaymentSuccess
│ │ │ ├── Controller
│ │ │ ├── PaymentSuccessViewController.h
│ │ │ └── PaymentSuccessViewController.m
│ │ │ └── View
│ │ │ └── PaymentSuccessView.xib
│ ├── Product
│ │ ├── Backend
│ │ │ ├── ECProductBackend.h
│ │ │ ├── ECProductBackend.m
│ │ │ ├── ECProductBackendAssembler.h
│ │ │ ├── ECProductBackendAssembler.m
│ │ │ ├── GKProductBackend.h
│ │ │ ├── GKProductBackendAssembler.h
│ │ │ ├── GKProductBackendAssembler.m
│ │ │ ├── GKProductBackendImpl.h
│ │ │ ├── GKProductBackendImpl.m
│ │ │ ├── Model
│ │ │ │ ├── SearchBackendModel.h
│ │ │ │ └── SearchBackendModel.m
│ │ │ ├── ProductBackend.h
│ │ │ └── ProductBackendDelegate.h
│ │ ├── GKProductService.h
│ │ ├── GKProductServiceImpl.h
│ │ ├── GKProductServiceImpl.m
│ │ ├── GKProductServiceMock.h
│ │ ├── GKProductServiceMock.m
│ │ ├── Model
│ │ │ ├── Product.h
│ │ │ ├── Product.m
│ │ │ ├── ProductCategory.h
│ │ │ ├── ProductCategory.m
│ │ │ ├── ProductImageURL.h
│ │ │ ├── ProductImageURL.m
│ │ │ ├── ProductSpecification.h
│ │ │ ├── ProductSpecification.m
│ │ │ ├── ProductSpecificationValue.h
│ │ │ └── ProductSpecificationValue.m
│ │ ├── ProductCategory
│ │ │ ├── Controller
│ │ │ │ ├── ProductCategoryViewController.h
│ │ │ │ └── ProductCategoryViewController.m
│ │ │ ├── Mock
│ │ │ │ ├── ProductCategories.json
│ │ │ │ └── ProductCategoryCatalog.xcassets
│ │ │ │ │ ├── product_category_mock_apple.png.imageset
│ │ │ │ │ ├── Contents.json
│ │ │ │ │ └── product_category_mock_apple@2x.png
│ │ │ │ │ ├── product_category_mock_iphone.imageset
│ │ │ │ │ ├── Contents.json
│ │ │ │ │ └── product_category_mock_iphone@2x.png
│ │ │ │ │ └── product_category_mock_macbook.png.imageset
│ │ │ │ │ ├── Contents.json
│ │ │ │ │ └── product_category_mock_macbook@2x.png
│ │ │ ├── TableViewCell
│ │ │ │ ├── ProductCategoryChildTableViewCell.h
│ │ │ │ ├── ProductCategoryChildTableViewCell.m
│ │ │ │ ├── ProductCategoryChildTableViewCellGrid.h
│ │ │ │ ├── ProductCategoryChildTableViewCellGrid.m
│ │ │ │ ├── ProductCategoryTableViewCell.h
│ │ │ │ ├── ProductCategoryTableViewCell.m
│ │ │ │ └── ProductCategoryTableViewCell.xib
│ │ │ └── View
│ │ │ │ └── ProductCategoryView.xib
│ │ ├── ProductDetail
│ │ │ ├── Controller
│ │ │ │ ├── ProductDetailMoreViewController.h
│ │ │ │ ├── ProductDetailMoreViewController.m
│ │ │ │ ├── ProductDetailViewController.h
│ │ │ │ └── ProductDetailViewController.m
│ │ │ ├── Mock
│ │ │ │ └── Product1.json
│ │ │ ├── TableViewCell
│ │ │ │ ├── ProductDetailCarouselTableViewCell.h
│ │ │ │ ├── ProductDetailCarouselTableViewCell.m
│ │ │ │ ├── ProductDetailCarouselTableViewCell.xib
│ │ │ │ ├── ProductDetailInfomationTableViewCell.h
│ │ │ │ ├── ProductDetailInfomationTableViewCell.m
│ │ │ │ ├── ProductDetailInfomationTableViewCell.xib
│ │ │ │ ├── ProductDetailTableViewCell.h
│ │ │ │ ├── ProductDetailTableViewCell.m
│ │ │ │ ├── ProductDetailTitleTableViewCell.h
│ │ │ │ ├── ProductDetailTitleTableViewCell.m
│ │ │ │ └── ProductDetailTitleTableViewCell.xib
│ │ │ └── View
│ │ │ │ ├── ProductDetailMoreTab.h
│ │ │ │ ├── ProductDetailMoreTab.m
│ │ │ │ ├── ProductDetailMoreTabButton.h
│ │ │ │ ├── ProductDetailMoreTabButton.m
│ │ │ │ ├── ProductDetailMoreTabButtonDelegate.h
│ │ │ │ ├── ProductDetailMoreView.xib
│ │ │ │ ├── ProductDetailView.xib
│ │ │ │ ├── ProductMoreTableViewCell.h
│ │ │ │ ├── ProductMoreTableViewCell.m
│ │ │ │ └── ProductMoreTableViewCell.xib
│ │ ├── ProductList
│ │ │ ├── Controller
│ │ │ │ ├── ProductListViewController.h
│ │ │ │ └── ProductListViewController.m
│ │ │ ├── Mock
│ │ │ │ ├── ProductList.json
│ │ │ │ └── ProductListCatalog.xcassets
│ │ │ │ │ └── iphone_6.imageset
│ │ │ │ │ ├── Contents.json
│ │ │ │ │ └── iphone_6@2x.jpg
│ │ │ └── View
│ │ │ │ ├── ProductListCollectionViewCell.h
│ │ │ │ ├── ProductListCollectionViewCell.m
│ │ │ │ ├── ProductListCollectionViewCell.xib
│ │ │ │ └── ProductListView.xib
│ │ ├── ProductRepository.h
│ │ └── ProductRepository.m
│ ├── Protocol
│ │ └── UIBindableTableViewCell.h
│ ├── Store
│ │ └── Model
│ │ │ ├── ShippingMethod.h
│ │ │ ├── ShippingMethod.m
│ │ │ ├── Store.h
│ │ │ └── Store.m
│ ├── TestUI.h
│ ├── TestUI.m
│ ├── UI
│ │ ├── GKButton.h
│ │ ├── GKButton.m
│ │ ├── GKCarousel
│ │ │ ├── GKCarouselView.h
│ │ │ ├── GKCarouselView.m
│ │ │ ├── GKCarouselViewCell.h
│ │ │ ├── GKCarouselViewCell.m
│ │ │ └── GKCarouselViewDelegate.h
│ │ ├── GKLabel.h
│ │ ├── GKLabel.m
│ │ ├── GKToggleButton.h
│ │ ├── GKToggleButton.m
│ │ ├── GKView.h
│ │ └── GKView.m
│ ├── User
│ │ ├── Backend
│ │ │ ├── ECUserBackend.h
│ │ │ ├── ECUserBackend.m
│ │ │ ├── ECUserBackendAssembler.h
│ │ │ ├── ECUserBackendAssembler.m
│ │ │ ├── GKUserAssembler.h
│ │ │ ├── GKUserAssembler.m
│ │ │ ├── GKUserBackend.h
│ │ │ ├── GKUserBackendImpl.h
│ │ │ ├── GKUserBackendImpl.m
│ │ │ ├── GKUserBackendMock.h
│ │ │ ├── GKUserBackendMock.m
│ │ │ ├── Model
│ │ │ │ ├── UserAuthenticationModel.h
│ │ │ │ └── UserAuthenticationModel.m
│ │ │ ├── UserBackend.h
│ │ │ └── UserBackendDelegate.h
│ │ ├── ECUserService.h
│ │ ├── ECUserService.m
│ │ ├── GKUserService.h
│ │ ├── GKUserServiceImpl.h
│ │ ├── GKUserServiceImpl.m
│ │ ├── GKUserServiceMock.h
│ │ ├── GKUserServiceMock.m
│ │ ├── Mock
│ │ │ └── MockUserCatalog.xcassets
│ │ │ │ └── user_avatar.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ └── avatar@2x.jpeg
│ │ ├── Model
│ │ │ ├── User.h
│ │ │ └── User.m
│ │ ├── UserAuthentication
│ │ │ ├── Controller
│ │ │ │ ├── UserauthenticationViewController.h
│ │ │ │ └── UserauthenticationViewController.m
│ │ │ ├── TableVIewCell
│ │ │ │ ├── UserAuthenticationTableViewCell.h
│ │ │ │ ├── UserAuthenticationTableViewCell.m
│ │ │ │ └── UserAuthenticationTableViewCell.xib
│ │ │ └── View
│ │ │ │ └── UserAuthenticationView.xib
│ │ ├── UserRepository.h
│ │ ├── UserRepository.m
│ │ ├── UserService.h
│ │ └── UserServiceDelegate.h
│ ├── Utility
│ │ ├── NSString+NSBundle.h
│ │ ├── NSString+NSBundle.m
│ │ ├── Resize
│ │ │ ├── GKResizer.h
│ │ │ ├── GKResizer.m
│ │ │ ├── NSString+GKResizable.h
│ │ │ └── NSString+GKResizable.m
│ │ ├── UITableView+Extension.h
│ │ ├── UITableView+Extension.m
│ │ ├── UIView+Extension.h
│ │ ├── UIView+Extension.m
│ │ └── Utility.h
│ └── alipay
│ │ ├── Alipay.h
│ │ ├── Alipay.m
│ │ ├── AlipayDelegate.h
│ │ ├── AlipayResponse.h
│ │ ├── AlipayResponse.m
│ │ ├── AlipaySDK.bundle
│ │ ├── bar@2x.png
│ │ ├── refresh@2x.png
│ │ ├── refresh_click@2x.png
│ │ ├── shutdown@2x.png
│ │ ├── shutdown_click@2x.png
│ │ └── 归档.zip
│ │ ├── AlipaySDK.framework
│ │ ├── AlipaySDK
│ │ ├── Headers
│ │ │ ├── APayAuthInfo.h
│ │ │ └── AlipaySDK.h
│ │ ├── Info.plist
│ │ └── en.lproj
│ │ │ └── InfoPlist.strings
│ │ ├── AlipayUtility.h
│ │ ├── AlipayUtility.m
│ │ ├── AlixLibService.h
│ │ ├── AlixPayOrder.h
│ │ ├── AlixPayOrder.m
│ │ ├── AlixPayResult.h
│ │ ├── AlixPayResult.m
│ │ ├── Alixpay.bundle
│ │ ├── Toast_BG.png
│ │ ├── Toast_BG@2x.png
│ │ ├── alert_bg.png
│ │ ├── alert_bg@2x.png
│ │ ├── alert_btn_bg.png
│ │ ├── alert_btn_bg@2x.png
│ │ ├── alert_btn_left.png
│ │ ├── alert_btn_left@2x.png
│ │ ├── alert_btn_left_push.png
│ │ ├── alert_btn_left_push@2x.png
│ │ ├── alert_btn_right.png
│ │ ├── alert_btn_right@2x.png
│ │ ├── alert_btn_right_push.png
│ │ ├── alert_btn_right_push@2x.png
│ │ ├── alert_btn_signal.png
│ │ ├── alert_btn_signal@2x.png
│ │ ├── alert_btn_signal_push.png
│ │ ├── alert_btn_signal_push@2x.png
│ │ ├── alert_line.png
│ │ ├── alert_line@2x.png
│ │ ├── apnavbar.png
│ │ ├── apnavbar@2x.png
│ │ ├── apnavbar_back.png
│ │ ├── apnavbar_back@2x.png
│ │ ├── apnavbar_back_push.png
│ │ ├── apnavbar_back_push@2x.png
│ │ ├── apnavbar_push.png
│ │ ├── apnavbar_push@2x.png
│ │ ├── logo.png
│ │ ├── logo@2x.png
│ │ ├── title.png
│ │ └── title@2x.png
│ │ ├── Util
│ │ ├── DataSigner.h
│ │ ├── DataSigner.m
│ │ ├── DataVerifier.h
│ │ ├── DataVerifier.m
│ │ ├── MD5DataSigner.h
│ │ ├── MD5DataSigner.m
│ │ ├── NSDataEx.h
│ │ ├── NSDataEx.m
│ │ ├── RSADataSigner.h
│ │ ├── RSADataSigner.m
│ │ ├── RSADataVerifier.h
│ │ ├── RSADataVerifier.m
│ │ ├── base64.h
│ │ ├── base64.m
│ │ ├── config.h
│ │ ├── openssl_wrapper.h
│ │ └── openssl_wrapper.m
│ │ ├── json
│ │ ├── JSON.h
│ │ ├── NSObject+SBJSON.h
│ │ ├── NSObject+SBJSON.m
│ │ ├── NSString+SBJSON.h
│ │ ├── NSString+SBJSON.m
│ │ ├── SBJSON.h
│ │ ├── SBJSON.m
│ │ ├── SBJsonBase.h
│ │ ├── SBJsonBase.m
│ │ ├── SBJsonParser.h
│ │ ├── SBJsonParser.m
│ │ ├── SBJsonWriter.h
│ │ └── SBJsonWriter.m
│ │ ├── libcrypto.a
│ │ ├── libssl.a
│ │ └── openssl
│ │ ├── aes.h
│ │ ├── asn1.h
│ │ ├── asn1_mac.h
│ │ ├── asn1t.h
│ │ ├── bio.h
│ │ ├── blowfish.h
│ │ ├── bn.h
│ │ ├── buffer.h
│ │ ├── camellia.h
│ │ ├── cast.h
│ │ ├── cmac.h
│ │ ├── cms.h
│ │ ├── comp.h
│ │ ├── conf.h
│ │ ├── conf_api.h
│ │ ├── crypto.h
│ │ ├── des.h
│ │ ├── des_old.h
│ │ ├── dh.h
│ │ ├── dsa.h
│ │ ├── dso.h
│ │ ├── dtls1.h
│ │ ├── e_os2.h
│ │ ├── ebcdic.h
│ │ ├── ec.h
│ │ ├── ecdh.h
│ │ ├── ecdsa.h
│ │ ├── engine.h
│ │ ├── err.h
│ │ ├── evp.h
│ │ ├── hmac.h
│ │ ├── idea.h
│ │ ├── krb5_asn.h
│ │ ├── kssl.h
│ │ ├── lhash.h
│ │ ├── md4.h
│ │ ├── md5.h
│ │ ├── mdc2.h
│ │ ├── modes.h
│ │ ├── obj_mac.h
│ │ ├── objects.h
│ │ ├── ocsp.h
│ │ ├── opensslconf.h
│ │ ├── opensslv.h
│ │ ├── ossl_typ.h
│ │ ├── pem.h
│ │ ├── pem2.h
│ │ ├── pkcs12.h
│ │ ├── pkcs7.h
│ │ ├── pqueue.h
│ │ ├── rand.h
│ │ ├── rc2.h
│ │ ├── rc4.h
│ │ ├── ripemd.h
│ │ ├── rsa.h
│ │ ├── safestack.h
│ │ ├── seed.h
│ │ ├── sha.h
│ │ ├── srp.h
│ │ ├── srtp.h
│ │ ├── ssl.h
│ │ ├── ssl2.h
│ │ ├── ssl23.h
│ │ ├── ssl3.h
│ │ ├── stack.h
│ │ ├── symhacks.h
│ │ ├── tls1.h
│ │ ├── ts.h
│ │ ├── txt_db.h
│ │ ├── ui.h
│ │ ├── ui_compat.h
│ │ ├── whrlpool.h
│ │ ├── x509.h
│ │ ├── x509_vfy.h
│ │ └── x509v3.h
├── Info.plist
├── en.lproj
│ └── InfoPlist.strings
└── main.m
├── GKCommerceTests
├── GKCommerceTests.m
├── Info.plist
├── Order
│ └── GKOrderServiceImplTests.m
├── Product
│ └── Backend
│ │ └── GKProductBackendAssemblerTest.m
├── User
│ └── Backend
│ │ └── GKUserBackendImplTest.m
└── Utility
│ ├── GKResizerTests.m
│ └── NSString+NSBundleTest.m
├── LICENSE
├── Podfile
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | build/
4 | *.pbxuser
5 | !default.pbxuser
6 | *.mode1v3
7 | !default.mode1v3
8 | *.mode2v3
9 | !default.mode2v3
10 | *.perspectivev3
11 | !default.perspectivev3
12 | xcuserdata
13 | *.xccheckout
14 | *.moved-aside
15 | DerivedData
16 | *.hmap
17 | *.ipa
18 | *.xcuserstate
19 |
20 | Pods/
21 |
22 | Podfile.lock
23 | .DS_Store
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "vendor/GKUserKit"]
2 | path = vendor/GKUserKit
3 | url = https://github.com/gokush/GKUserKit.git
4 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | - 11/22 产品界面
2 | - 11/21 用户登录请求响应
3 | - 11/20 用户认证
4 | - 11/19 用户认证表格,单元格的边框样式,UIView的选择状态。
5 | - 11/18 用户认证的表格
--------------------------------------------------------------------------------
/GKCommerce.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/GKCommerce.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Application.xcassets/tabbar_features.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "tabbar_features.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x",
11 | "filename" : "tabbar_features@2x.png"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x",
16 | "filename" : "tabbar_features@3x.png"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Application.xcassets/tabbar_features.imageset/tabbar_features.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Application.xcassets/tabbar_features.imageset/tabbar_features.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Application.xcassets/tabbar_features.imageset/tabbar_features@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Application.xcassets/tabbar_features.imageset/tabbar_features@2x.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Application.xcassets/tabbar_features.imageset/tabbar_features@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Application.xcassets/tabbar_features.imageset/tabbar_features@3x.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Application.xcassets/tabbar_list.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "tabbar_list.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x",
11 | "filename" : "tabbar_list@2x.png"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x",
16 | "filename" : "tabbar_list@3x.png"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Application.xcassets/tabbar_list.imageset/tabbar_list.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Application.xcassets/tabbar_list.imageset/tabbar_list.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Application.xcassets/tabbar_list.imageset/tabbar_list@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Application.xcassets/tabbar_list.imageset/tabbar_list@2x.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Application.xcassets/tabbar_list.imageset/tabbar_list@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Application.xcassets/tabbar_list.imageset/tabbar_list@3x.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Application.xcassets/tabbar_round.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "round.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x",
11 | "filename" : "round@2x.png"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x",
16 | "filename" : "round@3x.png"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Application.xcassets/tabbar_round.imageset/round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Application.xcassets/tabbar_round.imageset/round.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Application.xcassets/tabbar_round.imageset/round@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Application.xcassets/tabbar_round.imageset/round@2x.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Application.xcassets/tabbar_round.imageset/round@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Application.xcassets/tabbar_round.imageset/round@3x.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Application.xcassets/tabbar_shopping.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "tab_shopping.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x",
11 | "filename" : "tab_shopping@2x.png"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x",
16 | "filename" : "tab_shopping@3x.png"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Application.xcassets/tabbar_shopping.imageset/tab_shopping.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Application.xcassets/tabbar_shopping.imageset/tab_shopping.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Application.xcassets/tabbar_shopping.imageset/tab_shopping@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Application.xcassets/tabbar_shopping.imageset/tab_shopping@2x.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Application.xcassets/tabbar_shopping.imageset/tab_shopping@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Application.xcassets/tabbar_shopping.imageset/tab_shopping@3x.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Cart.xcassets/cart_decrement.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "cart_decrement.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x",
11 | "filename" : "cart_decrement@2x.png"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Cart.xcassets/cart_decrement.imageset/cart_decrement.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Cart.xcassets/cart_decrement.imageset/cart_decrement.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Cart.xcassets/cart_decrement.imageset/cart_decrement@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Cart.xcassets/cart_decrement.imageset/cart_decrement@2x.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Cart.xcassets/cart_increment.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "cart_increment.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x",
11 | "filename" : "cart_increment@2x.png"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Cart.xcassets/cart_increment.imageset/cart_increment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Cart.xcassets/cart_increment.imageset/cart_increment.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Cart.xcassets/cart_increment.imageset/cart_increment@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Cart.xcassets/cart_increment.imageset/cart_increment@2x.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Cart.xcassets/cart_select.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "cart_select.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x",
11 | "filename" : "cart_select@2x.png"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Cart.xcassets/cart_select.imageset/cart_select.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Cart.xcassets/cart_select.imageset/cart_select.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Cart.xcassets/cart_select.imageset/cart_select@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Cart.xcassets/cart_select.imageset/cart_select@2x.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Cart.xcassets/cart_selected.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "cart_selected.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x",
11 | "filename" : "cart_selected@2x.png"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Cart.xcassets/cart_selected.imageset/cart_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Cart.xcassets/cart_selected.imageset/cart_selected.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Cart.xcassets/cart_selected.imageset/cart_selected@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Cart.xcassets/cart_selected.imageset/cart_selected@2x.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Cart.xcassets/checkout_location.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x"
10 | },
11 | {
12 | "idiom" : "universal",
13 | "scale" : "3x",
14 | "filename" : "booking_location@3x.png"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Cart.xcassets/checkout_location.imageset/booking_location@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Cart.xcassets/checkout_location.imageset/booking_location@3x.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-40.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-72.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-76.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-Small-20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-Small-20.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-Small-20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-Small-20@2x.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-Small-30.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-Small-30.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-Small-30@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-Small-30@2x.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-Small-50.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-Small-50.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-Small-50@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-Small-50@2x.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-Small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-Small.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-Small@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon-Small@3x.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/Icon@2x.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/apple-touch-icon-114x114-precomposed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/apple-touch-icon-114x114-precomposed.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/apple-touch-icon-144x144-precomposed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/apple-touch-icon-144x144-precomposed.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/apple-touch-icon-72x72-precomposed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/apple-touch-icon-72x72-precomposed.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/apple-touch-icon-precomposed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/apple-touch-icon-precomposed.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/iTunesArtwork.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/iTunesArtwork.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/iTunesArtwork@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Images.xcassets/AppIcon.appiconset/iTunesArtwork@2x.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Mine.xcassets/mine_header_photo.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "mine_header_photo.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x",
11 | "filename" : "mine_header_photo@2x.png"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Mine.xcassets/mine_header_photo.imageset/mine_header_photo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Mine.xcassets/mine_header_photo.imageset/mine_header_photo.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Mine.xcassets/mine_header_photo.imageset/mine_header_photo@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Mine.xcassets/mine_header_photo.imageset/mine_header_photo@2x.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Mine.xcassets/mine_icon_about.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "mine_icon_about.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x",
11 | "filename" : "mine_icon_about@2x.png"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Mine.xcassets/mine_icon_about.imageset/mine_icon_about.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Mine.xcassets/mine_icon_about.imageset/mine_icon_about.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Mine.xcassets/mine_icon_about.imageset/mine_icon_about@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Mine.xcassets/mine_icon_about.imageset/mine_icon_about@2x.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Mine.xcassets/mine_icon_account.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "mine_icon_charge.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x",
11 | "filename" : "mine_icon_charge@2x.png"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Mine.xcassets/mine_icon_account.imageset/mine_icon_charge.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Mine.xcassets/mine_icon_account.imageset/mine_icon_charge.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Mine.xcassets/mine_icon_account.imageset/mine_icon_charge@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Mine.xcassets/mine_icon_account.imageset/mine_icon_charge@2x.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Mine.xcassets/mine_icon_address.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "mine_icon_address.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x",
11 | "filename" : "mine_icon_address@2x.png"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Mine.xcassets/mine_icon_address.imageset/mine_icon_address.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Mine.xcassets/mine_icon_address.imageset/mine_icon_address.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Mine.xcassets/mine_icon_address.imageset/mine_icon_address@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Mine.xcassets/mine_icon_address.imageset/mine_icon_address@2x.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Mine.xcassets/mine_icon_community.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "mine_icon_community.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x",
11 | "filename" : "mine_icon_community@2x.png"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Mine.xcassets/mine_icon_community.imageset/mine_icon_community.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Mine.xcassets/mine_icon_community.imageset/mine_icon_community.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Mine.xcassets/mine_icon_community.imageset/mine_icon_community@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Mine.xcassets/mine_icon_community.imageset/mine_icon_community@2x.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Mine.xcassets/mine_icon_favor.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "mine_icon_favor.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x",
11 | "filename" : "mine_icon_favor@2x.png"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Mine.xcassets/mine_icon_favor.imageset/mine_icon_favor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Mine.xcassets/mine_icon_favor.imageset/mine_icon_favor.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Mine.xcassets/mine_icon_favor.imageset/mine_icon_favor@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Mine.xcassets/mine_icon_favor.imageset/mine_icon_favor@2x.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Mine.xcassets/mine_icon_feedback.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "mine_icon_feedback.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x",
11 | "filename" : "mine_icon_feedback@2x.png"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Mine.xcassets/mine_icon_feedback.imageset/mine_icon_feedback.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Mine.xcassets/mine_icon_feedback.imageset/mine_icon_feedback.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Mine.xcassets/mine_icon_feedback.imageset/mine_icon_feedback@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Mine.xcassets/mine_icon_feedback.imageset/mine_icon_feedback@2x.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Mine.xcassets/mine_icon_order.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "mine_icon_order.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x",
11 | "filename" : "mine_icon_order@2x.png"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Mine.xcassets/mine_icon_order.imageset/mine_icon_order.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Mine.xcassets/mine_icon_order.imageset/mine_icon_order.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Mine.xcassets/mine_icon_order.imageset/mine_icon_order@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Mine.xcassets/mine_icon_order.imageset/mine_icon_order@2x.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Product.xcassets/product_favor.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "product_favor.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x",
11 | "filename" : "product_favor@2x.png"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Product.xcassets/product_favor.imageset/product_favor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Product.xcassets/product_favor.imageset/product_favor.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Product.xcassets/product_favor.imageset/product_favor@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Product.xcassets/product_favor.imageset/product_favor@2x.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Product.xcassets/product_favor_selected.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "product_favor_selected.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x",
11 | "filename" : "product_favor_selected@2x.png"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Product.xcassets/product_favor_selected.imageset/product_favor_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Product.xcassets/product_favor_selected.imageset/product_favor_selected.png
--------------------------------------------------------------------------------
/GKCommerce/AssetCatalog/Product.xcassets/product_favor_selected.imageset/product_favor_selected@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/AssetCatalog/Product.xcassets/product_favor_selected.imageset/product_favor_selected@2x.png
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce.xcdatamodeld/.xccurrentversion:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | _XCCurrentVersionName
6 | GKCommerce.xcdatamodel
7 |
8 |
9 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce.xcdatamodeld/GKCommerce.xcdatamodel/contents:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Address/Address/Controller/AddressController.h:
--------------------------------------------------------------------------------
1 | //
2 | // AddressController.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/15/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "Address.h"
11 |
12 | @interface AddressController : UIViewController
13 |
14 |
15 | @property (strong, nonatomic) IBOutlet UITableView *tableView;
16 | @property (strong, nonatomic) Address *address;
17 | @property (strong, nonatomic) User *user;
18 |
19 | - (id)initWithAddress:(Address *)address user:(User *)anUser;
20 | + (instancetype)addressControllerWithMock;
21 | @end
22 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Address/Address/TableViewCell/AddressTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // AddressTableViewCell.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/15/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AddressTableViewCell : UITableViewCell
12 |
13 | @property (strong, nonatomic) IBOutlet UILabel *titleLabel;
14 | @property (strong, nonatomic) IBOutlet UILabel *contentLabel;
15 | @end
16 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Address/Address/TableViewCell/AddressTableViewCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // AddressTableViewCell.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/15/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "AddressTableViewCell.h"
10 |
11 | @implementation AddressTableViewCell
12 |
13 | - (void)awakeFromNib
14 | {
15 | }
16 |
17 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated
18 | {
19 | [super setSelected:selected animated:animated];
20 | }
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Address/AddressDefines.h:
--------------------------------------------------------------------------------
1 | //
2 | // Address.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/15/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef enum {
12 | AddressNameCell,
13 | AddressCellPhoneCell,
14 | AddressPostcodeCell,
15 | AddressRegionCell,
16 | AddressStreetCell
17 | } AddressCell;
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Address/AddressEdit/TableViewCell/AddressEditInputTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // AddressEditInputTableViewCell.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14/11/7.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "Address.h"
11 | #import "UIBindableTableViewCell.h"
12 |
13 | @interface AddressEditInputTableViewCell : UITableViewCell
14 |
15 |
16 | @property (strong, nonatomic) IBOutlet UITextField *inputTextField;
17 | @property (strong, nonatomic) Address *address;
18 | @end
19 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Address/AddressList/Controller/AddressListController.h:
--------------------------------------------------------------------------------
1 | //
2 | // AddressListController.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/15/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "Address.h"
11 |
12 | @interface AddressListController : UIViewController
13 |
14 |
15 | @property (strong, nonatomic) User *user;
16 | @property (strong, nonatomic) NSArray *addresses;
17 | @property (strong, nonatomic) IBOutlet UITableView *tableView;
18 | - (id)initWithAddress:(NSArray *)addresses;
19 | - (id)initWithUser:(User *)user;
20 | + (instancetype)addressListControllerWithMock;
21 | @end
22 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Address/AddressList/TableView/AddressListTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // AddressListTableViewCell.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/15/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "Address.h"
11 | #import "AddressListTableViewCellSelected.h"
12 |
13 | @interface AddressListTableViewCell : UITableViewCell
14 |
15 | @property (strong, nonatomic) Address *address;
16 | @property (strong, nonatomic) IBOutlet UILabel *nameLabel;
17 | @property (strong, nonatomic) IBOutlet UILabel *cellPhoneLabel;
18 | @property (strong, nonatomic) IBOutlet UILabel *addressLabel;
19 | @property (strong, nonatomic) IBOutlet AddressListTableViewCellSelected
20 | *selectedView;
21 | @end
22 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Address/AddressList/TableView/AddressListTableViewCellSelected.h:
--------------------------------------------------------------------------------
1 | //
2 | // AddressTableViewCellSelected.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/15/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AddressListTableViewCellSelected : UIView
12 |
13 | @property (assign, nonatomic) BOOL selected;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Address/AddressService.h:
--------------------------------------------------------------------------------
1 | //
2 | // AddressService.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 12/15/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AddressServiceDelegate.h"
11 |
12 | @protocol AddressService
13 |
14 | @property (strong, nonatomic) id delegate;
15 | - (void)addressesWithUser:(User *)user;
16 | - (void)addressWithID:(NSInteger)addressID user:(User *)anUser;
17 | @end
18 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Address/AddressServiceDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AddressServiceDelegate.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 12/15/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @protocol AddressService;
12 | @protocol AddressServiceDelegate
13 |
14 | @optional
15 | - (void)addressService:(id)anAddressService
16 | user:(User *)anUser addresses:(NSArray *)anAddresses
17 | error:(NSError *)anError;
18 |
19 | - (void)addressService:(id)anAddressService
20 | user:(User *)anUser address:(Address *)anAddress
21 | error:(NSError *)anError;
22 | @end
23 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Address/Backend/AddressBackend.h:
--------------------------------------------------------------------------------
1 | //
2 | // AddressBackend.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 12/15/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AddressBackendDelegate.h"
11 | #import "Address.h"
12 |
13 | @protocol AddressBackend
14 |
15 | @property (strong, nonatomic) id delegate;
16 | - (void)requestAddressesWithUser:(User *)user;
17 | - (void)requestAddressWithID:(NSInteger)addressID user:(User *)user;
18 | @end
19 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Address/Backend/AddressBackendDelegate.h:
--------------------------------------------------------------------------------
1 |
2 | //
3 | // AddressBackendDelegate.h
4 | // GKCommerce
5 | //
6 | // Created by 小悟空 on 12/15/14.
7 | // Copyright (c) 2014 GKCommerce. All rights reserved.
8 | //
9 |
10 | #import
11 |
12 | @class Address;
13 | @protocol AddressBackend;
14 | @protocol AddressBackendDelegate
15 |
16 | - (void)addressBackend:(id)anAddressBackend user:(User *)anUser
17 | didReceiveAddresses:(NSArray *)addresses error:(NSError *)anError;
18 |
19 | - (void)addressBackend:(id)anAddressBackend user:(User *)anUser
20 | didReceiveAddress:(Address *)address error:(NSError *)anError;
21 | @end
22 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Address/Infrastructure/PDAddressBackend.h:
--------------------------------------------------------------------------------
1 | //
2 | // AddressBackend.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14/11/7.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "Address.h"
11 | #import "PDRegionAssembler.h"
12 |
13 | @class PDAddressBackend;
14 |
15 | @protocol PDAddressBackendDelegate
16 |
17 | @optional
18 | - (void)addressBackend:(PDAddressBackend *)anAddressBackend
19 | didReceiveRegions:(NSArray *)regions;
20 | @end
21 |
22 |
23 | @interface PDAddressBackend : NSObject
24 |
25 | @property (strong, nonatomic) id delegate;
26 | @property (strong, nonatomic) PDRegionAssembler *assembler;
27 | - (void)requestRegions;
28 | @end
29 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Address/Infrastructure/PDRegionAssembler.h:
--------------------------------------------------------------------------------
1 | //
2 | // AreaJSONAssembler.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14/11/14.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "Region.h"
11 |
12 | @interface PDRegionAssembler : NSObject
13 |
14 | - (NSArray *)fromJSON:(NSArray *)areaJSON parent:(Region *)aParent;
15 | @end
16 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Address/Model/Address.h:
--------------------------------------------------------------------------------
1 | //
2 | // Address.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14/11/7.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "Region.h"
11 |
12 | @interface Address : NSObject
13 |
14 | @property (assign, nonatomic) NSInteger addressID;
15 | @property (strong, nonatomic) NSString *name;
16 | @property (strong, nonatomic) NSString *cellPhone;
17 | @property (strong, nonatomic) NSString *postcode;
18 | @property (strong, nonatomic) NSString *address;
19 | @property (strong, nonatomic) Region *province;
20 | @property (strong, nonatomic) Region *city;
21 | @property (strong, nonatomic) Region *district;
22 | @property (assign, nonatomic) BOOL isDefault;
23 | @end
24 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Address/Model/Address.m:
--------------------------------------------------------------------------------
1 | //
2 | // Address.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14/11/7.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "Address.h"
10 |
11 | @implementation Address
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Address/Model/Region.h:
--------------------------------------------------------------------------------
1 | //
2 | // Area.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14/11/7.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef enum {
12 | RegionTypeProvince,
13 | RegionTypeCity,
14 | RegionTypeDistrict
15 | } RegionType;
16 |
17 | @interface Region : NSObject
18 |
19 | @property (assign, nonatomic) NSInteger areaID;
20 | @property (strong, nonatomic) NSString *name;
21 | @property (weak, nonatomic) Region *parent;
22 | @property (strong, nonatomic) NSArray *children;
23 | @property (assign, nonatomic) RegionType type;
24 | @end
25 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Address/Model/Region.m:
--------------------------------------------------------------------------------
1 | //
2 | // Area.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14/11/7.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "Region.h"
10 |
11 | @implementation Region
12 |
13 | - (NSString *)description
14 | {
15 | NSMutableString *description;
16 | if (self.parent)
17 | description = [[NSMutableString alloc]
18 | initWithString:[self.parent description]];
19 | else
20 | description = [[NSMutableString alloc] init];
21 |
22 | [description appendString:self.name];
23 |
24 | return description;
25 | }
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/App/GKServiceMock.h:
--------------------------------------------------------------------------------
1 | //
2 | // ServiceMock.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 1/22/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface GKServiceMock : NSObject
12 |
13 | - (NSDictionary *)loadJSON:(NSString *)jsonName;
14 | @end
15 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/App/GKServiceMock.m:
--------------------------------------------------------------------------------
1 | //
2 | // ServiceMock.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 1/22/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "GKServiceMock.h"
10 |
11 | @implementation GKServiceMock
12 |
13 | - (NSDictionary *)loadJSON:(NSString *)jsonName
14 | {
15 | NSData *data;
16 | NSString *path;
17 | NSError *error;
18 |
19 | path = [[NSBundle mainBundle] pathForResource:jsonName ofType:@"json"];
20 | data = [NSData dataWithContentsOfFile:path];
21 | NSDictionary *JSON = [NSJSONSerialization
22 | JSONObjectWithData:data
23 | options:NSJSONReadingMutableContainers
24 | error:&error];
25 | return JSON;
26 | }
27 | @end
28 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/App/Model/App.h:
--------------------------------------------------------------------------------
1 | //
2 | // App.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/20/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface App : NSObject
12 |
13 | @property (strong, nonatomic) NSMutableArray *users;
14 | @property (strong, nonatomic) GKUser *currentUser;
15 |
16 | + (instancetype)shared;
17 | @end
18 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/App/Model/App.m:
--------------------------------------------------------------------------------
1 | //
2 | // App.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/20/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "App.h"
10 |
11 | @implementation App
12 |
13 | + (instancetype)shared
14 | {
15 | static App *_shared = nil;
16 | static dispatch_once_t onceToken;
17 | dispatch_once(&onceToken, ^{
18 | _shared = [[self alloc] init];
19 | });
20 | return _shared;
21 | }
22 | @end
23 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/App/Model/GKConfig.h:
--------------------------------------------------------------------------------
1 | //
2 | // Config.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/21/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #define PartnerID @""
12 | //收款支付宝账号
13 | #define SellerID @""
14 |
15 | //安全校验码(MD5)密钥,以数字和字母组成的32位字符
16 | #define MD5_KEY @""
17 |
18 | //商户私钥,自助生成
19 | #define PartnerPrivKey @""
20 |
21 | //支付宝公钥
22 | #define AlipayPubKey @""
23 |
24 | @interface GKConfig : NSObject
25 |
26 | @property (assign, nonatomic) BOOL demostrate;
27 | @property (strong, nonatomic) NSString *backendURL;
28 | @property (strong, nonatomic) NSString *OAuthAccessTokenURL;
29 | + (instancetype)shared;
30 | @end
31 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/App/Model/GKConfig.m:
--------------------------------------------------------------------------------
1 | //
2 | // Config.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/21/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "GKConfig.h"
10 |
11 | @implementation GKConfig
12 |
13 | - (id)init
14 | {
15 | self = [super init];
16 | if (self) {
17 | self.demostrate = YES;
18 | }
19 | return self;
20 | }
21 |
22 | + (instancetype)shared
23 | {
24 | static GKConfig *_shared = nil;
25 | static dispatch_once_t onceToken;
26 | dispatch_once(&onceToken, ^{
27 | _shared = [[self alloc] init];
28 | });
29 | return _shared;
30 | }
31 | @end
32 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/App/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14/11/7.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/App/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14/11/7.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | @interface ViewController ()
12 |
13 | @end
14 |
15 | @implementation ViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do any additional setup after loading the view, typically from a nib.
20 | }
21 |
22 | - (void)didReceiveMemoryWarning {
23 | [super didReceiveMemoryWarning];
24 | // Dispose of any resources that can be recreated.
25 | }
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Backend/Backend.h:
--------------------------------------------------------------------------------
1 | //
2 | // Backend.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/21/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import "GKConfig.h"
12 |
13 | @interface Backend : NSObject
14 |
15 | @property (strong, nonatomic) GKConfig *config;
16 | @property (strong, nonatomic) AFHTTPRequestOperationManager *manager;
17 | @end
18 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Backend/Backend.m:
--------------------------------------------------------------------------------
1 | //
2 | // Backend.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/21/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "Backend.h"
10 |
11 | @implementation Backend
12 |
13 | - (id)init
14 | {
15 | self = [super init];
16 | if (self) {
17 | self.config = [GKConfig shared];
18 | self.manager = [AFHTTPRequestOperationManager manager];
19 | [self.manager.requestSerializer setValue:@"application/json" forHTTPHeaderField:@"accept"];
20 | }
21 | return self;
22 | }
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Backend/ECBackendAssembler.h:
--------------------------------------------------------------------------------
1 | //
2 | // ECBackendAssembler.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/21/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ECBackendAssembler : NSObject
12 |
13 | - (NSError *)error:(NSDictionary *)JSON;
14 | - (NSString *)digitalWithString:(NSString *)string;
15 | @end
16 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Cart/Backend/CartBackend.h:
--------------------------------------------------------------------------------
1 | //
2 | // CartBackend.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/23/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "CartBackendDelegate.h"
11 |
12 | @protocol CartBackend
13 |
14 | @required
15 | @property (strong, nonatomic) id delegate;
16 | - (void)requestCartWithUser:(GKUser *)user;
17 | - (void)requestAddItem:(CartItem *)item;
18 | - (void)requestUpdateItem:(CartItem *)item oldQuantity:(NSInteger)anOldQuantity;
19 | - (void)requestRemoveItem:(CartItem *)item;
20 | @end
21 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Cart/Backend/ECCartBackendAssembler.h:
--------------------------------------------------------------------------------
1 | //
2 | // ECCartBackendAssembler.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/23/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "ECBackendAssembler.h"
10 | #import "ECProductBackendAssembler.h"
11 |
12 | @interface ECCartBackendAssembler : ECBackendAssembler
13 |
14 | @property (strong, nonatomic) ECProductBackendAssembler *productAssembler;
15 |
16 | - (Cart *)cartWithJSON:(NSDictionary *)JSON user:(GKUser *)anUser;
17 | @end
18 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Cart/Backend/GKCartBackend.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKCartBackend.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 1/31/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @protocol GKCartBackend
12 |
13 | - (RACSignal *)requestCartWithUser:(GKUser *)user;
14 | - (RACSignal *)requestAddItem:(CartItem *)item;
15 | - (RACSignal *)requestUpdateItem:(CartItem *)item
16 | oldQuantity:(NSInteger)anOldQuantity;
17 | - (RACSignal *)requestRemoveItem:(CartItem *)item;
18 | @end
19 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Cart/CartRepository.h:
--------------------------------------------------------------------------------
1 | //
2 | // CartRepository.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/23/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CartRepository : NSObject
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Cart/CartRepository.m:
--------------------------------------------------------------------------------
1 | //
2 | // CartRepository.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/23/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "CartRepository.h"
10 |
11 | @implementation CartRepository
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Cart/Controller/CartEmptyViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // CartEmptyViewController.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 12/6/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CartEmptyViewController : UIViewController
12 |
13 | @property (strong, nonatomic) IBOutlet UILabel *titleLabel;
14 | @property (strong, nonatomic) IBOutlet GKButton *actionButton;
15 | @property (assign, nonatomic) BOOL authenticated;
16 | + (instancetype)shared;
17 | @end
18 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Cart/Controller/Model/CartItemListViewModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // CartItemListViewModel.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 12/9/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CartItemListViewModel : NSObject
12 |
13 | /**
14 | * YES就是显示购物车商品的数量调整面板
15 | */
16 | @property (assign, nonatomic) BOOL editing;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Cart/Controller/Model/CartItemListViewModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // CartItemListViewModel.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 12/9/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "CartItemListViewModel.h"
10 |
11 | @implementation CartItemListViewModel
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Cart/Controller/Model/CartViewModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // CartViewModel.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 12/9/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "CartItemListViewModel.h"
11 |
12 | @interface CartViewModel : NSObject
13 |
14 | @property (weak, nonatomic) Cart *cart;
15 | @property (strong, nonatomic) NSMutableArray *list;
16 | - (id)initWithCart:(Cart *)cart;
17 | @end
18 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Cart/GKCartBackendImpl.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKCartBackendImpl.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 1/31/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "Backend.h"
10 | #import "GKCartBackend.h"
11 |
12 | @interface GKCartBackendImpl : Backend
13 |
14 | - (RACSignal *)requestCartWithUser:(GKUser *)user;
15 | - (RACSignal *)requestAddItem:(CartItem *)item;
16 | - (RACSignal *)requestUpdateItem:(CartItem *)item
17 | oldQuantity:(NSInteger)anOldQuantity;
18 | - (RACSignal *)requestRemoveItem:(CartItem *)item;
19 | @end
20 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Cart/GKCartService.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKCartService.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 1/31/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GKUser.h"
11 |
12 | @protocol GKCartService
13 |
14 | - (RACSignal *)fetchCartWithUser:(GKUser *)user;
15 | - (RACSignal *)addItem:(CartItem *)item;
16 | - (RACSignal *)addItemWithProduct:(Product *)product cart:(Cart *)aCart;
17 | - (RACSignal *)updateItem:(CartItem *)item oldQuantity:(NSInteger)anOldQuantity;
18 | - (RACSignal *)removeItem:(CartItem *)item;
19 | - (RACSignal *)removeItems:(NSArray *)items;
20 | @end
21 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Cart/GKCartServiceImpl.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKCartServiceImpl.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 1/31/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GKCartService.h"
11 |
12 | @interface GKCartServiceImpl : NSObject
13 |
14 | - (RACSignal *)fetchCartWithUser:(GKUser *)user;
15 | - (RACSignal *)addItem:(CartItem *)item;
16 | - (RACSignal *)addItemWithProduct:(Product *)product cart:(Cart *)aCart;
17 | - (RACSignal *)updateItem:(CartItem *)item oldQuantity:(NSInteger)anOldQuantity;
18 | - (RACSignal *)removeItem:(CartItem *)item;
19 | - (RACSignal *)removeItems:(NSArray *)items;
20 | @end
21 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Cart/GKCartServiceMock.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKCartServiceMock.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 1/31/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface GKCartServiceMock : NSObject
12 |
13 | - (RACSignal *)fetchCartWithUser:(GKUser *)user;
14 | - (RACSignal *)addItem:(CartItem *)item;
15 | - (RACSignal *)addItemWithProduct:(Product *)product cart:(Cart *)aCart;
16 | - (RACSignal *)updateItem:(CartItem *)item oldQuantity:(NSInteger)anOldQuantity;
17 | - (RACSignal *)removeItem:(CartItem *)item;
18 | - (RACSignal *)removeItems:(NSArray *)items;
19 | @end
20 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Cart/Model/Invoice.h:
--------------------------------------------------------------------------------
1 | //
2 | // Invoice.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14/11/4.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "InvoiceContent.h"
11 |
12 | @interface Invoice : NSObject
13 |
14 | @property (assign, nonatomic) NSInteger invoiceID;
15 | @property (strong, nonatomic) NSString *name;
16 | @property (strong, nonatomic) NSString *title;
17 | @property (strong, nonatomic) InvoiceContent *content;
18 | // TODO: contents 会有很多重复的对象
19 | // TODO: 如有非图书和图书的发票,两种不同的类型有不同的发票内容
20 | @property (strong, nonatomic) NSMutableArray *contents;
21 | @end
22 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Cart/Model/Invoice.m:
--------------------------------------------------------------------------------
1 | //
2 | // Invoice.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14/11/4.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "Invoice.h"
10 |
11 | @implementation Invoice
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Cart/Model/InvoiceContent.h:
--------------------------------------------------------------------------------
1 | //
2 | // InvoiceContent.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14/11/4.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface InvoiceContent : NSObject
12 |
13 | @property (assign, nonatomic) NSInteger invoiceContentID;
14 | @property (strong, nonatomic) NSString *name;
15 | @end
16 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Cart/Model/InvoiceContent.m:
--------------------------------------------------------------------------------
1 | //
2 | // InvoiceContent.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14/11/4.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "InvoiceContent.h"
10 |
11 | @implementation InvoiceContent
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Cart/TableViewCell/CartItemOverviewTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // CartItemOverviewTableViewCell.h
3 | // goku-commerce.com
4 | //
5 | // Created by 小悟空 on 14-8-4.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "Cart.h"
11 | #import "UIBindableTableViewCell.h"
12 |
13 | @interface CartItemOverviewTableViewCell : UITableViewCell
14 |
15 |
16 | @property (nonatomic, strong) IBOutlet UILabel *overview;
17 | @property (nonatomic, strong) IBOutlet UILabel *price;
18 | @property (nonatomic, strong) CartItemList *list;
19 | - (void)bind;
20 | - (void)unbind;
21 | @end
22 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Cart/View/GKQuantityView.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKQuantityView.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 12/7/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "GKView.h"
10 |
11 | @interface GKQuantityView : GKView
12 |
13 | @property (strong, nonatomic) IBOutlet UITextField *quantityTextField;
14 | @end
15 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Checkout/Backend/GKCheckoutBackend.h:
--------------------------------------------------------------------------------
1 | //
2 | // CheckoutBackend.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 12/15/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @protocol GKCheckoutBackend
12 | - (RACSignal *)requestCheckout:(Cart *)cart;
13 | @end
14 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Checkout/Backend/GKCheckoutBackendDemostration.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKCheckoutBackendDemostration.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 3/9/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GKCheckoutBackend.h"
11 |
12 | @interface GKCheckoutBackendDemostration : NSObject
13 |
14 | @property (assign, nonatomic) BOOL foreverSuccess;
15 | - (RACSignal *)requestCheckout:(Cart *)cart;
16 | @end
17 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Checkout/Controller/CheckoutChoiceAddressController.h:
--------------------------------------------------------------------------------
1 | //
2 | // CheckoutChoiceAddressController.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 3/31/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CheckoutChoiceAddressController : UIViewController
12 |
13 |
14 | @property (strong, nonatomic) IBOutlet UITableView *tableView;
15 | @property (strong, nonatomic) NSArray *addresses;
16 | @property (strong, nonatomic) RACSubject *chosen;
17 | @end
18 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Checkout/Controller/InvoiceViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // InvoiceViewController.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14/11/4.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "Cart.h"
11 |
12 | @interface InvoiceViewController : UIViewController
13 |
14 |
15 | @property (strong, nonatomic) Cart *cart;
16 | @property (strong, nonatomic) IBOutlet UITableView *tableView;
17 | - (id)initWithCart:(Cart *)cart;
18 | - (IBAction)didTapConfirm:(id)sender;
19 | @end
20 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Checkout/Controller/ShippingViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ShippingViewController.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14/11/3.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ShippingViewController : UIViewController
12 |
13 |
14 | @property (strong, nonatomic) UITableView *tableView;
15 | @property (strong, nonatomic) NSArray *shippings;
16 | @property (weak, nonatomic) NSObject *order;
17 |
18 | - (id)initWithShippings:(NSArray *)shippings order:(NSObject *)aOrder;
19 | @end
20 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Checkout/GKCheckoutService.h:
--------------------------------------------------------------------------------
1 | //
2 | // CheckoutService.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 3/9/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GKCheckoutBackend.h"
11 |
12 | @protocol GKCheckoutService
13 |
14 | @property (strong, nonatomic) id backend;
15 | - (RACSignal *)checkout:(Cart *)cart;
16 | @end
17 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Checkout/GKCheckoutServiceImpl.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKCheckoutServiceImpl.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 3/9/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GKCheckoutService.h"
11 |
12 | @interface GKCheckoutServiceImpl : NSObject
13 |
14 | @property (strong, nonatomic) id backend;
15 | - (RACSignal *)checkout:(Cart *)cart;
16 | @end
17 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Checkout/GKCheckoutServiceImpl.m:
--------------------------------------------------------------------------------
1 | //
2 | // GKCheckoutServiceImpl.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 3/9/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "GKCheckoutServiceImpl.h"
10 | #import
11 |
12 | @implementation GKCheckoutServiceImpl
13 |
14 | objection_requires_sel(@selector(backend))
15 |
16 | - (RACSignal *)checkout:(Cart *)cart
17 | {
18 | return [self.backend requestCheckout:cart];
19 | // return
20 | // [RACSignal createSignal:^RACDisposable *(id subscriber) {
21 | //
22 | // return (RACDisposable *)nil;
23 | // }];
24 | }
25 | @end
26 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Checkout/Provider/CheckoutViewControllerProvider.h:
--------------------------------------------------------------------------------
1 | //
2 | // CheckoutViewControllerProvider.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 3/9/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CheckoutViewControllerProvider : NSObject
12 | @end
13 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Checkout/Provider/CheckoutViewControllerProvider.m:
--------------------------------------------------------------------------------
1 | //
2 | // CheckoutViewControllerProvider.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 3/9/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "CheckoutViewControllerProvider.h"
10 | #import "CheckoutViewController.h"
11 |
12 | @implementation CheckoutViewControllerProvider
13 |
14 | - (id)provide:(JSObjectionInjector *)context arguments:(NSArray *)arguments
15 | {
16 | CheckoutViewController *controller;
17 | controller = [[CheckoutViewController alloc] initWithUser:arguments[0]
18 | cart:arguments[1]];
19 |
20 | [context injectDependencies:controller];
21 | return controller;
22 | }
23 | @end
24 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Checkout/TableViewCell/CheckoutAddressTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // CheckoutAddressTableViewCell.h
3 | // goku-commerce.com
4 | //
5 | // Created by 小悟空 on 14-8-23.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CheckoutAddressTableViewCell : UITableViewCell
12 |
13 | @property (strong, nonatomic) IBOutlet UILabel *nameLabel;
14 | @property (strong, nonatomic) IBOutlet UILabel *addressLabel;
15 | @property (strong, nonatomic) IBOutlet UILabel *phoneNumberLabel;
16 | @property (strong, nonatomic) GKAddress *address;
17 |
18 | + (CGFloat)heightWithAddress:(GKAddress *)address;
19 | @end
20 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Checkout/TableViewCell/CheckoutCartOverviewTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // CheckoutProductOverviewTableViewCell.h
3 | // goku-commerce.com
4 | //
5 | // Created by 小悟空 on 14-8-23.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CheckoutCartOverviewTableViewCell : UITableViewCell
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Checkout/TableViewCell/CheckoutChoiceAddressTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // CheckoutChoiceAddressTableViewCell.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 3/30/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CheckoutChoiceAddressTableViewCell : UITableViewCell
12 |
13 | @property (strong, nonatomic) IBOutlet UILabel *nameLabel;
14 | @property (strong, nonatomic) IBOutlet UILabel *phoneNumberLabel;
15 | @property (strong, nonatomic) IBOutlet UILabel *addressLabel;
16 |
17 | @property (strong, nonatomic) IBOutlet
18 | NSLayoutConstraint *mobilePhoneNumberTrailling;
19 | @property (strong, nonatomic) IBOutlet NSLayoutConstraint *addressTrailling;
20 | @end
21 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Checkout/TableViewCell/CheckoutChoiceAddressTableViewCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // CheckoutChoiceAddressTableViewCell.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 3/30/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "CheckoutChoiceAddressTableViewCell.h"
10 |
11 | @implementation CheckoutChoiceAddressTableViewCell
12 |
13 | - (void)awakeFromNib {
14 | // Initialization code
15 | }
16 |
17 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
18 | [super setSelected:selected animated:animated];
19 |
20 | // Configure the view for the selected state
21 | }
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Checkout/TableViewCell/CheckoutInputTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // CheckoutInputTableViewCell.h
3 | // goku-commerce.com
4 | //
5 | // Created by 小悟空 on 14-8-23.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CheckoutInputTableViewCell : UITableViewCell
12 |
13 | @property (strong, nonatomic) IBOutlet UILabel *label;
14 | @property (strong, nonatomic) IBOutlet UITextField *input;
15 | @end
16 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Checkout/TableViewCell/CheckoutInputTableViewCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // CheckoutInputTableViewCell.m
3 | // goku-commerce.com
4 | //
5 | // Created by 小悟空 on 14-8-23.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import "CheckoutInputTableViewCell.h"
10 |
11 | @implementation CheckoutInputTableViewCell
12 |
13 | - (void)awakeFromNib
14 | {
15 | }
16 |
17 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated
18 | {
19 | [super setSelected:selected animated:animated];
20 |
21 | // Configure the view for the selected state
22 | }
23 | @end
24 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Checkout/TableViewCell/CheckoutInvoiceTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // InvoiceTableViewCell.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14/11/4.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "Invoice.h"
11 | #import "UIBindableTableViewCell.h"
12 |
13 | @interface CheckoutInvoiceTableViewCell : UITableViewCell
14 |
15 |
16 | @property (strong, nonatomic) IBOutlet UILabel *descriptionLabel;
17 | @property (strong, nonatomic) Cart *cart;
18 | @end
19 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Checkout/TableViewCell/CheckoutMessageTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // CheckoutMessageTableViewCell.h
3 | // goku-commerce.com
4 | //
5 | // Created by 小悟空 on 14-8-23.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | // TODO: miss custom TextFieldDelegate
12 | @interface CheckoutMessageTableViewCell : UITableViewCell
13 |
14 |
15 | @property (strong, nonatomic) id delegate;
16 | @end
17 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Checkout/TableViewCell/CheckoutMessageTableViewCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // CheckoutMessageTableViewCell.m
3 | // goku-commerce.com
4 | //
5 | // Created by 小悟空 on 14-8-23.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import "CheckoutMessageTableViewCell.h"
10 |
11 | @implementation CheckoutMessageTableViewCell
12 |
13 | - (void)textFieldDidBeginEditing:(UITextField *)textField
14 | {
15 | // if ([self.delegate respondsToSelector:@selector(textField:didGainFocus:)])
16 | // [self.delegate textField:textField didGainFocus:YES];
17 | }
18 | @end
19 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Checkout/TableViewCell/CheckoutPaymentTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // CheckoutPaymentTableViewCell.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14/11/3.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "Cart.h"
11 | #import "UIBindableTableViewCell.h"
12 | #import "PaymentBalance.h"
13 |
14 | @interface CheckoutPaymentTableViewCell : UITableViewCell
15 |
16 |
17 | @property (strong, nonatomic) Cart *cart;
18 | @property (strong, nonatomic) IBOutlet UILabel *nameLabel;
19 | @end
20 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Checkout/TableViewCell/CheckoutStoreNameTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // CheckoutStoreNameTableViewCell.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 12/14/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CheckoutStoreNameTableViewCell : UITableViewCell
12 |
13 | @property (strong, nonatomic) CartItemList *list;
14 | @end
15 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Checkout/TableViewCell/CheckoutStoreNameTableViewCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // CheckoutStoreNameTableViewCell.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 12/14/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "CheckoutStoreNameTableViewCell.h"
10 |
11 | @implementation CheckoutStoreNameTableViewCell
12 |
13 | - (void)awakeFromNib {
14 | // Initialization code
15 | }
16 |
17 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
18 | [super setSelected:selected animated:animated];
19 |
20 | // Configure the view for the selected state
21 | }
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Checkout/View/CheckoutCheckBox.h:
--------------------------------------------------------------------------------
1 | //
2 | // CheckoutCheckBox.h
3 | // goku-commerce.com
4 | //
5 | // Created by 小悟空 on 14-8-24.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class CheckoutCheckBox;
12 | @protocol CheckoutCheckBoxDelegate
13 | @optional
14 | - (void)checkoutCheckBox:(CheckoutCheckBox *)checkBox didChecked:(BOOL)checked;
15 | @end
16 |
17 | @interface CheckoutCheckBox : UIView
18 | {
19 | UIImageView *selectedImageView;
20 | }
21 |
22 | @property (assign, nonatomic) BOOL selected;
23 | @property (strong, nonatomic) id delegate;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Checkout/View/CheckoutView.h:
--------------------------------------------------------------------------------
1 | //
2 | // CheckoutView.h
3 | // goku-commerce.com
4 | //
5 | // Created by 小悟空 on 14-8-23.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GKUser.h"
11 |
12 | @interface CheckoutView : UIView
13 |
14 | @property (strong, nonatomic) UIColor *topBorderColor;
15 | @end
16 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Context/GKCommerceApplicationContext.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKApplicationContext.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 3/9/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface GKCommerceApplicationContext : JSObjectionModule
13 |
14 | + (void)install;
15 | @end
16 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Feature/Backend/FeatureBackend.h:
--------------------------------------------------------------------------------
1 | //
2 | // FeatureBackend.h
3 | // GKCommerce
4 | //
5 | // Created by Goku on 14/12/1.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "FeatureBackendDelegate.h"
11 |
12 | @protocol FeatureBackend
13 |
14 | @property (strong, nonatomic) id delegate;
15 | - (void)requestFeature;
16 | @end
17 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Feature/Backend/FeatureBackendDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // FeatureBackendDelegate.h
3 | // GKCommerce
4 | //
5 | // Created by Goku on 14/12/1.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "FeatureViewModel.h"
11 |
12 | @protocol FeatureBackend;
13 | @protocol FeatureBackendDelegate
14 |
15 | - (void)featureBackend:(id)aFeatureBackend
16 | didReceiveFeature:(FeatureViewModel *)feature;
17 | @end
18 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Feature/Backend/GKFeatureBackend.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKFeatureBackend.h
3 | // GKCommerce
4 | //
5 | // Created by Goku on 14/12/1.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "Backend.h"
10 | #import "FeatureBackend.h"
11 | #import "GKFeatureBackendAssembler.h"
12 |
13 | @interface GKFeatureBackend : Backend
14 |
15 | @property (strong, nonatomic) id delegate;
16 | @property (strong, nonatomic) GKFeatureBackendAssembler *assembler;
17 | - (void)requestFeature;
18 | @end
19 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Feature/Backend/GKFeatureBackendAssembler.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKFeatureBackendAssembler.h
3 | // GKCommerce
4 | //
5 | // Created by Goku on 14/12/1.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "FeatureViewModel.h"
11 | #import "FeatureColumnModel.h"
12 | #import "FeatureCarouselModel.h"
13 |
14 | @interface GKFeatureBackendAssembler : NSObject
15 |
16 | - (FeatureViewModel *)featureModelWithJSON:(NSDictionary *)JSON;
17 | @end
18 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Feature/FeatureService.h:
--------------------------------------------------------------------------------
1 | //
2 | // FeatureService.h
3 | // GKCommerce
4 | //
5 | // Created by Goku on 14/12/1.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "FeatureServiceDelegate.h"
11 |
12 | @protocol FeatureService
13 |
14 | @property (strong, nonatomic) id delegate;
15 |
16 | - (void)feature;
17 | @end
18 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Feature/FeatureServiceDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // FeatureServiceDelegate.h
3 | // GKCommerce
4 | //
5 | // Created by Goku on 14/12/1.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "FeatureViewModel.h"
11 |
12 | @protocol FeatureService;
13 | @protocol FeatureServiceDelegate
14 |
15 | - (void)featureService:(id)service
16 | feature:(FeatureViewModel *)aFeature;
17 | @end
18 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Feature/FeatureTableViewCell/FeatureCarouselTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // FeatureCarouselTableViewCell.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14-10-17.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "FeatureTableViewCell.h"
11 | #import "GKCarouselView.h"
12 | #import "FeatureViewModel.h"
13 |
14 | @interface FeatureCarouselTableViewCell : FeatureTableViewCell
15 |
16 |
17 | @property (strong, nonatomic) NSArray *carousels;
18 | @property (strong, nonatomic) IBOutlet GKCarouselView *carouselView;
19 | @end
20 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Feature/FeatureTableViewCell/FeatureOneColumnTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // FeatureProductTableViewCell.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14-10-17.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "FeatureTableViewCell.h"
11 | #import "FeatureOneColumnModel.h"
12 |
13 | @interface FeatureOneColumnTableViewCell : FeatureTableViewCell
14 |
15 | @property (strong, nonatomic) FeatureOneColumnModel *model;
16 | @property (strong, nonatomic) IBOutlet UILabel *title;
17 | @property (strong, nonatomic) IBOutlet UIImageView *picture;
18 | @end
19 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Feature/FeatureTableViewCell/FeatureTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // FeatureTableViewCell.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14-10-17.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class FeatureTableViewCell;
12 |
13 | @protocol FeatureTableViewCellDelegate
14 |
15 | - (void)featureTableViewCell:(FeatureTableViewCell *)featureTableViewCell
16 | didSelectProduct:(Product *)product;
17 | @end
18 |
19 | @interface FeatureTableViewCell : UITableViewCell
20 |
21 | @property (strong, nonatomic) id delegate;
22 | @end
23 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Feature/FeatureTableViewCell/FeatureTableViewCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // FeatureTableViewCell.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14-10-17.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import "FeatureTableViewCell.h"
10 |
11 | @implementation FeatureTableViewCell
12 | @end
13 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Feature/FeatureTableViewCell/FeatureTableViewCellColumn.h:
--------------------------------------------------------------------------------
1 | //
2 | // FeatureTableViewCellColumn.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14/10/29.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface FeatureTableViewCellColumn : UIView
12 |
13 | @property (strong, nonatomic) Product *product;
14 | @end
15 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Feature/FeatureTableViewCell/FeatureTableViewCellColumn.m:
--------------------------------------------------------------------------------
1 | //
2 | // FeatureTableViewCellColumn.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14/10/29.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "FeatureTableViewCellColumn.h"
10 |
11 | @implementation FeatureTableViewCellColumn
12 |
13 | /*
14 | // Only override drawRect: if you perform custom drawing.
15 | // An empty implementation adversely affects performance during animation.
16 | - (void)drawRect:(CGRect)rect {
17 | // Drawing code
18 | }
19 | */
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Feature/FeatureTableViewCell/FeatureThreeColumnTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // FeatureThreeColumnCell.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14-10-17.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "FeatureTableViewCell.h"
11 | #import "FeatureTableViewCellColumn.h"
12 | #import "FeatureThreeColumnModel.h"
13 |
14 | @interface FeatureThreeColumnTableViewCell : FeatureTableViewCell
15 |
16 | @property (strong, nonatomic) FeatureThreeColumnModel *model;
17 | @property (strong, nonatomic) IBOutlet UILabel *title;
18 | @property (strong, nonatomic) IBOutlet UIView *columnView;
19 | @end
20 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Feature/GKFeatureService.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKFeatureService.h
3 | // GKCommerce
4 | //
5 | // Created by Goku on 14/12/1.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "Backend.h"
10 | #import "FeatureBackend.h"
11 | #import "FeatureService.h"
12 |
13 | @interface GKFeatureService : Backend
14 |
15 | @property (strong, nonatomic) id delegate;
16 | @property (strong, nonatomic) id backend;
17 |
18 | - (void)feature;
19 | @end
20 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Feature/Mock/feature_iPhone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/GKCommerce/Feature/Mock/feature_iPhone.png
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Feature/Mock/feature_iPhone@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/GKCommerce/Feature/Mock/feature_iPhone@2x.png
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Feature/Mock/feature_three_column_0.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/GKCommerce/Feature/Mock/feature_three_column_0.jpg
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Feature/Mock/feature_three_column_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/GKCommerce/Feature/Mock/feature_three_column_1.jpg
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Feature/Mock/feature_three_column_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/GKCommerce/Feature/Mock/feature_three_column_2.jpg
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Feature/Model/FeatureCarouselModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // FeatureCarouselModel.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14-10-19.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface FeatureCarouselModel : NSObject
12 |
13 | @property (strong, nonatomic) NSURL *picture;
14 | @end
15 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Feature/Model/FeatureCarouselModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // FeatureCarouselModel.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14-10-19.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import "FeatureCarouselModel.h"
10 |
11 | @implementation FeatureCarouselModel
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Feature/Model/FeatureColumnModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // FeatureCellModel.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14-10-17.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef enum {
12 | FeatureOneColumn
13 | } FeatureColumn;
14 |
15 | @interface FeatureColumnModel : NSObject
16 |
17 | @property (assign, nonatomic) FeatureColumn type;
18 | @end
19 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Feature/Model/FeatureColumnModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // FeatureCellModel.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14-10-17.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import "FeatureColumnModel.h"
10 |
11 | @implementation FeatureColumnModel
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Feature/Model/FeatureModelFactory.h:
--------------------------------------------------------------------------------
1 | //
2 | // FeatureModelFactory.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14-10-17.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "FeatureViewModel.h"
11 | #import "FeatureColumnModel.h"
12 | #import "FeatureCarouselModel.h"
13 |
14 | @interface FeatureModelFactory : NSObject
15 |
16 | - (FeatureViewModel *)featureModelWithJSON:(NSDictionary *)JSON;
17 | @end
18 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Feature/Model/FeatureOneColumnModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // FeatureOneColumnCellModel.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14-10-17.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "FeatureColumnModel.h"
11 |
12 | @interface FeatureOneColumnModel : FeatureColumnModel
13 |
14 | @property (strong, nonatomic) NSString *title;
15 | @property (strong, nonatomic) NSURL *picture;
16 | @property (strong, nonatomic) NSURL *link;
17 | @end
18 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Feature/Model/FeatureOneColumnModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // FeatureOneColumnCellModel.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14-10-17.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import "FeatureOneColumnModel.h"
10 |
11 | @implementation FeatureOneColumnModel
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Feature/Model/FeatureThreeColumnModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // FeatureThreeColumnTableViewCellModel.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14-10-17.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface FeatureThreeColumnModelItem : NSObject
12 |
13 | @property (strong, nonatomic) NSURL *picture;
14 | @property (strong, nonatomic) NSDecimalNumber *price;
15 | @property (strong, nonatomic) NSString *hightlight;
16 | @property (strong, nonatomic) Product *product;
17 | @end
18 |
19 | @interface FeatureThreeColumnModel : NSObject
20 |
21 | @property (strong, nonatomic) NSString *title;
22 | @property (strong, nonatomic) NSArray *columns;
23 | @end
24 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Feature/Model/FeatureThreeColumnModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // FeatureThreeColumnTableViewCellModel.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14-10-17.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import "FeatureThreeColumnModel.h"
10 |
11 | @implementation FeatureThreeColumnModelItem
12 | @end
13 |
14 | @implementation FeatureThreeColumnModel
15 | @end
16 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Feature/Model/FeatureViewModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // FeatureModel.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14-10-17.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface FeatureViewModel : NSObject
12 |
13 | @property (strong, nonatomic) NSArray *cells;
14 | @end
15 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Feature/Model/FeatureViewModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // FeatureModel.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14-10-17.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import "FeatureViewModel.h"
10 |
11 | @implementation FeatureViewModel
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Fixtures.h:
--------------------------------------------------------------------------------
1 | //
2 | // Fixtures.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 3/8/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GKProductService.h"
11 |
12 | @interface Fixtures : NSObject
13 |
14 | - (void)install;
15 | + (Fixtures *)fixtures;
16 | @end
17 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKAddressKit/Address/Controller/AddressController.h:
--------------------------------------------------------------------------------
1 | //
2 | // AddressController.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/15/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GKAddressCommon.h"
11 |
12 | @interface AddressController : UIViewController
13 |
14 |
15 | @property (strong, nonatomic) IBOutlet UITableView *tableView;
16 | @property (strong, nonatomic) GKAddress *address;
17 | @property (strong, nonatomic) GKUser *user;
18 |
19 | - (id)initWithAddress:(GKAddress *)address user:(GKUser *)anUser;
20 | + (instancetype)addressControllerWithMock;
21 | @end
22 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKAddressKit/Address/TableViewCell/AddressTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // AddressTableViewCell.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/15/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AddressTableViewCell : UITableViewCell
12 |
13 | @property (strong, nonatomic) IBOutlet UILabel *titleLabel;
14 | @property (strong, nonatomic) IBOutlet UILabel *contentLabel;
15 | @end
16 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKAddressKit/Address/TableViewCell/AddressTableViewCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // AddressTableViewCell.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/15/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "AddressTableViewCell.h"
10 |
11 | @implementation AddressTableViewCell
12 |
13 | - (void)awakeFromNib
14 | {
15 | }
16 |
17 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated
18 | {
19 | [super setSelected:selected animated:animated];
20 | }
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKAddressKit/AddressEdit/TableViewCell/AddressEditInputTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // AddressEditInputTableViewCell.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14/11/7.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GKAddressCommon.h"
11 |
12 | @interface AddressEditInputTableViewCell : UITableViewCell
13 |
14 | @property (strong, nonatomic) IBOutlet UITextField *inputTextField;
15 | @property (strong, nonatomic) GKAddress *address;
16 | @end
17 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKAddressKit/AddressList/Controller/GKAddressListController.h:
--------------------------------------------------------------------------------
1 | //
2 | // AddressListController.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/15/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GKAddressCommon.h"
11 |
12 | @interface GKAddressListController : UIViewController
13 |
14 |
15 | @property (strong, nonatomic) GKUser *user;
16 | @property (strong, nonatomic) NSArray *addresses;
17 | @property (strong, nonatomic) IBOutlet UITableView *tableView;
18 | @property (strong, nonatomic) id service;
19 | - (id)initWithAddress:(NSArray *)addresses;
20 | - (id)initWithUser:(GKUser *)user;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKAddressKit/AddressList/TableView/AddressListTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // AddressListTableViewCell.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/15/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GKAddressCommon.h"
11 | #import "AddressListTableViewCellSelected.h"
12 |
13 | @interface AddressListTableViewCell : UITableViewCell
14 |
15 | @property (strong, nonatomic) GKAddress *address;
16 | @property (strong, nonatomic) IBOutlet UILabel *nameLabel;
17 | @property (strong, nonatomic) IBOutlet UILabel *cellPhoneLabel;
18 | @property (strong, nonatomic) IBOutlet UILabel *addressLabel;
19 | @property (strong, nonatomic) IBOutlet AddressListTableViewCellSelected
20 | *selectedView;
21 | @end
22 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKAddressKit/AddressList/TableView/AddressListTableViewCellSelected.h:
--------------------------------------------------------------------------------
1 | //
2 | // AddressTableViewCellSelected.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/15/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AddressListTableViewCellSelected : UIView
12 |
13 | @property (assign, nonatomic) BOOL selected;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKAddressKit/GKAddressBackend.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKAddressBackend.h
3 | // GKAddressKitExample
4 | //
5 | // Created by 小悟空 on 2/21/15.
6 | // Copyright (c) 2015 Goku. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import "GKAddress.h"
12 |
13 | @protocol GKAddressBackend
14 |
15 | - (RACSignal *)fetchAddressesWithToken:(NSString *)token;
16 | - (RACSignal *)create:(GKAddress *)address;
17 | @end
18 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKAddressKit/GKAddressBackendImpl.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKAddressBackendImpl.h
3 | // GKAddressKitExample
4 | //
5 | // Created by 小悟空 on 2/21/15.
6 | // Copyright (c) 2015 Goku. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GKAddressBackend.h"
11 |
12 | @interface GKAddressBackendImpl : NSObject
13 |
14 | - (RACSignal *)fetchAddressesWithToken:(NSString *)token;
15 | @end
16 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKAddressKit/GKAddressBackendMock.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKAddressBackendMock.h
3 | // GKAddressKitExample
4 | //
5 | // Created by 小悟空 on 2/21/15.
6 | // Copyright (c) 2015 Goku. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GKAddress.h"
11 | #import "GKAddressBackend.h"
12 |
13 | @interface GKAddressBackendMock : NSObject
14 |
15 | - (RACSignal *)fetchAddressesWithToken:(NSString *)token;
16 | @end
17 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKAddressKit/GKAddressCommon.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKAddressKitCell.h
3 | // GKAddressKitExample
4 | //
5 | // Created by 小悟空 on 2/21/15.
6 | // Copyright (c) 2015 Goku. All rights reserved.
7 | //
8 |
9 | #import "GKUser.h"
10 | #import "GKAddress.h"
11 | #import "GKAddressService.h"
12 | #import "GKAddressRepository.h"
13 |
14 | typedef enum {
15 | AddressNameCell,
16 | AddressCellPhoneCell,
17 | AddressPostcodeCell,
18 | AddressRegionCell,
19 | AddressStreetCell
20 | } GKAddressCell;
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKAddressKit/GKAddressKit.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKAddressKit.h
3 | // GKAddressKitExample
4 | //
5 | // Created by 小悟空 on 2/21/15.
6 | // Copyright (c) 2015 Goku. All rights reserved.
7 | //
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKAddressKit/GKCity.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKCity.h
3 | // GKAddressKitExample
4 | //
5 | // Created by 小悟空 on 2/19/15.
6 | // Copyright (c) 2015 Goku. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GKRegion.h"
11 |
12 | @interface GKCity : GKRegion
13 |
14 | @property (assign, nonatomic) NSInteger cityID;
15 | @property (strong, nonatomic) NSArray *counties;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKAddressKit/GKCity.m:
--------------------------------------------------------------------------------
1 | //
2 | // GKCity.m
3 | // GKAddressKitExample
4 | //
5 | // Created by 小悟空 on 2/19/15.
6 | // Copyright (c) 2015 Goku. All rights reserved.
7 | //
8 |
9 | #import "GKCity.h"
10 |
11 | @implementation GKCity
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKAddressKit/GKCounty.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKCounty.h
3 | // GKAddressKitExample
4 | //
5 | // Created by 小悟空 on 2/19/15.
6 | // Copyright (c) 2015 Goku. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface GKCounty : NSObject
12 |
13 | @property (assign, nonatomic) NSInteger countyID;
14 | @property (strong, nonatomic) NSString *code;
15 | @property (strong, nonatomic) NSString *name;
16 | @property (strong, nonatomic) NSString *pinyin;
17 | @property (strong, nonatomic) NSArray *towns;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKAddressKit/GKCounty.m:
--------------------------------------------------------------------------------
1 | //
2 | // GKCounty.m
3 | // GKAddressKitExample
4 | //
5 | // Created by 小悟空 on 2/19/15.
6 | // Copyright (c) 2015 Goku. All rights reserved.
7 | //
8 |
9 | #import "GKCounty.h"
10 |
11 | @implementation GKCounty
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKAddressKit/GKProvince.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKProvince.h
3 | // GKAddressKitExample
4 | //
5 | // Created by 小悟空 on 2/19/15.
6 | // Copyright (c) 2015 Goku. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GKRegion.h"
11 |
12 | @interface GKProvince : GKRegion
13 |
14 | @property (assign, nonatomic) NSInteger provinceID;
15 | @property (strong, nonatomic) NSArray *cities;
16 | @end
17 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKAddressKit/GKProvince.m:
--------------------------------------------------------------------------------
1 | //
2 | // GKProvince.m
3 | // GKAddressKitExample
4 | //
5 | // Created by 小悟空 on 2/19/15.
6 | // Copyright (c) 2015 Goku. All rights reserved.
7 | //
8 |
9 | #import "GKProvince.h"
10 |
11 | @implementation GKProvince
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKAddressKit/GKRegion.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKRegion.h
3 | // GKAddressKitExample
4 | //
5 | // Created by 小悟空 on 2/21/15.
6 | // Copyright (c) 2015 Goku. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface GKRegion : NSObject
12 |
13 | @property (strong, nonatomic) NSString *code;
14 | @property (strong, nonatomic) NSString *name;
15 | @property (strong, nonatomic) NSString *pinyin;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKAddressKit/GKRegion.m:
--------------------------------------------------------------------------------
1 | //
2 | // GKRegion.m
3 | // GKAddressKitExample
4 | //
5 | // Created by 小悟空 on 2/21/15.
6 | // Copyright (c) 2015 Goku. All rights reserved.
7 | //
8 |
9 | #import "GKRegion.h"
10 |
11 | @implementation GKRegion
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKAddressKit/GKRegionBackend.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKRegionBackend.h
3 | // GKAddressKitExample
4 | //
5 | // Created by 小悟空 on 2/21/15.
6 | // Copyright (c) 2015 Goku. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @protocol GKRegionBackend
13 |
14 | - (RACSignal *)fetchProvinces;
15 | - (RACSignal *)fetchCitiesWithProvinceID:(NSInteger)provinceID;
16 | - (RACSignal *)fetchCountiesWithCityID:(NSInteger)cityID;
17 | - (RACSignal *)fetchTownsWithCountyID:(NSInteger)countyID;
18 | - (RACSignal *)fetchVillagesWithTownID:(NSInteger)TownID;
19 | @end
20 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKAddressKit/GKTown.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKTown.h
3 | // GKAddressKitExample
4 | //
5 | // Created by 小悟空 on 2/19/15.
6 | // Copyright (c) 2015 Goku. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GKRegion.h"
11 |
12 | @interface GKTown : GKRegion
13 |
14 | @property (assign, nonatomic) NSInteger townID;
15 | @property (strong, nonatomic) NSArray *villages;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKAddressKit/GKTown.m:
--------------------------------------------------------------------------------
1 | //
2 | // GKTown.m
3 | // GKAddressKitExample
4 | //
5 | // Created by 小悟空 on 2/19/15.
6 | // Copyright (c) 2015 Goku. All rights reserved.
7 | //
8 |
9 | #import "GKTown.h"
10 |
11 | @implementation GKTown
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKAddressKit/GKVillage.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKVillage.h
3 | // GKAddressKitExample
4 | //
5 | // Created by 小悟空 on 2/19/15.
6 | // Copyright (c) 2015 Goku. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GKRegion.h"
11 |
12 | @interface GKVillage : GKRegion
13 |
14 | @property (assign, nonatomic) NSInteger villageID;
15 | @property (assign, nonatomic) NSInteger category;
16 | @end
17 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKAddressKit/GKVillage.m:
--------------------------------------------------------------------------------
1 | //
2 | // GKVillage.m
3 | // GKAddressKitExample
4 | //
5 | // Created by 小悟空 on 2/19/15.
6 | // Copyright (c) 2015 Goku. All rights reserved.
7 | //
8 |
9 | #import "GKVillage.h"
10 |
11 | @implementation GKVillage
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKSegment/GKSegmentView.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKSegment.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 3/12/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GKSegmentViewDelegate.h"
11 |
12 | @interface GKSegmentView : UIView
13 |
14 | @property (strong, nonatomic) UIColor *indicatorColor;
15 | @property (assign, nonatomic) float indicatorHeight;
16 | @property (strong, nonatomic) UIColor *normalColor;
17 | @property (strong, nonatomic) UIColor *highlightColor;
18 | @property (assign, nonatomic) NSInteger selectedIndex;
19 | @property (strong, nonatomic) IBOutlet id delegate;
20 |
21 | - (void)reloadData;
22 | @end
23 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKSegment/GKSegmentViewDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKSegmentDelegate.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 3/12/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class GKSegmentView;
12 | @protocol GKSegmentViewDelegate
13 |
14 | - (NSInteger)numberOfSegments;
15 | - (NSString *)segmentView:(GKSegmentView *)segmentView
16 | titleForSegmentAtIndex:(NSInteger)index;
17 |
18 | - (void)segmentView:(GKSegmentView *)segmentView
19 | didSelectAtIndex:(NSInteger)index;
20 | @end
21 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKUserKit/GKForgotPassword/GKForgotPasswordController.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKForgotPasswordController.h
3 | // GKUserKitExample
4 | //
5 | // Created by MASGG on 15-2-22.
6 | // Copyright (c) 2015年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface GKForgotPasswordController : UIViewController
12 |
13 |
14 | @property (strong, nonatomic) IBOutlet UITableView *tableView;
15 | @end
16 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKUserKit/GKForgotPassword/GKVerificationTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKVerificationTableViewCell.h
3 | // GKUserKitExample
4 | //
5 | // Created by MASGG on 15-2-22.
6 | // Copyright (c) 2015年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface GKVerificationTableViewCell : UITableViewCell
12 | @property (weak, nonatomic) IBOutlet UIButton *btnVerification;
13 | @property (weak, nonatomic) IBOutlet UITextField *textField;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKUserKit/GKForgotPassword/GKVerificationTableViewCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // GKVerificationTableViewCell.m
3 | // GKUserKitExample
4 | //
5 | // Created by MASGG on 15-2-22.
6 | // Copyright (c) 2015年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "GKVerificationTableViewCell.h"
10 |
11 | @implementation GKVerificationTableViewCell
12 |
13 | - (void)awakeFromNib {
14 | // Initialization code
15 | }
16 |
17 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
18 | [super setSelected:selected animated:animated];
19 |
20 | // Configure the view for the selected state
21 | }
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKUserKit/GKHUD.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKHUD.h
3 | // GKUserKitExample
4 | //
5 | // Created by 小悟空 on 3/6/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface GKHUD : NSObject
12 |
13 | @property (weak, nonatomic) UIView *rootView;
14 | - (void)showMessage:(NSString *)message hideAfterDelay:(NSTimeInterval)second;
15 | - (void)show:(BOOL)animated;
16 | - (void)hide:(BOOL)animated;
17 | + (void)setHUD:(GKHUD *)hud;
18 | + (instancetype)defaultHUD;
19 | @end
20 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKUserKit/GKMine/Controller/GKMineViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKMineViewController.h
3 | // GKUserKitExample
4 | //
5 | // Created by 小悟空 on 3/1/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface GKMineViewController : UIViewController
13 |
14 | @property (strong, nonatomic) MBProgressHUD *hud;
15 | @end
16 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKUserKit/GKRegistration/TableViewCell/GKRegistrationTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // RegistrationTableViewCell.h
3 | // GKUserKitExample
4 | //
5 | // Created by 宇 陈 on 15/2/21.
6 | // Copyright (c) 2015年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface GKRegistrationTableViewCell : UITableViewCell
12 | @property (weak, nonatomic) IBOutlet UILabel *label;
13 | @property (weak, nonatomic) IBOutlet UITextField *textField;
14 | - (BOOL) isValidEmail:(NSString *)emailText;
15 | @end
16 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKUserKit/GKUserApplicationContext.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKApplicationContext.h
3 | // GKUserKitExample
4 | //
5 | // Created by 小悟空 on 3/7/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface GKUserApplicationContext : JSObjectionModule
12 |
13 | @end
14 |
15 | @interface GKUserApplicationContextDemonstration : JSObjectionModule
16 |
17 | @end
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKUserKit/GKUserAuthentication/TableVIewCell/GKUserAuthenticationTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // UserAuthenticationTableViewCell.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/18/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface GKUserAuthenticationTableViewCell : UITableViewCell
12 |
13 | @property (strong, nonatomic) IBOutlet UILabel *titleLabel;
14 | @property (strong, nonatomic) IBOutlet UITextField *inputTextField;
15 | @end
16 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKUserKit/GKUserAuthentication/TableVIewCell/GKUserAuthenticationTableViewCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // UserAuthenticationTableViewCell.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/18/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "GKUserAuthenticationTableViewCell.h"
10 |
11 | @implementation GKUserAuthenticationTableViewCell
12 |
13 | - (void)awakeFromNib {
14 | // Initialization code
15 | }
16 |
17 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
18 | [super setSelected:selected animated:animated];
19 |
20 | // Configure the view for the selected state
21 | }
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKUserKit/GKUserForgotPassword.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKUserForgotPassword.h
3 | // GKUserKitExample
4 | //
5 | // Created by MASGG on 15-2-26.
6 | // Copyright (c) 2015年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface GKUserForgotPassword : NSObject
12 | @property (strong,nonatomic) NSString *userName;
13 | @property (strong,nonatomic) NSString *verificationCode;
14 | @property (strong,nonatomic) NSString *password;
15 | @end
16 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKUserKit/GKUserForgotPassword.m:
--------------------------------------------------------------------------------
1 | //
2 | // GKUserForgotPassword.m
3 | // GKUserKitExample
4 | //
5 | // Created by MASGG on 15-2-26.
6 | // Copyright (c) 2015年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "GKUserForgotPassword.h"
10 |
11 | @implementation GKUserForgotPassword
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKUserKit/Model/GKUserAccessToken.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKUserAccessToken.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 1/20/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef enum {
12 | GKBearer,
13 | GKMAC
14 | } GKAccessTokenType;
15 |
16 | @interface GKUserAccessToken : NSObject
17 |
18 | @property (strong, nonatomic) NSString *accessToken;
19 | @property (assign, nonatomic) NSInteger expires;
20 | @property (assign, nonatomic) GKAccessTokenType type;
21 | @end
22 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKUserKit/Model/GKUserAuthentication.h:
--------------------------------------------------------------------------------
1 | //
2 | // UserAuthenticationModel.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/20/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface GKUserAuthentication : NSObject
12 |
13 | @property (strong, nonatomic) NSString *username;
14 | @property (strong, nonatomic) NSString *password;
15 |
16 | - (id)initWithUsername:(NSString *)username password:(NSString *)aPassword;
17 |
18 | - (NSError *)valid;
19 | @end
20 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKUserKit/Model/GKUserBackend/GKUserBackendImpl.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKUserBackendImpl.h
3 | // GKUserKitExample
4 | //
5 | // Created by SeanChense on 15/2/23.
6 | // Copyright (c) 2015年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GKUserBackend.h"
11 | #import
12 | #import
13 |
14 | @interface GKUserBackendImpl : NSObject
15 |
16 | @property (strong, nonatomic) AFHTTPRequestOperationManager *manager;
17 |
18 | - (RACSignal *)signup:(GKUserRegistration *)user;
19 | @end
20 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKUserKit/Model/GKUserBackend/GKUserBackendMock.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKUserBackendMock.h
3 | // GKUserKitExample
4 | //
5 | // Created by SeanChense on 15/2/23.
6 | // Copyright (c) 2015年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GKUserBackend.h"
11 | @interface GKUserBackendMock : NSObject
12 |
13 | - (RACSignal *)signup:(GKUserRegistration *)user;
14 | - (RACSignal *)forgotPassword:(GKUserForgotPassword *) forgotPassword;
15 | @end
16 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKUserKit/Model/GKUserEntity.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKUserEntity.h
3 | // Pods
4 | //
5 | // Created by 小悟空 on 3/15/15.
6 | //
7 | //
8 |
9 | #import
10 | #import
11 |
12 |
13 | @interface GKUserEntity : NSManagedObject
14 |
15 | @property (nonatomic, retain) NSString * accessToken;
16 | @property (nonatomic, retain) NSNumber * accessTokenExpires;
17 | @property (nonatomic, retain) NSNumber * accessTokenType;
18 | @property (nonatomic, retain) NSString * avatar;
19 | @property (nonatomic, retain) NSString * email;
20 | @property (nonatomic, retain) NSNumber * userID;
21 | @property (nonatomic, retain) NSString * username;
22 | @property (nonatomic, retain) NSDate * lastAuthencateDate;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKUserKit/Model/GKUserEntity.m:
--------------------------------------------------------------------------------
1 | //
2 | // GKUserEntity.m
3 | // Pods
4 | //
5 | // Created by 小悟空 on 3/15/15.
6 | //
7 | //
8 |
9 | #import "GKUserEntity.h"
10 |
11 |
12 | @implementation GKUserEntity
13 |
14 | @dynamic accessToken;
15 | @dynamic accessTokenExpires;
16 | @dynamic accessTokenType;
17 | @dynamic avatar;
18 | @dynamic email;
19 | @dynamic userID;
20 | @dynamic username;
21 | @dynamic lastAuthencateDate;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKUserKit/Model/GKUserRepositoryImpl.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKUserRepositoryImpl.h
3 | // GKUserKitExample
4 | //
5 | // Created by 小悟空 on 2/24/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GKUserRepository.h"
11 |
12 | @interface GKUserRepositoryImpl : NSObject
13 |
14 | @property (strong, nonatomic) NSManagedObjectContext *context;
15 | - (RACSignal *)create:(GKUser *)user;
16 | - (RACSignal *)findUserWithID:(NSInteger)userID;
17 | - (RACSignal *)updateLastAuthencateDate:(GKUser *)user;
18 | - (RACSignal *)lastAuthencateUser;
19 | @end
20 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/GKUserKit/Model/GKUserServiceImpl.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKUserServiceImpl.h
3 | // GKUserKitExample
4 | //
5 | // Created by SeanChense on 15/2/23.
6 | // Copyright (c) 2015年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GKUserBackend.h"
11 | #import "GKUserService.h"
12 |
13 | @interface GKUserServiceImpl : NSObject
14 |
15 | @property (strong, nonatomic) id backend;
16 | @property (strong, nonatomic) id repository;
17 |
18 | - (RACSignal *)signup:(GKUserRegistration *)registration;
19 | - (RACSignal *)authenticate:(GKUserAuthentication *)authentication;
20 | @end
21 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Mine/MineDefault/Controller/MineDefaultViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // MineViewController.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14/11/7.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "MineHeaderPhotoTableViewCell.h"
11 |
12 | @interface MineDefaultViewController : UIViewController
13 |
15 |
16 | @property (strong, nonatomic) GKUser *user;
17 | @property (strong, nonatomic) IBOutlet UITableView *tableView;
18 |
19 | - (void)pushAddressList;
20 | @end
21 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Mine/MineDefault/TableViewCell/MineDefaultTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // MineDefaultTableViewCell.h
3 | // goku-commerce.com
4 | //
5 | // Created by 小悟空 on 14-8-1.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MineDefaultTableViewCell : UITableViewCell
12 |
13 | @property(nonatomic, strong) IBOutlet UILabel *titleLabel;
14 | @property(nonatomic, strong) IBOutlet UIImageView *iconImageView;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Mine/MineDefault/TableViewCell/MineDefaultTableViewCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // MineDefaultTableViewCell.m
3 | // goku-commerce.com
4 | //
5 | // Created by 小悟空 on 14-8-1.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import "MineDefaultTableViewCell.h"
10 |
11 | @implementation MineDefaultTableViewCell
12 |
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Order/GKOrderBackend.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKOrderBackend.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 3/11/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @protocol GKOrderBackend
12 |
13 | - (RACSignal *)requestOrders:(GKUser *)user;
14 | @end
15 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Order/GKOrderService.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKOrderService.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 3/11/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GKOrderBackend.h"
11 |
12 | @protocol GKOrderService
13 |
14 | @property (strong, nonatomic) id backend;
15 | - (RACSignal *)orders:(GKUser *)user;
16 | @end
17 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Order/GKOrderServiceImpl.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKOrderServiceImpl.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 3/11/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GKOrderService.h"
11 |
12 | @interface GKOrderServiceImpl : NSObject
13 |
14 | @property (strong, nonatomic) id backend;
15 | - (RACSignal *)orders:(GKUser *)user;
16 | @end
17 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Order/GKOrderServiceImpl.m:
--------------------------------------------------------------------------------
1 | //
2 | // GKOrderServiceImpl.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 3/11/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "GKOrderServiceImpl.h"
10 | #import
11 |
12 | @implementation GKOrderServiceImpl
13 | objection_requires_sel(@selector(backend))
14 |
15 | - (RACSignal *)orders:(GKUser *)user
16 | {
17 | return [self.backend requestOrders:user];
18 | }
19 | @end
20 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Order/Model/Order.m:
--------------------------------------------------------------------------------
1 | //
2 | // Order.m
3 | // goku-commerce.com
4 | //
5 | // Created by 小悟空 on 14-8-21.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import "Order.h"
10 |
11 | @implementation Order
12 |
13 | - (id)init
14 | {
15 | self = [super init];
16 | if (self) {
17 | }
18 | return self;
19 | }
20 |
21 | - (void)clear
22 | {
23 | self.orderID = 0;
24 | self.SN = @"";
25 | self.totalPrice = [[NSDecimalNumber alloc] initWithString:@"0.00"];
26 | self.subject = @"";
27 | self.orderDescription = @"";
28 | self.message = @"";
29 | }
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Order/Model/OrderItem.m:
--------------------------------------------------------------------------------
1 | //
2 | // OrderItem.m
3 | // GKCommerce
4 | //
5 | // Created by Goku on 14/12/2.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "OrderItem.h"
10 |
11 | @implementation OrderItem
12 |
13 | - (id)initWithOrder:(Order *)order
14 | {
15 | self = [self init];
16 | if (self) {
17 | self.order = order;
18 | }
19 | return self;
20 | }
21 | @end
22 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Order/OrderDetail/View/OrderDetailDefaultTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // MineOrderDetailInfoCell.h
3 | // goku-commerce.com
4 | //
5 | // Created by 小悟空 on 14-8-20.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "OrderDetailTableViewCell.h"
11 |
12 | @interface OrderDetailDefaultTableViewCell : OrderDetailTableViewCell
13 | @property (weak, nonatomic) IBOutlet UILabel *nameLabel;
14 | @property (weak, nonatomic) IBOutlet UILabel *descriptionLabel;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Order/OrderDetail/View/OrderDetailProductTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // MineOrderDetailGoodCell.h
3 | // goku-commerce.com
4 | //
5 | // Created by 小悟空 on 14-8-20.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "CartItem.h"
11 | #import "OrderDetailTableViewCell.h"
12 |
13 | @interface OrderDetailProductTableViewCell : OrderDetailTableViewCell
14 | @property (weak, nonatomic) IBOutlet UIImageView *photoImageView;
15 | @property (weak, nonatomic) IBOutlet UILabel *nameLabel;
16 | @property (weak, nonatomic) IBOutlet UILabel *amountLabel;
17 | @property (weak, nonatomic) IBOutlet UILabel *colorLabel;
18 | @end
19 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Order/OrderDetail/View/OrderDetailTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // OrderDetailTableViewCell.h
3 | // goku-commerce.com
4 | //
5 | // Created by 小悟空 on 14-9-21.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "Order.h"
11 | #import "GKUser.h"
12 |
13 | @interface OrderDetailTableViewCell : UITableViewCell
14 |
15 | @property (strong, nonatomic) Order *order;
16 | @property (strong, nonatomic) GKUser *user;
17 | @property (strong, nonatomic) NSIndexPath *indexPath;
18 |
19 | - (void)fillData;
20 | @end
21 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Order/OrderList/Controller/GKOrderListController.h:
--------------------------------------------------------------------------------
1 | //
2 | // OrderListController.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 3/11/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface GKOrderListController : UIViewController
12 |
13 |
14 | @property (strong, nonatomic) IBOutlet UITableView *tableView;
15 | //@property (strong, nonatomic)
16 | @end
17 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Payment/Model/Payment.h:
--------------------------------------------------------------------------------
1 | //
2 | // Payment.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14/11/3.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef enum {
12 | PaymentTypeNone,
13 | PaymentTypeUserBalance,
14 | PaymentTypeAlipay,
15 | PaymentTypeCashOnDelivery
16 | } PaymentType;
17 |
18 | @interface Payment : NSObject
19 |
20 | @property (assign, nonatomic) NSInteger paymentID;
21 | @property (strong, nonatomic) NSString *code;
22 | @property (strong, nonatomic) NSString *name;
23 | @property (assign, nonatomic) BOOL cashOnDelivery;
24 | @property (assign, nonatomic) PaymentType type;
25 | @end
26 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Payment/Model/Payment.m:
--------------------------------------------------------------------------------
1 | //
2 | // Payment.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14/11/3.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "Payment.h"
10 |
11 | @implementation Payment
12 | @end
13 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Payment/Model/PaymentBalance.h:
--------------------------------------------------------------------------------
1 | //
2 | // PaymentBalance.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14/11/4.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "Payment.h"
10 |
11 | @interface PaymentBalance : Payment
12 |
13 | @property (strong, nonatomic) NSDecimalNumber *amountOfMoney;
14 | - (id)initWithAmountOfMoney:(NSDecimalNumber *)money;
15 | @end
16 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Payment/Model/PaymentBalance.m:
--------------------------------------------------------------------------------
1 | //
2 | // PaymentBalance.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14/11/4.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "PaymentBalance.h"
10 |
11 | @implementation PaymentBalance
12 |
13 | - (id)initWithAmountOfMoney:(NSDecimalNumber *)money
14 | {
15 | self = [super init];
16 | if (self) {
17 | self.amountOfMoney = money;
18 | }
19 | return self;
20 | }
21 | @end
22 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Payment/PaymentSuccess/Controller/PaymentSuccessViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // PaymentSuccessViewController.h
3 | // goku-commerce.com
4 | //
5 | // Created by 小悟空 on 14-8-26.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "Order.h"
11 | #import "GKUser.h"
12 |
13 | @interface PaymentSuccessViewController : UIViewController
14 |
15 | @property (strong, nonatomic) IBOutlet UILabel *descriptionOrderSN;
16 | @property (strong, nonatomic) IBOutlet UILabel *descriptionOrderPrice;
17 | @property (strong, nonatomic) Order *order;
18 | @property (strong, nonatomic) GKUser *user;
19 |
20 | - (id)initWithOrder:(Order *)order andUser:(GKUser *)user;
21 | - (IBAction)gotoOrderDidTap:(id)sender;
22 | - (IBAction)gotoHomeDidTap:(id)sender;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/Backend/ECProductBackend.h:
--------------------------------------------------------------------------------
1 | //
2 | // ECProductBackend.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/21/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "ProductBackend.h"
10 | #import "ECProductBackendAssembler.h"
11 | #import "ProductBackendDelegate.h"
12 |
13 | @interface ECProductBackend : Backend
14 |
15 | @property (strong, nonatomic) ECProductBackendAssembler *assembler;
16 | @property (strong, nonatomic) id delegate;
17 |
18 | - (void)requestProductWithID:(NSInteger)productID user:(GKUser *)anUser;
19 | - (void)requestProductDescription:(Product *)product;
20 | - (void)requestProductsWithSearchModel:(SearchBackendModel *)searchModel;
21 | - (void)requestProductCategories;
22 | @end
23 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/Backend/ECProductBackendAssembler.h:
--------------------------------------------------------------------------------
1 | //
2 | // ProductBackendAssembler.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/21/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "Product.h"
11 | #import "ProductSpecification.h"
12 | #import "ECBackendAssembler.h"
13 |
14 | @interface ECProductBackendAssembler : ECBackendAssembler
15 |
16 | - (Product *)product:(NSDictionary *)JSON;
17 | - (ProductImageURL *)productImageURL:(NSDictionary *)productImageURLJSON;
18 | - (NSArray *)productImageURLs:(NSArray *)productImageURLJSON;
19 | - (NSArray *)searchProducts:(NSArray *)productsJSON;
20 | - (NSArray *)categories:(NSArray *)categoriesJSON;
21 | @end
22 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/Backend/GKProductBackend.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKProductBackend.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 1/13/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @protocol GKProductBackend
12 |
13 | - (RACSignal *)requestProductWithID:(NSInteger)productID user:(GKUser *)anUser;
14 | @end
15 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/Backend/GKProductBackendAssembler.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKProductBackendAssembler.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 1/9/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface GKProductBackendAssembler : NSObject
12 |
13 | - (Product *)product:(NSDictionary *)JSON;
14 | - (NSArray *)listProducts:(NSArray *)JSON;
15 | - (Product *)listProduct:(NSDictionary *)JSON;
16 | - (NSArray *)productCategories:(NSArray *)JSON;
17 | @end
18 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/Backend/GKProductBackendImpl.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKProductBackend.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 1/9/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "Backend.h"
11 | #import "GKProductBackend.h"
12 | #import "GKProductBackendAssembler.h"
13 |
14 | @interface GKProductBackendImpl : Backend
15 |
16 | @property (strong, nonatomic) GKProductBackendAssembler *assembler;
17 | - (RACSignal *)requestProductWithID:(NSInteger)productID user:(GKUser *)anUser;
18 | @end
19 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/Backend/Model/SearchBackendModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // SearchBackendModel.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14/10/26.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface SearchBackendModel : NSObject
12 |
13 | @property (strong, nonatomic) NSString *keywords;
14 | @property (assign, nonatomic) NSInteger productCategoryID;
15 | // TODO 用枚举
16 | @property (strong, nonatomic) NSString *sort;
17 | @property (assign, nonatomic) NSInteger page;
18 | @property (assign, nonatomic) NSInteger perPage;
19 | @property (assign, nonatomic) NSInteger total;
20 |
21 | - (BOOL)hasMore;
22 | - (SearchBackendModel *)clone;
23 | @end
24 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/GKProductService.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKProductService.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 1/13/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "SearchBackendModel.h"
11 |
12 | @protocol GKProductService
13 | @optional
14 | - (RACSignal *)productWithID:(NSInteger)productID user:(GKUser *)anUser;
15 | - (RACSignal *)productCategories;
16 | - (RACSignal *)productsWithSearchModel:(SearchBackendModel *)searchModel;
17 | @end
18 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/GKProductServiceImpl.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKProductServiceImpl.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 1/13/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GKProductService.h"
11 | #import "GKProductBackendImpl.h"
12 |
13 | @interface GKProductServiceImpl : NSObject
14 |
15 | - (RACSignal *)productWithID:(NSInteger)productID user:(GKUser *)anUser;
16 | - (RACSignal *)productCategories;
17 | - (RACSignal *)productsWithSearchModel:(SearchBackendModel *)searchModel;
18 | @end
19 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/GKProductServiceMock.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKProductServiceMock.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 1/22/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GKProductService.h"
11 | #import "GKServiceMock.h"
12 |
13 | @interface GKProductServiceMock : GKServiceMock
14 |
15 | - (RACSignal *)productWithID:(NSInteger)productID user:(GKUser *)anUser;
16 | - (RACSignal *)productCategories;
17 | - (RACSignal *)productsWithSearchModel:(SearchBackendModel *)searchModel;
18 | @end
19 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/Model/ProductCategory.h:
--------------------------------------------------------------------------------
1 | //
2 | // Category.h
3 | // goku-commerce.com
4 | //
5 | // Created by 小悟空 on 14-10-11.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ProductCategory : NSObject
12 |
13 | @property (assign, nonatomic) NSInteger categoryID;
14 | @property (strong, nonatomic) NSString *name;
15 | @property (strong, nonatomic) NSString *categoryDescription;
16 | /**
17 | * children第一项是`ProductCategory`的实例
18 | */
19 | @property (strong, nonatomic) NSMutableArray *children;
20 | @property (strong, nonatomic) NSURL *cover;
21 |
22 | - (NSArray *)namesOfChildren;
23 | @end
24 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/Model/ProductImageURL.h:
--------------------------------------------------------------------------------
1 | //
2 | // ProductImage.h
3 | // goku-commerce.com
4 | //
5 | // Created by 小悟空 on 14-8-8.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ProductImageURL : NSObject
12 |
13 | @property (nonatomic, strong) NSString *origin;
14 | @property (nonatomic, strong) NSString *small;
15 | @property (nonatomic, strong) NSString *thumbnail;
16 |
17 | - (id)initWithOrigin:(NSString *)origin
18 | small:(NSString *)aSmall
19 | thumbnail:(NSString *)aThumbnail;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/Model/ProductSpecification.h:
--------------------------------------------------------------------------------
1 | //
2 | // ProductSpecification.h
3 | // goku-commerce.com
4 | //
5 | // Created by 小悟空 on 14-9-4.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ProductSpecificationValue.h"
11 |
12 | @interface ProductSpecification : NSObject
13 |
14 | @property (strong, nonatomic) NSString *name;
15 | @property (strong, nonatomic) ProductSpecificationValue *value;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/Model/ProductSpecification.m:
--------------------------------------------------------------------------------
1 | //
2 | // ProductSpecification.m
3 | // goku-commerce.com
4 | //
5 | // Created by 小悟空 on 14-9-4.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import "ProductSpecification.h"
10 |
11 | @implementation ProductSpecification
12 |
13 | - (id)initWithCoder:(NSCoder *)aDecoder
14 | {
15 | self = [self init];
16 | if (self) {
17 | self.name = [aDecoder decodeObjectForKey:@"name"];
18 | self.value = [aDecoder decodeObjectForKey:@"value"];
19 | }
20 | return self;
21 | }
22 |
23 | - (void)encodeWithCoder:(NSCoder *)aCoder
24 | {
25 | [aCoder encodeObject:self.name forKey:@"name"];
26 | [aCoder encodeObject:self.value forKey:@"value"];
27 | }
28 | @end
29 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/Model/ProductSpecificationValue.h:
--------------------------------------------------------------------------------
1 | //
2 | // ProductSpecificationValue.h
3 | // goku-commerce.com
4 | //
5 | // Created by 小悟空 on 14-9-4.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ProductSpecificationValue : NSObject
12 |
13 | @property (strong, nonatomic) NSString *label;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/Model/ProductSpecificationValue.m:
--------------------------------------------------------------------------------
1 | //
2 | // ProductSpecificationValue.m
3 | // goku-commerce.com
4 | //
5 | // Created by 小悟空 on 14-9-4.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import "ProductSpecificationValue.h"
10 |
11 | @implementation ProductSpecificationValue
12 |
13 | - (id)initWithCoder:(NSCoder *)aDecoder
14 | {
15 | self = [self init];
16 | if (self) {
17 | self.label = [aDecoder decodeObjectForKey:@"label"];
18 | }
19 | return self;
20 | }
21 |
22 | - (void)encodeWithCoder:(NSCoder *)aCoder
23 | {
24 | [aCoder encodeObject:self.label forKey:@"label"];
25 | }
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/ProductCategory/Mock/ProductCategories.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "id": 1,
4 | "name": "Apple",
5 | "description": "",
6 | "cover": "product_category_mock_iphone@2x.png",
7 | "children": [
8 | {
9 | "id": 2,
10 | "name": "iPhone",
11 | "description": "",
12 | "cover": "product_category_mock_iphone@2x.png"
13 | },
14 | {
15 | "id": 3,
16 | "name": "Mackbook",
17 | "description": "",
18 | "cover": "product_category_mock_macbook@2x.png"
19 | }
20 | ]
21 | }
22 | ]
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/ProductCategory/Mock/ProductCategoryCatalog.xcassets/product_category_mock_apple.png.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "product_category_mock_apple@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/ProductCategory/Mock/ProductCategoryCatalog.xcassets/product_category_mock_apple.png.imageset/product_category_mock_apple@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/GKCommerce/Product/ProductCategory/Mock/ProductCategoryCatalog.xcassets/product_category_mock_apple.png.imageset/product_category_mock_apple@2x.png
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/ProductCategory/Mock/ProductCategoryCatalog.xcassets/product_category_mock_iphone.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "product_category_mock_iphone@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/ProductCategory/Mock/ProductCategoryCatalog.xcassets/product_category_mock_iphone.imageset/product_category_mock_iphone@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/GKCommerce/Product/ProductCategory/Mock/ProductCategoryCatalog.xcassets/product_category_mock_iphone.imageset/product_category_mock_iphone@2x.png
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/ProductCategory/Mock/ProductCategoryCatalog.xcassets/product_category_mock_macbook.png.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "product_category_mock_macbook@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/ProductCategory/Mock/ProductCategoryCatalog.xcassets/product_category_mock_macbook.png.imageset/product_category_mock_macbook@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/GKCommerce/Product/ProductCategory/Mock/ProductCategoryCatalog.xcassets/product_category_mock_macbook.png.imageset/product_category_mock_macbook@2x.png
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/ProductCategory/TableViewCell/ProductCategoryChildTableViewCellGrid.h:
--------------------------------------------------------------------------------
1 | //
2 | // MallSecondCategoryCellGrid.h
3 | // goku-commerce.com
4 | //
5 | // Created by 小悟空 on 14-8-28.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ProductCategoryChildTableViewCellGrid : UIView
12 | @end
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/ProductCategory/TableViewCell/ProductCategoryTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // MallCategoryCell.h
3 | // goku-commerce.com
4 | //
5 | // Created by wupeng on 8/8/14.
6 | // Copyright (c) 2014 小悟空. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "SKSTableViewCell.h"
11 | #import "ProductCategory.h"
12 |
13 | @interface ProductCategoryTableViewCell : SKSTableViewCell
14 |
15 | @property (nonatomic, strong) IBOutlet UILabel *nameLabel;
16 | @property (nonatomic, strong) IBOutlet UILabel *descriptionLabel;
17 | @property (nonatomic, strong) IBOutlet UIImageView *coverImage;
18 | @property (nonatomic, strong) ProductCategory *productCategory;
19 | @end
20 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/ProductDetail/Mock/Product1.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": 1,
3 | "name": "苹果(Apple)iPhone 6 Plus (A1524) 16GB 金色",
4 | "description": "在打造 iPhone 6 时,我们反复斟酌了各种材料和元素。也正因如此,我们才得以让光滑圆润、流畅一体的机身成为现实。我们以至薄的显示屏成就至为纤薄的机身,把按钮安排在直观易用的位置,并以质感唯美的阳极氧化铝金属、不锈钢及玻璃来将一切塑造成形。这是成千上万个微小细节共同凝聚的一款大作,或者更准确地说,是两款大作:iPhone 6 和 iPhone 6 Plus。",
5 | "regularPrice": 5999.00,
6 | "listingPrice": 5888.00,
7 | "pictures": [
8 | "http://img20.360buyimg.com/vc/jfs/t556/319/1100656343/78198/b5af8faa/54ae9a6eNe2dbf0ef.jpg",
9 | "iphone_6@2x.jpg"
10 | ]
11 | }
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/ProductDetail/TableViewCell/ProductDetailCarouselTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // ProductDetailCarouselTableViewCell.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14/10/22.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ProductDetailTableViewCell.h"
11 | #import "Product.h"
12 | #import "GKCarouselView.h"
13 |
14 | @interface ProductDetailCarouselTableViewCell : ProductDetailTableViewCell
15 |
16 |
17 | @property (strong, nonatomic) IBOutlet GKCarouselView *carousel;
18 | @end
19 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/ProductDetail/TableViewCell/ProductDetailInfomationTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // ProductDetailInfomationTableViewCell.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14/10/22.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ProductDetailTableViewCell.h"
11 |
12 | @interface ProductDetailInfomationTableViewCell : ProductDetailTableViewCell
13 | @end
14 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/ProductDetail/TableViewCell/ProductDetailInfomationTableViewCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // ProductDetailInfomationTableViewCell.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14/10/22.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "ProductDetailInfomationTableViewCell.h"
10 |
11 | @implementation ProductDetailInfomationTableViewCell
12 |
13 | - (void)awakeFromNib {
14 | // Initialization code
15 | }
16 |
17 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
18 | [super setSelected:selected animated:animated];
19 | }
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/ProductDetail/TableViewCell/ProductDetailTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // ProductDetailTableViewCell.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14/10/22.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "Product.h"
11 |
12 | @interface ProductDetailTableViewCell : UITableViewCell
13 |
14 | @property (strong, nonatomic) Product *product;
15 | @end
16 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/ProductDetail/TableViewCell/ProductDetailTableViewCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // ProductDetailTableViewCell.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14/10/22.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "ProductDetailTableViewCell.h"
10 |
11 | @implementation ProductDetailTableViewCell
12 |
13 | - (void)awakeFromNib {
14 | // Initialization code
15 | }
16 |
17 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
18 | [super setSelected:selected animated:animated];
19 |
20 | // Configure the view for the selected state
21 | }
22 | @end
23 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/ProductDetail/View/ProductDetailMoreTabButton.h:
--------------------------------------------------------------------------------
1 | //
2 | // ProductDetailMoreTabButton.h
3 | // goku-commerce.com
4 | //
5 | // Created by 小悟空 on 14-8-15.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ProductDetailMoreTabButtonDelegate.h"
11 |
12 | @interface ProductDetailMoreTabButton : UILabel
13 |
14 | @property (nonatomic, strong) UILabel *label;
15 | @property (nonatomic, assign) NSInteger index;
16 | @property (nonatomic, strong) id delegate;
17 |
18 | - (id)initWithTitle:(NSString *)title atIndex:(NSInteger)index;
19 | - (void)showRightBorder;
20 | - (void)active;
21 | - (void)deactive;
22 | @end
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/ProductDetail/View/ProductDetailMoreTabButtonDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // ProductDetailMoreTabButtonDelegate.h
3 | // goku-commerce.com
4 | //
5 | // Created by 小悟空 on 14-8-15.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class ProductDetailMoreTabButton;
12 |
13 | @protocol ProductDetailMoreTabButtonDelegate
14 | - (void)didTapTabButton:(ProductDetailMoreTabButton *)button;
15 | @end
16 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/ProductDetail/View/ProductMoreTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // ProductMoreTableViewCell.h
3 | // goku-commerce.com
4 | //
5 | // Created by 小悟空 on 14-9-4.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ProductMoreTableViewCell : UITableViewCell
12 |
13 | @property (strong, nonatomic) IBOutlet UILabel *left;
14 | @property (strong, nonatomic) IBOutlet UILabel *right;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/ProductList/Mock/ProductList.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "id": 1,
4 | "name": "苹果(Apple)iPhone 6 Plus (A1524) 16GB 金色",
5 | "description": "在打造 iPhone 6 时,我们反复斟酌了各种材料和元素。也正因如此,我们才得以让光滑圆润、流畅一体的机身成为现实。我们以至薄的显示屏成就至为纤薄的机身,把按钮安排在直观易用的位置,并以质感唯美的阳极氧化铝金属、不锈钢及玻璃来将一切塑造成形。这是成千上万个微小细节共同凝聚的一款大作,或者更准确地说,是两款大作:iPhone 6 和 iPhone 6 Plus。",
6 | "regularPrice": 5999.00,
7 | "listingPrice": 5888.00,
8 | "pictures": [
9 | "iphone_6@2x.jpg"
10 | ]
11 | }
12 | ]
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/ProductList/Mock/ProductListCatalog.xcassets/iphone_6.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "iphone_6@2x.jpg"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/ProductList/Mock/ProductListCatalog.xcassets/iphone_6.imageset/iphone_6@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gokush/GKCommerce/0b3e7e5ea922188bdcbe84a9e818307a34d1e567/GKCommerce/GKCommerce/Product/ProductList/Mock/ProductListCatalog.xcassets/iphone_6.imageset/iphone_6@2x.jpg
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/ProductList/View/ProductListCollectionViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // ProductIndexViewCell.h
3 | // goku-commerce.com
4 | //
5 | // Created by 小悟空 on 14-8-26.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "Product.h"
11 |
12 | @interface ProductListCollectionViewCell : UICollectionViewCell
13 |
14 | @property (strong, nonatomic) IBOutlet UIImageView *photoImageView;
15 | @property (strong, nonatomic) IBOutlet UILabel *nameLabel;
16 | @property (strong, nonatomic) IBOutlet UILabel *priceLabel;
17 | @property (strong, nonatomic) IBOutlet UILabel *marketPriceLabel;
18 | @property (strong, nonatomic) Product *product;
19 | @end
20 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/ProductRepository.h:
--------------------------------------------------------------------------------
1 | //
2 | // ProductRepository.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/21/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ProductRepository : NSObject
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Product/ProductRepository.m:
--------------------------------------------------------------------------------
1 | //
2 | // ProductRepository.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/21/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "ProductRepository.h"
10 |
11 | @implementation ProductRepository
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Protocol/UIBindableTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIBindableTableViewCell.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14/11/3.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @protocol UIBindableTableViewCell
12 |
13 | - (void)bind;
14 | - (void)unbind;
15 | @end
16 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Store/Model/ShippingMethod.h:
--------------------------------------------------------------------------------
1 | //
2 | // Shipping.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14/11/1.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ShippingMethod : NSObject
12 |
13 | @property (assign, nonatomic) NSInteger shippingID;
14 | @property (strong, nonatomic) NSString *code;
15 | @property (strong, nonatomic) NSString *name;
16 | @property (assign, nonatomic) BOOL cashOnDelivery;
17 | @property (strong, nonatomic) NSDecimalNumber *freight;
18 | @end
19 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Store/Model/ShippingMethod.m:
--------------------------------------------------------------------------------
1 | //
2 | // Shipping.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 14/11/1.
6 | // Copyright (c) 2014年 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "ShippingMethod.h"
10 |
11 | @implementation ShippingMethod
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/Store/Model/Store.h:
--------------------------------------------------------------------------------
1 | //
2 | // Shop.h
3 | // goku-commerce.com
4 | //
5 | // Created by 小悟空 on 14-8-17.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GKUser.h"
11 | #import "ShippingMethod.h"
12 |
13 | @class Product;
14 | @interface Store : NSObject
15 |
16 | @property (assign, nonatomic) NSInteger storeID;
17 | @property (strong, nonatomic) NSMutableArray *products;
18 | @property (strong, nonatomic) NSMutableArray *shippingMethods;
19 | @property (strong, nonatomic) NSMutableArray *payments;
20 |
21 | - (void)addProduct:(Product *)product;
22 | - (Product *)productWithID:(NSInteger)productID;
23 | @end
24 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/TestUI.h:
--------------------------------------------------------------------------------
1 | //
2 | // TestUI.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 12/11/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface TestUI : NSObject
12 |
13 | - (void)gotoCheckout:(UITabBarController *)tabBarController;
14 | - (void)gotoAddAddress:(UITabBarController *)tabBarController;
15 | - (void)gotoAddressList:(UITabBarController *)tabBarController;
16 | - (void)gotoProductList:(UITabBarController *)tabBarController;
17 | @end
18 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/UI/GKButton.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKButton.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/21/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | IB_DESIGNABLE
12 | @interface GKButton : UIButton
13 |
14 | @property (assign, nonatomic) IBInspectable CGFloat cornerRadius;
15 | @property (assign, nonatomic) IBInspectable CGFloat borderWidth;
16 | @property (assign, nonatomic) IBInspectable UIColor *borderColor;
17 | @end
18 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/UI/GKButton.m:
--------------------------------------------------------------------------------
1 | //
2 | // GKButton.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/21/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "GKButton.h"
10 |
11 | @implementation GKButton
12 |
13 | - (void)setCornerRadius:(CGFloat)cornerRadius
14 | {
15 | _cornerRadius = cornerRadius;
16 | self.layer.cornerRadius = cornerRadius;
17 | }
18 |
19 | - (void)setBorderWidth:(CGFloat)borderWidth
20 | {
21 | _borderWidth = borderWidth;
22 | self.layer.borderWidth = borderWidth;
23 | }
24 |
25 | - (void)setBorderColor:(UIColor *)borderColor
26 | {
27 | _borderColor = borderColor;
28 | self.layer.borderColor = borderColor.CGColor;
29 | }
30 | @end
31 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/UI/GKCarousel/GKCarouselViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // WKSlideButton.h
3 | // WuKongCommerce
4 | //
5 | // Created by 小悟空 on 14-9-10.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface GKCarouselViewCell : UIView
12 |
13 | @property (nonatomic, strong) NSURL *imageURL;
14 | @property (nonatomic, assign) NSInteger index;
15 | @property (nonatomic, strong) UIImageView *imageView;
16 | @property (nonatomic, strong) id userInfo;
17 | @end
18 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/UI/GKCarousel/GKCarouselViewDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // WKSlideDelegate.h
3 | // WuKongCommerce
4 | //
5 | // Created by 小悟空 on 14-9-10.
6 | // Copyright (c) 2014年 小悟空. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GKCarouselView.h"
11 | #import "GKCarouselViewCell.h"
12 |
13 | @class GKCarouselView;
14 | @protocol GKCarouselViewDelegate
15 |
16 | - (GKCarouselViewCell *)carouselView:(GKCarouselView *)carouselView
17 | cellAtIndex:(NSInteger)index;
18 | - (NSInteger)numberOfCellsInCarouselView:(GKCarouselView *)carouselView;
19 | @optional
20 | - (void)carouselView:(GKCarouselView *)carouselView
21 | didSelectAtIndex:(NSInteger)index;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/UI/GKLabel.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKLabel.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/22/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UILabel (Strikethrough)
12 |
13 | - (void)setStrikethrough;
14 | @end
15 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/UI/GKLabel.m:
--------------------------------------------------------------------------------
1 | //
2 | // GKLabel.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/22/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "GKLabel.h"
10 |
11 | @implementation UILabel(Strikethrough)
12 |
13 | - (void)setStrikethrough
14 | {
15 | NSMutableAttributedString *attribute;
16 | attribute = [[NSMutableAttributedString alloc]
17 | initWithAttributedString:self.attributedText];
18 | NSNumber *strikethrough = [NSNumber numberWithInt:NSUnderlineStyleSingle];
19 | int length = self.text.length;
20 | [attribute addAttribute:NSStrikethroughStyleAttributeName
21 | value:strikethrough range:NSMakeRange(0, length)];
22 | self.attributedText = attribute;
23 | }
24 | @end
25 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/UI/GKToggleButton.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIToggleButton.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/24/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class GKToggleButton;
12 | @protocol GKToggleButtonDelegate
13 |
14 | - (void)toggleButton:(GKToggleButton *)aToggleButton didSwitch:(BOOL)onOrOff;
15 | @end
16 |
17 | IB_DESIGNABLE
18 | @interface GKToggleButton : UIView
19 |
20 | @property (assign, nonatomic) IBInspectable BOOL on;
21 | @property (strong, nonatomic) IBInspectable UIImage *onImage;
22 | @property (strong, nonatomic) IBInspectable UIImage *offImage;
23 | @property (strong, nonatomic) IBOutlet id delegate;
24 | - (void)tapButton;
25 | @end
26 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/User/Backend/ECUserBackend.h:
--------------------------------------------------------------------------------
1 | //
2 | // ECUserBackend.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/20/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "Backend.h"
10 | #import "UserBackend.h"
11 | #import "ECUserBackendAssembler.h"
12 |
13 | @interface ECUserBackend : Backend
14 |
15 | @property (strong, nonatomic) id delegate;
16 | @property (strong, nonatomic) ECUserBackendAssembler *assembler;
17 | + (instancetype)shared;
18 | @end
19 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/User/Backend/ECUserBackendAssembler.h:
--------------------------------------------------------------------------------
1 | //
2 | // ECUserBackendAssembler.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/20/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "User.h"
11 | #import "ECBackendAssembler.h"
12 |
13 | @interface ECUserBackendAssembler : ECBackendAssembler
14 |
15 | - (User *)user:(NSDictionary *)JSON;
16 | @end
17 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/User/Backend/ECUserBackendAssembler.m:
--------------------------------------------------------------------------------
1 | //
2 | // ECUserBackendAssembler.m
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 11/20/14.
6 | // Copyright (c) 2014 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import "ECUserBackendAssembler.h"
10 |
11 | @implementation ECUserBackendAssembler
12 |
13 | - (User *)user:(NSDictionary *)JSON
14 | {
15 | User *user = [[User alloc] init];
16 | user.userID = [[JSON valueForKeyPath:@"data.session.uid"] integerValue];
17 | user.sessionID = [JSON valueForKeyPath:@"data.session.sid"];
18 |
19 | user.username = [JSON valueForKeyPath:@"data.user.name"];
20 | user.email = [JSON valueForKeyPath:@"data.user.email"];
21 |
22 | return user;
23 | }
24 | @end
25 |
--------------------------------------------------------------------------------
/GKCommerce/GKCommerce/User/Backend/GKUserAssembler.h:
--------------------------------------------------------------------------------
1 | //
2 | // GKUserAssembler.h
3 | // GKCommerce
4 | //
5 | // Created by 小悟空 on 1/15/15.
6 | // Copyright (c) 2015 GKCommerce. All rights reserved.
7 | //
8 |
9 | #import