Commit fb43f8b8 cgx

首页中间区域添加登录逻辑

1 个父辈 458aeb8a
......@@ -1637,9 +1637,12 @@
HEADER_SEARCH_PATHS = "$(inherited)/**";
INFOPLIST_FILE = DreamSleep/Basement/DSConfig/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "小梦睡眠-Dev";
INFOPLIST_KEY_NSCameraUsageDescription = "拍照";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "拍照";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "相册";
INFOPLIST_KEY_NSCameraUsageDescription = "APP需要您的同意,才能使用摄像头,以便于相机拍摄,上传";
INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "APP需要您的同意,才能访问位置信息";
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "APP需要您的同意,才能始终访问位置信息";
INFOPLIST_KEY_NSLocationUsageDescription = "APP需要您的同意,才能访问位置信息";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "APP需要您的同意,才能在使用时获取位置信息";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "APP需要您的同意,才能访问相册,以便于图片选取、上传";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UIStatusBarHidden = YES;
......@@ -1700,9 +1703,12 @@
HEADER_SEARCH_PATHS = "$(inherited)/**";
INFOPLIST_FILE = DreamSleep/Basement/DSConfig/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "小梦睡眠";
INFOPLIST_KEY_NSCameraUsageDescription = "拍照";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "拍照";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "相册";
INFOPLIST_KEY_NSCameraUsageDescription = "APP需要您的同意,才能使用摄像头,以便于相机拍摄,上传";
INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "APP需要您的同意,才能访问位置信息";
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "APP需要您的同意,才能始终访问位置信息";
INFOPLIST_KEY_NSLocationUsageDescription = "APP需要您的同意,才能访问位置信息";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "APP需要您的同意,才能在使用时获取位置信息";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "APP需要您的同意,才能访问相册,以便于图片选取、上传";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UIStatusBarHidden = YES;
......@@ -1823,9 +1829,12 @@
HEADER_SEARCH_PATHS = "$(inherited)/**";
INFOPLIST_FILE = DreamSleep/Basement/DSConfig/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "小梦睡眠-Beta";
INFOPLIST_KEY_NSCameraUsageDescription = "拍照";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "拍照";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "相册";
INFOPLIST_KEY_NSCameraUsageDescription = "APP需要您的同意,才能使用摄像头,以便于相机拍摄,上传";
INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "APP需要您的同意,才能访问位置信息";
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "APP需要您的同意,才能始终访问位置信息";
INFOPLIST_KEY_NSLocationUsageDescription = "APP需要您的同意,才能访问位置信息";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "APP需要您的同意,才能在使用时获取位置信息";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "APP需要您的同意,才能访问相册,以便于图片选取、上传";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UIStatusBarHidden = YES;
......
......@@ -2,22 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSLocationUsageDescription</key>
<string>APP需要您的同意,才能访问位置信息</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>App需要您的同意,才能始终访问位置信息</string>
<key>Privacy - Location Always and When In Use Usage Description </key>
<string>App需要您的同意,才能访问位置信息</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>APP需要您的同意,才能在使用时获取位置信息</string>
<key>NSFaceIDUsageDescription</key>
<string>APP需要您的同意,才能获取人脸识别权限</string>
<key>Privacy - Photo Library Additions Usage Description </key>
<string>APP需要您的同意,才能访问相册,以便于保存图片</string>
<key>Privacy - Photo Library Usage Description </key>
<string>APP需要您的同意,才能访问相册,以便于图片选取、上传</string>
<key>NSCameraUsageDescription</key>
<string>APP需要您的同意,才能使用摄像头,以便于相机拍摄,上传</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
......@@ -95,6 +79,8 @@
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>Privacy - Photo Library Additions Usage Description </key>
<string>APP需要您的同意,才能访问相册,以便于保存图片</string>
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
......
......@@ -67,6 +67,8 @@
}
- (void)btnAction:(UIButton *)sender {
// 判断是否登录成功
if ([LoginUtils getUserLoginData]) {
if (sender.tag == 0) {
// 进入三分钟即刻入睡页面
ThreeMinuteController *threeVC = [[ThreeMinuteController alloc] init];
......@@ -77,6 +79,10 @@
breatheVC.title = sender.tag == 1 ? @"均衡呼吸法" : @"舒睡4-7-8呼吸法";
[self.ds_viewController.navigationController pushViewController:breatheVC animated:YES];
}
} else {
// 跳转到登录页面
[LoginUtils jumpToLoginControllerWithTarget:self.ds_viewController];
}
}
@end
......@@ -36,14 +36,14 @@
}
- (void)showAlertView {
self.alertLab.text = self.indexPath.row == 5 ? @"即将前往小梦睡眠微信小程序" : @"请前往微信粘贴搜索";
self.alertLab.text = self.indexPath.row == 4 ? @"即将前往小梦睡眠微信小程序" : @"请前往微信粘贴搜索";
[self.alertLab sizeToFit];
[self.alertLab mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.alertView);
make.top.equalTo(self.alertView).offset(97);
}];
if (self.indexPath.row != 5) {
if (self.indexPath.row != 4) {
// 关注公众号和添加客服微信
[self.alertView addSubview:self.copySuccessBtn];
[self.copySuccessBtn mas_makeConstraints:^(MASConstraintMaker *make) {
......@@ -121,7 +121,7 @@
[self closeAction];
switch (self.indexPath.row) {
case 5: // 前往小程序
case 4: // 前往小程序
{
WXLaunchMiniProgramReq *launchMiniProgramReq = [WXLaunchMiniProgramReq object];
launchMiniProgramReq.userName = @"gh_cb2b2c83afc8";
......@@ -130,7 +130,7 @@
}];
}
break;
case 6: // 关注公众号
case 5: // 关注公众号
{
NSURL *wxURL = [NSURL URLWithString:@"weixin://"];
if ([[UIApplication sharedApplication] canOpenURL:wxURL]) {
......@@ -138,7 +138,7 @@
}
}
break;
case 7: // 添加客服微信
case 6: // 添加客服微信
{
NSURL *wxURL = [NSURL URLWithString:@"weixin://"];
if ([[UIApplication sharedApplication] canOpenURL:wxURL]) {
......
......@@ -26,7 +26,7 @@
self.navigationItem.title = @"我的";
self.tableView.dk_backgroundColorPicker = DKColorPickerWithKey(VCViewBG);
self.tmpDatas = @[@"模拟用户登录", @"意见反馈", @"系统设置", @"邀请好友", @"关于我们", @"前往小程序", @"关注公众号", @"添加客服微信", @"失眠的认知行为疗法"];
self.tmpDatas = @[@"意见反馈", @"系统设置", @"邀请好友", @"关于我们", @"前往小程序", @"关注公众号", @"添加客服微信", @"失眠的认知行为疗法"];
self.tableView.tableHeaderView = self.userInfoView;
// 监听用户数据更新通知
......@@ -65,51 +65,46 @@
[tableView deselectRowAtIndexPath:indexPath animated:YES];
switch (indexPath.row) {
case 0: // 模拟跳转到登录页面
{
[LoginUtils jumpToLoginControllerWithTarget:self];
}
break;
case 1: // 意见反馈入口
case 0: // 意见反馈入口
{
[self jumpViewController:@"FeedbackController"];
}
break;
case 2: // 系统设置入口
case 1: // 系统设置入口
{
SystemSetController *sysVC = [SystemSetController new];
[self.navigationController pushViewController:sysVC animated:YES];
}
break;
case 3: // 邀请好友
case 2: // 邀请好友
{
InviteController *inviteVC = [InviteController new];
[self.navigationController pushViewController:inviteVC animated:YES];
}
break;
case 4: // 关于我们
case 3: // 关于我们
{
[self.navigationController pushViewController:[[DsWebController alloc] initWithTitle:@"关于我们" link:AboutUS] animated:YES];
}
break;
case 5: // 前往小程序
case 4: // 前往小程序
{
[[[ProfileAlertView alloc] initWithIndexPath:indexPath] showAlertView];
}
break;
case 6: // 关注公众号
case 5: // 关注公众号
{
[UIPasteboard generalPasteboard].string = @"xiaomeng-sleep";
[[[ProfileAlertView alloc] initWithIndexPath:indexPath] showAlertView];
}
break;
case 7: // 添加客服微信
case 6: // 添加客服微信
{
[UIPasteboard generalPasteboard].string = @"xiaomengsleep";
[[[ProfileAlertView alloc] initWithIndexPath:indexPath] showAlertView];
}
break;
case 8: // CBTI
case 7: // CBTI
{
[self.navigationController pushViewController:[[DsWebController alloc] initWithTitle:@"失眠的认知行为疗法(CBTI)" link:MYCBTI] animated:YES];
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!