Commit 32358719 authored by jz's avatar jz

update

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