修改完成

This commit is contained in:
启星
2025-09-11 18:25:41 +08:00
parent 349cab1499
commit 35709d4e8e
67 changed files with 1344 additions and 223 deletions

View File

@@ -61,23 +61,24 @@
}
-(void)setHeadIcon:(NSString *)headerIcon
dress:(NSString *)dress{
dress:(nonnull NSString *)dress{
NSString *dressUrl = [dress stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
[self.headImageView sd_setImageWithURL:[NSURL URLWithString:headerIcon] placeholderImage:[UIImage imageNamed:@"user_header_placehoulder"]];
if (dress.length > 0 && ([dress hasPrefix:@"http"] || [dress hasPrefix:@"https"])) {
if ([dress isExist]) {
if ([dress hasSuffix:@"svga"]) {
if (dressUrl.length > 0 && ([dressUrl hasPrefix:@"http"] || [dressUrl hasPrefix:@"https"])) {
if ([dressUrl isExist]) {
if ([dressUrl hasSuffix:@"svga"]) {
[self.svgaView setHidden:NO];
[self.mp4View stopHWDMP4];
[self.mp4View setHidden:YES];
[self.svgaView destroySvga];
[self.svgaView loadSVGAPlayerWith:dress inBundle:NO loop:INTMAX_MAX];
}else if ([dress hasSuffix:@"mp4"]){
[self.svgaView loadSVGAPlayerWith:dressUrl inBundle:NO loop:INTMAX_MAX];
}else if ([dressUrl hasSuffix:@"mp4"]){
[self.svgaView setHidden:YES];
[self.mp4View setHidden:NO];
[self.mp4View stopHWDMP4];
MJWeakSelf
[[QXRequset shareInstance] downloadVideoPlayerWithUrl:dress completion:^(BOOL result, NSString * _Nonnull fileName) {
NSString *videoPath = [QXFileManager getGiftVideoPath:dress.lastPathComponent];
[[QXRequset shareInstance] downloadVideoPlayerWithUrl:dressUrl completion:^(BOOL result, NSString * _Nonnull fileName) {
NSString *videoPath = [QXFileManager getGiftVideoPath:dressUrl.lastPathComponent];
[weakSelf.mp4View playHWDMP4:videoPath repeatCount:INTMAX_MAX delegate:self];
}];
}else{