@@ -104,7 +104,7 @@ - (BOOL)buildRequestData:(NSError *__autoreleasing *)error {
104104 [self .requestData setQueryStringParamter: [self base64EncodeString: self .htmlwaterword] withKey: @" htmlwaterword" ];
105105
106106 if (self.htmlfillstyle != nil ) {
107- [self .requestData setQueryStringParamter: [ self colorToString: self .htmlfillstyle] withKey: @" htmlfillstyle" ];
107+ [self .requestData setQueryStringParamter: self .htmlfillstyle withKey: @" htmlfillstyle" ];
108108 }
109109
110110 if (self.htmlfront != nil ) {
@@ -157,50 +157,50 @@ - (QCloudSignatureFields *)signatureFields {
157157
158158 return fileds;
159159}
160- - (NSArray <NSMutableDictionary *> *)scopesArray {
161- NSMutableDictionary *dic = [NSMutableDictionary dictionary ];
162- NSArray *separatetmpArray = [self .requestData.serverURL componentsSeparatedByString: @" ://" ];
163- NSString *str = separatetmpArray[1 ];
164- NSArray *separateArray = [str componentsSeparatedByString: @" ." ];
165- dic[@" bucket" ] = separateArray[0 ];
166- dic[@" region" ] = self.runOnService .configuration .endpoint .regionName ;
167- dic[@" prefix" ] = self.object ;
168- dic[@" action" ] = @" name/cos:GetObject" ;
169- NSMutableArray *array = [NSMutableArray array ];
170- [array addObject: dic];
171- return [array copy ];
172- }
173-
174- - (NSString *)colorToString : (UIColor *)color {
175-
176- CGFloat red, green, blue, alpha;
177- #if SD_UIKIT
178- if (![color getRed: &red green: &green blue: &blue alpha: &alpha]) {
179- [color getWhite: &red alpha: &alpha];
180- green = red;
181- blue = red;
182- alpha = 1 ;
183- }
184- #else
185- @try {
186- [color getRed: &red green: &green blue: &blue alpha: &alpha];
187- }
188- @catch (NSException *exception) {
189- [color getWhite: &red alpha: &alpha];
190- green = red;
191- blue = red;
192- alpha = 1 ;
193- }
194- #endif
195-
196- red = roundf (red * 255 .f );
197- green = roundf (green * 255 .f );
198- blue = roundf (blue * 255 .f );
199- alpha = round (alpha * 255 .f );
200- uint hex = (((uint)red << 16 ) | ((uint)green << 8 ) | ((uint)blue));
201-
202- return [self base64EncodeString: [NSString stringWithFormat: @" %06x " , hex]];
203- }
160+ // - (NSArray<NSMutableDictionary *> *)scopesArray {
161+ // NSMutableDictionary *dic = [NSMutableDictionary dictionary];
162+ // NSArray *separatetmpArray = [self.requestData.serverURL componentsSeparatedByString:@"://"];
163+ // NSString *str = separatetmpArray[1];
164+ // NSArray *separateArray = [str componentsSeparatedByString:@"."];
165+ // dic[@"bucket"] = separateArray[0];
166+ // dic[@"region"] = self.runOnService.configuration.endpoint.regionName;
167+ // dic[@"prefix"] = self.object;
168+ // dic[@"action"] = @"name/cos:GetObject";
169+ // NSMutableArray *array = [NSMutableArray array];
170+ // [array addObject:dic];
171+ // return [array copy];
172+ // }
173+ //
174+ // - (NSString *)colorToString:(UIColor *)color {
175+ //
176+ // CGFloat red, green, blue, alpha;
177+ // #if SD_UIKIT
178+ // if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
179+ // [color getWhite:&red alpha:&alpha];
180+ // green = red;
181+ // blue = red;
182+ // alpha = 1;
183+ // }
184+ // #else
185+ // @try {
186+ // [color getRed:&red green:&green blue:&blue alpha:&alpha];
187+ // }
188+ // @catch (NSException *exception) {
189+ // [color getWhite:&red alpha:&alpha];
190+ // green = red;
191+ // blue = red;
192+ // alpha = 1;
193+ // }
194+ // #endif
195+ //
196+ // red = roundf(red * 255.f);
197+ // green = roundf(green * 255.f);
198+ // blue = roundf(blue * 255.f);
199+ // alpha = round(alpha * 255.f);
200+ // uint hex = (((uint)red << 16) | ((uint)green << 8) | ((uint)blue));
201+ //
202+ // return [self base64EncodeString:[NSString stringWithFormat:@"%06x", hex]];
203+ // }
204204
205205- (NSString *)base64EncodeString : (NSString *)string {
206206 NSData *data =[string dataUsingEncoding: NSUTF8StringEncoding];
0 commit comments