diff --git a/GIGA.xcodeproj/project.pbxproj b/GIGA.xcodeproj/project.pbxproj index 52e812e..afb2226 100644 --- a/GIGA.xcodeproj/project.pbxproj +++ b/GIGA.xcodeproj/project.pbxproj @@ -46,6 +46,10 @@ 834415F6215B89A300A6D906 /* MaskTimeTopAnimationView.m in Sources */ = {isa = PBXBuildFile; fileRef = 834415F5215B89A300A6D906 /* MaskTimeTopAnimationView.m */; }; 8345C13621414D3B00051717 /* NSString+Unicode.m in Sources */ = {isa = PBXBuildFile; fileRef = 8345C13521414D3B00051717 /* NSString+Unicode.m */; }; 8349585C212511040064DB6C /* AppDelegate+ThirdParty.m in Sources */ = {isa = PBXBuildFile; fileRef = 8349585B212511040064DB6C /* AppDelegate+ThirdParty.m */; }; + 834BDA48215C7D10001E1DB7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 834BDA47215C7D0F001E1DB7 /* InfoPlist.strings */; }; + 834DA5A5215F5F3B003FC4C6 /* ShareViewSystemImageHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 834DA5A4215F5F3B003FC4C6 /* ShareViewSystemImageHelper.m */; }; + 834DA5A8215F5FE0003FC4C6 /* ShareCustomIamgeModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 834DA5A7215F5FE0003FC4C6 /* ShareCustomIamgeModel.m */; }; + 834DA5AB215F6840003FC4C6 /* JobModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 834DA5AA215F6840003FC4C6 /* JobModel.m */; }; 835060A2212D1225007E6220 /* GiGaMeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 835060A1212D1225007E6220 /* GiGaMeViewController.m */; }; 835060A5212D3536007E6220 /* AppDelegate+GiGaConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 8361B40A21217B2100238FEB /* AppDelegate+GiGaConfig.m */; }; 835060A9212D38EE007E6220 /* GiGaStartAdView.m in Sources */ = {isa = PBXBuildFile; fileRef = 835060A8212D38EE007E6220 /* GiGaStartAdView.m */; }; @@ -237,7 +241,6 @@ 83C78A192159D74D0083DDD9 /* UIImage+LogoQrCode.m in Sources */ = {isa = PBXBuildFile; fileRef = 83C78A182159D74D0083DDD9 /* UIImage+LogoQrCode.m */; }; 83C78A1C2159DD920083DDD9 /* UIImage+ShotImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 83C78A1B2159DD920083DDD9 /* UIImage+ShotImage.m */; }; 83D3832D215A2CF5009E8669 /* MaskHistryRecord.m in Sources */ = {isa = PBXBuildFile; fileRef = 83D3832C215A2CF5009E8669 /* MaskHistryRecord.m */; }; - 83E40B2B21218B6F008149C4 /* GiGaExercisesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 83E40B2A21218B6F008149C4 /* GiGaExercisesViewController.m */; }; 83E40B2F21218BA0008149C4 /* GiGaUserViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 83E40B2E21218BA0008149C4 /* GiGaUserViewController.m */; }; /* End PBXBuildFile section */ @@ -326,6 +329,13 @@ 8345C13521414D3B00051717 /* NSString+Unicode.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSString+Unicode.m"; sourceTree = ""; }; 8349585A212511040064DB6C /* AppDelegate+ThirdParty.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "AppDelegate+ThirdParty.h"; sourceTree = ""; }; 8349585B212511040064DB6C /* AppDelegate+ThirdParty.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "AppDelegate+ThirdParty.m"; sourceTree = ""; }; + 834BDA47215C7D0F001E1DB7 /* InfoPlist.strings */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; path = InfoPlist.strings; sourceTree = ""; }; + 834DA5A3215F5F3B003FC4C6 /* ShareViewSystemImageHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ShareViewSystemImageHelper.h; sourceTree = ""; }; + 834DA5A4215F5F3B003FC4C6 /* ShareViewSystemImageHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ShareViewSystemImageHelper.m; sourceTree = ""; }; + 834DA5A6215F5FE0003FC4C6 /* ShareCustomIamgeModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ShareCustomIamgeModel.h; sourceTree = ""; }; + 834DA5A7215F5FE0003FC4C6 /* ShareCustomIamgeModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ShareCustomIamgeModel.m; sourceTree = ""; }; + 834DA5A9215F6840003FC4C6 /* JobModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JobModel.h; sourceTree = ""; }; + 834DA5AA215F6840003FC4C6 /* JobModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JobModel.m; sourceTree = ""; }; 835060A0212D1225007E6220 /* GiGaMeViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaMeViewController.h; sourceTree = ""; }; 835060A1212D1225007E6220 /* GiGaMeViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaMeViewController.m; sourceTree = ""; }; 835060A3212D2321007E6220 /* GIGA.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = GIGA.entitlements; sourceTree = ""; }; @@ -667,8 +677,6 @@ 83C78A1B2159DD920083DDD9 /* UIImage+ShotImage.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIImage+ShotImage.m"; sourceTree = ""; }; 83D3832B215A2CF5009E8669 /* MaskHistryRecord.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MaskHistryRecord.h; sourceTree = ""; }; 83D3832C215A2CF5009E8669 /* MaskHistryRecord.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MaskHistryRecord.m; sourceTree = ""; }; - 83E40B2921218B6F008149C4 /* GiGaExercisesViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaExercisesViewController.h; sourceTree = ""; }; - 83E40B2A21218B6F008149C4 /* GiGaExercisesViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaExercisesViewController.m; sourceTree = ""; }; 83E40B2D21218BA0008149C4 /* GiGaUserViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaUserViewController.h; sourceTree = ""; }; 83E40B2E21218BA0008149C4 /* GiGaUserViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaUserViewController.m; sourceTree = ""; }; B14B65914FBF61910191D7A8 /* Pods_GIGA.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GIGA.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -852,6 +860,8 @@ 8376B8222154927300AB79F8 /* GIGaMaskShareViewController.m */, 8376B8342154C74300AB79F8 /* ShareViewController.h */, 8376B8352154C74300AB79F8 /* ShareViewController.m */, + 834DA5A3215F5F3B003FC4C6 /* ShareViewSystemImageHelper.h */, + 834DA5A4215F5F3B003FC4C6 /* ShareViewSystemImageHelper.m */, ); path = Controller; sourceTree = ""; @@ -863,6 +873,8 @@ 8392900E2134FA0A0077D2E8 /* GiGaCommentModel.m */, 834415F1215B5F8200A6D906 /* GiGaShareModel.h */, 834415F2215B5F8200A6D906 /* GiGaShareModel.m */, + 834DA5A6215F5FE0003FC4C6 /* ShareCustomIamgeModel.h */, + 834DA5A7215F5FE0003FC4C6 /* ShareCustomIamgeModel.m */, ); path = Model; sourceTree = ""; @@ -959,6 +971,7 @@ 8340BFA7213E6532008F22E4 /* Localizable */, 8361B3D8212155C300238FEB /* main.m */, 8361B3FB21215BE900238FEB /* GIGA.pch */, + 834BDA47215C7D0F001E1DB7 /* InfoPlist.strings */, ); path = GIGA; sourceTree = ""; @@ -1051,7 +1064,6 @@ 835060AE212D5423007E6220 /* AppAD */, 83E40B3021219078008149C4 /* Mask */, 83E40B2C21218B7E008149C4 /* LogIn */, - 8361B42521217FC000238FEB /* GiGaExercises */, 8361B42421217F6000238FEB /* Me */, ); path = Modules; @@ -1076,39 +1088,6 @@ path = Me; sourceTree = ""; }; - 8361B42521217FC000238FEB /* GiGaExercises */ = { - isa = PBXGroup; - children = ( - 8361B4282121807100238FEB /* Controller */, - 8361B4272121806500238FEB /* View */, - 8361B4262121805800238FEB /* Model */, - ); - path = GiGaExercises; - sourceTree = ""; - }; - 8361B4262121805800238FEB /* Model */ = { - isa = PBXGroup; - children = ( - ); - path = Model; - sourceTree = ""; - }; - 8361B4272121806500238FEB /* View */ = { - isa = PBXGroup; - children = ( - ); - path = View; - sourceTree = ""; - }; - 8361B4282121807100238FEB /* Controller */ = { - isa = PBXGroup; - children = ( - 83E40B2921218B6F008149C4 /* GiGaExercisesViewController.h */, - 83E40B2A21218B6F008149C4 /* GiGaExercisesViewController.m */, - ); - path = Controller; - sourceTree = ""; - }; 8361B4292121809A00238FEB /* Model */ = { isa = PBXGroup; children = ( @@ -1120,6 +1099,8 @@ 83A1DDB121574807006DE881 /* GIGaFeedKind.m */, 83D3832B215A2CF5009E8669 /* MaskHistryRecord.h */, 83D3832C215A2CF5009E8669 /* MaskHistryRecord.m */, + 834DA5A9215F6840003FC4C6 /* JobModel.h */, + 834DA5AA215F6840003FC4C6 /* JobModel.m */, ); path = Model; sourceTree = ""; @@ -1850,6 +1831,7 @@ 838762E8214B9FA60039D241 /* GIGaUserCityViewCell.xib in Resources */, 834415EB215B4E6F00A6D906 /* HistoryNoDataViewCell.xib in Resources */, 8342FD8B2151095100D141F4 /* AppVersionLogoCell.xib in Resources */, + 834BDA48215C7D10001E1DB7 /* InfoPlist.strings in Resources */, 8382DFEF21564A1F00BBA5A5 /* photopicker_back.png in Resources */, 83BFAE68213CCF10004EF801 /* GiGaMineUserViewCell.xib in Resources */, 8376B8202154913E00AB79F8 /* city.json in Resources */, @@ -1993,6 +1975,7 @@ 8361B3CE212155C200238FEB /* ViewController.m in Sources */, 8361B4382121847600238FEB /* UINavigationBar+Custom.m in Sources */, 83BFAE6C213CD0E3004EF801 /* GiGaMineInfoViewCell.m in Sources */, + 834DA5A8215F5FE0003FC4C6 /* ShareCustomIamgeModel.m in Sources */, 8376B8402154CEB200AB79F8 /* MaskShareTimeMidViewCell.m in Sources */, 8390116B214E20B2004CA790 /* LYSDateContentView.m in Sources */, 83BC8A872148BE8A00820437 /* NYPopover.m in Sources */, @@ -2107,14 +2090,15 @@ 835147312151E4EF00B25A88 /* GIGaAboutUsVC.m in Sources */, 8376B8282154A0A200AB79F8 /* MaskTimeEndViewImgaeCell.m in Sources */, 83901174214E20B2004CA790 /* LYSDateIndicatorViewController.m in Sources */, - 83E40B2B21218B6F008149C4 /* GiGaExercisesViewController.m in Sources */, 8390117B214E20B2004CA790 /* LYSDatePickerHeaderView.m in Sources */, 838762E7214B9FA60039D241 /* GIGaUserCityViewCell.m in Sources */, 8342FD822150FA1500D141F4 /* AppVersionDescCell.m in Sources */, + 834DA5AB215F6840003FC4C6 /* JobModel.m in Sources */, 83BFAE77213CDE91004EF801 /* GiGaSettingsViewCell.m in Sources */, 83835BA7212E4748001480F2 /* MAssaageCenterCell.m in Sources */, 836EE5D42136454500F0ABB2 /* RegistGetSMSCodeRequest.m in Sources */, 8361B42E2121812000238FEB /* GiGaServerConfig.m in Sources */, + 834DA5A5215F5F3B003FC4C6 /* ShareViewSystemImageHelper.m in Sources */, 838762DD214B9F140039D241 /* GIGaUserWeChatViewCell.m in Sources */, 8382DFA72156247F00BBA5A5 /* GiGaFeedLeiIingViewCell.m in Sources */, 8382DFA12155F68800BBA5A5 /* MaskActionSheetViewCell.m in Sources */, diff --git a/GIGA/AppDelegate+GiGaConfig.m b/GIGA/AppDelegate+GiGaConfig.m index cb804fa..d725daf 100644 --- a/GIGA/AppDelegate+GiGaConfig.m +++ b/GIGA/AppDelegate+GiGaConfig.m @@ -6,7 +6,7 @@ #import "AppDelegate+GiGaConfig.h" #import "GiGaServerConfig.h" #import "GiGaUserViewController.h" -#import "GiGaExercisesViewController.h" + #import "GiGaBaseNavViewController.h" #import "GiGaMaskTaskViewController.h" #import "GiGaUserDefault.h" @@ -18,13 +18,13 @@ -(void)setupTabBarController{ - GiGaExercisesViewController *exerciseVC = [[GiGaExercisesViewController alloc] init]; - GiGaBaseNavViewController *exerciseNav =[[GiGaBaseNavViewController alloc] initWithRootViewController:exerciseVC]; - exerciseNav.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName : [UIColor blackColor]}; - exerciseNav.title = @"测试"; - exerciseNav.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"测试" - image:nil - selectedImage:nil]; +// GiGaExercisesViewController *exerciseVC = [[GiGaExercisesViewController alloc] init]; +// GiGaBaseNavViewController *exerciseNav =[[GiGaBaseNavViewController alloc] initWithRootViewController:exerciseVC]; +// exerciseNav.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName : [UIColor blackColor]}; +// exerciseNav.title = @"测试"; +// exerciseNav.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"测试" +// image:nil +// selectedImage:nil]; GiGaMaskTaskViewController *maskVC = [[GiGaMaskTaskViewController alloc] init]; GiGaBaseNavViewController *maskNav =[[GiGaBaseNavViewController alloc] initWithRootViewController:maskVC]; @@ -43,7 +43,7 @@ [[UITabBar appearance] setTintColor:GIGARGB(70, 70, 70, 1)]; self.rootTabBarVC = [[UITabBarController alloc] init]; - self.rootTabBarVC.viewControllers = @[exerciseNav,maskNav,userNav]; + self.rootTabBarVC.viewControllers = @[maskNav,userNav]; [self initTabItems]; self.window.rootViewController = self.rootTabBarVC; self.window.backgroundColor = [UIColor whiteColor]; diff --git a/GIGA/AppDelegate+ThirdParty.m b/GIGA/AppDelegate+ThirdParty.m index 85d20ac..3dec361 100644 --- a/GIGA/AppDelegate+ThirdParty.m +++ b/GIGA/AppDelegate+ThirdParty.m @@ -81,8 +81,15 @@ [[UIApplication sharedApplication].keyWindow makeToast:@"授权失败" duration:1.6 position:CSToastPositionCenter]; } }else if ([resp isKindOfClass:[SendMessageToWXResp class]]){ - if (resp.errCode == 0) { + //cancel事件和success事件将统一为success事件。 微信团队 + //2018年08月13日 !!! + //App 分享功能调整 + if (resp.errCode == WXSuccess) { + GILog(@"分享取消或成功"); NC_POST_NAME_OBJECT(NC_UseShareSuccessNoti, nil); + }else if (resp.errCode == WXErrCodeUserCancel){ + GILog(@"分享取消"); + } } } diff --git a/GIGA/Assets.xcassets/login/appgaurd_bg.imageset/Contents.json b/GIGA/Assets.xcassets/login/appgaurd_bg.imageset/Contents.json new file mode 100644 index 0000000..f22138e --- /dev/null +++ b/GIGA/Assets.xcassets/login/appgaurd_bg.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "appgaurd_bg.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "appgaurd_bg@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "appgaurd_bg@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/GIGA/Assets.xcassets/login/appgaurd_bg.imageset/appgaurd_bg.png b/GIGA/Assets.xcassets/login/appgaurd_bg.imageset/appgaurd_bg.png new file mode 100644 index 0000000..03a859f Binary files /dev/null and b/GIGA/Assets.xcassets/login/appgaurd_bg.imageset/appgaurd_bg.png differ diff --git a/GIGA/Assets.xcassets/login/appgaurd_bg.imageset/appgaurd_bg@2x.png b/GIGA/Assets.xcassets/login/appgaurd_bg.imageset/appgaurd_bg@2x.png new file mode 100644 index 0000000..a1240d9 Binary files /dev/null and b/GIGA/Assets.xcassets/login/appgaurd_bg.imageset/appgaurd_bg@2x.png differ diff --git a/GIGA/Assets.xcassets/login/appgaurd_bg.imageset/appgaurd_bg@3x.png b/GIGA/Assets.xcassets/login/appgaurd_bg.imageset/appgaurd_bg@3x.png new file mode 100644 index 0000000..f9e6c15 Binary files /dev/null and b/GIGA/Assets.xcassets/login/appgaurd_bg.imageset/appgaurd_bg@3x.png differ diff --git a/GIGA/Assets.xcassets/login/appgaurd_moon.imageset/Contents.json b/GIGA/Assets.xcassets/login/appgaurd_moon.imageset/Contents.json new file mode 100644 index 0000000..4b460c2 --- /dev/null +++ b/GIGA/Assets.xcassets/login/appgaurd_moon.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "appgaurd_moon.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "appgaurd_moon@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "appgaurd_moon@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/GIGA/Assets.xcassets/login/appgaurd_moon.imageset/appgaurd_moon.png b/GIGA/Assets.xcassets/login/appgaurd_moon.imageset/appgaurd_moon.png new file mode 100644 index 0000000..763a003 Binary files /dev/null and b/GIGA/Assets.xcassets/login/appgaurd_moon.imageset/appgaurd_moon.png differ diff --git a/GIGA/Assets.xcassets/login/appgaurd_moon.imageset/appgaurd_moon@2x.png b/GIGA/Assets.xcassets/login/appgaurd_moon.imageset/appgaurd_moon@2x.png new file mode 100644 index 0000000..b1b8a1a Binary files /dev/null and b/GIGA/Assets.xcassets/login/appgaurd_moon.imageset/appgaurd_moon@2x.png differ diff --git a/GIGA/Assets.xcassets/login/appgaurd_moon.imageset/appgaurd_moon@3x.png b/GIGA/Assets.xcassets/login/appgaurd_moon.imageset/appgaurd_moon@3x.png new file mode 100644 index 0000000..15b3b3e Binary files /dev/null and b/GIGA/Assets.xcassets/login/appgaurd_moon.imageset/appgaurd_moon@3x.png differ diff --git a/GIGA/Assets.xcassets/login/appgaurd_woman.imageset/Contents.json b/GIGA/Assets.xcassets/login/appgaurd_woman.imageset/Contents.json new file mode 100644 index 0000000..4fa990b --- /dev/null +++ b/GIGA/Assets.xcassets/login/appgaurd_woman.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "appgaurd_woman.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "appgaurd_woman@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "appgaurd_woman@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/GIGA/Assets.xcassets/login/appgaurd_woman.imageset/appgaurd_woman.png b/GIGA/Assets.xcassets/login/appgaurd_woman.imageset/appgaurd_woman.png new file mode 100644 index 0000000..ca90289 Binary files /dev/null and b/GIGA/Assets.xcassets/login/appgaurd_woman.imageset/appgaurd_woman.png differ diff --git a/GIGA/Assets.xcassets/login/appgaurd_woman.imageset/appgaurd_woman@2x.png b/GIGA/Assets.xcassets/login/appgaurd_woman.imageset/appgaurd_woman@2x.png new file mode 100644 index 0000000..b8599f3 Binary files /dev/null and b/GIGA/Assets.xcassets/login/appgaurd_woman.imageset/appgaurd_woman@2x.png differ diff --git a/GIGA/Assets.xcassets/login/appgaurd_woman.imageset/appgaurd_woman@3x.png b/GIGA/Assets.xcassets/login/appgaurd_woman.imageset/appgaurd_woman@3x.png new file mode 100644 index 0000000..36d5afa Binary files /dev/null and b/GIGA/Assets.xcassets/login/appgaurd_woman.imageset/appgaurd_woman@3x.png differ diff --git a/GIGA/Assets.xcassets/login/start_app.imageset/Contents.json b/GIGA/Assets.xcassets/login/start_app.imageset/Contents.json new file mode 100644 index 0000000..00e6afb --- /dev/null +++ b/GIGA/Assets.xcassets/login/start_app.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "start_app@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "start_app@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/GIGA/Assets.xcassets/login/start_app.imageset/start_app@2x.png b/GIGA/Assets.xcassets/login/start_app.imageset/start_app@2x.png new file mode 100644 index 0000000..d90d517 Binary files /dev/null and b/GIGA/Assets.xcassets/login/start_app.imageset/start_app@2x.png differ diff --git a/GIGA/Assets.xcassets/login/start_app.imageset/start_app@3x.png b/GIGA/Assets.xcassets/login/start_app.imageset/start_app@3x.png new file mode 100644 index 0000000..9b2d2d6 Binary files /dev/null and b/GIGA/Assets.xcassets/login/start_app.imageset/start_app@3x.png differ diff --git a/GIGA/Assets.xcassets/maskTime/share_oneblack.imageset/Contents.json b/GIGA/Assets.xcassets/maskTime/share_oneblack.imageset/Contents.json index 6ca095d..6c25cb6 100644 --- a/GIGA/Assets.xcassets/maskTime/share_oneblack.imageset/Contents.json +++ b/GIGA/Assets.xcassets/maskTime/share_oneblack.imageset/Contents.json @@ -1,9 +1,17 @@ { "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, { "idiom" : "universal", "filename" : "share_oneblack@2x.png", "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" } ], "info" : { diff --git a/GIGA/Assets.xcassets/maskTime/sharebg_6.imageset/Contents.json b/GIGA/Assets.xcassets/maskTime/sharebg_6.imageset/Contents.json new file mode 100644 index 0000000..671445e --- /dev/null +++ b/GIGA/Assets.xcassets/maskTime/sharebg_6.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "sharebg_6@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/GIGA/Assets.xcassets/maskTime/sharebg_6.imageset/sharebg_6@2x.png b/GIGA/Assets.xcassets/maskTime/sharebg_6.imageset/sharebg_6@2x.png new file mode 100644 index 0000000..b52a421 Binary files /dev/null and b/GIGA/Assets.xcassets/maskTime/sharebg_6.imageset/sharebg_6@2x.png differ diff --git a/GIGA/Assets.xcassets/maskTime/sharebg_7.imageset/Contents.json b/GIGA/Assets.xcassets/maskTime/sharebg_7.imageset/Contents.json new file mode 100644 index 0000000..8cc2495 --- /dev/null +++ b/GIGA/Assets.xcassets/maskTime/sharebg_7.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "sharebg_7@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/GIGA/Assets.xcassets/maskTime/sharebg_7.imageset/sharebg_7@2x.png b/GIGA/Assets.xcassets/maskTime/sharebg_7.imageset/sharebg_7@2x.png new file mode 100644 index 0000000..57d3e08 Binary files /dev/null and b/GIGA/Assets.xcassets/maskTime/sharebg_7.imageset/sharebg_7@2x.png differ diff --git a/GIGA/Assets.xcassets/maskTime/user_day.imageset/Contents.json b/GIGA/Assets.xcassets/maskTime/user_day.imageset/Contents.json index 6b90143..6cee567 100644 --- a/GIGA/Assets.xcassets/maskTime/user_day.imageset/Contents.json +++ b/GIGA/Assets.xcassets/maskTime/user_day.imageset/Contents.json @@ -1,9 +1,17 @@ { "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, { "idiom" : "universal", "filename" : "user_day@2x.png", "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" } ], "info" : { diff --git a/GIGA/Assets.xcassets/maskTime/user_time.imageset/Contents.json b/GIGA/Assets.xcassets/maskTime/user_time.imageset/Contents.json index 60cb0a4..97aaf21 100644 --- a/GIGA/Assets.xcassets/maskTime/user_time.imageset/Contents.json +++ b/GIGA/Assets.xcassets/maskTime/user_time.imageset/Contents.json @@ -1,9 +1,17 @@ { "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, { "idiom" : "universal", "filename" : "user_time@2x.png", "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" } ], "info" : { diff --git a/GIGA/Assets.xcassets/userCenter/applink.imageset/Contents.json b/GIGA/Assets.xcassets/userCenter/applink.imageset/Contents.json new file mode 100644 index 0000000..765397b --- /dev/null +++ b/GIGA/Assets.xcassets/userCenter/applink.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "applink.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/GIGA/Assets.xcassets/userCenter/applink.imageset/applink.png b/GIGA/Assets.xcassets/userCenter/applink.imageset/applink.png new file mode 100644 index 0000000..10dc0a2 Binary files /dev/null and b/GIGA/Assets.xcassets/userCenter/applink.imageset/applink.png differ diff --git a/GIGA/Assets.xcassets/userCenter/share_minute.imageset/Contents.json b/GIGA/Assets.xcassets/userCenter/share_minute.imageset/Contents.json new file mode 100644 index 0000000..374517e --- /dev/null +++ b/GIGA/Assets.xcassets/userCenter/share_minute.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "share_minute@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/GIGA/Assets.xcassets/userCenter/share_minute.imageset/share_minute@2x.png b/GIGA/Assets.xcassets/userCenter/share_minute.imageset/share_minute@2x.png new file mode 100644 index 0000000..639e75a Binary files /dev/null and b/GIGA/Assets.xcassets/userCenter/share_minute.imageset/share_minute@2x.png differ diff --git a/GIGA/Assets.xcassets/userCenter/share_tim.imageset/Contents.json b/GIGA/Assets.xcassets/userCenter/share_tim.imageset/Contents.json new file mode 100644 index 0000000..377a34a --- /dev/null +++ b/GIGA/Assets.xcassets/userCenter/share_tim.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "share_tim@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/GIGA/Assets.xcassets/userCenter/share_tim.imageset/share_tim@2x.png b/GIGA/Assets.xcassets/userCenter/share_tim.imageset/share_tim@2x.png new file mode 100644 index 0000000..fc0d738 Binary files /dev/null and b/GIGA/Assets.xcassets/userCenter/share_tim.imageset/share_tim@2x.png differ diff --git a/GIGA/Base.lproj/LaunchScreen.storyboard b/GIGA/Base.lproj/LaunchScreen.storyboard index 8db0a91..dc45b17 100644 --- a/GIGA/Base.lproj/LaunchScreen.storyboard +++ b/GIGA/Base.lproj/LaunchScreen.storyboard @@ -19,55 +19,51 @@ - + - - + + - - - - - - - - - + - - - - - - + + + + + + + + - + - diff --git a/GIGA/Category/UIImage+ShotImage.h b/GIGA/Category/UIImage+ShotImage.h index 01e0635..8154157 100644 --- a/GIGA/Category/UIImage+ShotImage.h +++ b/GIGA/Category/UIImage+ShotImage.h @@ -11,5 +11,6 @@ @interface UIImage (ShotImage) //截图tableviewi +(UIImage *)saveLongImage:(UITableView *)table; ++(UIImage *)saveNavsuitImage:(UITableView *)table; @end diff --git a/GIGA/Category/UIImage+ShotImage.m b/GIGA/Category/UIImage+ShotImage.m index a78ace9..8298cca 100644 --- a/GIGA/Category/UIImage+ShotImage.m +++ b/GIGA/Category/UIImage+ShotImage.m @@ -14,24 +14,39 @@ UIImage* image = nil; // 下面方法,第一个参数表示区域大小。第二个参数表示是否是非透明的。如果需要显示半透明效果,需要传NO,否则传YES。第三个参数就是屏幕密度了,调整清晰度。 - - UIGraphicsBeginImageContextWithOptions(table.contentSize, YES, [UIScreen mainScreen].scale); + UIGraphicsBeginImageContextWithOptions(CGSizeMake(table.contentSize.width,table.contentSize.height), YES, [UIScreen mainScreen].scale); CGPoint savedContentOffset = table.contentOffset; CGRect savedFrame = table.frame; table.contentOffset = CGPointZero; - table.frame = CGRectMake(0, 0, table.contentSize.width, table.contentSize.height); + table.frame = CGRectMake(0, 0, table.contentSize.width, table.contentSize.height +100); + [table.layer renderInContext: UIGraphicsGetCurrentContext()]; + image = UIGraphicsGetImageFromCurrentImageContext(); + table.contentOffset = savedContentOffset; + table.frame = savedFrame; + UIGraphicsEndImageContext(); + + return image; + +} + ++(UIImage *)saveNavsuitImage:(UITableView *)table { + + UIImage* image = nil; + // 下面方法,第一个参数表示区域大小。第二个参数表示是否是非透明的。如果需要显示半透明效果,需要传NO,否则传YES。第三个参数就是屏幕密度了,调整清晰度。 + UIGraphicsBeginImageContextWithOptions(CGSizeMake(table.contentSize.width,table.contentSize.height+30), YES, [UIScreen mainScreen].scale); + + CGPoint savedContentOffset = table.contentOffset; + CGRect savedFrame = table.frame; + table.contentOffset = CGPointZero; + table.frame = CGRectMake(0, 0, table.contentSize.width, table.contentSize.height +30); [table.layer renderInContext: UIGraphicsGetCurrentContext()]; - image = UIGraphicsGetImageFromCurrentImageContext(); - table.contentOffset = savedContentOffset; - table.frame = savedFrame; - UIGraphicsEndImageContext(); - + return image; } diff --git a/GIGA/Common/GiGaNetTool/GiGaNetManager.m b/GIGA/Common/GiGaNetTool/GiGaNetManager.m index 67293b3..e1842df 100644 --- a/GIGA/Common/GiGaNetTool/GiGaNetManager.m +++ b/GIGA/Common/GiGaNetTool/GiGaNetManager.m @@ -28,7 +28,9 @@ if (token) { [manager.requestSerializer setValue:token forHTTPHeaderField:@"token"]; } - + + [manager.requestSerializer setValue:@"ios" forHTTPHeaderField:@"device"]; + switch (requestMethod) { case RequestGetMethod: @@ -85,7 +87,7 @@ AFHTTPSessionManager*manager=[[AFHTTPSessionManager alloc] init]; manager.responseSerializer=[AFHTTPResponseSerializer serializer]; - + [manager.requestSerializer setValue:@"ios" forHTTPHeaderField:@"device"]; [manager POST:url parameters:param progress:^(NSProgress * _Nonnull uploadProgress) { } success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) { @@ -131,6 +133,8 @@ [manager.requestSerializer setValue:token forHTTPHeaderField:@"token"]; [requst setValue:token forHTTPHeaderField:@"token"]; } + [manager.requestSerializer setValue:@"ios" forHTTPHeaderField:@"device"]; + [requst setValue:@"ios" forHTTPHeaderField:@"device"]; [requst setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; [requst setValue:@"application/json" forHTTPHeaderField:@"Accept"]; @@ -179,6 +183,8 @@ if (token) { [manager.requestSerializer setValue:token forHTTPHeaderField:@"token"]; } + [manager.requestSerializer setValue:@"ios" forHTTPHeaderField:@"device"]; + [manager POST:url parameters:parms constructingBodyWithBlock:^(id _Nonnull formData) { @@ -232,6 +238,7 @@ if (token) { [manager.requestSerializer setValue:token forHTTPHeaderField:@"token"]; } + [manager.requestSerializer setValue:@"ios" forHTTPHeaderField:@"device"]; NSString *fullurl = [NSString stringWithFormat:@"%@%@",[GiGaServerConfig getMainUrl],url]; [manager POST:fullurl parameters:parms constructingBodyWithBlock:^(id _Nonnull formData) { diff --git a/GIGA/Common/GiGaUserDB/GIGaUserFileHelper.m b/GIGA/Common/GiGaUserDB/GIGaUserFileHelper.m index 457f243..3925ad3 100644 --- a/GIGA/Common/GiGaUserDB/GIGaUserFileHelper.m +++ b/GIGA/Common/GiGaUserDB/GIGaUserFileHelper.m @@ -42,7 +42,7 @@ NSString*fullpath=[[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"]stringByAppendingPathComponent:imageName]; UIImage*saveImage=[[UIImage alloc]initWithContentsOfFile:fullpath]; if (!saveImage) { - saveImage = [UIImage imageNamed:@"sharebg_1"]; + saveImage = [UIImage imageNamed:@"sharebg_6"]; } return saveImage; } diff --git a/GIGA/Common/GiGaUserDB/GiGaUserDefault.h b/GIGA/Common/GiGaUserDB/GiGaUserDefault.h index a3d0e78..921b9be 100644 --- a/GIGA/Common/GiGaUserDB/GiGaUserDefault.h +++ b/GIGA/Common/GiGaUserDB/GiGaUserDefault.h @@ -50,6 +50,14 @@ +(void)saveWeiXinaccesstokenInfoWithDic:(NSDictionary *)dic; +(NSDictionary *)getWeiXinAccessToenDic; +/** + 微信code + @param code 微信code + */ ++(void)saveWeiXinCode:(NSString *)code; ++(NSString *)getWeiXinCode; + + //面膜时间 未登录用户默认16分钟 测试用户对应测试结果 diff --git a/GIGA/Common/GiGaUserDB/GiGaUserDefault.m b/GIGA/Common/GiGaUserDB/GiGaUserDefault.m index 7541ba5..3a403c1 100644 --- a/GIGA/Common/GiGaUserDB/GiGaUserDefault.m +++ b/GIGA/Common/GiGaUserDB/GiGaUserDefault.m @@ -16,6 +16,7 @@ NSString *const kWeiXinSaveToken = @"WeiXinSaveToken"; NSString *const kWeiXinUserInfo = @"WeiXinUserinfo"; NSString *const kGiGaToken = @"GiGatoken"; NSString *const kMaskeTime= @"userMaskeTime"; +NSString *const kWeiXinCodeInfo = @"WeiXinCodeinfo"; #define MASKTIME_DEFAULT 20; @implementation GiGaUserDefault @@ -60,6 +61,7 @@ NSString *const kMaskeTime= @"userMaskeTime"; UD_REMOVE_KEY(kGiGaToken); UD_REMOVE_KEY(kMaskeTime); UD_REMOVE_KEY(GIGADEFAULTKEY_USERID); + } +(void)saveDBVersion:(NSInteger)versionNum{ @@ -111,6 +113,17 @@ NSString *const kMaskeTime= @"userMaskeTime"; return [UD_STADARDUD objectForKey:kWeiXinSaveToken]; } ++(void)saveWeiXinCode:(NSString *)code{ + + [UD_STADARDUD setObject:code forKey:kWeiXinCodeInfo]; + [UD_STADARDUD synchronize]; +} + ++(NSString *)getWeiXinCode{ + + return [UD_STADARDUD objectForKey:kWeiXinCodeInfo]; +} + +(void)saveWeiXinUserInfoDic:(NSDictionary *)dic { [UD_STADARDUD setObject:dic forKey:kWeiXinUserInfo]; @@ -131,9 +144,9 @@ NSString *const kMaskeTime= @"userMaskeTime"; NSTimeInterval time = [UD_STADARDUD doubleForKey:kMaskeTime]; if (time == 0) { - //默认17 分钟 - time = 17 * 60; - time = MASKTIME_DEFAULT; + //默认15 分钟 + time = 15 * 60; + //time = MASKTIME_DEFAULT; } return time; } diff --git a/GIGA/Config/ApiRequestConfig.h b/GIGA/Config/ApiRequestConfig.h index a14ad53..2777f3c 100644 --- a/GIGA/Config/ApiRequestConfig.h +++ b/GIGA/Config/ApiRequestConfig.h @@ -28,15 +28,20 @@ //修改密码 #define kPAiUSerEditpwd @"user/v1/editpwd" //修改手机号 -#define kApiChangePhone @"user/v1/editmobil" -//修改手机号发送验证码 -#define kApiChangeMobleCode @"msg/sms/v1/editsendcode" -//发送验证码 -#define kApiSendPhoneCode @"msg/sms/v1/sendcode"; +#define kApiChangePhone @"user/v1/editmobile" +//修改手机号发送旧手机验证码 +#define kApiChangeMobleOldCode @"msg/sms/v1/editsendcode" +//修改手机号发送新手机验证码 +#define kApiChangeMobleNewCode @"msg/sms/v1/editsendcode2" + + //找回密码发送验证码 #define kApiChangePassSendCode @"msg/sms/v1/retrievesendcode" //异步验证手机验证码 #define kApiVersifyPhoneCode @"user/v1/validateSmsCode" +//注册发送短信 +#define kApiUserRegistSendCode @"msg/sms/v1/registersendcode" + //获取意见反馈类型 (设置意见反馈) #define kApiGetFeedList @"sys/sysdict/v1/maskproposaltype" @@ -57,6 +62,14 @@ #define kApiEndMaskTime @"activity/maskuselog/v1/end" //每日分享 #define kApiShareAction @"activity/maskuselog/v1/sharedata" +//微信登陆 +#define kApiWeiChatLogin @"sys/v1/wechatlogin" + +//版本说明 +//测试 +//#define kIMPRITNT @"http://yts.s1.natapp.cc/mask/imprint.html" +//正式 +#define kIMPRITNT @"http://app.mianmoshijian.com/imprint.html?device=ios" #endif /* ApiRequestConfig_h */ diff --git a/GIGA/Config/GIGA.h b/GIGA/Config/GIGA.h index f800de4..76fe1f5 100644 --- a/GIGA/Config/GIGA.h +++ b/GIGA/Config/GIGA.h @@ -101,7 +101,7 @@ alpha:((float)(rgbValue & 0xFF))/255.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 SAFE_NAV_HEIGHT ([[UIApplication sharedApplication] statusBarFrame].size.height == 44.0 ? 88.0 : 64.0) #define GIGA_FONTNAME @"PingFangSC-Medium" diff --git a/GIGA/Config/GiGaServerConfig.h b/GIGA/Config/GiGaServerConfig.h index e4d62a4..d3b12b0 100644 --- a/GIGA/Config/GiGaServerConfig.h +++ b/GIGA/Config/GiGaServerConfig.h @@ -12,5 +12,6 @@ + (void)setServerType:(NSInteger) type; + (NSString *)getMainUrl; ++(NSString*)getsocketUrl; @end diff --git a/GIGA/Config/GiGaServerConfig.m b/GIGA/Config/GiGaServerConfig.m index c9ac0d0..4574d6a 100644 --- a/GIGA/Config/GiGaServerConfig.m +++ b/GIGA/Config/GiGaServerConfig.m @@ -18,12 +18,19 @@ switch (type) { case 0://测试环境 { - [[NSUserDefaults standardUserDefaults] setValue:@"http://apiyts.s1.natapp.cc/v1/" forKey:@"MainUrl"]; + [[NSUserDefaults standardUserDefaults] setValue:@"http://apiyts.s1.natapp.cc/v1/" forKey:@"MainUrl"]; + [[NSUserDefaults standardUserDefaults] setValue:@"http://wsyts.s1.natapp.cc" forKey:@"gigasocketUrl"]; +// [[NSUserDefaults standardUserDefaults] setValue:@"https://api.mianmoshijian.com/v1/" forKey:@"MainUrl"]; +// [[NSUserDefaults standardUserDefaults] setValue:@"https://ws.mianmoshijian.com" forKey:@"gigasocketUrl"]; + } break; case 1: //生产环境 { - [[NSUserDefaults standardUserDefaults] setValue:@"https://" forKey:@"MainUrl"]; + //https://api.mianmoshijian.com/v1/ + [[NSUserDefaults standardUserDefaults] setValue:@"https://api.mianmoshijian.com/v1/" forKey:@"MainUrl"]; + [[NSUserDefaults standardUserDefaults] setValue:@"https://ws.mianmoshijian.com" forKey:@"gigasocketUrl"]; + } break; @@ -37,4 +44,8 @@ return [[NSUserDefaults standardUserDefaults] objectForKey:@"MainUrl"]; } ++(NSString*)getsocketUrl{ + return [[NSUserDefaults standardUserDefaults] objectForKey:@"gigasocketUrl"]; +} + @end diff --git a/GIGA/Info.plist b/GIGA/Info.plist index 2312099..17fef7b 100644 --- a/GIGA/Info.plist +++ b/GIGA/Info.plist @@ -2,23 +2,12 @@ - NSPhotoLibraryAddUsageDescription - 保存图片到相册 BuglyAppIDString 8f49773330 CFBundleDevelopmentRegion cn CFBundleDisplayName 面膜时间 - CFBundleDocumentTypes - - - CFBundleTypeIconFiles - - CFBundleTypeName - - - CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -30,7 +19,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.0 + 0.8.0 CFBundleURLTypes @@ -53,7 +42,7 @@ CFBundleVersion - 1 + 1.4.0 LSApplicationQueriesSchemes weixin @@ -67,6 +56,8 @@ NSCameraUsageDescription 是否允许此App使用您的 相机? + NSPhotoLibraryAddUsageDescription + 保存图片到相册 NSPhotoLibraryUsageDescription 是否允许此App使用您的相册? UIBackgroundModes diff --git a/GIGA/InfoPlist.strings b/GIGA/InfoPlist.strings new file mode 100644 index 0000000..8426c68 --- /dev/null +++ b/GIGA/InfoPlist.strings @@ -0,0 +1,10 @@ +/* + InfoPlist.strings + GIGA + + Created by lianxiang on 2018/9/27. + Copyright © 2018年 com.giga.ios. All rights reserved. +*/ + +CFBundleDisplayName = "面膜时间"; + diff --git a/GIGA/Localizable/Localizable.strings b/GIGA/Localizable/Localizable.strings index e407f90..2b2ac56 100644 --- a/GIGA/Localizable/Localizable.strings +++ b/GIGA/Localizable/Localizable.strings @@ -5,3 +5,4 @@ Created by lianxiang on 2018/9/4. Copyright © 2018年 com.giga.ios. All rights reserved. */ + diff --git a/GIGA/Modules/AppAD/GiGaStartAdView/GiGaStartAdView.m b/GIGA/Modules/AppAD/GiGaStartAdView/GiGaStartAdView.m index 5d69008..c47c2f7 100644 --- a/GIGA/Modules/AppAD/GiGaStartAdView/GiGaStartAdView.m +++ b/GIGA/Modules/AppAD/GiGaStartAdView/GiGaStartAdView.m @@ -86,6 +86,7 @@ static int const showTime = 5; NSMutableAttributedString *title = [[NSMutableAttributedString alloc] initWithString:@"了解更多" attributes:@{NSFontAttributeName:[UIFont fontWithName:GIGA_FONTNAME size:18],NSForegroundColorAttributeName:[UIColor whiteColor]}]; [moreinfoBtn setAttributedTitle:title forState:UIControlStateNormal]; + UILabel *year = [[UILabel alloc] init]; year.textColor = [UIColor whiteColor]; year.font = GIGA_TEXTFONTBOLD(10); @@ -131,6 +132,8 @@ static int const showTime = 5; make.left.mas_equalTo(20); }]; + + moreinfoBtn.hidden = YES; } -(void)removeAdView{ diff --git a/GIGA/Modules/GiGaExercises/Controller/GiGaExercisesViewController.h b/GIGA/Modules/GiGaExercises/Controller/GiGaExercisesViewController.h deleted file mode 100644 index a1c25a6..0000000 --- a/GIGA/Modules/GiGaExercises/Controller/GiGaExercisesViewController.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// GiGaExercisesViewController.h -// GIGA -// -// Created by lianxiang on 2018/8/13. -// Copyright © 2018年 com.giga.ios. All rights reserved. -// - -#import - -@interface GiGaExercisesViewController : UIViewController - -@end diff --git a/GIGA/Modules/GiGaExercises/Controller/GiGaExercisesViewController.m b/GIGA/Modules/GiGaExercises/Controller/GiGaExercisesViewController.m deleted file mode 100644 index 78ab03a..0000000 --- a/GIGA/Modules/GiGaExercises/Controller/GiGaExercisesViewController.m +++ /dev/null @@ -1,37 +0,0 @@ -// -// GiGaExercisesViewController.m -// GIGA -// -// Created by lianxiang on 2018/8/13. -// Copyright © 2018年 com.giga.ios. All rights reserved. -// - -#import "GiGaExercisesViewController.h" - -@interface GiGaExercisesViewController () - -@end - -@implementation GiGaExercisesViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view. -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - -/* -#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/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.m b/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.m index acd0d34..ce59090 100644 --- a/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.m +++ b/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.m @@ -46,6 +46,7 @@ [self.checkBtn addTarget:self action:@selector(checkBtnAction:) forControlEvents:UIControlEventTouchUpInside]; [self resetBackimg]; + } -(void)resetBackimg{ @@ -122,7 +123,7 @@ NSDictionary *param = @{ @"mobile":phoneNumber }; - GiGaBaseAPiRequest *api = [GiGaBaseAPiRequest initWithRequestPath:@"msg/sms/v1/registersendcode" method:RequestPostMethod parms:param]; + GiGaBaseAPiRequest *api = [GiGaBaseAPiRequest initWithRequestPath:kApiUserRegistSendCode method:RequestPostMethod parms:param]; [api requstDataWithResult:^(GiGaAPIResult *result) { [MBProgressHUD hideHUDForView:self.view animated:YES]; @@ -182,9 +183,10 @@ // [self.navigationController pushViewController:webView animated:YES]; GiGaWebViewController *webView = [[GiGaWebViewController alloc] init]; webView.souceType = WebSourceTypeUrlLink; - webView.url = @"http://www.youtansu.com"; + webView.url = @"http://app.mianmoshijian.com/userAgrerment.html"; [self.navigationController pushViewController:webView animated:YES]; + } #pragma mark 注册 @@ -216,11 +218,16 @@ -(void)regeist:(UIButton *)btn{ btn.userInteractionEnabled = NO; - NSDictionary *weixinInfoDic = [GiGaUserDefault getWeiXinAccessToenDic]; + //NSDictionary *weixinInfoDic = [GiGaUserDefault getWeiXinAccessToenDic]; + NSString *wechatCode = [GiGaUserDefault getWeiXinCode]; NSDictionary *param = nil; - if (weixinInfoDic) { - param = @{@"username":self.phoneNumberTextField.text,@"verifiedCode":self.codeTextField.text,@"password":self.passTexFied.text,@"openid":weixinInfoDic[@"openid"]}; + + if (wechatCode) { + + param = @{@"username":self.phoneNumberTextField.text,@"verifiedCode":self.codeTextField.text,@"password":self.passTexFied.text,@"wechatCode":wechatCode}; + }else{ + param = @{@"username":self.phoneNumberTextField.text,@"verifiedCode":self.codeTextField.text,@"password":self.passTexFied.text}; } @@ -230,21 +237,49 @@ btn.userInteractionEnabled = YES; GILog(@"注册->%@",result.message); - if (result.code == 0) { - NC_POST_NAME_OBJECT(kUserRegistSucccess,self.phoneNumberTextField.text); - GIGA_ShowToast(result.message); - [self.navigationController popToRootViewControllerAnimated:YES]; - - }else if (result.code == GiGAErrorCode_USER_EXIST){ - GIGA_ShowToast(@"用户已存在"); - NC_POST_NAME_OBJECT(kUserRegistSucccess,self.phoneNumberTextField.text); + if (result.success) { +// NC_POST_NAME_OBJECT(kUserRegistSucccess,self.phoneNumberTextField.text); +// GIGA_ShowToast(result.message); +// [self.navigationController popToRootViewControllerAnimated:YES]; + if (result.dic) { + //token 登陆标志 + [GiGaUserDefault saveToken:result.dic[@"token"]]; + //埋点 + [MobClick endEvent:MobClick_UserLogin]; + GIGA_WIndowTost(@"登录成功!"); + //请求用户数据 + + [[GiGaUserManager shareUser] synsisUserInfo:^(GiGaUser *user) { + GILog(@"user.userId:%@",user.userId); + + NC_POST_NAME_OBJECT(kUserLoginSuccessNoti, nil); + [self dismissViewControllerAnimated:YES completion:nil]; + } userErrorMsgBlock:^(NSDictionary *errorCodemsg) { + GILog(@"%@",errorCodemsg); + + }]; + + } + + }else{ + GIGA_ShowToast(result.message); } }]; } +-(void)userloginAuto{ + + [[GiGaUserManager shareUser] synsisUserInfo:^(GiGaUser *user) { + GILog(@"user.userId:%@",user.userId); + NC_POST_NAME_OBJECT(kUserLoginSuccessNoti, nil); + } userErrorMsgBlock:^(NSDictionary *errorCodemsg) { + + }]; +} + -(void)checkBtnAction:(UIButton *)btn{ btn.selected = !btn.selected; if (btn.selected) { @@ -253,7 +288,7 @@ self.registBtn.userInteractionEnabled = YES; }else{ - [btn setImage:[UIImage imageNamed:@"btn_turndown"] forState:UIControlStateSelected]; + [btn setImage:[UIImage imageNamed:@"btn_turndown"] forState:UIControlStateNormal]; [self.registBtn setBackgroundColor:[UIColor lightGrayColor]]; self.registBtn.userInteractionEnabled = NO; @@ -265,4 +300,5 @@ // Dispose of any resources that can be recreated. } + @end diff --git a/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.xib b/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.xib index eedc6a5..5143108 100644 --- a/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.xib +++ b/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.xib @@ -1,11 +1,11 @@ - + - + @@ -31,14 +31,14 @@ - + - + @@ -47,14 +47,14 @@ - + - + @@ -63,7 +63,7 @@ - + - + @@ -105,7 +105,7 @@ - + @@ -142,7 +142,7 @@ - + diff --git a/GIGA/Modules/LogIn/Controller/GiGaUserLoginVC.m b/GIGA/Modules/LogIn/Controller/GiGaUserLoginVC.m index 0b22507..b63df7d 100644 --- a/GIGA/Modules/LogIn/Controller/GiGaUserLoginVC.m +++ b/GIGA/Modules/LogIn/Controller/GiGaUserLoginVC.m @@ -188,14 +188,16 @@ -(void)loginWithAction:(UIButton *)btn{ - NSDictionary *weixinInfoDic = [GiGaUserDefault getWeiXinAccessToenDic]; +// NSDictionary *weixinInfoDic = [GiGaUserDefault getWeiXinAccessToenDic]; + NSString *wechatCode = [GiGaUserDefault getWeiXinCode]; + NSDictionary *params = nil; - if (weixinInfoDic) { + if (wechatCode) { params = @{ @"username":self.acountTextField.text, @"password":self.passwordTextField.text, - @"openid":weixinInfoDic[@"openid"], + @"wechatCode":wechatCode, }; }else{ @@ -241,33 +243,37 @@ } } -//授权成功获取access_token +//授权成功获取access_token(改服务器获取) -(void)WeiXinLongIn:(NSNotification *)notification{ - //检查网络 - //[self testNetworkStatus]; + //保存code 首次授权微信登陆需要先绑定手机号(必须注册手机账号) + [GiGaUserDefault saveWeiXinCode:notification.object[@"code"]]; [self.view makeToastActivity:CSToastPositionCenter]; - NSDictionary *param = @{ - @"appid":WXin_APPID, - @"secret":WXin_APPSecret, - @"code":notification.object[@"code"], - @"grant_type":@"authorization_code" + @"code":notification.object[@"code"] }; - [WeiIXinApiManager weixinAccessTokeRequstUrl:@"https://api.weixin.qq.com/sns/oauth2/access_token" parameters:param success:^(id response) { - NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:response options:NSJSONReadingAllowFragments error:nil]; - GILog(@"access_token back -->%@",dict); - [GiGaUserDefault saveWeiXinaccesstokenInfoWithDic:dict]; - [self requstWeiXinUserinfo]; - - } failure:^(NSError *err) { - [self.view makeToast:err.localizedDescription]; - GILog(@"access_token err-->%@",err.localizedDescription); - }]; + [self gigaUploadweixinInfo:param]; +// NSDictionary *param = @{ +// @"appid":WXin_APPID, +// @"secret":WXin_APPSecret, +// @"code":notification.object[@"code"], +// @"grant_type":@"authorization_code" +// }; +// +// [WeiIXinApiManager weixinAccessTokeRequstUrl:@"https://api.weixin.qq.com/sns/oauth2/access_token" parameters:param success:^(id response) { +// NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:response options:NSJSONReadingAllowFragments error:nil]; +// GILog(@"access_token back -->%@",dict); +// [GiGaUserDefault saveWeiXinaccesstokenInfoWithDic:dict]; +// [self requstWeiXinUserinfo]; +// +// } failure:^(NSError *err) { +// [self.view makeToast:err.localizedDescription]; +// GILog(@"access_token err-->%@",err.localizedDescription); +// }]; } -//获取微信用户信息 +//获取微信用户信息 (改由服务器请求获取) -(void)requstWeiXinUserinfo{ @@ -280,7 +286,7 @@ [WeiIXinApiManager getWeiXinUserInfoUrl:@"https://api.weixin.qq.com/sns/userinfo" parameters:param success:^(id response) { NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:response options:NSJSONReadingAllowFragments error:nil]; GILog(@"weixinUser info back -->%@",dict); - [self gigaUploadweixinInfo:dict]; +// [self gigaUploadweixinInfo:dict]; } failure:^(NSError *err) { [self.view makeToast:err.localizedDescription]; @@ -292,7 +298,8 @@ -(void)gigaUploadweixinInfo:(NSDictionary *)weiXinUserinfo{ [self.view makeToastActivity:CSToastPositionCenter]; - NSString *url = [NSString stringWithFormat:@"%@sys/v1/wechatlogin",[GiGaServerConfig getMainUrl]]; + NSString *url = [NSString stringWithFormat:@"%@%@",[GiGaServerConfig getMainUrl],kApiWeiChatLogin]; + [GiGaNetManager requestMethod:RequestPostMethod Url:url params:weiXinUserinfo responseBlock:^(NSDictionary *responseDict, NSDictionary *responseHeaderFields, NSError *error) { [self.view hideToastActivity]; if (!error) { @@ -303,8 +310,8 @@ }else if([responseDict[@"code"] integerValue] == 500){ //登录流程待定 [self.view makeToast:responseDict[@"msg"] duration:2.0 position:CSToastPositionCenter]; - [self jxt_showAlertWithTitle:@"温馨提示" message:@"请绑定手机号" appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) { - + [self jxt_showAlertWithTitle:@"温馨提示" message:@"请先绑定手机账号" appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) { + alertMaker.addActionCancelTitle(@"知道了"); } actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) { }]; diff --git a/GIGA/Modules/LogIn/Controller/GiGaUserLoginVC.xib b/GIGA/Modules/LogIn/Controller/GiGaUserLoginVC.xib index a4510a1..cf1d340 100644 --- a/GIGA/Modules/LogIn/Controller/GiGaUserLoginVC.xib +++ b/GIGA/Modules/LogIn/Controller/GiGaUserLoginVC.xib @@ -1,11 +1,11 @@ - + - + @@ -53,7 +53,7 @@ - + @@ -96,14 +96,14 @@ - + - - - + + + - - diff --git a/GIGA/Modules/Me/View/HistoryView/MaskHistoryListViewCell.h b/GIGA/Modules/Me/View/HistoryView/MaskHistoryListViewCell.h index 8115da9..77f3ac1 100644 --- a/GIGA/Modules/Me/View/HistoryView/MaskHistoryListViewCell.h +++ b/GIGA/Modules/Me/View/HistoryView/MaskHistoryListViewCell.h @@ -13,7 +13,7 @@ @property (weak, nonatomic) IBOutlet UIButton *skinBtn; @property (weak, nonatomic) IBOutlet UIButton *timeBtn; @property (weak, nonatomic) IBOutlet UILabel *timeLabe; -@property (weak, nonatomic) IBOutlet UILabel *timesLabe; + -(void)loadCellDataAt:(NSIndexPath *)indepath recod:(MaskHistryRecord*)model; @end diff --git a/GIGA/Modules/Me/View/HistoryView/MaskHistoryListViewCell.m b/GIGA/Modules/Me/View/HistoryView/MaskHistoryListViewCell.m index 5ed2dbf..12b4d3a 100644 --- a/GIGA/Modules/Me/View/HistoryView/MaskHistoryListViewCell.m +++ b/GIGA/Modules/Me/View/HistoryView/MaskHistoryListViewCell.m @@ -23,16 +23,17 @@ -(void)loadCellDataAt:(NSIndexPath *)indepath recod:(MaskHistryRecord*)model { - self.timesLabe.text = [NSString stringWithFormat:@"第%@天敷面膜",model.dayNum]; + self.timeLabe.text = model.createTime; - if (![model.skinTypeName isKindOfClass:[NSNull class]] && model.skinTypeName) { - NSAttributedString *atrtskin = [GiGaHelper stringWithText:model.skinTypeName textColor:[UIColor whiteColor] textFont:GIGA_TEXTFONTMEDIUM(10) leterSpace:0]; + if (![model.dayNum isKindOfClass:[NSNull class]] && model.dayNum) { + NSString *str = [NSString stringWithFormat:@"%@天",model.dayNum]; + NSAttributedString *atrtskin = [GiGaHelper stringWithText:str textColor:[UIColor whiteColor] textFont:GIGA_TEXTFONTMEDIUM(10) leterSpace:0]; [self.skinBtn setAttributedTitle:atrtskin forState:UIControlStateNormal]; } if (![model.minute isKindOfClass:[NSNull class]] && model.minute) { - NSAttributedString *atrtskin = [GiGaHelper stringWithText:[NSString stringWithFormat:@"倒计时%@分钟",model.minute] textColor:[UIColor whiteColor] textFont:GIGA_TEXTFONTMEDIUM(10) leterSpace:0]; + NSAttributedString *atrtskin = [GiGaHelper stringWithText:[NSString stringWithFormat:@"%@分钟",model.minute] textColor:[UIColor whiteColor] textFont:GIGA_TEXTFONTMEDIUM(10) leterSpace:0]; [self.timeBtn setAttributedTitle:atrtskin forState:UIControlStateNormal]; } diff --git a/GIGA/Modules/Me/View/HistoryView/MaskHistoryListViewCell.xib b/GIGA/Modules/Me/View/HistoryView/MaskHistoryListViewCell.xib index c0249a4..7b120d0 100644 --- a/GIGA/Modules/Me/View/HistoryView/MaskHistoryListViewCell.xib +++ b/GIGA/Modules/Me/View/HistoryView/MaskHistoryListViewCell.xib @@ -39,10 +39,12 @@ - + - + + +