Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
陈高翔
/
DreamSleep-iOS
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit e208d964
由
cgx
编写于
2022-06-06 08:59:29 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
修复注销账号后重新开启AI睡眠教练显示bug、用户未登录头像设置
1 个父辈
566e72bd
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
5 行增加
和
4 行删除
DreamSleep/DreamSleep/Class/ProfileModule/Me/ProfileHeaderView.m
DreamSleep/DreamSleep/Class/ProfileModule/UserLogin/LoginUtils.m
DreamSleep/DreamSleep/Class/ProfileModule/UserLogin/UserRequestModel.m
DreamSleep/DreamSleep/Class/ProfileModule/Me/ProfileHeaderView.m
查看文件 @
e208d96
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
-
(
void
)
updateUserView
{
-
(
void
)
updateUserView
{
UserModel
*
model
=
[
LoginUtils
getUserLoginData
];
UserModel
*
model
=
[
LoginUtils
getUserLoginData
];
if
(
model
)
{
if
(
model
)
{
[
self
.
portraitIV
yy_setImageWithURL
:[
NSURL
URLWithString
:
model
.
face_img
]
placeholder
:[
UIImage
imageNamed
:
@"
portrait
"
]];
[
self
.
portraitIV
yy_setImageWithURL
:[
NSURL
URLWithString
:
model
.
face_img
]
placeholder
:[
UIImage
imageNamed
:
@"
basicPlaceholder
"
]];
self
.
titleLab
.
text
=
model
.
nick_name
;
self
.
titleLab
.
text
=
model
.
nick_name
;
[
self
.
titleLab
sizeToFit
];
[
self
.
titleLab
sizeToFit
];
self
.
levelIV
.
hidden
=
NO
;
self
.
levelIV
.
hidden
=
NO
;
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
self
.
reportReviewsView
.
hidden
=
!
self
.
openAIBtn
.
hidden
;
self
.
reportReviewsView
.
hidden
=
!
self
.
openAIBtn
.
hidden
;
self
.
scoreCountLab
.
text
=
[
NSString
stringWithFormat
:
@"我的积分:%d"
,
model
.
total_points
];
self
.
scoreCountLab
.
text
=
[
NSString
stringWithFormat
:
@"我的积分:%d"
,
model
.
total_points
];
}
else
{
}
else
{
self
.
portraitIV
.
image
=
[
UIImage
imageNamed
:
@"
portrait
"
];
self
.
portraitIV
.
image
=
[
UIImage
imageNamed
:
@"
basicPlaceholder
"
];
self
.
titleLab
.
text
=
@"注册/登录"
;
self
.
titleLab
.
text
=
@"注册/登录"
;
[
self
.
titleLab
sizeToFit
];
[
self
.
titleLab
sizeToFit
];
self
.
levelIV
.
hidden
=
YES
;
self
.
levelIV
.
hidden
=
YES
;
...
...
DreamSleep/DreamSleep/Class/ProfileModule/UserLogin/LoginUtils.m
查看文件 @
e208d96
...
@@ -77,7 +77,7 @@
...
@@ -77,7 +77,7 @@
// 发送更新用户数据显示UI通知
// 发送更新用户数据显示UI通知
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
HasUpdateUserDataNoti
object
:
nil
];
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
HasUpdateUserDataNoti
object
:
nil
];
//
DSLog(@"保存用户信息:%@", model.debugDescription);
DSLog
(
@"保存用户信息:%@"
,
model
.
debugDescription
);
}
}
+
(
void
)
clearUserLoginData
{
+
(
void
)
clearUserLoginData
{
...
...
DreamSleep/DreamSleep/Class/ProfileModule/UserLogin/UserRequestModel.m
查看文件 @
e208d96
...
@@ -103,7 +103,8 @@
...
@@ -103,7 +103,8 @@
return
[
self
httpPostBodyRequestWithAPI
:
api
params
:@{
@"query"
:
argStr
}
view
:
nil
hasNetActivity
:
YES
loadingInfo
:
nil
hasFailInfo
:
YES
success
:^
(
NSDictionary
*
_Nonnull
apiDic
)
{
return
[
self
httpPostBodyRequestWithAPI
:
api
params
:@{
@"query"
:
argStr
}
view
:
nil
hasNetActivity
:
YES
loadingInfo
:
nil
hasFailInfo
:
YES
success
:^
(
NSDictionary
*
_Nonnull
apiDic
)
{
DSLog
(
@"用户自动登录接口apiDic:%@
\n
, token:%@
\n
, sid:%@"
,
apiDic
,
token
,
[
LoginUtils
getSid
]);
DSLog
(
@"用户自动登录接口apiDic:%@
\n
, token:%@
\n
, sid:%@"
,
apiDic
,
token
,
[
LoginUtils
getSid
]);
NSDictionary
*
resultDic
=
apiDic
[
@"result"
];
NSDictionary
*
resultDic
=
apiDic
[
@"result"
];
[
LoginUtils
updateSid
:
resultDic
[
@"sid"
]
token
:
resultDic
[
@"token"
]
isAccess
:
[
resultDic
[
@"is_access"
]
intValue
]];
NSDictionary
*
userDic
=
resultDic
[
@"user"
];
[
LoginUtils
updateSid
:
resultDic
[
@"sid"
]
token
:
resultDic
[
@"token"
]
isAccess
:
[
userDic
[
@"is_access"
]
intValue
]];
DSLog
(
@"自动登录成功后token:%@
\n
, sid:%@"
,
[
LoginUtils
getToken
],
[
LoginUtils
getSid
]);
DSLog
(
@"自动登录成功后token:%@
\n
, sid:%@"
,
[
LoginUtils
getToken
],
[
LoginUtils
getSid
]);
requestModel
.
resCode
=
DSResCodeSuccess
;
requestModel
.
resCode
=
DSResCodeSuccess
;
completion
(
requestModel
);
completion
(
requestModel
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论