diff --git a/GiGaMall.xcodeproj/project.pbxproj b/GiGaMall.xcodeproj/project.pbxproj index 25fcfc6..c9d2cd6 100644 --- a/GiGaMall.xcodeproj/project.pbxproj +++ b/GiGaMall.xcodeproj/project.pbxproj @@ -8,6 +8,19 @@ /* Begin PBXBuildFile section */ 2EA2CCC376D33903D390C777 /* Pods_GiGaMall.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B311EA8D7B4CBC4CE535B0D0 /* Pods_GiGaMall.framework */; }; + 83CBFBC322320A35006B40D8 /* GiGaMallConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 83CBFBC222320A35006B40D8 /* GiGaMallConfig.m */; }; + 83CBFBC622320CE0006B40D8 /* AppDelegate+GiGaMallConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 83CBFBC522320CE0006B40D8 /* AppDelegate+GiGaMallConfig.m */; }; + 83CBFBC922321CD6006B40D8 /* UILabel+DeleteLine.m in Sources */ = {isa = PBXBuildFile; fileRef = 83CBFBC822321CD6006B40D8 /* UILabel+DeleteLine.m */; }; + 83CBFBCE22321DFD006B40D8 /* GiGaMallHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 83CBFBCD22321DFD006B40D8 /* GiGaMallHelper.m */; }; + 83CBFBD422322053006B40D8 /* UIColor+MallTheme.m in Sources */ = {isa = PBXBuildFile; fileRef = 83CBFBD322322053006B40D8 /* UIColor+MallTheme.m */; }; + 83CBFBEC2232382E006B40D8 /* GiGaMallBaseNavViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 83CBFBEB2232382E006B40D8 /* GiGaMallBaseNavViewController.m */; }; + 83CBFBEF22323A26006B40D8 /* GiGaMallBaseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 83CBFBEE22323A26006B40D8 /* GiGaMallBaseViewController.m */; }; + 83CBFBF422323BAE006B40D8 /* GiGaNavTitileView.m in Sources */ = {isa = PBXBuildFile; fileRef = 83CBFBF322323BAE006B40D8 /* GiGaNavTitileView.m */; }; + 83CBFBF722323E1A006B40D8 /* GiGaMallTabBarViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 83CBFBF622323E1A006B40D8 /* GiGaMallTabBarViewController.m */; }; + 83CBFBFA22323F2F006B40D8 /* GiGaMallHomePageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 83CBFBF922323F2F006B40D8 /* GiGaMallHomePageViewController.m */; }; + 83CBFC0022323FC8006B40D8 /* GiGaMallShipmentViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 83CBFBFF22323FC8006B40D8 /* GiGaMallShipmentViewController.m */; }; + 83CBFC0322323FEE006B40D8 /* GiGaMallMemberCenterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 83CBFC0222323FEE006B40D8 /* GiGaMallMemberCenterViewController.m */; }; + 83CBFC0622324029006B40D8 /* GGMReplenishmentViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 83CBFC0522324029006B40D8 /* GGMReplenishmentViewController.m */; }; 83D44E332231581700CB3257 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 83D44E322231581700CB3257 /* AppDelegate.m */; }; 83D44E362231581700CB3257 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 83D44E352231581700CB3257 /* ViewController.m */; }; 83D44E392231581700CB3257 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 83D44E372231581700CB3257 /* Main.storyboard */; }; @@ -39,6 +52,33 @@ 766C83C22760C583C705C2C8 /* Pods-GiGaMall.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GiGaMall.release.xcconfig"; path = "Pods/Target Support Files/Pods-GiGaMall/Pods-GiGaMall.release.xcconfig"; sourceTree = ""; }; 830D764C22315AD1008B69A2 /* GiGaMall.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaMall.h; sourceTree = ""; }; 830D764D22315B13008B69A2 /* GiGaMall.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaMall.pch; sourceTree = ""; }; + 83CBFBC122320A35006B40D8 /* GiGaMallConfig.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaMallConfig.h; sourceTree = ""; }; + 83CBFBC222320A35006B40D8 /* GiGaMallConfig.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaMallConfig.m; sourceTree = ""; }; + 83CBFBC422320CE0006B40D8 /* AppDelegate+GiGaMallConfig.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "AppDelegate+GiGaMallConfig.h"; sourceTree = ""; }; + 83CBFBC522320CE0006B40D8 /* AppDelegate+GiGaMallConfig.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "AppDelegate+GiGaMallConfig.m"; sourceTree = ""; }; + 83CBFBC722321CD6006B40D8 /* UILabel+DeleteLine.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UILabel+DeleteLine.h"; sourceTree = ""; }; + 83CBFBC822321CD6006B40D8 /* UILabel+DeleteLine.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UILabel+DeleteLine.m"; sourceTree = ""; }; + 83CBFBCC22321DFD006B40D8 /* GiGaMallHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaMallHelper.h; sourceTree = ""; }; + 83CBFBCD22321DFD006B40D8 /* GiGaMallHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaMallHelper.m; sourceTree = ""; }; + 83CBFBCF22321F4B006B40D8 /* GiGaMallApiConfig.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaMallApiConfig.h; sourceTree = ""; }; + 83CBFBD222322053006B40D8 /* UIColor+MallTheme.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIColor+MallTheme.h"; sourceTree = ""; }; + 83CBFBD322322053006B40D8 /* UIColor+MallTheme.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIColor+MallTheme.m"; sourceTree = ""; }; + 83CBFBEA2232382E006B40D8 /* GiGaMallBaseNavViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaMallBaseNavViewController.h; sourceTree = ""; }; + 83CBFBEB2232382E006B40D8 /* GiGaMallBaseNavViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaMallBaseNavViewController.m; sourceTree = ""; }; + 83CBFBED22323A26006B40D8 /* GiGaMallBaseViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaMallBaseViewController.h; sourceTree = ""; }; + 83CBFBEE22323A26006B40D8 /* GiGaMallBaseViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaMallBaseViewController.m; sourceTree = ""; }; + 83CBFBF222323BAE006B40D8 /* GiGaNavTitileView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GiGaNavTitileView.h; sourceTree = ""; }; + 83CBFBF322323BAE006B40D8 /* GiGaNavTitileView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GiGaNavTitileView.m; sourceTree = ""; }; + 83CBFBF522323E1A006B40D8 /* GiGaMallTabBarViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaMallTabBarViewController.h; sourceTree = ""; }; + 83CBFBF622323E1A006B40D8 /* GiGaMallTabBarViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaMallTabBarViewController.m; sourceTree = ""; }; + 83CBFBF822323F2F006B40D8 /* GiGaMallHomePageViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaMallHomePageViewController.h; sourceTree = ""; }; + 83CBFBF922323F2F006B40D8 /* GiGaMallHomePageViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaMallHomePageViewController.m; sourceTree = ""; }; + 83CBFBFE22323FC8006B40D8 /* GiGaMallShipmentViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaMallShipmentViewController.h; sourceTree = ""; }; + 83CBFBFF22323FC8006B40D8 /* GiGaMallShipmentViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaMallShipmentViewController.m; sourceTree = ""; }; + 83CBFC0122323FEE006B40D8 /* GiGaMallMemberCenterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaMallMemberCenterViewController.h; sourceTree = ""; }; + 83CBFC0222323FEE006B40D8 /* GiGaMallMemberCenterViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaMallMemberCenterViewController.m; sourceTree = ""; }; + 83CBFC0422324029006B40D8 /* GGMReplenishmentViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GGMReplenishmentViewController.h; sourceTree = ""; }; + 83CBFC0522324029006B40D8 /* GGMReplenishmentViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GGMReplenishmentViewController.m; sourceTree = ""; }; 83D44E2E2231581700CB3257 /* GiGaMall.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GiGaMall.app; sourceTree = BUILT_PRODUCTS_DIR; }; 83D44E312231581700CB3257 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 83D44E322231581700CB3257 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; @@ -94,6 +134,275 @@ name = Pods; sourceTree = ""; }; + 83CBFBBD223208F1006B40D8 /* Config */ = { + isa = PBXGroup; + children = ( + 83CBFBC122320A35006B40D8 /* GiGaMallConfig.h */, + 83CBFBC222320A35006B40D8 /* GiGaMallConfig.m */, + 83CBFBCF22321F4B006B40D8 /* GiGaMallApiConfig.h */, + ); + path = Config; + sourceTree = ""; + }; + 83CBFBBE22320916006B40D8 /* Modules */ = { + isa = PBXGroup; + children = ( + 83CBFBD92232328E006B40D8 /* MemberCenter */, + 83CBFBD8223231FA006B40D8 /* Shipment */, + 83CBFBD7223231A2006B40D8 /* Replenishment */, + 83CBFBD62232316A006B40D8 /* HomePage */, + 83CBFBD522323126006B40D8 /* UserLogin */, + ); + path = Modules; + sourceTree = ""; + }; + 83CBFBBF22320990006B40D8 /* Category */ = { + isa = PBXGroup; + children = ( + 83CBFBC722321CD6006B40D8 /* UILabel+DeleteLine.h */, + 83CBFBC822321CD6006B40D8 /* UILabel+DeleteLine.m */, + 83CBFBD222322053006B40D8 /* UIColor+MallTheme.h */, + 83CBFBD322322053006B40D8 /* UIColor+MallTheme.m */, + ); + path = Category; + sourceTree = ""; + }; + 83CBFBC0223209DC006B40D8 /* Common */ = { + isa = PBXGroup; + children = ( + 83CBFBF022323B8F006B40D8 /* Utils */, + 83CBFBE9223237BE006B40D8 /* GiGaMallBase */, + 83CBFBD122321F8F006B40D8 /* GiGaMallUserDB */, + 83CBFBD022321F6D006B40D8 /* GiGaMallNetApiTool */, + 83CBFBCB22321D99006B40D8 /* Helper */, + 83CBFBCA22321D83006B40D8 /* Lib */, + ); + path = Common; + sourceTree = ""; + }; + 83CBFBCA22321D83006B40D8 /* Lib */ = { + isa = PBXGroup; + children = ( + ); + path = Lib; + sourceTree = ""; + }; + 83CBFBCB22321D99006B40D8 /* Helper */ = { + isa = PBXGroup; + children = ( + 83CBFBCC22321DFD006B40D8 /* GiGaMallHelper.h */, + 83CBFBCD22321DFD006B40D8 /* GiGaMallHelper.m */, + ); + path = Helper; + sourceTree = ""; + }; + 83CBFBD022321F6D006B40D8 /* GiGaMallNetApiTool */ = { + isa = PBXGroup; + children = ( + ); + path = GiGaMallNetApiTool; + sourceTree = ""; + }; + 83CBFBD122321F8F006B40D8 /* GiGaMallUserDB */ = { + isa = PBXGroup; + children = ( + ); + path = GiGaMallUserDB; + sourceTree = ""; + }; + 83CBFBD522323126006B40D8 /* UserLogin */ = { + isa = PBXGroup; + children = ( + 83CBFBE8223233B2006B40D8 /* View */, + 83CBFBE7223233AC006B40D8 /* Model */, + 83CBFBE62232339E006B40D8 /* Controller */, + ); + path = UserLogin; + sourceTree = ""; + }; + 83CBFBD62232316A006B40D8 /* HomePage */ = { + isa = PBXGroup; + children = ( + 83CBFBE522323393006B40D8 /* View */, + 83CBFBE42232338D006B40D8 /* Model */, + 83CBFBE322323386006B40D8 /* Controller */, + ); + path = HomePage; + sourceTree = ""; + }; + 83CBFBD7223231A2006B40D8 /* Replenishment */ = { + isa = PBXGroup; + children = ( + 83CBFBE22232337D006B40D8 /* View */, + 83CBFBE122323377006B40D8 /* Model */, + 83CBFBE02232336A006B40D8 /* Controller */, + ); + path = Replenishment; + sourceTree = ""; + }; + 83CBFBD8223231FA006B40D8 /* Shipment */ = { + isa = PBXGroup; + children = ( + 83CBFBDF2232335F006B40D8 /* View */, + 83CBFBDE22323357006B40D8 /* Model */, + 83CBFBDD2232334D006B40D8 /* Controller */, + ); + path = Shipment; + sourceTree = ""; + }; + 83CBFBD92232328E006B40D8 /* MemberCenter */ = { + isa = PBXGroup; + children = ( + 83CBFBDC2232332F006B40D8 /* View */, + 83CBFBDB22323327006B40D8 /* Model */, + 83CBFBDA2232330E006B40D8 /* Controller */, + ); + path = MemberCenter; + sourceTree = ""; + }; + 83CBFBDA2232330E006B40D8 /* Controller */ = { + isa = PBXGroup; + children = ( + 83CBFC0122323FEE006B40D8 /* GiGaMallMemberCenterViewController.h */, + 83CBFC0222323FEE006B40D8 /* GiGaMallMemberCenterViewController.m */, + ); + path = Controller; + sourceTree = ""; + }; + 83CBFBDB22323327006B40D8 /* Model */ = { + isa = PBXGroup; + children = ( + ); + path = Model; + sourceTree = ""; + }; + 83CBFBDC2232332F006B40D8 /* View */ = { + isa = PBXGroup; + children = ( + ); + path = View; + sourceTree = ""; + }; + 83CBFBDD2232334D006B40D8 /* Controller */ = { + isa = PBXGroup; + children = ( + 83CBFBFE22323FC8006B40D8 /* GiGaMallShipmentViewController.h */, + 83CBFBFF22323FC8006B40D8 /* GiGaMallShipmentViewController.m */, + ); + path = Controller; + sourceTree = ""; + }; + 83CBFBDE22323357006B40D8 /* Model */ = { + isa = PBXGroup; + children = ( + ); + path = Model; + sourceTree = ""; + }; + 83CBFBDF2232335F006B40D8 /* View */ = { + isa = PBXGroup; + children = ( + ); + path = View; + sourceTree = ""; + }; + 83CBFBE02232336A006B40D8 /* Controller */ = { + isa = PBXGroup; + children = ( + 83CBFC0422324029006B40D8 /* GGMReplenishmentViewController.h */, + 83CBFC0522324029006B40D8 /* GGMReplenishmentViewController.m */, + ); + path = Controller; + sourceTree = ""; + }; + 83CBFBE122323377006B40D8 /* Model */ = { + isa = PBXGroup; + children = ( + ); + path = Model; + sourceTree = ""; + }; + 83CBFBE22232337D006B40D8 /* View */ = { + isa = PBXGroup; + children = ( + ); + path = View; + sourceTree = ""; + }; + 83CBFBE322323386006B40D8 /* Controller */ = { + isa = PBXGroup; + children = ( + 83CBFBF822323F2F006B40D8 /* GiGaMallHomePageViewController.h */, + 83CBFBF922323F2F006B40D8 /* GiGaMallHomePageViewController.m */, + ); + path = Controller; + sourceTree = ""; + }; + 83CBFBE42232338D006B40D8 /* Model */ = { + isa = PBXGroup; + children = ( + ); + path = Model; + sourceTree = ""; + }; + 83CBFBE522323393006B40D8 /* View */ = { + isa = PBXGroup; + children = ( + ); + path = View; + sourceTree = ""; + }; + 83CBFBE62232339E006B40D8 /* Controller */ = { + isa = PBXGroup; + children = ( + ); + path = Controller; + sourceTree = ""; + }; + 83CBFBE7223233AC006B40D8 /* Model */ = { + isa = PBXGroup; + children = ( + ); + path = Model; + sourceTree = ""; + }; + 83CBFBE8223233B2006B40D8 /* View */ = { + isa = PBXGroup; + children = ( + ); + path = View; + sourceTree = ""; + }; + 83CBFBE9223237BE006B40D8 /* GiGaMallBase */ = { + isa = PBXGroup; + children = ( + 83CBFBEA2232382E006B40D8 /* GiGaMallBaseNavViewController.h */, + 83CBFBEB2232382E006B40D8 /* GiGaMallBaseNavViewController.m */, + 83CBFBED22323A26006B40D8 /* GiGaMallBaseViewController.h */, + 83CBFBEE22323A26006B40D8 /* GiGaMallBaseViewController.m */, + 83CBFBF522323E1A006B40D8 /* GiGaMallTabBarViewController.h */, + 83CBFBF622323E1A006B40D8 /* GiGaMallTabBarViewController.m */, + ); + path = GiGaMallBase; + sourceTree = ""; + }; + 83CBFBF022323B8F006B40D8 /* Utils */ = { + isa = PBXGroup; + children = ( + 83CBFBF122323BAE006B40D8 /* GiGaNavTitileView */, + ); + path = Utils; + sourceTree = ""; + }; + 83CBFBF122323BAE006B40D8 /* GiGaNavTitileView */ = { + isa = PBXGroup; + children = ( + 83CBFBF222323BAE006B40D8 /* GiGaNavTitileView.h */, + 83CBFBF322323BAE006B40D8 /* GiGaNavTitileView.m */, + ); + path = GiGaNavTitileView; + sourceTree = ""; + }; 83D44E252231581700CB3257 = { isa = PBXGroup; children = ( @@ -119,8 +428,14 @@ 83D44E302231581700CB3257 /* GiGaMall */ = { isa = PBXGroup; children = ( + 83CBFBC0223209DC006B40D8 /* Common */, + 83CBFBBF22320990006B40D8 /* Category */, + 83CBFBBE22320916006B40D8 /* Modules */, + 83CBFBBD223208F1006B40D8 /* Config */, 83D44E312231581700CB3257 /* AppDelegate.h */, 83D44E322231581700CB3257 /* AppDelegate.m */, + 83CBFBC422320CE0006B40D8 /* AppDelegate+GiGaMallConfig.h */, + 83CBFBC522320CE0006B40D8 /* AppDelegate+GiGaMallConfig.m */, 83D44E342231581700CB3257 /* ViewController.h */, 83D44E352231581700CB3257 /* ViewController.m */, 83D44E372231581700CB3257 /* Main.storyboard */, @@ -354,8 +669,21 @@ buildActionMask = 2147483647; files = ( 83D44E362231581700CB3257 /* ViewController.m in Sources */, + 83CBFBF422323BAE006B40D8 /* GiGaNavTitileView.m in Sources */, + 83CBFBF722323E1A006B40D8 /* GiGaMallTabBarViewController.m in Sources */, + 83CBFBEC2232382E006B40D8 /* GiGaMallBaseNavViewController.m in Sources */, + 83CBFBCE22321DFD006B40D8 /* GiGaMallHelper.m in Sources */, + 83CBFC0322323FEE006B40D8 /* GiGaMallMemberCenterViewController.m in Sources */, + 83CBFC0622324029006B40D8 /* GGMReplenishmentViewController.m in Sources */, + 83CBFBEF22323A26006B40D8 /* GiGaMallBaseViewController.m in Sources */, + 83CBFBC922321CD6006B40D8 /* UILabel+DeleteLine.m in Sources */, 83D44E412231581800CB3257 /* main.m in Sources */, 83D44E332231581700CB3257 /* AppDelegate.m in Sources */, + 83CBFBFA22323F2F006B40D8 /* GiGaMallHomePageViewController.m in Sources */, + 83CBFBC322320A35006B40D8 /* GiGaMallConfig.m in Sources */, + 83CBFC0022323FC8006B40D8 /* GiGaMallShipmentViewController.m in Sources */, + 83CBFBC622320CE0006B40D8 /* AppDelegate+GiGaMallConfig.m in Sources */, + 83CBFBD422322053006B40D8 /* UIColor+MallTheme.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -530,6 +858,11 @@ CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = U3L4264SQH; GCC_PREFIX_HEADER = "$(SRCROOT)//GiGaMall/GiGaMall.pch"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "COCOAPODS=1", + "GIGA_ENVIRONMENT=0", + ); INFOPLIST_FILE = GiGaMall/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -550,6 +883,11 @@ CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = U3L4264SQH; GCC_PREFIX_HEADER = "$(SRCROOT)//GiGaMall/GiGaMall.pch"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "COCOAPODS=1", + "GIGA_ENVIRONMENT=1", + ); INFOPLIST_FILE = GiGaMall/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = ( diff --git a/GiGaMall/AppDelegate+GiGaMallConfig.h b/GiGaMall/AppDelegate+GiGaMallConfig.h new file mode 100644 index 0000000..bc147cf --- /dev/null +++ b/GiGaMall/AppDelegate+GiGaMallConfig.h @@ -0,0 +1,28 @@ +// +// AppDelegate+GiGaMallConfig.h +// GiGaMall +// +// Created by lianxiang on 2019/3/8. +// Copyright © 2019年 com.shanghaigigamall.ios. All rights reserved. +// + +#import "AppDelegate.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface AppDelegate (GiGaMallConfig) + +/** + 主控制器 + */ +- (void)setupTabBarController; + +/** + 服务器环境 + */ +- (void)configEnvironment; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/GiGaMall/AppDelegate+GiGaMallConfig.m b/GiGaMall/AppDelegate+GiGaMallConfig.m new file mode 100644 index 0000000..6c53e62 --- /dev/null +++ b/GiGaMall/AppDelegate+GiGaMallConfig.m @@ -0,0 +1,98 @@ +// +// AppDelegate+GiGaMallConfig.m +// GiGaMall +// +// Created by lianxiang on 2019/3/8. +// Copyright © 2019年 com.shanghaigigamall.ios. All rights reserved. +// + +#import "AppDelegate+GiGaMallConfig.h" +#import "GiGaMallConfig.h" +#import "GiGaMallTabBarViewController.h" +#import "GiGaMallHomePageViewController.h" +#import "GGMReplenishmentViewController.h" +#import "GiGaMallShipmentViewController.h" +#import "GiGaMallMemberCenterViewController.h" +#import "GiGaMallBaseNavViewController.h" + +@implementation AppDelegate (GiGaMallConfig) + +-(void)configEnvironment{ + + [GiGaMallConfig setServerType:GIGA_ENVIRONMENT]; + +} + +-(void)setupTabBarController{ + + ///首页 + GiGaMallHomePageViewController *homepageVC = [[GiGaMallHomePageViewController alloc] init]; + + GiGaMallBaseNavViewController *homeNav =[[GiGaMallBaseNavViewController alloc] initWithRootViewController:homepageVC]; + homeNav.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName : [UIColor blackColor]}; + homeNav.title = @"首页"; + homeNav.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"首页" + image:nil + selectedImage:nil]; + + ///补货 + GGMReplenishmentViewController *replenishmentVC = [[GGMReplenishmentViewController alloc] init]; + GiGaMallBaseNavViewController *replenishmentNav = [[GiGaMallBaseNavViewController alloc] initWithRootViewController:replenishmentVC]; + replenishmentNav.navigationBar.titleTextAttributes =@{NSForegroundColorAttributeName:[UIColor blackColor]}; + replenishmentNav.title = @"补货"; + replenishmentNav.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"补货" image:nil selectedImage:nil]; + + ///提货 + GiGaMallShipmentViewController *shipmentVC = [[GiGaMallShipmentViewController alloc] init]; + GiGaMallBaseNavViewController *shipmentNav = [[GiGaMallBaseNavViewController alloc] initWithRootViewController:shipmentVC]; + shipmentNav.navigationBar.titleTextAttributes =@{NSForegroundColorAttributeName:[UIColor blackColor]}; + shipmentNav.title = @"提货"; + shipmentNav.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"提货" image:nil selectedImage:nil]; + + ///会员 + GiGaMallMemberCenterViewController *memberCenterVC = [[GiGaMallMemberCenterViewController alloc] init]; + GiGaMallBaseNavViewController *memberCenterNav = [[GiGaMallBaseNavViewController alloc] initWithRootViewController:memberCenterVC]; + memberCenterNav.navigationBar.titleTextAttributes =@{NSForegroundColorAttributeName:[UIColor blackColor]}; + memberCenterNav.title = @"会员"; + memberCenterNav.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"会员" image:nil selectedImage:nil]; + + + [[UITabBar appearance] setTintColor:GIGARGB(70, 70, 70, 1)]; + self.rootTabBarVC = [[GiGaMallTabBarViewController alloc] init]; + self.rootTabBarVC.viewControllers = @[homeNav,replenishmentNav,shipmentNav,memberCenterNav]; + + [self initTabItems]; + self.window.rootViewController = self.rootTabBarVC; + self.window.backgroundColor = [UIColor whiteColor]; + [self.window makeKeyAndVisible]; + +} + +-(void)initTabItems{ + + UITabBar *tabBar = self.rootTabBarVC.tabBar; + UITabBarItem *item0 = [tabBar.items objectAtIndex:0]; + UITabBarItem *item1 = [tabBar.items objectAtIndex:1]; + UITabBarItem *item2 = [tabBar.items objectAtIndex:2]; + UITabBarItem *item3 = [tabBar.items objectAtIndex:3]; + + item0.selectedImage = [[UIImage imageNamed:@""] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]; + ; + item0.image = [[UIImage imageNamed:@""] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]; + + item1.selectedImage = [[UIImage imageNamed:@""] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]; + ; + item1.image = [[UIImage imageNamed:@""] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]; + + item2.selectedImage = [[UIImage imageNamed:@""] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]; + ; + item2.image = [[UIImage imageNamed:@""] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]; + + item3.selectedImage = [[UIImage imageNamed:@""] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]; + ; + item3.image = [[UIImage imageNamed:@""] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]; + +} + + +@end diff --git a/GiGaMall/AppDelegate.h b/GiGaMall/AppDelegate.h index f316fb5..de703c1 100644 --- a/GiGaMall/AppDelegate.h +++ b/GiGaMall/AppDelegate.h @@ -7,11 +7,11 @@ // #import - +#import "GiGaMallTabBarViewController.h" @interface AppDelegate : UIResponder @property (strong, nonatomic) UIWindow *window; - +@property (nonatomic ,strong) GiGaMallTabBarViewController *rootTabBarVC; @end diff --git a/GiGaMall/AppDelegate.m b/GiGaMall/AppDelegate.m index 772169a..1f6d775 100644 --- a/GiGaMall/AppDelegate.m +++ b/GiGaMall/AppDelegate.m @@ -7,6 +7,7 @@ // #import "AppDelegate.h" +#import "AppDelegate+GiGaMallConfig.h" @interface AppDelegate () @@ -17,6 +18,10 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. + + [self setupTabBarController]; + [self configEnvironment]; + return YES; } diff --git a/GiGaMall/Category/UIColor+MallTheme.h b/GiGaMall/Category/UIColor+MallTheme.h new file mode 100644 index 0000000..ea822f0 --- /dev/null +++ b/GiGaMall/Category/UIColor+MallTheme.h @@ -0,0 +1,21 @@ +// +// UIColor+MallTheme.h +// GiGaMall +// +// Created by lianxiang on 2019/3/8. +// Copyright © 2019年 com.shanghaigigamall.ios. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface UIColor (MallTheme) +/** + * Hexadecimal number: 282828 主标题颜色 + */ ++ (UIColor *)mainTextColor; + +@end + +NS_ASSUME_NONNULL_END diff --git a/GiGaMall/Category/UIColor+MallTheme.m b/GiGaMall/Category/UIColor+MallTheme.m new file mode 100644 index 0000000..c58d640 --- /dev/null +++ b/GiGaMall/Category/UIColor+MallTheme.m @@ -0,0 +1,17 @@ +// +// UIColor+MallTheme.m +// GiGaMall +// +// Created by lianxiang on 2019/3/8. +// Copyright © 2019年 com.shanghaigigamall.ios. All rights reserved. +// + +#import "UIColor+MallTheme.h" + +@implementation UIColor (MallTheme) + ++ (UIColor *)mainTextColor { + return GIGAUIColorFromRGB_A(0x282828, 1); +} + +@end diff --git a/GiGaMall/Category/UILabel+DeleteLine.h b/GiGaMall/Category/UILabel+DeleteLine.h new file mode 100644 index 0000000..62d5c7b --- /dev/null +++ b/GiGaMall/Category/UILabel+DeleteLine.h @@ -0,0 +1,20 @@ +// +// UILabel+DeleteLine.h +// GiGaMall +// +// Created by lianxiang on 2019/3/8. +// Copyright © 2019年 com.shanghaigigamall.ios. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface UILabel (DeleteLine) + +- (void)setNormalTextNumber:(NSNumber *)normalNum deleteTextNumber:(NSNumber *)deleteNum; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/GiGaMall/Category/UILabel+DeleteLine.m b/GiGaMall/Category/UILabel+DeleteLine.m new file mode 100644 index 0000000..2a5215d --- /dev/null +++ b/GiGaMall/Category/UILabel+DeleteLine.m @@ -0,0 +1,43 @@ +// +// UILabel+DeleteLine.m +// GiGaMall +// +// Created by lianxiang on 2019/3/8. +// Copyright © 2019年 com.shanghaigigamall.ios. All rights reserved. +// + +#import "UILabel+DeleteLine.h" +#import "UIColor+MallTheme.h" + +@implementation UILabel (DeleteLine) + +- (void)setNormalTextNumber:(NSNumber *)normalNum deleteTextNumber:(NSNumber *)deleteNum { + if (normalNum == nil) { return; } + + NSAttributedString* normalAttrStr = [self handleNormalAttributedString:normalNum]; + NSAttributedString* deleteAttrStr = [self handleDeleteAttributedString:deleteNum]; + + NSMutableAttributedString* full = [[NSMutableAttributedString alloc] initWithAttributedString:normalAttrStr]; + + if (deleteAttrStr) { + [full appendAttributedString:[self handleSpaceAttributedString]]; + [full appendAttributedString:deleteAttrStr]; + } + + [self setAttributedText:full]; +} +// handle the text of normal style +- (NSAttributedString *)handleNormalAttributedString:(NSNumber *)normalNum { + return [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"¥%@", [GiGaMallHelper convertPrice:normalNum.integerValue]] attributes:@{NSStrikethroughStyleAttributeName:@(NSUnderlineStyleNone), NSForegroundColorAttributeName:[UIColor mainTextColor], NSFontAttributeName:[UIFont boldSystemFontOfSize:12]}]; +} +// handle the text of delete line +- (NSAttributedString *)handleDeleteAttributedString:(NSNumber *)deleteNum { + return deleteNum && ![deleteNum isEqual:@0] ? [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"¥%@", [GiGaMallHelper convertPrice:deleteNum.integerValue]] attributes:@{NSStrikethroughStyleAttributeName:@(NSUnderlineStyleSingle), NSForegroundColorAttributeName:[UIColor mainTextColor], NSFontAttributeName:[UIFont systemFontOfSize:12]}] : nil; +} +// handle space between normal text and delete text +- (NSAttributedString *)handleSpaceAttributedString { + return [[NSAttributedString alloc] initWithString:@" " attributes:@{NSStrikethroughStyleAttributeName:@(NSUnderlineStyleNone), NSForegroundColorAttributeName:[UIColor mainTextColor], NSFontAttributeName:[UIFont systemFontOfSize:12]}]; +} + + +@end diff --git a/GiGaMall/Common/GiGaMallBase/GiGaMallBaseNavViewController.h b/GiGaMall/Common/GiGaMallBase/GiGaMallBaseNavViewController.h new file mode 100644 index 0000000..53dcf07 --- /dev/null +++ b/GiGaMall/Common/GiGaMallBase/GiGaMallBaseNavViewController.h @@ -0,0 +1,17 @@ +// +// GiGaMallBaseNavViewController.h +// GiGaMall +// +// Created by lianxiang on 2019/3/8. +// Copyright © 2019年 com.shanghaigigamall.ios. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface GiGaMallBaseNavViewController : UINavigationController + +@end + +NS_ASSUME_NONNULL_END diff --git a/GiGaMall/Common/GiGaMallBase/GiGaMallBaseNavViewController.m b/GiGaMall/Common/GiGaMallBase/GiGaMallBaseNavViewController.m new file mode 100644 index 0000000..befd8a0 --- /dev/null +++ b/GiGaMall/Common/GiGaMallBase/GiGaMallBaseNavViewController.m @@ -0,0 +1,59 @@ +// +// GiGaMallBaseNavViewController.m +// GiGaMall +// +// Created by lianxiang on 2019/3/8. +// Copyright © 2019年 com.shanghaigigamall.ios. All rights reserved. +// + +#import "GiGaMallBaseNavViewController.h" + +@interface GiGaMallBaseNavViewController () + +@end + +@implementation GiGaMallBaseNavViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + self.interactivePopGestureRecognizer.delegate = (id)self; + self.view.backgroundColor = UIColor.whiteColor; + // Do any additional setup after loading the view. +} + +-(UIStatusBarStyle)preferredStatusBarStyle +{ + return UIStatusBarStyleLightContent; +} + +-(void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated +{ + if (self.viewControllers.count > 0) { + viewController.hidesBottomBarWhenPushed = YES; + } + + [super pushViewController:viewController animated:animated]; + if (self.viewControllers.count > 1 ) { + //自定义返回按钮 + UIButton *backBtn = [UIButton buttonWithType:UIButtonTypeCustom]; + backBtn.frame = CGRectMake(0, 0, 40, 40); + [backBtn setImage:[UIImage imageNamed:@""] forState:UIControlStateNormal]; + [backBtn setImageEdgeInsets:UIEdgeInsetsMake(0,-14, 0, 14)]; + backBtn.backgroundColor = [UIColor redColor]; + [backBtn addTarget:self action:@selector(backItemAction) forControlEvents:UIControlEventTouchUpInside]; + UIBarButtonItem *backItem = [[UIBarButtonItem alloc] initWithCustomView:backBtn]; + viewController.navigationItem.leftBarButtonItem = backItem; + } +} + +-(void)backItemAction{ + + [super popViewControllerAnimated:YES]; +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +@end diff --git a/GiGaMall/Common/GiGaMallBase/GiGaMallBaseViewController.h b/GiGaMall/Common/GiGaMallBase/GiGaMallBaseViewController.h new file mode 100644 index 0000000..0d8912a --- /dev/null +++ b/GiGaMall/Common/GiGaMallBase/GiGaMallBaseViewController.h @@ -0,0 +1,29 @@ +// +// GiGaMallBaseViewController.h +// GiGaMall +// +// Created by lianxiang on 2019/3/8. +// Copyright © 2019年 com.shanghaigigamall.ios. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface GiGaMallBaseViewController : UIViewController +{ + UITableView *_tableView; +} + +@property (nonatomic,strong) UITableView *tableView; + +//网络改变回调Block,-1未知、0无网络、1蜂窝数据网络、2WiFi +@property (nonatomic, copy) void(^ network)(AFNetworkReachabilityStatus status); +//当前网络状态,-1未知、0无网络、1蜂窝数据网络、2WiFi +@property (nonatomic, assign) AFNetworkReachabilityStatus currentNetworkStatus; +-(void)testNetworkStatus; +- (void)addNavTitile:(NSString *)title; + +@end + +NS_ASSUME_NONNULL_END diff --git a/GiGaMall/Common/GiGaMallBase/GiGaMallBaseViewController.m b/GiGaMall/Common/GiGaMallBase/GiGaMallBaseViewController.m new file mode 100644 index 0000000..27394e0 --- /dev/null +++ b/GiGaMall/Common/GiGaMallBase/GiGaMallBaseViewController.m @@ -0,0 +1,102 @@ +// +// GiGaMallBaseViewController.m +// GiGaMall +// +// Created by lianxiang on 2019/3/8. +// Copyright © 2019年 com.shanghaigigamall.ios. All rights reserved. +// + +#import "GiGaMallBaseViewController.h" +#import "GiGaNavTitileView.h" + +@interface GiGaMallBaseViewController () + +@end + +@implementation GiGaMallBaseViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + self.view.backgroundColor = [UIColor whiteColor]; + // Do any additional setup after loading the view. +} + +- (void)viewDidAppear:(BOOL)animated{ + [super viewDidAppear:animated]; + + +} +-(void)viewWillDisappear:(BOOL)animated{ + [super viewWillDisappear:animated]; + +} + +-(void)viewWillAppear:(BOOL)animated{ + [super viewWillAppear:animated]; + //[self.navigationController.navigationBar setBackgroundImage]; + + //[self.navigationController.navigationBar setTranslucent:YES]; + +} + +-(void)addNavTitile:(NSString *)title{ + + self.navigationItem.titleView = [[GiGaNavTitileView alloc] initWithString:title frame:CGRectMake(0, 0, 200, 44)]; + +} + +-(void)testNetworkStatus{ + AFNetworkReachabilityManager *manager = [AFNetworkReachabilityManager sharedManager]; + weakify(self); + [manager setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) { + weakSelf.currentNetworkStatus = status; + if (weakSelf.network) weakSelf.network(status); + switch (status) { + case AFNetworkReachabilityStatusNotReachable: + + [[UIApplication sharedApplication].keyWindow makeToast:@"哎呀,没有网络啦~"duration:1.6 position:CSToastPositionCenter]; + + break; + + default: + + break; + } + }] ; + //开始检测 + [manager startMonitoring]; + +} + +//显示信息,并在设定延时后返回上级界面 +- (void)backWithShowMessage:(NSString *)message afterDelay:(CGFloat)delay +{ + [[UIApplication sharedApplication].keyWindow makeToast:message duration:1.6 position:CSToastPositionCenter]; + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delay * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + [self back]; + }); +} +- (void)back +{ + [self.navigationController popViewControllerAnimated:YES]; +} + +-(UITableView*)tableView{ + + if (!_tableView) { + + _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0,0, KMainW,KMainH - PhoneX_BottomMargin) style:UITableViewStyleGrouped]; + } + return _tableView; +} + +- (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath { + return 0; +} + +- (NSInteger)tableView:(nonnull UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return 0; +} + + +@end diff --git a/GiGaMall/Common/GiGaMallBase/GiGaMallTabBarViewController.h b/GiGaMall/Common/GiGaMallBase/GiGaMallTabBarViewController.h new file mode 100644 index 0000000..14de750 --- /dev/null +++ b/GiGaMall/Common/GiGaMallBase/GiGaMallTabBarViewController.h @@ -0,0 +1,17 @@ +// +// GiGaMallTabBarViewController.h +// GiGaMall +// +// Created by lianxiang on 2019/3/8. +// Copyright © 2019年 com.shanghaigigamall.ios. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface GiGaMallTabBarViewController : UITabBarController + +@end + +NS_ASSUME_NONNULL_END diff --git a/GiGaMall/Common/GiGaMallBase/GiGaMallTabBarViewController.m b/GiGaMall/Common/GiGaMallBase/GiGaMallTabBarViewController.m new file mode 100644 index 0000000..8e93290 --- /dev/null +++ b/GiGaMall/Common/GiGaMallBase/GiGaMallTabBarViewController.m @@ -0,0 +1,49 @@ +// +// GiGaMallTabBarViewController.m +// GiGaMall +// +// Created by lianxiang on 2019/3/8. +// Copyright © 2019年 com.shanghaigigamall.ios. All rights reserved. +// + +#import "GiGaMallTabBarViewController.h" + +@interface GiGaMallTabBarViewController () + +@end + +@implementation GiGaMallTabBarViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. + +} + +- (void)viewDidAppear:(BOOL)animated{ + [super viewDidAppear:animated]; + + if([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) { + self.navigationController.interactivePopGestureRecognizer.enabled = NO; + } + + +} +-(void)viewWillDisappear:(BOOL)animated{ + [super viewWillDisappear:animated]; + + if([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) { + self.navigationController.interactivePopGestureRecognizer.enabled = YES; + } +} + +-(void)viewWillAppear:(BOOL)animated{ + [super viewWillAppear:animated]; + + +} + + + + +@end diff --git a/GiGaMall/Common/Helper/GiGaMallHelper.h b/GiGaMall/Common/Helper/GiGaMallHelper.h new file mode 100644 index 0000000..59fdc2a --- /dev/null +++ b/GiGaMall/Common/Helper/GiGaMallHelper.h @@ -0,0 +1,19 @@ +// +// GiGaMallHelper.h +// GiGaMall +// +// Created by lianxiang on 2019/3/8. +// Copyright © 2019年 com.shanghaigigamall.ios. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface GiGaMallHelper : NSObject + ++ (NSString *)convertPrice:(NSInteger)price; + +@end + +NS_ASSUME_NONNULL_END diff --git a/GiGaMall/Common/Helper/GiGaMallHelper.m b/GiGaMall/Common/Helper/GiGaMallHelper.m new file mode 100644 index 0000000..ce425ea --- /dev/null +++ b/GiGaMall/Common/Helper/GiGaMallHelper.m @@ -0,0 +1,25 @@ +// +// GiGaMallHelper.m +// GiGaMall +// +// Created by lianxiang on 2019/3/8. +// Copyright © 2019年 com.shanghaigigamall.ios. All rights reserved. +// + +#import "GiGaMallHelper.h" + +@implementation GiGaMallHelper + ++ (NSString *)convertPrice:(NSInteger)price { + if (price < 0) { + return @""; + } + + NSDecimalNumber *divisorNumber = [NSDecimalNumber decimalNumberWithString:[NSString stringWithFormat:@"%ld", price]]; + NSDecimalNumber *dividendNumber = [NSDecimalNumber decimalNumberWithString:@"100"]; + NSDecimalNumber *product = [divisorNumber decimalNumberByDividingBy:dividendNumber]; + + return [product stringValue]; +} + +@end diff --git a/GiGaMall/Common/Utils/GiGaNavTitileView/GiGaNavTitileView.h b/GiGaMall/Common/Utils/GiGaNavTitileView/GiGaNavTitileView.h new file mode 100644 index 0000000..ea0b178 --- /dev/null +++ b/GiGaMall/Common/Utils/GiGaNavTitileView/GiGaNavTitileView.h @@ -0,0 +1,17 @@ +// +// GiGaNavTitileView.h +// GIGA +// +// Created by lianxiang on 2018/8/23. +// Copyright © 2018年 com.giga.ios. All rights reserved. +// + +#import + +@interface GiGaNavTitileView : UIView +- (id)initWithString:(NSString *)str frame:(CGRect)frame; +@property(nonatomic,copy) NSString *titleStr; +@property(nonatomic,strong) UILabel *navlabel; +@property(nonatomic,strong) UIColor *titleColor; + +@end diff --git a/GiGaMall/Common/Utils/GiGaNavTitileView/GiGaNavTitileView.m b/GiGaMall/Common/Utils/GiGaNavTitileView/GiGaNavTitileView.m new file mode 100644 index 0000000..61a3760 --- /dev/null +++ b/GiGaMall/Common/Utils/GiGaNavTitileView/GiGaNavTitileView.m @@ -0,0 +1,53 @@ +// +// GiGaNavTitileView.m +// GIGA +// +// Created by lianxiang on 2018/8/23. +// Copyright © 2018年 com.giga.ios. All rights reserved. +// + +#import "GiGaNavTitileView.h" + +@implementation GiGaNavTitileView +@synthesize titleStr = _titleStr; +@synthesize titleColor = _titleColor; +- (id)initWithString:(NSString *)str frame:(CGRect)frame +{ + if (self = [super initWithFrame:frame]) { + self.titleStr = str; + [self creatTitle:frame]; + } + return self; +} + +-(instancetype)initWithFrame:(CGRect)frame{ + if (self = [super initWithFrame:frame]) { + [self creatTitle:frame]; + } + return self; +} + +-(void)creatTitle:(CGRect)frame{ + + UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, 44)]; + label.textColor = [UIColor whiteColor]; + label.text = self.titleStr; + label.font = [UIFont fontWithName:@"PingFangSC-Regular" size:22.f]; + label.textAlignment = NSTextAlignmentCenter; + [self addSubview:label]; + self.navlabel = label; + +} + +- (void)setTitleStr:(NSString *)titleStr{ + + _titleStr = titleStr; + + self.navlabel.text = titleStr; +} + +-(void)setTitleColor:(UIColor *)titleColor{ + _titleColor = titleColor; + self.navlabel.textColor = _titleColor; +} +@end diff --git a/GiGaMall/Config/GiGaMallApiConfig.h b/GiGaMall/Config/GiGaMallApiConfig.h new file mode 100644 index 0000000..dc24d9f --- /dev/null +++ b/GiGaMall/Config/GiGaMallApiConfig.h @@ -0,0 +1,13 @@ +// +// GiGaMallApiConfig.h +// GiGaMall +// +// Created by lianxiang on 2019/3/8. +// Copyright © 2019年 com.shanghaigigamall.ios. All rights reserved. +// + +#ifndef GiGaMallApiConfig_h +#define GiGaMallApiConfig_h + + +#endif /* GiGaMallApiConfig_h */ diff --git a/GiGaMall/Config/GiGaMallConfig.h b/GiGaMall/Config/GiGaMallConfig.h new file mode 100644 index 0000000..4896215 --- /dev/null +++ b/GiGaMall/Config/GiGaMallConfig.h @@ -0,0 +1,19 @@ +// +// GiGaMallConfig.h +// GiGaMall +// +// Created by lianxiang on 2019/3/8. +// Copyright © 2019年 com.shanghaigigamall.ios. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface GiGaMallConfig : NSObject ++ (void)setServerType:(NSInteger) type; ++ (NSString *)getMainUrl; + +@end + +NS_ASSUME_NONNULL_END diff --git a/GiGaMall/Config/GiGaMallConfig.m b/GiGaMall/Config/GiGaMallConfig.m new file mode 100644 index 0000000..4f33e9e --- /dev/null +++ b/GiGaMall/Config/GiGaMallConfig.m @@ -0,0 +1,48 @@ +// +// GiGaMallConfig.m +// GiGaMall +// +// Created by lianxiang on 2019/3/8. +// Copyright © 2019年 com.shanghaigigamall.ios. All rights reserved. +// + +#import "GiGaMallConfig.h" + +@implementation GiGaMallConfig + ++ (void)setServerType:(NSInteger)type +{ +#if defined(DEBUG) || defined(RELEASE_VERTION_TEST) + +#endif + + switch (type) { + case 0://测试环境 + { + + + [[NSUserDefaults standardUserDefaults] setValue:@"" forKey:@"MainUrl"]; + + + } + break; + + case 1: //生产环境 + { + + [[NSUserDefaults standardUserDefaults] setValue:@"" forKey:@"MainUrl"]; + + } + break; + default: + break; + } + +} + ++ (NSString *)getMainUrl +{ + return [[NSUserDefaults standardUserDefaults] objectForKey:@"MainUrl"]; +} + +@end diff --git a/GiGaMall/GiGaMall.h b/GiGaMall/GiGaMall.h index 4283e68..3d899e0 100644 --- a/GiGaMall/GiGaMall.h +++ b/GiGaMall/GiGaMall.h @@ -9,5 +9,59 @@ #ifndef GiGaMall_h #define GiGaMall_h +#define UD_STADARDUD [NSUserDefaults standardUserDefaults] + +#define UD_REMOVE_KEY(__KEY__) \ +[[NSUserDefaults standardUserDefaults] removeObjectForKey:__KEY__]; \ +UD_SYNC + +#define UD_GET_VALUE(__KEY__) [[NSUserDefaults standardUserDefaults] valueForKey:__KEY__]; + +#define UD_SET_KEY_VALUE(__KEY__, __VALUE__) \ +[[NSUserDefaults standardUserDefaults] setValue:(__VALUE__) forKey:(__KEY__)]; \ +UD_SYNC + +#define UD_SYNC [[NSUserDefaults standardUserDefaults] synchronize]; + +#define GIGAUIColorFromRGB_A(rgbValue,alphaValue) [UIColor \ +colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \ +green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \ +blue:((float)(rgbValue & 0xFF))/255.0 alpha:alphaValue] + +#define GIGARGB(R,G,B,A) [UIColor colorWithRed:R/255.0f green:G/255.0f blue:B/255.0f alpha:A] + + +#define KMainW [UIScreen mainScreen].bounds.size.width +#define KMainH [UIScreen mainScreen].bounds.size.height + +#define ISIOS10 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 10.0 ? YES : NO) +#define weakify(var) __weak typeof(var) weakSelf = var +#define strongify(var) __strong typeof(var) strongSelf = var +#define GIGA_ShowToast(__toast__) [self.view makeToast:(__toast__) duration:1.5 position:CSToastPositionCenter]; +#define GIGA_WIndowTost(__toast__) [[UIApplication sharedApplication].keyWindow makeToast:(__toast__) duration:1.5 position:CSToastPositionCenter]; + +//X +//底部工具栏需要为home indicator留出34pt边距 +#define PhoneX_BottomMargin ([[UIApplication sharedApplication] statusBarFrame].size.height == 44.0 ? 34.0 :0.0) +//状态栏高度由20pt变成44pt,导航栏以上变化64->88。 +#define PhoneX_TopMargin ([[UIApplication sharedApplication] statusBarFrame].size.height == 44.0 ? 24.0 :0.0) + +// 状态栏高度 所有机型 +#define Phone_STATUBAR_H [[UIApplication sharedApplication] statusBarFrame].size.height +//状态栏—➕导航栏 +#define SAFE_NAV_HEIGHT ([[UIApplication sharedApplication] statusBarFrame].size.height == 44.0 ? 88.0 : 64.0) +#define IS_IPHONE (UI_USER_INTERiFACE_IDIOM() == UIUserInterfaceIdiomPhone) +#define IS_PAD (UI_USER_INTERFACE_IDIOM()== UIUserInterfaceIdiomPad) + + +#define GIGA_FONTNAME @"PingFangSC-Medium" +#define GIGA_FONTBOLD @"PingFangSC-Semibold" +#define GIGA_FONTRegular @"PingFangSC-Regular" +#define GIGA_TEXTFONTBOLD(font) [UIFont fontWithName:GIGA_FONTBOLD size:font] + +#define GIGA_TEXTFONTMEDIUM(font) [UIFont fontWithName:GIGA_FONTNAME size:font] + +#define GIGA_TEXTFONTRegular(font) [UIFont fontWithName:GIGA_FONTRegular size:font] + #endif /* GiGaMall_h */ diff --git a/GiGaMall/GiGaMall.pch b/GiGaMall/GiGaMall.pch index e9e2d69..b7becd3 100644 --- a/GiGaMall/GiGaMall.pch +++ b/GiGaMall/GiGaMall.pch @@ -26,6 +26,7 @@ #import "GiGaMall.h" #import "UIView+Toast.h" #import "Masonry.h" +#import "GiGaMallHelper.h" #endif /* GiGaMall_pch */ diff --git a/GiGaMall/Modules/HomePage/Controller/GiGaMallHomePageViewController.h b/GiGaMall/Modules/HomePage/Controller/GiGaMallHomePageViewController.h new file mode 100644 index 0000000..6f30172 --- /dev/null +++ b/GiGaMall/Modules/HomePage/Controller/GiGaMallHomePageViewController.h @@ -0,0 +1,17 @@ +// +// GiGaMallHomePageViewController.h +// GiGaMall +// +// Created by lianxiang on 2019/3/8. +// Copyright © 2019年 com.shanghaigigamall.ios. All rights reserved. +// + +#import "GiGaMallBaseViewController.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface GiGaMallHomePageViewController : GiGaMallBaseViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/GiGaMall/Modules/HomePage/Controller/GiGaMallHomePageViewController.m b/GiGaMall/Modules/HomePage/Controller/GiGaMallHomePageViewController.m new file mode 100644 index 0000000..efc6a9f --- /dev/null +++ b/GiGaMall/Modules/HomePage/Controller/GiGaMallHomePageViewController.m @@ -0,0 +1,33 @@ +// +// GiGaMallHomePageViewController.m +// GiGaMall +// +// Created by lianxiang on 2019/3/8. +// Copyright © 2019年 com.shanghaigigamall.ios. All rights reserved. +// + +#import "GiGaMallHomePageViewController.h" + +@interface GiGaMallHomePageViewController () + +@end + +@implementation GiGaMallHomePageViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. + +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/GiGaMall/Modules/MemberCenter/Controller/GiGaMallMemberCenterViewController.h b/GiGaMall/Modules/MemberCenter/Controller/GiGaMallMemberCenterViewController.h new file mode 100644 index 0000000..24f86c7 --- /dev/null +++ b/GiGaMall/Modules/MemberCenter/Controller/GiGaMallMemberCenterViewController.h @@ -0,0 +1,17 @@ +// +// GiGaMallMemberCenterViewController.h +// GiGaMall +// +// Created by lianxiang on 2019/3/8. +// Copyright © 2019年 com.shanghaigigamall.ios. All rights reserved. +// + +#import "GiGaMallBaseViewController.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface GiGaMallMemberCenterViewController : GiGaMallBaseViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/GiGaMall/Modules/MemberCenter/Controller/GiGaMallMemberCenterViewController.m b/GiGaMall/Modules/MemberCenter/Controller/GiGaMallMemberCenterViewController.m new file mode 100644 index 0000000..9b43f0d --- /dev/null +++ b/GiGaMall/Modules/MemberCenter/Controller/GiGaMallMemberCenterViewController.m @@ -0,0 +1,32 @@ +// +// GiGaMallMemberCenterViewController.m +// GiGaMall +// +// Created by lianxiang on 2019/3/8. +// Copyright © 2019年 com.shanghaigigamall.ios. All rights reserved. +// + +#import "GiGaMallMemberCenterViewController.h" + +@interface GiGaMallMemberCenterViewController () + +@end + +@implementation GiGaMallMemberCenterViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/GiGaMall/Modules/Replenishment/Controller/GGMReplenishmentViewController.h b/GiGaMall/Modules/Replenishment/Controller/GGMReplenishmentViewController.h new file mode 100644 index 0000000..320a533 --- /dev/null +++ b/GiGaMall/Modules/Replenishment/Controller/GGMReplenishmentViewController.h @@ -0,0 +1,17 @@ +// +// GGMReplenishmentViewController.h +// GiGaMall +// +// Created by lianxiang on 2019/3/8. +// Copyright © 2019年 com.shanghaigigamall.ios. All rights reserved. +// + +#import "GiGaMallBaseViewController.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface GGMReplenishmentViewController : GiGaMallBaseViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/GiGaMall/Modules/Replenishment/Controller/GGMReplenishmentViewController.m b/GiGaMall/Modules/Replenishment/Controller/GGMReplenishmentViewController.m new file mode 100644 index 0000000..cb22fc8 --- /dev/null +++ b/GiGaMall/Modules/Replenishment/Controller/GGMReplenishmentViewController.m @@ -0,0 +1,32 @@ +// +// GGMReplenishmentViewController.m +// GiGaMall +// +// Created by lianxiang on 2019/3/8. +// Copyright © 2019年 com.shanghaigigamall.ios. All rights reserved. +// + +#import "GGMReplenishmentViewController.h" + +@interface GGMReplenishmentViewController () + +@end + +@implementation GGMReplenishmentViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/GiGaMall/Modules/Shipment/Controller/GiGaMallShipmentViewController.h b/GiGaMall/Modules/Shipment/Controller/GiGaMallShipmentViewController.h new file mode 100644 index 0000000..7835042 --- /dev/null +++ b/GiGaMall/Modules/Shipment/Controller/GiGaMallShipmentViewController.h @@ -0,0 +1,17 @@ +// +// GiGaMallShipmentViewController.h +// GiGaMall +// +// Created by lianxiang on 2019/3/8. +// Copyright © 2019年 com.shanghaigigamall.ios. All rights reserved. +// + +#import "GiGaMallBaseViewController.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface GiGaMallShipmentViewController : GiGaMallBaseViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/GiGaMall/Modules/Shipment/Controller/GiGaMallShipmentViewController.m b/GiGaMall/Modules/Shipment/Controller/GiGaMallShipmentViewController.m new file mode 100644 index 0000000..8de11ee --- /dev/null +++ b/GiGaMall/Modules/Shipment/Controller/GiGaMallShipmentViewController.m @@ -0,0 +1,32 @@ +// +// GiGaMallShipmentViewController.m +// GiGaMall +// +// Created by lianxiang on 2019/3/8. +// Copyright © 2019年 com.shanghaigigamall.ios. All rights reserved. +// + +#import "GiGaMallShipmentViewController.h" + +@interface GiGaMallShipmentViewController () + +@end + +@implementation GiGaMallShipmentViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end