diff --git a/GIGA.xcodeproj/project.pbxproj b/GIGA.xcodeproj/project.pbxproj index c73f1cd..3a3bffb 100644 --- a/GIGA.xcodeproj/project.pbxproj +++ b/GIGA.xcodeproj/project.pbxproj @@ -96,6 +96,16 @@ 8384643E214A484400F12B33 /* MaskTestResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 8384643D214A484400F12B33 /* MaskTestResult.m */; }; 83846441214A4BFF00F12B33 /* MaskTestResultVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 83846440214A4BFF00F12B33 /* MaskTestResultVC.m */; }; 838500DC2137F3F7003514A3 /* GiGaAttributedLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 838500DB2137F3F7003514A3 /* GiGaAttributedLabel.m */; }; + 838762D3214B9D120039D241 /* GIGaUserInfoAvatorCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 838762D1214B9D120039D241 /* GIGaUserInfoAvatorCell.m */; }; + 838762D4214B9D120039D241 /* GIGaUserInfoAvatorCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 838762D2214B9D120039D241 /* GIGaUserInfoAvatorCell.xib */; }; + 838762D8214B9EF80039D241 /* GIGaUserIDViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 838762D6214B9EF80039D241 /* GIGaUserIDViewCell.m */; }; + 838762D9214B9EF80039D241 /* GIGaUserIDViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 838762D7214B9EF80039D241 /* GIGaUserIDViewCell.xib */; }; + 838762DD214B9F140039D241 /* GIGaUserWeChatViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 838762DB214B9F140039D241 /* GIGaUserWeChatViewCell.m */; }; + 838762DE214B9F140039D241 /* GIGaUserWeChatViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 838762DC214B9F140039D241 /* GIGaUserWeChatViewCell.xib */; }; + 838762E2214B9F580039D241 /* GiGaUserSexViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 838762E0214B9F580039D241 /* GiGaUserSexViewCell.m */; }; + 838762E3214B9F580039D241 /* GiGaUserSexViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 838762E1214B9F580039D241 /* GiGaUserSexViewCell.xib */; }; + 838762E7214B9FA60039D241 /* GIGaUserCityViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 838762E5214B9FA60039D241 /* GIGaUserCityViewCell.m */; }; + 838762E8214B9FA60039D241 /* GIGaUserCityViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 838762E6214B9FA60039D241 /* GIGaUserCityViewCell.xib */; }; 83928FFA2134D8F60077D2E8 /* GiGaFlyingCommitInputView.m in Sources */ = {isa = PBXBuildFile; fileRef = 83928FF92134D8F60077D2E8 /* GiGaFlyingCommitInputView.m */; }; 83928FFE2134F37D0077D2E8 /* GiGaSocketRocketUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = 83928FFD2134F37D0077D2E8 /* GiGaSocketRocketUtility.m */; }; 839290052134F4240077D2E8 /* LXDanMuTrackView.m in Sources */ = {isa = PBXBuildFile; fileRef = 839290002134F4230077D2E8 /* LXDanMuTrackView.m */; }; @@ -302,6 +312,21 @@ 83846440214A4BFF00F12B33 /* MaskTestResultVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MaskTestResultVC.m; sourceTree = ""; }; 838500DA2137F3F7003514A3 /* GiGaAttributedLabel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaAttributedLabel.h; sourceTree = ""; }; 838500DB2137F3F7003514A3 /* GiGaAttributedLabel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaAttributedLabel.m; sourceTree = ""; }; + 838762D0214B9D120039D241 /* GIGaUserInfoAvatorCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GIGaUserInfoAvatorCell.h; sourceTree = ""; }; + 838762D1214B9D120039D241 /* GIGaUserInfoAvatorCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GIGaUserInfoAvatorCell.m; sourceTree = ""; }; + 838762D2214B9D120039D241 /* GIGaUserInfoAvatorCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GIGaUserInfoAvatorCell.xib; sourceTree = ""; }; + 838762D5214B9EF80039D241 /* GIGaUserIDViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GIGaUserIDViewCell.h; sourceTree = ""; }; + 838762D6214B9EF80039D241 /* GIGaUserIDViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GIGaUserIDViewCell.m; sourceTree = ""; }; + 838762D7214B9EF80039D241 /* GIGaUserIDViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GIGaUserIDViewCell.xib; sourceTree = ""; }; + 838762DA214B9F140039D241 /* GIGaUserWeChatViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GIGaUserWeChatViewCell.h; sourceTree = ""; }; + 838762DB214B9F140039D241 /* GIGaUserWeChatViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GIGaUserWeChatViewCell.m; sourceTree = ""; }; + 838762DC214B9F140039D241 /* GIGaUserWeChatViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GIGaUserWeChatViewCell.xib; sourceTree = ""; }; + 838762DF214B9F580039D241 /* GiGaUserSexViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaUserSexViewCell.h; sourceTree = ""; }; + 838762E0214B9F580039D241 /* GiGaUserSexViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaUserSexViewCell.m; sourceTree = ""; }; + 838762E1214B9F580039D241 /* GiGaUserSexViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GiGaUserSexViewCell.xib; sourceTree = ""; }; + 838762E4214B9FA60039D241 /* GIGaUserCityViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GIGaUserCityViewCell.h; sourceTree = ""; }; + 838762E5214B9FA60039D241 /* GIGaUserCityViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GIGaUserCityViewCell.m; sourceTree = ""; }; + 838762E6214B9FA60039D241 /* GIGaUserCityViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GIGaUserCityViewCell.xib; sourceTree = ""; }; 83928FF82134D8F60077D2E8 /* GiGaFlyingCommitInputView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaFlyingCommitInputView.h; sourceTree = ""; }; 83928FF92134D8F60077D2E8 /* GiGaFlyingCommitInputView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaFlyingCommitInputView.m; sourceTree = ""; }; 83928FFC2134F37D0077D2E8 /* GiGaSocketRocketUtility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GiGaSocketRocketUtility.h; sourceTree = ""; }; @@ -759,6 +784,7 @@ 8361B42A212180A100238FEB /* View */ = { isa = PBXGroup; children = ( + 838762CF214B9CAA0039D241 /* userInfoView */, 83BFAE64213CCF10004EF801 /* GiGaMineUserViewCell.h */, 83BFAE65213CCF10004EF801 /* GiGaMineUserViewCell.m */, 83BFAE66213CCF10004EF801 /* GiGaMineUserViewCell.xib */, @@ -953,6 +979,28 @@ path = AlertView; sourceTree = ""; }; + 838762CF214B9CAA0039D241 /* userInfoView */ = { + isa = PBXGroup; + children = ( + 838762D0214B9D120039D241 /* GIGaUserInfoAvatorCell.h */, + 838762D1214B9D120039D241 /* GIGaUserInfoAvatorCell.m */, + 838762D2214B9D120039D241 /* GIGaUserInfoAvatorCell.xib */, + 838762D5214B9EF80039D241 /* GIGaUserIDViewCell.h */, + 838762D6214B9EF80039D241 /* GIGaUserIDViewCell.m */, + 838762D7214B9EF80039D241 /* GIGaUserIDViewCell.xib */, + 838762DA214B9F140039D241 /* GIGaUserWeChatViewCell.h */, + 838762DB214B9F140039D241 /* GIGaUserWeChatViewCell.m */, + 838762DC214B9F140039D241 /* GIGaUserWeChatViewCell.xib */, + 838762DF214B9F580039D241 /* GiGaUserSexViewCell.h */, + 838762E0214B9F580039D241 /* GiGaUserSexViewCell.m */, + 838762E1214B9F580039D241 /* GiGaUserSexViewCell.xib */, + 838762E4214B9FA60039D241 /* GIGaUserCityViewCell.h */, + 838762E5214B9FA60039D241 /* GIGaUserCityViewCell.m */, + 838762E6214B9FA60039D241 /* GIGaUserCityViewCell.xib */, + ); + path = userInfoView; + sourceTree = ""; + }; 83928FFB2134F37D0077D2E8 /* SocketRocketUtility */ = { isa = PBXGroup; children = ( @@ -1172,15 +1220,20 @@ buildActionMask = 2147483647; files = ( 83346AC6212BBC8C0054D597 /* GiGaRegistViewController.xib in Resources */, + 838762DE214B9F140039D241 /* GIGaUserWeChatViewCell.xib in Resources */, 83BFAE6D213CD0E3004EF801 /* GiGaMineInfoViewCell.xib in Resources */, 8361B3D6212155C300238FEB /* LaunchScreen.storyboard in Resources */, + 838762E3214B9F580039D241 /* GiGaUserSexViewCell.xib in Resources */, 838388DA2130046D00D14C53 /* emojizone.mp4 in Resources */, 83A22720212AC8C100B3E75C /* GiGaUserLoginVC.xib in Resources */, + 838762D4214B9D120039D241 /* GIGaUserInfoAvatorCell.xib in Resources */, 838388C4212F934400D14C53 /* pomodoSound.m4a in Resources */, 83BFAE78213CDE91004EF801 /* GiGaSettingsViewCell.xib in Resources */, 83346AC1212BB50A0054D597 /* PassWordResetVC.xib in Resources */, 83BDC0592147B89900E74E0D /* GiGaAnswerViewCell.xib in Resources */, 83346AD1212BF5B70054D597 /* useragreement.html in Resources */, + 838762D9214B9EF80039D241 /* GIGaUserIDViewCell.xib in Resources */, + 838762E8214B9FA60039D241 /* GIGaUserCityViewCell.xib in Resources */, 83BFAE68213CCF10004EF801 /* GiGaMineUserViewCell.xib in Resources */, 8340BFA9213E65CA008F22E4 /* GIGACommonLocalizabe.strings in Resources */, 83835BA8212E4748001480F2 /* MAssaageCenterCell.xib in Resources */, @@ -1293,6 +1346,7 @@ 83346AD7212C18F50054D597 /* GiGaAppGaurdVC.m in Sources */, 8349585C212511040064DB6C /* AppDelegate+ThirdParty.m in Sources */, 83BFAE73213CDB58004EF801 /* GiSysSettingsVC.m in Sources */, + 838762D8214B9EF80039D241 /* GIGaUserIDViewCell.m in Sources */, 838500DC2137F3F7003514A3 /* GiGaAttributedLabel.m in Sources */, 83BFAE7B213D3F3A004EF801 /* MaskTimeCircularProgressView.m in Sources */, 8314D2112133ABE500B458BF /* WeiIXinApiManager.m in Sources */, @@ -1342,6 +1396,7 @@ 8338F6B92142504E00B4780B /* LXCustomSwith.m in Sources */, 8357ADD32123C7C6000816F2 /* GiGaAPIResult.m in Sources */, 8340BF9E213E3846008F22E4 /* SHineLabel.m in Sources */, + 838762D3214B9D120039D241 /* GIGaUserInfoAvatorCell.m in Sources */, 8361B4352121836700238FEB /* GiGaBaseNavViewController.m in Sources */, 835060B3212D54C2007E6220 /* GiGaAdDetailViewController.m in Sources */, 83346AC0212BB50A0054D597 /* PassWordResetVC.m in Sources */, @@ -1351,14 +1406,17 @@ 83BFAE67213CCF10004EF801 /* GiGaMineUserViewCell.m in Sources */, 8392900C2134F9F80077D2E8 /* GiGaCommentView.m in Sources */, 839290062134F4240077D2E8 /* LXDanMuManager.m in Sources */, + 838762E2214B9F580039D241 /* GiGaUserSexViewCell.m in Sources */, 839290052134F4240077D2E8 /* LXDanMuTrackView.m in Sources */, 83E40B2F21218BA0008149C4 /* GiGaUserViewController.m in Sources */, 835060A5212D3536007E6220 /* AppDelegate+GiGaConfig.m in Sources */, 83E40B2B21218B6F008149C4 /* GiGaExercisesViewController.m in Sources */, + 838762E7214B9FA60039D241 /* GIGaUserCityViewCell.m in Sources */, 83BFAE77213CDE91004EF801 /* GiGaSettingsViewCell.m in Sources */, 83835BA7212E4748001480F2 /* MAssaageCenterCell.m in Sources */, 836EE5D42136454500F0ABB2 /* RegistGetSMSCodeRequest.m in Sources */, 8361B42E2121812000238FEB /* GiGaServerConfig.m in Sources */, + 838762DD214B9F140039D241 /* GIGaUserWeChatViewCell.m in Sources */, 8340BFAF213E739D008F22E4 /* GiGaNoNetWorkView.m in Sources */, 836EE5DA2136716100F0ABB2 /* NSTimer+Convenience.m in Sources */, 83A22712212A9EA900B3E75C /* UIView+Sizes.m in Sources */, diff --git a/GIGA/AppDelegate.m b/GIGA/AppDelegate.m index 090da19..e4775e1 100644 --- a/GIGA/AppDelegate.m +++ b/GIGA/AppDelegate.m @@ -36,6 +36,13 @@ //广告页 [self creatAdView]; //[self setupTabBarController]; + + //启动同步用户数据 + BOOL islogin = [GiGaUserDefault isUserLogin]; + if (islogin) { + [[GiGaUserManager shareUser] synsisUserInfo:nil]; + } + return YES; } diff --git a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_20pt@1x.png b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_20pt@1x.png index 3fd7548..1a2a7e2 100644 Binary files a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_20pt@1x.png and b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_20pt@1x.png differ diff --git a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_20pt@2x-1.png b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_20pt@2x-1.png index 455a3b1..db5508e 100644 Binary files a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_20pt@2x-1.png and b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_20pt@2x-1.png differ diff --git a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_20pt@2x.png b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_20pt@2x.png index 455a3b1..db5508e 100644 Binary files a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_20pt@2x.png and b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_20pt@2x.png differ diff --git a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_20pt@3x.png b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_20pt@3x.png index eda493e..461f91e 100644 Binary files a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_20pt@3x.png and b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_20pt@3x.png differ diff --git a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_29pt@1x.png b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_29pt@1x.png index 50195f2..a09bb39 100644 Binary files a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_29pt@1x.png and b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_29pt@1x.png differ diff --git a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_29pt@2x-1.png b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_29pt@2x-1.png index 1829f28..8792993 100644 Binary files a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_29pt@2x-1.png and b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_29pt@2x-1.png differ diff --git a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_29pt@2x.png b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_29pt@2x.png index 1829f28..8792993 100644 Binary files a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_29pt@2x.png and b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_29pt@2x.png differ diff --git a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_29pt@3x.png b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_29pt@3x.png index 866a306..008f0e9 100644 Binary files a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_29pt@3x.png and b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_29pt@3x.png differ diff --git a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_40pt@1x.png b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_40pt@1x.png index 455a3b1..db5508e 100644 Binary files a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_40pt@1x.png and b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_40pt@1x.png differ diff --git a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_40pt@2x-1.png b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_40pt@2x-1.png index 27cae6d..ad5825a 100644 Binary files a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_40pt@2x-1.png and b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_40pt@2x-1.png differ diff --git a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_40pt@2x.png b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_40pt@2x.png index 27cae6d..ad5825a 100644 Binary files a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_40pt@2x.png and b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_40pt@2x.png differ diff --git a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_40pt@3x.png b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_40pt@3x.png index cc5047e..19d5296 100644 Binary files a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_40pt@3x.png and b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_40pt@3x.png differ diff --git a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_60pt@2x.png b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_60pt@2x.png index cc5047e..19d5296 100644 Binary files a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_60pt@2x.png and b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_60pt@2x.png differ diff --git a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_60pt@3x.png b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_60pt@3x.png index 62b1352..a35d888 100644 Binary files a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_60pt@3x.png and b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_60pt@3x.png differ diff --git a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_76pt@1x.png b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_76pt@1x.png index 19fe917..ae9f5e1 100644 Binary files a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_76pt@1x.png and b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_76pt@1x.png differ diff --git a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_76pt@2x.png b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_76pt@2x.png index 7ad394d..71c9884 100644 Binary files a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_76pt@2x.png and b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_76pt@2x.png differ diff --git a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_83.5pt@2x.png b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_83.5pt@2x.png index 4b95c79..04eb6e7 100644 Binary files a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_83.5pt@2x.png and b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_83.5pt@2x.png differ diff --git a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_appstore.png b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_appstore.png index 379b889..74a12cc 100644 Binary files a/GIGA/Assets.xcassets/AppIcon.appiconset/icon_appstore.png and b/GIGA/Assets.xcassets/AppIcon.appiconset/icon_appstore.png differ diff --git a/GIGA/Assets.xcassets/userCenter/sex_disselect.imageset/Contents.json b/GIGA/Assets.xcassets/userCenter/sex_disselect.imageset/Contents.json new file mode 100644 index 0000000..9cd5413 --- /dev/null +++ b/GIGA/Assets.xcassets/userCenter/sex_disselect.imageset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "sex_disselect@2x.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/GIGA/Assets.xcassets/userCenter/sex_disselect.imageset/sex_disselect@2x.png b/GIGA/Assets.xcassets/userCenter/sex_disselect.imageset/sex_disselect@2x.png new file mode 100644 index 0000000..2cdc84a Binary files /dev/null and b/GIGA/Assets.xcassets/userCenter/sex_disselect.imageset/sex_disselect@2x.png differ diff --git a/GIGA/Assets.xcassets/userCenter/sex_selected.imageset/Contents.json b/GIGA/Assets.xcassets/userCenter/sex_selected.imageset/Contents.json new file mode 100644 index 0000000..8c64c60 --- /dev/null +++ b/GIGA/Assets.xcassets/userCenter/sex_selected.imageset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "sex_selected@2x.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/GIGA/Assets.xcassets/userCenter/sex_selected.imageset/sex_selected@2x.png b/GIGA/Assets.xcassets/userCenter/sex_selected.imageset/sex_selected@2x.png new file mode 100644 index 0000000..45e3497 Binary files /dev/null and b/GIGA/Assets.xcassets/userCenter/sex_selected.imageset/sex_selected@2x.png differ diff --git a/GIGA/Category/UINavigationBar+Custom.m b/GIGA/Category/UINavigationBar+Custom.m index 737a09f..3ddb4b0 100644 --- a/GIGA/Category/UINavigationBar+Custom.m +++ b/GIGA/Category/UINavigationBar+Custom.m @@ -24,7 +24,7 @@ static char overlayKey; { if (!self.overlay) { [self setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault]; - self.overlay = [[UIView alloc] initWithFrame:CGRectMake(0, -PhoneX_STATUBAR_H, [UIScreen mainScreen].bounds.size.width, CGRectGetHeight(self.bounds) + PhoneX_STATUBAR_H)]; + self.overlay = [[UIView alloc] initWithFrame:CGRectMake(0, -Phone_STATUBAR_H, [UIScreen mainScreen].bounds.size.width, CGRectGetHeight(self.bounds) + Phone_STATUBAR_H)]; self.overlay.userInteractionEnabled = NO; self.overlay.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight; [self insertSubview:self.overlay atIndex:0]; @@ -58,6 +58,7 @@ static char overlayKey; -(void)setBackgroundImage{ [self setBackgroundImage:[UIImage imageNamed:@"nav_red_moment"] forBarMetrics:UIBarMetricsDefault]; + [self setTranslucent:NO]; } diff --git a/GIGA/Common/BaseVC/GiGaBaseViewController.m b/GIGA/Common/BaseVC/GiGaBaseViewController.m index 148588e..00cbf50 100644 --- a/GIGA/Common/BaseVC/GiGaBaseViewController.m +++ b/GIGA/Common/BaseVC/GiGaBaseViewController.m @@ -26,12 +26,15 @@ // Do any additional setup after loading the view. //[self.navigationController.navigationBar cnSetBackgroundColor:GIGARGB(216, 216, 216, 1)]; + //[self.navigationController.navigationBar setBarTintColor:GIGA_MAIN_BGCOLOR]; + } - (void)viewDidAppear:(BOOL)animated{ [super viewDidAppear:animated]; + } -(void)viewWillDisappear:(BOOL)animated{ [super viewWillDisappear:animated]; @@ -41,6 +44,7 @@ -(void)viewWillAppear:(BOOL)animated{ [super viewWillAppear:animated]; [self.navigationController.navigationBar setBackgroundImage]; + //[self.navigationController.navigationBar setTranslucent:YES]; } diff --git a/GIGA/Common/GiGaHelper.h b/GIGA/Common/GiGaHelper.h index 24ed16f..b83b761 100644 --- a/GIGA/Common/GiGaHelper.h +++ b/GIGA/Common/GiGaHelper.h @@ -58,5 +58,12 @@ +(NSString *)convertToJsonData:(NSDictionary *)dict; +(NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString; +/** + 6~20 密码 必须包含数字和字母 + + @return 必须包含数字和字母 + */ + ++(BOOL)checkPassWord:(NSString *)pass; @end diff --git a/GIGA/Common/GiGaHelper.m b/GIGA/Common/GiGaHelper.m index 6c24959..e2c59c1 100644 --- a/GIGA/Common/GiGaHelper.m +++ b/GIGA/Common/GiGaHelper.m @@ -230,10 +230,9 @@ } //⚠️ 13.2.0库编码采用 isoLatin1 + NSData *jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; - //NSData *jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; - - NSData *jsonData = [jsonString dataUsingEncoding:NSISOLatin1StringEncoding]; + //NSData *jsonData = [jsonString dataUsingEncoding:NSISOLatin1StringEncoding]; NSError *err; NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers @@ -254,4 +253,16 @@ return [NSString stringWithUTF8String:[oldStr cStringUsingEncoding:enc]]; } + ++(BOOL)checkPassWord:(NSString *)pass +{ + //6-20位数字和字母组成 + NSString *regex = @"^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$"; + NSPredicate * pred = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", regex]; + if ([pred evaluateWithObject:pass]) { + return YES ; + }else + return NO; +} + @end diff --git a/GIGA/Common/GiGaUserDB/GiGaUserDefault.h b/GIGA/Common/GiGaUserDB/GiGaUserDefault.h index b125092..a3d0e78 100644 --- a/GIGA/Common/GiGaUserDB/GiGaUserDefault.h +++ b/GIGA/Common/GiGaUserDB/GiGaUserDefault.h @@ -50,6 +50,16 @@ +(void)saveWeiXinaccesstokenInfoWithDic:(NSDictionary *)dic; +(NSDictionary *)getWeiXinAccessToenDic; +//面膜时间 未登录用户默认16分钟 测试用户对应测试结果 + + +/** + 保存用户测试时间 + + @param time 秒 + */ ++(void)savaMaskeTime:(NSTimeInterval)time; ++(NSTimeInterval)getUserMaskeTime; @end diff --git a/GIGA/Common/GiGaUserDB/GiGaUserDefault.m b/GIGA/Common/GiGaUserDB/GiGaUserDefault.m index e8c93f0..27d642f 100644 --- a/GIGA/Common/GiGaUserDB/GiGaUserDefault.m +++ b/GIGA/Common/GiGaUserDB/GiGaUserDefault.m @@ -15,6 +15,8 @@ NSString *const kShowAppGuard = @"ShowAppGuard"; NSString *const kWeiXinSaveToken = @"WeiXinSaveToken"; NSString *const kWeiXinUserInfo = @"WeiXinUserinfo"; NSString *const kGiGaToken = @"GiGatoken"; +NSString *const kMaskeTime= @"userMaskeTime"; +#define MASKTIME_DEFAULT 20; @implementation GiGaUserDefault @@ -54,7 +56,9 @@ NSString *const kGiGaToken = @"GiGatoken"; } +(void)userLogOut{ + UD_REMOVE_KEY(kGiGaToken); + UD_REMOVE_KEY(kMaskeTime); UD_REMOVE_KEY(GIGADEFAULTKEY_USERID); } @@ -99,6 +103,7 @@ NSString *const kGiGaToken = @"GiGatoken"; +(void)saveWeiXinaccesstokenInfoWithDic:(NSDictionary *)dic { [UD_STADARDUD setObject:dic forKey:kWeiXinSaveToken]; + [UD_STADARDUD synchronize]; } +(NSDictionary *)getWeiXinAccessToenDic{ @@ -109,6 +114,7 @@ NSString *const kGiGaToken = @"GiGatoken"; +(void)saveWeiXinUserInfoDic:(NSDictionary *)dic { [UD_STADARDUD setObject:dic forKey:kWeiXinUserInfo]; + [UD_STADARDUD synchronize]; } +(NSDictionary *)getWeiXinUserInfoDic{ @@ -116,5 +122,19 @@ NSString *const kGiGaToken = @"GiGatoken"; return [UD_STADARDUD objectForKey:kWeiXinUserInfo]; } ++(void)savaMaskeTime:(NSTimeInterval)time{ + [UD_STADARDUD setDouble:time forKey:kMaskeTime]; + [UD_STADARDUD synchronize]; +} + ++ (NSTimeInterval)getUserMaskeTime{ + + NSTimeInterval time = [UD_STADARDUD doubleForKey:kMaskeTime]; + if (time == 0) { + //time = 16 * 60; + time = MASKTIME_DEFAULT; + } + return time; +} @end diff --git a/GIGA/Common/GiGaUserDB/GiGaUserManager.h b/GIGA/Common/GiGaUserDB/GiGaUserManager.h index 1ca0c67..0ceca0b 100644 --- a/GIGA/Common/GiGaUserDB/GiGaUserManager.h +++ b/GIGA/Common/GiGaUserDB/GiGaUserManager.h @@ -8,6 +8,10 @@ #import #import "GiGaUser.h" + + +typedef void (^userDataresponseBlock)(GiGaUser *user); + @interface GiGaUserManager : NSObject @property(nonatomic,strong) GiGaUser *user; @@ -22,4 +26,6 @@ */ //-(void)detectionUserUpgrade; +-(void)synsisUserInfo:(userDataresponseBlock)block; + @end diff --git a/GIGA/Common/GiGaUserDB/GiGaUserManager.m b/GIGA/Common/GiGaUserDB/GiGaUserManager.m index f9d8777..38fcbb1 100644 --- a/GIGA/Common/GiGaUserDB/GiGaUserManager.m +++ b/GIGA/Common/GiGaUserDB/GiGaUserManager.m @@ -9,6 +9,7 @@ #import "GiGaUserManager.h" #import "YTKKeyValueStore.h" #import "GiGaUserDefault.h" +#import "GiGaBaseAPiRequest.h" NSString *const GIGA_USER_TABLE = @"user_table"; const static NSInteger GIGADB_USER_VER = 0;//当前数据库版本号 @@ -47,6 +48,29 @@ const static NSInteger GIGADB_USER_VER = 0;//当前数据库版本号 return self; } +//登录成功后请求用户数据 +-(void)synsisUserInfo:(userDataresponseBlock)block{ + + GiGaBaseAPiRequest *requst = [GiGaBaseAPiRequest initWithRequestPath:@"user/v1/info" method:RequestPostMethod parms:nil]; + weakify(self); + [requst requstDataWithResult:^(GiGaAPIResult *result) { + + if (result.success) { + //更新用户信息 + NSDictionary *userDic = result.dic[@"userInfo"]; + GiGaUser *user = [[GiGaUser alloc] initWithDictionary:userDic error:nil]; + self.user = user; + [weakSelf saveUser:user]; + + if (block) { + block(user); + } + NSLog(@"user dic ***\n%@",result.dic); + } + }]; + +} + //建表 -(void)creatTableByName:(NSString *)tableName{ [_store createTableWithName:tableName]; @@ -57,12 +81,12 @@ const static NSInteger GIGADB_USER_VER = 0;//当前数据库版本号 self.user = user; NSString *userTableId = [NSString stringWithFormat:@"%@",user.userId]; self.userTabId = userTableId; + //暂定只保留一个用户 NSDictionary *userDic = [user toDictionary]; [_userArr removeAllObjects]; [_userArr addObject:userDic]; - - + [_store putObject:_userArr withId:userTableId intoTable:GIGA_USER_TABLE]; [GiGaUserDefault saveUserId:userTableId]; @@ -86,7 +110,8 @@ const static NSInteger GIGADB_USER_VER = 0;//当前数据库版本号 -(void)loginOut{ self.user = nil; - [GiGaUserDefault removeUserId]; + [GiGaUserDefault userLogOut]; + } diff --git a/GIGA/Config/GIGA.h b/GIGA/Config/GIGA.h index 3c0ddfd..8658bd2 100644 --- a/GIGA/Config/GIGA.h +++ b/GIGA/Config/GIGA.h @@ -43,6 +43,10 @@ UD_SYNC #define kLOCALNotifiID_APPTERMINAL @"GIGALocalNotificationAppTerminal" //注册成功 #define kUserRegistSucccess @"userRegistSuccess" +//登录成功 +#define kUserLoginSuccessNoti @"gigaUserloginSuccess" +//退出登录 +#define kUserLogOutNotify @"userLogOutNotify" //微信登陆授权成功 #define kWeiXinAuthrization_Success @"WXAuthSuccess" @@ -82,11 +86,15 @@ alpha:((float)(rgbValue & 0xFF))/255.0] //X //底部工具栏需要为home indicator留出34pt边距 -#define PhoneX_BottomMargin ([UIScreen mainScreen].bounds.size.height == 812.0 ? 34.0 :0.0) +#define PhoneX_BottomMargin ([UIScreen mainScreen].bounds.size.height == 44.0 ? 34.0 :0.0) //状态栏高度由20pt变成44pt,导航栏以上变化64->88。 -#define PhoneX_TopMargin ([UIScreen mainScreen].bounds.size.height == 812.0 ? 24.0 :0.0) +#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 + self.navigationController.navigationBar.frame.size.height) -#define PhoneX_STATUBAR_H ([UIScreen mainScreen].bounds.size.height == 812.0 ? 44.0 :20.0) #define GIGA_FONTNAME @"PingFangSC-Medium" #define GIGA_FONTBOLD @"PingFangSC-Semibold" diff --git a/GIGA/GIGA.pch b/GIGA/GIGA.pch index ec80429..2e2ab6b 100644 --- a/GIGA/GIGA.pch +++ b/GIGA/GIGA.pch @@ -22,6 +22,7 @@ #import #import "MobClickList.h" #import "TTTAttributedLabel.h" +#import "GiGaUserManager.h" #ifdef DEBUG #define GILog(fmt,...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__) diff --git a/GIGA/Modules/AppAD/GiGaStartAdView/GiGaStartAdView.m b/GIGA/Modules/AppAD/GiGaStartAdView/GiGaStartAdView.m index 98a346e..5d69008 100644 --- a/GIGA/Modules/AppAD/GiGaStartAdView/GiGaStartAdView.m +++ b/GIGA/Modules/AppAD/GiGaStartAdView/GiGaStartAdView.m @@ -52,7 +52,7 @@ static int const showTime = 5; // [_adView addGestureRecognizer:tap]; CGFloat btnW = 80; CGFloat btnH = 26; - _countBtn = [[UIButton alloc] initWithFrame:CGRectMake(KMainW - btnW - 24,PhoneX_STATUBAR_H + 10, btnW, btnH)]; + _countBtn = [[UIButton alloc] initWithFrame:CGRectMake(KMainW - btnW - 24,Phone_STATUBAR_H + 10, btnW, btnH)]; [_countBtn addTarget:self action:@selector(removeAdView) forControlEvents:UIControlEventTouchUpInside]; // [_countBtn setTitle:[NSString stringWithFormat:@"跳过%d",showTime] forState:UIControlStateNormal]; diff --git a/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.m b/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.m index 1be4232..707515e 100644 --- a/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.m +++ b/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.m @@ -201,12 +201,14 @@ GIGA_ShowToast(@"请输入验证码"); return; } - if (!(self.passTexFied.text.length >=6 && self.passTexFied.text.length <=20) || self.passTexFied.text.length == 0) { - GIGA_ShowToast(@"请输入6~20位密码"); + + BOOL isPass = [GiGaHelper checkPassWord:self.passTexFied.text]; + if (isPass == NO) { + GIGA_ShowToast(@"请输入6-20位数字和字母组成的密码"); return; } - [self regeist:btn]; + } //注册 diff --git a/GIGA/Modules/LogIn/Controller/GiGaUserLoginVC.m b/GIGA/Modules/LogIn/Controller/GiGaUserLoginVC.m index 5d41356..69d632c 100644 --- a/GIGA/Modules/LogIn/Controller/GiGaUserLoginVC.m +++ b/GIGA/Modules/LogIn/Controller/GiGaUserLoginVC.m @@ -18,6 +18,8 @@ #import "GiGaUser.h" #import "GiGaServerConfig.h" #import "GIGAMBHUDHelper.h" +#import "GiGaHelper.h" +#import "GiGaUserManager.h" @interface GiGaUserLoginVC () @property (weak, nonatomic) IBOutlet UIImageView *userImagView; @@ -154,7 +156,7 @@ #pragma mark 手机号登录 -(void)loginBtnAction:(UIButton *)btn{ - if (self.acountTextField.text == nil) { + if (self.acountTextField.text.length == 0) { GIGA_ShowToast(@"请输入手机号"); return; } @@ -163,12 +165,14 @@ return; } - if (self.passwordTextField.text == nil) { + if (self.passwordTextField.text.length == 0) { GIGA_ShowToast(@"密码不能为空"); return; } - if (self.passwordTextField.text.length <= 6) { - GIGA_ShowToast(@"密码长度不能小于六位字符"); + BOOL isPass = [GiGaHelper checkPassWord:self.passwordTextField.text]; + + if (isPass == NO) { + GIGA_ShowToast(@"请输入6-20位数字和字母组成的密码"); return; } @@ -312,16 +316,18 @@ //token 登陆标志 [GiGaUserDefault saveToken:resDic[@"token"]]; - //埋点 [MobClick endEvent:MobClick_UserLogin]; -// //暂定123 登陆标志 -// [GiGaUserDefault saveUserId:@"123"]; - GIGA_WIndowTost(@"登录成功!"); + //请求用户数据 + [[GiGaUserManager shareUser] synsisUserInfo:^(GiGaUser *user) { + NSLog(@"%@",user.userId); + }]; + NC_POST_NAME_OBJECT(kUserLoginSuccessNoti, nil); [self dismissViewControllerAnimated:YES completion:nil]; } + //接收注册成功通知 -(void)userRegistSuccsessNoti:(NSNotification *)noti{ diff --git a/GIGA/Modules/LogIn/Controller/PassWordResetVC.m b/GIGA/Modules/LogIn/Controller/PassWordResetVC.m index c7c0bc2..49af51b 100644 --- a/GIGA/Modules/LogIn/Controller/PassWordResetVC.m +++ b/GIGA/Modules/LogIn/Controller/PassWordResetVC.m @@ -79,6 +79,8 @@ GIGA_ShowToast(@"请输入正确手机号"); return; } + + btn.userInteractionEnabled = NO; [self startTimer:btn]; @@ -150,10 +152,15 @@ GIGA_ShowToast(@"请输入新密码"); return; } - if (!(self.passNewTextField.text.length >= 6 && self.passNewTextField.text.length <= 20)) { - GIGA_ShowToast(@"请输入6~20位新密码"); + + BOOL isPass = [GiGaHelper checkPassWord:self.passNewTextField.text]; + + if (isPass == NO) { + GIGA_ShowToast(@"请输入6-20位数字和字母组成的密码"); return; } + + btn.userInteractionEnabled = NO; [self.view makeToastActivity:CSToastPositionCenter]; NSDictionary *params = @{ diff --git a/GIGA/Modules/LogIn/Controller/PassWordResetVC.xib b/GIGA/Modules/LogIn/Controller/PassWordResetVC.xib index 21f5a62..bb3a1f8 100644 --- a/GIGA/Modules/LogIn/Controller/PassWordResetVC.xib +++ b/GIGA/Modules/LogIn/Controller/PassWordResetVC.xib @@ -1,11 +1,12 @@ - + + @@ -25,23 +26,23 @@ - + - + - + - + @@ -50,21 +51,21 @@ - + - + - + @@ -84,7 +85,7 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +