Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
陈高翔
/
DreamSleep-iOS
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit f26e5683
由
cgx
编写于
2022-11-03 11:56:41 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
banner和运营弹框新增人气测评和社区跳转
1 个父辈
c904c4f4
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
45 行增加
和
17 行删除
DreamSleep/DreamSleep/Basement/Utils/DSConstUtil.h
DreamSleep/DreamSleep/Class/HomeModule/Home/Controller/HomeViewController.m
DreamSleep/DreamSleep/Class/HomeModule/Home/View/HomeHeaderView.m
DreamSleep/DreamSleep/Class/ProfileModule/Me/ProfileController.m
DreamSleep/DreamSleep/Class/ProfileModule/ScoreTaskAI/Controller/DailyTaskController.m
DreamSleep/DreamSleep/Basement/Utils/DSConstUtil.h
查看文件 @
f26e568
...
@@ -7,6 +7,24 @@
...
@@ -7,6 +7,24 @@
#import <Foundation/Foundation.h>
#import <Foundation/Foundation.h>
// 选中的tabbar item
typedef
NS_ENUM
(
NSInteger
,
SelectedTabBarItem
)
{
SelectedTabBarItemHome
=
0
,
// 首页
SelectedTabBarItemAI
=
1
,
// AI睡眠教练
SelectedTabBarItemCom
=
2
,
// 社区
SelectedTabBarItemMe
=
3
// 我的
};
// 页面跳转类型(首页banner、活动运营、首次APP弹框)
typedef
NS_ENUM
(
NSInteger
,
PageJumpType
)
{
PageJumpTypeAI
=
1
,
// AI睡眠教练
PageJumpTypeHome
=
2
,
// 首页
PageJumpTypeCoax
=
3
,
// 哄睡
PageJumpTypeBox
=
4
,
// 小球
PageJumpTypeEva
=
5
,
// 人气测评
PageJumpTypeCom
=
6
// 社区
};
NS_ASSUME_NONNULL_BEGIN
NS_ASSUME_NONNULL_BEGIN
// 用户服务协议和隐私政策
// 用户服务协议和隐私政策
...
...
DreamSleep/DreamSleep/Class/HomeModule/Home/Controller/HomeViewController.m
查看文件 @
f26e568
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
#import "FirstLeadAlertView.h"
#import "FirstLeadAlertView.h"
#import "HomeRequestModel.h"
#import "HomeRequestModel.h"
#import "UnityGameController.h"
#import "UnityGameController.h"
#import "EvaluateController.h"
#import "SafeSleepRequestModel.h"
#import "SafeSleepRequestModel.h"
#import "WhiteNoiseRequestModel.h"
#import "WhiteNoiseRequestModel.h"
#import "NoisePlayBar.h"
#import "NoisePlayBar.h"
...
@@ -237,10 +238,10 @@
...
@@ -237,10 +238,10 @@
FirstLeadAlertView
*
view
=
[[
FirstLeadAlertView
alloc
]
initWithJumpBlock
:
^
(
JumpType
type
)
{
FirstLeadAlertView
*
view
=
[[
FirstLeadAlertView
alloc
]
initWithJumpBlock
:
^
(
JumpType
type
)
{
if
(
type
==
JumpTypeAI
)
{
if
(
type
==
JumpTypeAI
)
{
// 切换到AI睡眠教练标签
// 切换到AI睡眠教练标签
self
.
tabBarController
.
selectedIndex
=
1
;
self
.
tabBarController
.
selectedIndex
=
SelectedTabBarItemAI
;
}
else
{
}
else
{
// 进入快速入眠页面(首页)
// 进入快速入眠页面(首页)
self
.
tabBarController
.
selectedIndex
=
0
;
self
.
tabBarController
.
selectedIndex
=
SelectedTabBarItemHome
;
}
}
}];
}];
[
view
show
];
[
view
show
];
...
@@ -303,19 +304,23 @@
...
@@ -303,19 +304,23 @@
// 跳转到原生页面
// 跳转到原生页面
if
(
isNative
)
{
if
(
isNative
)
{
int
type
=
[[[
pModel
.
page_url
componentsSeparatedByString
:
@"type="
]
lastObject
]
intValue
];
int
type
=
[[[
pModel
.
page_url
componentsSeparatedByString
:
@"type="
]
lastObject
]
intValue
];
if
(
type
==
1
)
{
// AI睡眠教练
if
(
type
==
PageJumpTypeAI
)
{
// AI睡眠教练
// 切换到AI睡眠教练标签
// 切换到AI睡眠教练标签
self
.
tabBarController
.
selectedIndex
=
1
;
self
.
tabBarController
.
selectedIndex
=
SelectedTabBarItemAI
;
}
else
if
(
type
==
2
)
{
// 首页
}
else
if
(
type
==
PageJumpTypeHome
)
{
// 首页
self
.
tabBarController
.
selectedIndex
=
0
;
self
.
tabBarController
.
selectedIndex
=
SelectedTabBarItemHome
;
}
else
if
(
type
==
3
)
{
// 哄睡页面(未登录就可以进去)
}
else
if
(
type
==
PageJumpTypeCoax
)
{
// 哄睡页面(未登录就可以进去)
UnityGameController
*
gameVC
=
[
UnityGameController
new
];
UnityGameController
*
gameVC
=
[
UnityGameController
new
];
gameVC
.
gameType
=
GameTypeCoax
;
gameVC
.
gameType
=
GameTypeCoax
;
[
self
.
navigationController
pushViewController
:
gameVC
animated
:
YES
];
[
self
.
navigationController
pushViewController
:
gameVC
animated
:
YES
];
}
else
if
(
type
==
4
)
{
// 小球游戏(未登录就可以进去)
}
else
if
(
type
==
PageJumpTypeBox
)
{
// 小球游戏(未登录就可以进去)
UnityGameController
*
gameVC
=
[
UnityGameController
new
];
UnityGameController
*
gameVC
=
[
UnityGameController
new
];
gameVC
.
gameType
=
GameTypeBall
;
gameVC
.
gameType
=
GameTypeBall
;
[
self
.
navigationController
pushViewController
:
gameVC
animated
:
YES
];
[
self
.
navigationController
pushViewController
:
gameVC
animated
:
YES
];
}
else
if
(
type
==
PageJumpTypeEva
)
{
// 人气测评
[
self
.
navigationController
pushViewController
:[
EvaluateController
new
]
animated
:
YES
];
}
else
if
(
type
==
PageJumpTypeCom
)
{
// 社区
self
.
tabBarController
.
selectedIndex
=
SelectedTabBarItemCom
;
}
}
}
else
{
}
else
{
// 跳转到H5页面
// 跳转到H5页面
...
...
DreamSleep/DreamSleep/Class/HomeModule/Home/View/HomeHeaderView.m
查看文件 @
f26e568
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
#import "UnityGameController.h"
#import "UnityGameController.h"
#import "SleepStoryController.h"
#import "SleepStoryController.h"
#import "StoryPlayController.h"
#import "StoryPlayController.h"
#import "EvaluateController.h"
@interface
HomeHeaderView
()
<
CWCarouselDatasource
,
CWCarouselDelegate
,
UIScrollViewDelegate
>
@interface
HomeHeaderView
()
<
CWCarouselDatasource
,
CWCarouselDelegate
,
UIScrollViewDelegate
>
// 轮播图
// 轮播图
...
@@ -169,18 +170,22 @@
...
@@ -169,18 +170,22 @@
// 跳转到原生页面
// 跳转到原生页面
if
(
isNative
)
{
if
(
isNative
)
{
int
type
=
[[[
model
.
info_url
componentsSeparatedByString
:
@"type="
]
lastObject
]
intValue
];
int
type
=
[[[
model
.
info_url
componentsSeparatedByString
:
@"type="
]
lastObject
]
intValue
];
if
(
type
==
1
)
{
// 切换到AI睡眠教练标签
if
(
type
==
PageJumpTypeAI
)
{
// 切换到AI睡眠教练标签
self
.
ds_viewController
.
tabBarController
.
selectedIndex
=
1
;
self
.
ds_viewController
.
tabBarController
.
selectedIndex
=
SelectedTabBarItemAI
;
}
else
if
(
type
==
2
)
{
// 首页
}
else
if
(
type
==
PageJumpTypeHome
)
{
// 首页
self
.
ds_viewController
.
tabBarController
.
selectedIndex
=
0
;
self
.
ds_viewController
.
tabBarController
.
selectedIndex
=
SelectedTabBarItemHome
;
}
else
if
(
type
==
3
)
{
// 哄睡页面
}
else
if
(
type
==
PageJumpTypeCoax
)
{
// 哄睡页面
UnityGameController
*
gameVC
=
[
UnityGameController
new
];
UnityGameController
*
gameVC
=
[
UnityGameController
new
];
gameVC
.
gameType
=
GameTypeCoax
;
gameVC
.
gameType
=
GameTypeCoax
;
[
self
.
ds_viewController
.
navigationController
pushViewController
:
gameVC
animated
:
YES
];
[
self
.
ds_viewController
.
navigationController
pushViewController
:
gameVC
animated
:
YES
];
}
else
if
(
type
==
4
)
{
// 小球游戏
}
else
if
(
type
==
PageJumpTypeBox
)
{
// 小球游戏
UnityGameController
*
gameVC
=
[
UnityGameController
new
];
UnityGameController
*
gameVC
=
[
UnityGameController
new
];
gameVC
.
gameType
=
GameTypeBall
;
gameVC
.
gameType
=
GameTypeBall
;
[
self
.
ds_viewController
.
navigationController
pushViewController
:
gameVC
animated
:
YES
];
[
self
.
ds_viewController
.
navigationController
pushViewController
:
gameVC
animated
:
YES
];
}
else
if
(
type
==
PageJumpTypeEva
)
{
// 人气测评
[
self
.
ds_viewController
.
navigationController
pushViewController
:[
EvaluateController
new
]
animated
:
YES
];
}
else
if
(
type
==
PageJumpTypeCom
)
{
// 社区
self
.
ds_viewController
.
tabBarController
.
selectedIndex
=
SelectedTabBarItemCom
;
}
}
}
else
{
}
else
{
// 跳转到H5页面
// 跳转到H5页面
...
...
DreamSleep/DreamSleep/Class/ProfileModule/Me/ProfileController.m
查看文件 @
f26e568
...
@@ -122,7 +122,7 @@
...
@@ -122,7 +122,7 @@
break
;
break
;
case
3
:
// 开通AI
case
3
:
// 开通AI
{
{
self
.
tabBarController
.
selectedIndex
=
1
;
self
.
tabBarController
.
selectedIndex
=
SelectedTabBarItemAI
;
}
}
break
;
break
;
case
4
:
// 我的睡眠报告
case
4
:
// 我的睡眠报告
...
...
DreamSleep/DreamSleep/Class/ProfileModule/ScoreTaskAI/Controller/DailyTaskController.m
查看文件 @
f26e568
...
@@ -62,7 +62,7 @@
...
@@ -62,7 +62,7 @@
-
(
void
)
goToTaskPageWithTaskID
:
(
TaskItem
)
task_id
url
:
(
NSString
*
)
url
{
-
(
void
)
goToTaskPageWithTaskID
:
(
TaskItem
)
task_id
url
:
(
NSString
*
)
url
{
if
(
task_id
==
TaskItemGood
)
{
// 好眠声音(直接回到首页)
if
(
task_id
==
TaskItemGood
)
{
// 好眠声音(直接回到首页)
self
.
tabBarController
.
selectedIndex
=
0
;
self
.
tabBarController
.
selectedIndex
=
SelectedTabBarItemHome
;
[
self
.
navigationController
popViewControllerAnimated
:
YES
];
[
self
.
navigationController
popViewControllerAnimated
:
YES
];
return
;
return
;
}
}
...
@@ -70,7 +70,7 @@
...
@@ -70,7 +70,7 @@
switch
(
task_id
)
{
switch
(
task_id
)
{
case
TaskItemCoach
:
// AI睡眠教练(该任务不需要手动调用更新状态接口)
case
TaskItemCoach
:
// AI睡眠教练(该任务不需要手动调用更新状态接口)
{
{
self
.
tabBarController
.
selectedIndex
=
1
;
self
.
tabBarController
.
selectedIndex
=
SelectedTabBarItemAI
;
}
}
break
;
break
;
case
TaskItemBall
:
// 小球页面
case
TaskItemBall
:
// 小球页面
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论