Commit 32358719 authored by jz's avatar jz

update

parent 265f9062
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import <GMbase/GMObject.h> #import <GMbase/GMObject.h>
typedef NS_ENUM(NSUInteger, GMTokenType) { typedef NS_ENUM(NSUInteger, GMAITokenType) {
GMTokenTypeImage = 1,// 图片 GMAITokenTypeImage = 1,// 图片
GMTokenTypeViedo,// 视频 GMAITokenTypeViedo,// 视频
}; };
/** @brief 返回结果Block */ /** @brief 返回结果Block */
...@@ -24,7 +24,7 @@ typedef void(^UploadFinishedBlock)(BOOL result, NSString *message); ...@@ -24,7 +24,7 @@ typedef void(^UploadFinishedBlock)(BOOL result, NSString *message);
- (NSString *)createImagePath; - (NSString *)createImagePath;
// 1: '图片' 2:'视频' // 1: '图片' 2:'视频'
- (void)getTokenWithType:(GMTokenType)type resultBlock:(UploadFinishedBlock)resultBlock; - (void)getTokenWithType:(GMAITokenType)type resultBlock:(UploadFinishedBlock)resultBlock;
-(void)uploadImages:(NSArray *)images imageToken:(NSString *)imageToken resultBlock:(UploadFinishedBlock)resultBlock; -(void)uploadImages:(NSArray *)images imageToken:(NSString *)imageToken resultBlock:(UploadFinishedBlock)resultBlock;
......
...@@ -33,7 +33,7 @@ static GMAIUploadImagesManager *shareInstance = nil; ...@@ -33,7 +33,7 @@ static GMAIUploadImagesManager *shareInstance = nil;
return shareInstance; return shareInstance;
} }
- (void)getTokenWithType:(GMTokenType)type resultBlock:(UploadFinishedBlock)resultBlock { - (void)getTokenWithType:(GMAITokenType)type resultBlock:(UploadFinishedBlock)resultBlock {
NSDictionary *params = @{@"token_type" : @(type)}; NSDictionary *params = @{@"token_type" : @(type)};
[GMNetworking requestOCWithApi:@"/api/app/upload_token" method:GMHTTPMethodPost parameters:params completion:^(GMResponseOC * response) { [GMNetworking requestOCWithApi:@"/api/app/upload_token" method:GMHTTPMethodPost parameters:params completion:^(GMResponseOC * response) {
if (response.isSuccess) { if (response.isSuccess) {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "GMALNetworkMacros.h" #import "GMALNetworkMacros.h"
//#import <GMBase/GMObject.h> #import <GMBase/GMObject.h>
//@import GMBase; //@import GMBase;
typedef NS_ENUM(NSInteger, GMRequestMethod) { typedef NS_ENUM(NSInteger, GMRequestMethod) {
GMRequestMethodGET = 0, GMRequestMethodGET = 0,
...@@ -21,7 +21,7 @@ typedef NS_ENUM(NSInteger, GMRequestMethod) { ...@@ -21,7 +21,7 @@ typedef NS_ENUM(NSInteger, GMRequestMethod) {
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface GMRequestObject : NSObject @interface GMRequestObject : GMObject
@property (nonatomic, copy) NSString *offset; @property (nonatomic, copy) NSString *offset;
@property (nonatomic, assign) NSInteger page; @property (nonatomic, assign) NSInteger page;
......
...@@ -6,9 +6,12 @@ ...@@ -6,9 +6,12 @@
// Copyright © 2019 更美互动信息科技有限公司. All rights reserved. // Copyright © 2019 更美互动信息科技有限公司. All rights reserved.
// //
#import "GMLibraryHeader.h" #import "GMLibraryHeader.h"
@protocol GMSearchNavigationViewDelegate; @protocol GMAISearchNavigationViewDelegate <NSObject>
- (void)searchNavigationCancelButtonClick;
@end
@interface GMAISearchNavigationView : GMView @interface GMAISearchNavigationView : GMView
@property (nonatomic, assign) id<GMSearchNavigationViewDelegate> delegate; @property (nonatomic, assign) id<GMAISearchNavigationViewDelegate> delegate;
@property (nonatomic, assign) BOOL showCancelButton; @property (nonatomic, assign) BOOL showCancelButton;
@property (nonatomic, strong) UITextField *textField; @property (nonatomic, strong) UITextField *textField;
...@@ -20,7 +23,3 @@ ...@@ -20,7 +23,3 @@
- (BOOL)becomeFirstResponder; - (BOOL)becomeFirstResponder;
- (BOOL)resignFirstResponder; - (BOOL)resignFirstResponder;
@end @end
@protocol GMSearchNavigationViewDelegate <NSObject>
- (void)searchNavigationCancelButtonClick;
@end
...@@ -5,9 +5,10 @@ ...@@ -5,9 +5,10 @@
// Created by Jessica on 2020/3/9. // Created by Jessica on 2020/3/9.
// Copyright © 2020 更美互动信息科技有限公司. All rights reserved. // Copyright © 2020 更美互动信息科技有限公司. All rights reserved.
// //
#import "Lottie.h"
#import "GMLibraryHeader.h" #import "GMLibraryHeader.h"
@class LOTAnimationView;
@interface GMGrabLoadingAnimaitionView : GMView @interface GMGrabLoadingAnimaitionView : GMView
@property (nonatomic, strong) LOTAnimationView *animationView; @property (nonatomic, strong) LOTAnimationView *animationView;
@end @end
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#import "GMGrabLoadingView.h" #import "GMGrabLoadingView.h"
#import "GMTelephoneProxy.h" #import "GMTelephoneProxy.h"
#import <Lottie/Lottie.h>
@interface GMGrabLoadingAnimaitionView() @interface GMGrabLoadingAnimaitionView()
@property (nonatomic, strong) UILabel *textLabel; @property (nonatomic, strong) UILabel *textLabel;
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#import "QiniuSDK.h" #import "QiniuSDK.h"
#import "RequestHeader.h" #import "RequestHeader.h"
#import "GMAIUploadImagesManager.h" #import "GMAIUploadImagesManager.h"
//#import "GMUploadImagesManager.h"
#import <GMBaseWeb/GMBaseWeb-Swift.h> #import <GMBaseWeb/GMBaseWeb-Swift.h>
#import <GMbase/GMBaseTool.h> #import <GMbase/GMBaseTool.h>
...@@ -57,7 +58,7 @@ ...@@ -57,7 +58,7 @@
self.shareUserId = SafeString(dict[@"userId"]); self.shareUserId = SafeString(dict[@"userId"]);
self.shareImage = [UIImage imageWithData:[[NSData alloc] initWithBase64EncodedString:imageString options:NSDataBase64DecodingIgnoreUnknownCharacters]]; self.shareImage = [UIImage imageWithData:[[NSData alloc] initWithBase64EncodedString:imageString options:NSDataBase64DecodingIgnoreUnknownCharacters]];
__block NSString *key = [[GMAIUploadImagesManager shareInstance] createImagePath]; __block NSString *key = [[GMAIUploadImagesManager shareInstance] createImagePath];
[[GMAIUploadImagesManager shareInstance] getTokenWithType:GMTokenTypeImage resultBlock:^(BOOL result, NSString *message) { [[GMAIUploadImagesManager shareInstance] getTokenWithType:GMAITokenTypeImage resultBlock:^(BOOL result, NSString *message) {
if (result) { if (result) {
NSData *imageData = UIImageJPEGRepresentation(self.shareImage, 1); NSData *imageData = UIImageJPEGRepresentation(self.shareImage, 1);
QNUploadManager *upManager = [[QNUploadManager alloc] init]; QNUploadManager *upManager = [[QNUploadManager alloc] init];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment