Commit f863800b cgx

意见反馈、分享加入未登录逻辑

1 个父辈 1bd10c8c
...@@ -1262,7 +1262,7 @@ ...@@ -1262,7 +1262,7 @@
"$(PROJECT_DIR)/DreamSleep/Vendors/UMSocial_6.10.4/SocialLibraries/WeChat/WechatSDK", "$(PROJECT_DIR)/DreamSleep/Vendors/UMSocial_6.10.4/SocialLibraries/WeChat/WechatSDK",
"$(PROJECT_DIR)/DreamSleep/Vendors/UMSocial_6.10.4/SocialLibraries/QQ", "$(PROJECT_DIR)/DreamSleep/Vendors/UMSocial_6.10.4/SocialLibraries/QQ",
); );
MARKETING_VERSION = 1.1.0; MARKETING_VERSION = 1.1.1;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(inherited)", "$(inherited)",
...@@ -1323,7 +1323,7 @@ ...@@ -1323,7 +1323,7 @@
"$(PROJECT_DIR)/DreamSleep/Vendors/UMSocial_6.10.4/SocialLibraries/WeChat/WechatSDK", "$(PROJECT_DIR)/DreamSleep/Vendors/UMSocial_6.10.4/SocialLibraries/WeChat/WechatSDK",
"$(PROJECT_DIR)/DreamSleep/Vendors/UMSocial_6.10.4/SocialLibraries/QQ", "$(PROJECT_DIR)/DreamSleep/Vendors/UMSocial_6.10.4/SocialLibraries/QQ",
); );
MARKETING_VERSION = 1.1.0; MARKETING_VERSION = 1.1.1;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(inherited)", "$(inherited)",
...@@ -1444,7 +1444,7 @@ ...@@ -1444,7 +1444,7 @@
"$(PROJECT_DIR)/DreamSleep/Vendors/UMSocial_6.10.4/SocialLibraries/WeChat/WechatSDK", "$(PROJECT_DIR)/DreamSleep/Vendors/UMSocial_6.10.4/SocialLibraries/WeChat/WechatSDK",
"$(PROJECT_DIR)/DreamSleep/Vendors/UMSocial_6.10.4/SocialLibraries/QQ", "$(PROJECT_DIR)/DreamSleep/Vendors/UMSocial_6.10.4/SocialLibraries/QQ",
); );
MARKETING_VERSION = 1.1.0; MARKETING_VERSION = 1.1.1;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(inherited)", "$(inherited)",
......
...@@ -30,6 +30,13 @@ ...@@ -30,6 +30,13 @@
} }
- (void)shareAction { - (void)shareAction {
// 判断是否登录成功
if (![LoginUtils getUserLoginData]) {
// 跳转到登录页面
[LoginUtils jumpToLoginControllerWithTarget:self];
return;
}
UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:@"模拟分享" message:@"" preferredStyle:UIAlertControllerStyleAlert]; UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:@"模拟分享" message:@"" preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *action1 = [UIAlertAction actionWithTitle:@"微信好友" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { UIAlertAction *action1 = [UIAlertAction actionWithTitle:@"微信好友" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
[self shareTextToPlatformType:UMSocialPlatformType_WechatSession]; [self shareTextToPlatformType:UMSocialPlatformType_WechatSession];
......
...@@ -64,8 +64,7 @@ ...@@ -64,8 +64,7 @@
break; break;
case 1: // 意见反馈入口 case 1: // 意见反馈入口
{ {
FeedbackController *feedVC = [FeedbackController new]; [self jumpViewController:@"FeedbackController"];
[self.navigationController pushViewController:feedVC animated:YES];
} }
break; break;
case 2: // 系统设置入口 case 2: // 系统设置入口
...@@ -112,25 +111,32 @@ ...@@ -112,25 +111,32 @@
} }
} }
- (void)modifyAction { #pragma mark - Actions
- (void)modifyUserInfoAction {
// 账户与资料页面
[self jumpViewController:@"AccountController"];
}
- (void)jumpViewController:(NSString *)className {
// 判断是否登录成功 // 判断是否登录成功
if ([LoginUtils getUserLoginData]) { if ([LoginUtils getUserLoginData]) {
// 进入修改页面 // 进入相关页面
AccountController *accountVC = [[AccountController alloc] init]; Class cls = NSClassFromString(className);
[self.navigationController pushViewController:accountVC animated:YES]; [self.navigationController pushViewController:[cls new] animated:YES];
} else { } else {
// 跳转到登录页面 // 跳转到登录页面
[LoginUtils jumpToLoginControllerWithTarget:self]; [LoginUtils jumpToLoginControllerWithTarget:self];
} }
} }
#pragma mark - lazy
- (UIView *)userInfoView { - (UIView *)userInfoView {
if (!_userInfoView) { if (!_userInfoView) {
_userInfoView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 100)]; _userInfoView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 100)];
UIButton *btn = [UIButton btnWithTitle:@"点击修改信息" titleColor:BrandColor font:SysFont(16) bgColor:DSClearColor]; UIButton *btn = [UIButton btnWithTitle:@"点击修改信息" titleColor:BrandColor font:SysFont(16) bgColor:DSClearColor];
btn.frame = CGRectMake(0, 0, 150, 40); btn.frame = CGRectMake(0, 0, 150, 40);
btn.center = _userInfoView.center; btn.center = _userInfoView.center;
[btn addTarget:self action:@selector(modifyAction) forControlEvents:UIControlEventTouchUpInside]; [btn addTarget:self action:@selector(modifyUserInfoAction) forControlEvents:UIControlEventTouchUpInside];
[_userInfoView addSubview:btn]; [_userInfoView addSubview:btn];
} }
return _userInfoView; return _userInfoView;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!