提交
This commit is contained in:
@@ -28,10 +28,7 @@
|
||||
return self;
|
||||
}
|
||||
-(void)uploadFile:(id)file withObjectKey:(NSString *)key path:(NSString *)path complete:(void (^)(NSString * _Nonnull, QXCOSUploadImageState))complete {
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
[[QXRequset shareInstance] getWithUrl:[NSString stringWithFormat:@"%@%@",server,QXGetCosTempKeys] parameters:@{} needCache:NO success:^(id responseObject) {
|
||||
QXCOSUploadModel *model = [QXCOSUploadModel yy_modelWithJSON:responseObject[@"data"]];
|
||||
if (![model.region isExist] || ![model.bucket isExist] || ![model.credentials.sessionToken isExist] || ![model.credentials.tmpSecretId isExist] || ![model.credentials.tmpSecretKey isExist]) {
|
||||
@@ -102,10 +99,7 @@
|
||||
}
|
||||
|
||||
-(void)audioUploadFile:(id)file withObjectKey:(NSString *)key complete:(void (^)(NSString * fileUrl, QXCOSUploadImageState state))complete{
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
[[QXRequset shareInstance] getWithUrl:[NSString stringWithFormat:@"%@%@",server,QXGetCosTempKeys] parameters:@{} needCache:NO success:^(id responseObject) {
|
||||
QXCOSUploadModel *model = [QXCOSUploadModel yy_modelWithJSON:responseObject[@"data"]];
|
||||
if (![model.region isExist] || ![model.bucket isExist] || ![model.credentials.sessionToken isExist] || ![model.credentials.tmpSecretId isExist] || ![model.credentials.tmpSecretKey isExist]) {
|
||||
@@ -176,10 +170,7 @@
|
||||
}
|
||||
|
||||
-(void)uploadFile:(NSArray *)files withObjectKey:(NSArray *)objectKeys isAsync:(BOOL)isAsync complete:(void (^)(NSArray<NSString *> * _Nullable, QXCOSUploadImageState))complete{
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
[[QXRequset shareInstance] getWithUrl:[NSString stringWithFormat:@"%@%@",server,QXGetCosTempKeys] parameters:@{} needCache:NO success:^(id responseObject) {
|
||||
QXCOSUploadModel *model = [QXCOSUploadModel yy_modelWithJSON:responseObject[@"data"]];
|
||||
if (![model.region isExist] || ![model.bucket isExist] || ![model.credentials.sessionToken isExist] || ![model.credentials.tmpSecretId isExist] || ![model.credentials.tmpSecretKey isExist]) {
|
||||
@@ -276,10 +267,7 @@
|
||||
}
|
||||
|
||||
-(void)activityUploadFile:(NSArray *)files withObjectKey:(NSArray *)objectKeys isAsync:(BOOL)isAsync complete:(void (^)(NSArray<NSString *> * _Nonnull, QXCOSUploadImageState))complete{
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
[[QXRequset shareInstance] getWithUrl:[NSString stringWithFormat:@"%@%@",server,QXGetCosTempKeys] parameters:@{} needCache:NO success:^(id responseObject) {
|
||||
QXCOSUploadModel *model = [QXCOSUploadModel yy_modelWithJSON:responseObject[@"data"]];
|
||||
if (![model.region isExist] || ![model.bucket isExist] || ![model.credentials.sessionToken isExist] || ![model.credentials.tmpSecretId isExist] || ![model.credentials.tmpSecretKey isExist]) {
|
||||
|
||||
@@ -88,7 +88,14 @@
|
||||
[attr yy_setColor:self.lengthColor range:[str rangeOfString:length]];
|
||||
self.maxCountLabel.attributedText = attr;
|
||||
}
|
||||
|
||||
-(void)setText:(NSString *)text{
|
||||
[super setText:text];
|
||||
if (self.text.length == 0) {
|
||||
self.placehoulderLabel.hidden = NO;
|
||||
}else{
|
||||
self.placehoulderLabel.hidden = YES;
|
||||
}
|
||||
}
|
||||
-(void)setMaxLength:(NSInteger)maxLength{
|
||||
_maxLength = maxLength;
|
||||
NSString *length = [NSString stringWithFormat:@"%ld",self.maxLength - self.text.length];
|
||||
|
||||
Reference in New Issue
Block a user