This commit is contained in:
2025-12-22 19:19:28 +08:00
parent 5cfc76e6c5
commit 4e6fd90668
20 changed files with 679 additions and 3 deletions

View File

@@ -201,6 +201,24 @@
}];
}
- (void)restoreThemeWithId:(nullable NSString *)themeId
completion:(nullable KBShopRestoreCompletion)completion {
if (themeId.length == 0) {
if (completion) completion(NO, [self kb_invalidParameterError]);
return;
}
NSDictionary *body = @{@"themeId": [self kb_themeIdParamFromString:themeId]};
[[KBNetworkManager shared] POST:API_THEME_RESTORE
jsonBody:body
headers:nil
autoShowBusinessError:NO
completion:^(NSDictionary * _Nullable json,
NSURLResponse * _Nullable response,
NSError * _Nullable error) {
if (completion) completion(error == nil, error);
}];
}
- (id)kb_themeIdParamFromString:(NSString *)themeId {
if (themeId.length == 0) { return @""; }
NSNumberFormatter *formatter = [NSNumberFormatter new];