Commit 1bd10c8c cgx

完善用户登录相关接口

1 个父辈 d23ba692
......@@ -476,13 +476,12 @@
D04567AD27F6D0F4009F0A82 /* Profile */ = {
isa = PBXGroup;
children = (
D0D3826428124E34005BB219 /* Feedback */,
D07A4B2E280EC1F100BA0EC0 /* Me */,
D07A4B2F280EC21B00BA0EC0 /* Account */,
D0CE3D80280A532D00D8B02D /* UserLogin */,
D0D3826428124E34005BB219 /* Feedback */,
D09D0E97280D4EEA008DEDAB /* SystemSet */,
D09D0E9B280D73B6008DEDAB /* InviteController.h */,
D09D0E9C280D73B6008DEDAB /* InviteController.m */,
D0D382682812660C005BB219 /* InviteFriend */,
);
path = Profile;
sourceTree = "<group>";
......@@ -750,6 +749,15 @@
path = Feedback;
sourceTree = "<group>";
};
D0D382682812660C005BB219 /* InviteFriend */ = {
isa = PBXGroup;
children = (
D09D0E9B280D73B6008DEDAB /* InviteController.h */,
D09D0E9C280D73B6008DEDAB /* InviteController.m */,
);
path = InviteFriend;
sourceTree = "<group>";
};
D0E65FF32807A654006562F2 /* HYBUnicodeReadable */ = {
isa = PBXGroup;
children = (
......
......@@ -25,6 +25,7 @@ static MBProgressHUD *hud;
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:DSKeyWindow animated:YES];
hud.mode = MBProgressHUDModeText;
hud.label.text = message;
[self adjustThemeWithHud:hud];
[hud hideAnimated:NO afterDelay:1.0];
}
......@@ -32,6 +33,7 @@ static MBProgressHUD *hud;
{
[self dissmissProgressHUD];
hud = [MBProgressHUD showHUDAddedTo:DSKeyWindow animated:YES];
[self adjustThemeWithHud:hud];
hud.label.text = NSLocalizedString(info, @"");
return hud;
}
......@@ -89,4 +91,10 @@ static MBProgressHUD *hud;
[hud hideAnimated:NO afterDelay:4.0];
}
+ (void)adjustThemeWithHud:(MBProgressHUD *)hud {
hud.bezelView.style = MBProgressHUDBackgroundStyleSolidColor;
hud.bezelView.dk_backgroundColorPicker = DKColorPickerWithColors(DSBlack, DSWhite, DSWhite);
hud.label.dk_textColorPicker = DKColorPickerWithColors(DSWhite, DSBlack, DSWhite);
}
@end
......@@ -46,6 +46,7 @@
// 发送微信登录请求
[UserRequestModel wxLoginWithCode:code completion:^(UserRequestModel * _Nonnull requestModel) {
if (requestModel.resCode == DSResCodeSuccess) {
[DSProgressHUD showToast:@"登录成功"];
[self dismissViewControllerAnimated:YES completion:nil];
} else {
[DSProgressHUD showToast:requestModel.errorInfo];
......@@ -121,6 +122,7 @@
// 发送苹果登录请求
[UserRequestModel appleLoginWithUser:userID identityToken:identityToken authorizationCode:authorizationCode completion:^(UserRequestModel * _Nonnull requestModel) {
if (requestModel.resCode == DSResCodeSuccess) {
[DSProgressHUD showToast:@"登录成功"];
[self dismissViewControllerAnimated:YES completion:nil];
} else {
[DSProgressHUD showToast:requestModel.errorInfo];
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!