1
This commit is contained in:
@@ -97,6 +97,35 @@
|
||||
}];
|
||||
}
|
||||
|
||||
/// 删除用户人设
|
||||
- (void)deleteUserCharacterWithId:(NSNumber *)characterId
|
||||
completion:(KBDeleteUserCharacterCompletion)completion {
|
||||
if (!characterId) {
|
||||
if (completion) {
|
||||
NSError *e = [NSError errorWithDomain:KBNetworkErrorDomain
|
||||
code:KBNetworkErrorInvalidResponse
|
||||
userInfo:@{NSLocalizedDescriptionKey: KBLocalized(@"Invalid parameter")}];
|
||||
completion(NO, e);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
NSDictionary *params = @{@"id": characterId};
|
||||
[KBHUD show];
|
||||
[[KBNetworkManager shared] GET:API_CHARACTER_DEL_USER_CHARACTER
|
||||
parameters:params
|
||||
headers:nil
|
||||
autoShowBusinessError:YES
|
||||
completion:^(NSDictionary *jsonOrData,
|
||||
NSURLResponse * _Nullable response,
|
||||
NSError * _Nullable error) {
|
||||
[KBHUD dismiss];
|
||||
if (completion) {
|
||||
completion(error == nil, error);
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
/// 上传头像
|
||||
- (void)upLoadAvatarWithData:(NSData *)avatarData completion:(KBUpLoadAvatarCompletion)completion{
|
||||
KBWeakSelf;
|
||||
|
||||
Reference in New Issue
Block a user