|
@@ -25,6 +25,7 @@
|
|
|
|
|
|
#import "CoursewareDownloadManager.h"
|
|
|
#import "KSBaseGuideManager.h"
|
|
|
+#import "NSDate+Extension.h"
|
|
|
|
|
|
@interface INSSettingViewController ()<RSKImageCropViewControllerDelegate>
|
|
|
|
|
@@ -265,16 +266,17 @@
|
|
|
|
|
|
- (void)updateWithUserLogo:(UIImage *)image {
|
|
|
NSData *imgData = [UIImage turnsImaegDataByImage:image];
|
|
|
- NSString *fileName = @"image";
|
|
|
[UPLOAD_MANAGER configWithfilePath:@"/user/"];
|
|
|
- [UPLOAD_MANAGER uploadImage:imgData fileName:fileName successCallback:^(NSMutableArray * _Nonnull fileUrlArray) {
|
|
|
+ NSString *avatarName = [NSString stringWithFormat:@"%@.png", UserDefault(UIDKey)];
|
|
|
+ [UPLOAD_MANAGER uploadFixedNameImage:imgData fileName:avatarName successCallback:^(NSMutableArray * _Nonnull fileUrlArray) {
|
|
|
NSString *avatarUrl = [fileUrlArray lastObject];
|
|
|
+ avatarUrl = [NSString stringWithFormat:@"%@?t=%@", avatarUrl, [NSDate getCurrentTimestamp]];
|
|
|
[self modifyUserMessage:avatarUrl gender:nil birthday:nil];
|
|
|
- } faliure:^(NSError * _Nullable error, NSString *descMessaeg) {
|
|
|
- if (![NSString isEmptyString:descMessaeg]) {
|
|
|
- [LOADING_MANAGER MBShowAUTOHidingInWindow:descMessaeg];
|
|
|
- }
|
|
|
- }];
|
|
|
+ } faliure:^(NSError * _Nullable error, NSString * _Nullable descMessaeg) {
|
|
|
+ if (![NSString isEmptyString:descMessaeg]) {
|
|
|
+ [LOADING_MANAGER MBShowAUTOHidingInWindow:descMessaeg];
|
|
|
+ }
|
|
|
+ }];
|
|
|
}
|
|
|
|
|
|
- (void)modifyUserMessage:(NSString *)imgUrl gender:(NSString *)gender birthday:(NSString *)birthday {
|