Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
陈高翔
/
DreamSleep-iOS
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit fb43f8b8
由
cgx
编写于
2022-04-29 15:58:35 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
首页中间区域添加登录逻辑
1 个父辈
458aeb8a
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
40 行增加
和
44 行删除
DreamSleep/DreamSleep.xcodeproj/project.pbxproj
DreamSleep/DreamSleep/Basement/DSConfig/Info.plist
DreamSleep/DreamSleep/Class/HomeModule/Home/View/DsMiddleView.m
DreamSleep/DreamSleep/Class/ProfileModule/Me/ProfileAlertView.m
DreamSleep/DreamSleep/Class/ProfileModule/Me/ProfileController.m
DreamSleep/DreamSleep.xcodeproj/project.pbxproj
查看文件 @
fb43f8b
...
@@ -1637,9 +1637,12 @@
...
@@ -1637,9 +1637,12 @@
HEADER_SEARCH_PATHS = "$(inherited)/**";
HEADER_SEARCH_PATHS = "$(inherited)/**";
INFOPLIST_FILE = DreamSleep/Basement/DSConfig/Info.plist;
INFOPLIST_FILE = DreamSleep/Basement/DSConfig/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "小梦睡眠-Dev";
INFOPLIST_KEY_CFBundleDisplayName = "小梦睡眠-Dev";
INFOPLIST_KEY_NSCameraUsageDescription = "拍照";
INFOPLIST_KEY_NSCameraUsageDescription = "APP需要您的同意,才能使用摄像头,以便于相机拍摄,上传";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "拍照";
INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "APP需要您的同意,才能访问位置信息";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "相册";
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "APP需要您的同意,才能始终访问位置信息";
INFOPLIST_KEY_NSLocationUsageDescription = "APP需要您的同意,才能访问位置信息";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "APP需要您的同意,才能在使用时获取位置信息";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "APP需要您的同意,才能访问相册,以便于图片选取、上传";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UIStatusBarHidden = YES;
INFOPLIST_KEY_UIStatusBarHidden = YES;
...
@@ -1700,9 +1703,12 @@
...
@@ -1700,9 +1703,12 @@
HEADER_SEARCH_PATHS = "$(inherited)/**";
HEADER_SEARCH_PATHS = "$(inherited)/**";
INFOPLIST_FILE = DreamSleep/Basement/DSConfig/Info.plist;
INFOPLIST_FILE = DreamSleep/Basement/DSConfig/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "小梦睡眠";
INFOPLIST_KEY_CFBundleDisplayName = "小梦睡眠";
INFOPLIST_KEY_NSCameraUsageDescription = "拍照";
INFOPLIST_KEY_NSCameraUsageDescription = "APP需要您的同意,才能使用摄像头,以便于相机拍摄,上传";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "拍照";
INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "APP需要您的同意,才能访问位置信息";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "相册";
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "APP需要您的同意,才能始终访问位置信息";
INFOPLIST_KEY_NSLocationUsageDescription = "APP需要您的同意,才能访问位置信息";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "APP需要您的同意,才能在使用时获取位置信息";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "APP需要您的同意,才能访问相册,以便于图片选取、上传";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UIStatusBarHidden = YES;
INFOPLIST_KEY_UIStatusBarHidden = YES;
...
@@ -1823,9 +1829,12 @@
...
@@ -1823,9 +1829,12 @@
HEADER_SEARCH_PATHS = "$(inherited)/**";
HEADER_SEARCH_PATHS = "$(inherited)/**";
INFOPLIST_FILE = DreamSleep/Basement/DSConfig/Info.plist;
INFOPLIST_FILE = DreamSleep/Basement/DSConfig/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "小梦睡眠-Beta";
INFOPLIST_KEY_CFBundleDisplayName = "小梦睡眠-Beta";
INFOPLIST_KEY_NSCameraUsageDescription = "拍照";
INFOPLIST_KEY_NSCameraUsageDescription = "APP需要您的同意,才能使用摄像头,以便于相机拍摄,上传";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "拍照";
INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "APP需要您的同意,才能访问位置信息";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "相册";
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "APP需要您的同意,才能始终访问位置信息";
INFOPLIST_KEY_NSLocationUsageDescription = "APP需要您的同意,才能访问位置信息";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "APP需要您的同意,才能在使用时获取位置信息";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "APP需要您的同意,才能访问相册,以便于图片选取、上传";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UIStatusBarHidden = YES;
INFOPLIST_KEY_UIStatusBarHidden = YES;
...
...
DreamSleep/DreamSleep/Basement/DSConfig/Info.plist
查看文件 @
fb43f8b
...
@@ -2,22 +2,6 @@
...
@@ -2,22 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist
version=
"1.0"
>
<plist
version=
"1.0"
>
<dict>
<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>
<key>
CFBundleURLTypes
</key>
<array>
<array>
<dict>
<dict>
...
@@ -95,6 +79,8 @@
...
@@ -95,6 +79,8 @@
<key>
NSAllowsArbitraryLoads
</key>
<key>
NSAllowsArbitraryLoads
</key>
<true/>
<true/>
</dict>
</dict>
<key>
Privacy - Photo Library Additions Usage Description
</key>
<string>
APP需要您的同意,才能访问相册,以便于保存图片
</string>
<key>
UIBackgroundModes
</key>
<key>
UIBackgroundModes
</key>
<array>
<array>
<string>
audio
</string>
<string>
audio
</string>
...
...
DreamSleep/DreamSleep/Class/HomeModule/Home/View/DsMiddleView.m
查看文件 @
fb43f8b
...
@@ -67,6 +67,8 @@
...
@@ -67,6 +67,8 @@
}
}
-
(
void
)
btnAction
:
(
UIButton
*
)
sender
{
-
(
void
)
btnAction
:
(
UIButton
*
)
sender
{
// 判断是否登录成功
if
([
LoginUtils
getUserLoginData
])
{
if
(
sender
.
tag
==
0
)
{
if
(
sender
.
tag
==
0
)
{
// 进入三分钟即刻入睡页面
// 进入三分钟即刻入睡页面
ThreeMinuteController
*
threeVC
=
[[
ThreeMinuteController
alloc
]
init
];
ThreeMinuteController
*
threeVC
=
[[
ThreeMinuteController
alloc
]
init
];
...
@@ -77,6 +79,10 @@
...
@@ -77,6 +79,10 @@
breatheVC
.
title
=
sender
.
tag
==
1
?
@"均衡呼吸法"
:
@"舒睡4-7-8呼吸法"
;
breatheVC
.
title
=
sender
.
tag
==
1
?
@"均衡呼吸法"
:
@"舒睡4-7-8呼吸法"
;
[
self
.
ds_viewController
.
navigationController
pushViewController
:
breatheVC
animated
:
YES
];
[
self
.
ds_viewController
.
navigationController
pushViewController
:
breatheVC
animated
:
YES
];
}
}
}
else
{
// 跳转到登录页面
[
LoginUtils
jumpToLoginControllerWithTarget
:
self
.
ds_viewController
];
}
}
}
@end
@end
DreamSleep/DreamSleep/Class/ProfileModule/Me/ProfileAlertView.m
查看文件 @
fb43f8b
...
@@ -36,14 +36,14 @@
...
@@ -36,14 +36,14 @@
}
}
-
(
void
)
showAlertView
{
-
(
void
)
showAlertView
{
self
.
alertLab
.
text
=
self
.
indexPath
.
row
==
5
?
@"即将前往小梦睡眠微信小程序"
:
@"请前往微信粘贴搜索"
;
self
.
alertLab
.
text
=
self
.
indexPath
.
row
==
4
?
@"即将前往小梦睡眠微信小程序"
:
@"请前往微信粘贴搜索"
;
[
self
.
alertLab
sizeToFit
];
[
self
.
alertLab
sizeToFit
];
[
self
.
alertLab
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
[
self
.
alertLab
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
centerX
.
equalTo
(
self
.
alertView
);
make
.
centerX
.
equalTo
(
self
.
alertView
);
make
.
top
.
equalTo
(
self
.
alertView
).
offset
(
97
);
make
.
top
.
equalTo
(
self
.
alertView
).
offset
(
97
);
}];
}];
if
(
self
.
indexPath
.
row
!=
5
)
{
if
(
self
.
indexPath
.
row
!=
4
)
{
// 关注公众号和添加客服微信
// 关注公众号和添加客服微信
[
self
.
alertView
addSubview
:
self
.
copySuccessBtn
];
[
self
.
alertView
addSubview
:
self
.
copySuccessBtn
];
[
self
.
copySuccessBtn
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
[
self
.
copySuccessBtn
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
...
@@ -121,7 +121,7 @@
...
@@ -121,7 +121,7 @@
[
self
closeAction
];
[
self
closeAction
];
switch
(
self
.
indexPath
.
row
)
{
switch
(
self
.
indexPath
.
row
)
{
case
5
:
// 前往小程序
case
4
:
// 前往小程序
{
{
WXLaunchMiniProgramReq
*
launchMiniProgramReq
=
[
WXLaunchMiniProgramReq
object
];
WXLaunchMiniProgramReq
*
launchMiniProgramReq
=
[
WXLaunchMiniProgramReq
object
];
launchMiniProgramReq
.
userName
=
@"gh_cb2b2c83afc8"
;
launchMiniProgramReq
.
userName
=
@"gh_cb2b2c83afc8"
;
...
@@ -130,7 +130,7 @@
...
@@ -130,7 +130,7 @@
}];
}];
}
}
break
;
break
;
case
6
:
// 关注公众号
case
5
:
// 关注公众号
{
{
NSURL
*
wxURL
=
[
NSURL
URLWithString
:
@"weixin://"
];
NSURL
*
wxURL
=
[
NSURL
URLWithString
:
@"weixin://"
];
if
([[
UIApplication
sharedApplication
]
canOpenURL
:
wxURL
])
{
if
([[
UIApplication
sharedApplication
]
canOpenURL
:
wxURL
])
{
...
@@ -138,7 +138,7 @@
...
@@ -138,7 +138,7 @@
}
}
}
}
break
;
break
;
case
7
:
// 添加客服微信
case
6
:
// 添加客服微信
{
{
NSURL
*
wxURL
=
[
NSURL
URLWithString
:
@"weixin://"
];
NSURL
*
wxURL
=
[
NSURL
URLWithString
:
@"weixin://"
];
if
([[
UIApplication
sharedApplication
]
canOpenURL
:
wxURL
])
{
if
([[
UIApplication
sharedApplication
]
canOpenURL
:
wxURL
])
{
...
...
DreamSleep/DreamSleep/Class/ProfileModule/Me/ProfileController.m
查看文件 @
fb43f8b
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
self
.
navigationItem
.
title
=
@"我的"
;
self
.
navigationItem
.
title
=
@"我的"
;
self
.
tableView
.
dk_backgroundColorPicker
=
DKColorPickerWithKey
(
VCViewBG
);
self
.
tableView
.
dk_backgroundColorPicker
=
DKColorPickerWithKey
(
VCViewBG
);
self
.
tmpDatas
=
@[
@"
模拟用户登录"
,
@"
意见反馈"
,
@"系统设置"
,
@"邀请好友"
,
@"关于我们"
,
@"前往小程序"
,
@"关注公众号"
,
@"添加客服微信"
,
@"失眠的认知行为疗法"
];
self
.
tmpDatas
=
@[
@"意见反馈"
,
@"系统设置"
,
@"邀请好友"
,
@"关于我们"
,
@"前往小程序"
,
@"关注公众号"
,
@"添加客服微信"
,
@"失眠的认知行为疗法"
];
self
.
tableView
.
tableHeaderView
=
self
.
userInfoView
;
self
.
tableView
.
tableHeaderView
=
self
.
userInfoView
;
// 监听用户数据更新通知
// 监听用户数据更新通知
...
@@ -65,51 +65,46 @@
...
@@ -65,51 +65,46 @@
[
tableView
deselectRowAtIndexPath
:
indexPath
animated
:
YES
];
[
tableView
deselectRowAtIndexPath
:
indexPath
animated
:
YES
];
switch
(
indexPath
.
row
)
{
switch
(
indexPath
.
row
)
{
case
0
:
// 模拟跳转到登录页面
case
0
:
// 意见反馈入口
{
[
LoginUtils
jumpToLoginControllerWithTarget
:
self
];
}
break
;
case
1
:
// 意见反馈入口
{
{
[
self
jumpViewController
:
@"FeedbackController"
];
[
self
jumpViewController
:
@"FeedbackController"
];
}
}
break
;
break
;
case
2
:
// 系统设置入口
case
1
:
// 系统设置入口
{
{
SystemSetController
*
sysVC
=
[
SystemSetController
new
];
SystemSetController
*
sysVC
=
[
SystemSetController
new
];
[
self
.
navigationController
pushViewController
:
sysVC
animated
:
YES
];
[
self
.
navigationController
pushViewController
:
sysVC
animated
:
YES
];
}
}
break
;
break
;
case
3
:
// 邀请好友
case
2
:
// 邀请好友
{
{
InviteController
*
inviteVC
=
[
InviteController
new
];
InviteController
*
inviteVC
=
[
InviteController
new
];
[
self
.
navigationController
pushViewController
:
inviteVC
animated
:
YES
];
[
self
.
navigationController
pushViewController
:
inviteVC
animated
:
YES
];
}
}
break
;
break
;
case
4
:
// 关于我们
case
3
:
// 关于我们
{
{
[
self
.
navigationController
pushViewController
:[[
DsWebController
alloc
]
initWithTitle
:
@"关于我们"
link
:
AboutUS
]
animated
:
YES
];
[
self
.
navigationController
pushViewController
:[[
DsWebController
alloc
]
initWithTitle
:
@"关于我们"
link
:
AboutUS
]
animated
:
YES
];
}
}
break
;
break
;
case
5
:
// 前往小程序
case
4
:
// 前往小程序
{
{
[[[
ProfileAlertView
alloc
]
initWithIndexPath
:
indexPath
]
showAlertView
];
[[[
ProfileAlertView
alloc
]
initWithIndexPath
:
indexPath
]
showAlertView
];
}
}
break
;
break
;
case
6
:
// 关注公众号
case
5
:
// 关注公众号
{
{
[
UIPasteboard
generalPasteboard
].
string
=
@"xiaomeng-sleep"
;
[
UIPasteboard
generalPasteboard
].
string
=
@"xiaomeng-sleep"
;
[[[
ProfileAlertView
alloc
]
initWithIndexPath
:
indexPath
]
showAlertView
];
[[[
ProfileAlertView
alloc
]
initWithIndexPath
:
indexPath
]
showAlertView
];
}
}
break
;
break
;
case
7
:
// 添加客服微信
case
6
:
// 添加客服微信
{
{
[
UIPasteboard
generalPasteboard
].
string
=
@"xiaomengsleep"
;
[
UIPasteboard
generalPasteboard
].
string
=
@"xiaomengsleep"
;
[[[
ProfileAlertView
alloc
]
initWithIndexPath
:
indexPath
]
showAlertView
];
[[[
ProfileAlertView
alloc
]
initWithIndexPath
:
indexPath
]
showAlertView
];
}
}
break
;
break
;
case
8
:
// CBTI
case
7
:
// CBTI
{
{
[
self
.
navigationController
pushViewController
:[[
DsWebController
alloc
]
initWithTitle
:
@"失眠的认知行为疗法(CBTI)"
link
:
MYCBTI
]
animated
:
YES
];
[
self
.
navigationController
pushViewController
:[[
DsWebController
alloc
]
initWithTitle
:
@"失眠的认知行为疗法(CBTI)"
link
:
MYCBTI
]
animated
:
YES
];
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论