mtg
This commit is contained in:
parent
3140f503a4
commit
5ff1070967
@ -10,8 +10,24 @@
|
|||||||
47E2910BA14539535986845C /* Pods_wallpaper_project.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5FABA9F86ED5CD475E3A3424 /* Pods_wallpaper_project.framework */; };
|
47E2910BA14539535986845C /* Pods_wallpaper_project.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5FABA9F86ED5CD475E3A3424 /* Pods_wallpaper_project.framework */; };
|
||||||
75200B6D2BA7D34F00BA65FD /* WA_limitsVCViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75200B6B2BA7D34F00BA65FD /* WA_limitsVCViewController.swift */; };
|
75200B6D2BA7D34F00BA65FD /* WA_limitsVCViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75200B6B2BA7D34F00BA65FD /* WA_limitsVCViewController.swift */; };
|
||||||
75200B6E2BA7D34F00BA65FD /* WA_limitsVCViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 75200B6C2BA7D34F00BA65FD /* WA_limitsVCViewController.xib */; };
|
75200B6E2BA7D34F00BA65FD /* WA_limitsVCViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 75200B6C2BA7D34F00BA65FD /* WA_limitsVCViewController.xib */; };
|
||||||
|
752FFF7A2C48B7EB00FDA982 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 752FFF792C48B7EB00FDA982 /* GoogleService-Info.plist */; };
|
||||||
|
752FFF872C48EC5000FDA982 /* WA_RankVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 752FFF862C48EC5000FDA982 /* WA_RankVC.xib */; };
|
||||||
|
752FFF882C48EC5000FDA982 /* WA_RankVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 752FFF852C48EC5000FDA982 /* WA_RankVC.swift */; };
|
||||||
|
752FFF8A2C48F35F00FDA982 /* custlayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 752FFF892C48F35F00FDA982 /* custlayout.swift */; };
|
||||||
|
752FFF8E2C48F4E400FDA982 /* WA_RankCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 752FFF8D2C48F4E400FDA982 /* WA_RankCollectionViewCell.xib */; };
|
||||||
|
752FFF8F2C48F4E400FDA982 /* WA_RankCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 752FFF8C2C48F4E400FDA982 /* WA_RankCollectionViewCell.swift */; };
|
||||||
|
752FFF922C48FEBE00FDA982 /* rank.json in Resources */ = {isa = PBXBuildFile; fileRef = 752FFF912C48FEBE00FDA982 /* rank.json */; };
|
||||||
|
752FFFBA2C49118700FDA982 /* WA_playerVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 752FFFB92C49118700FDA982 /* WA_playerVC.xib */; };
|
||||||
|
752FFFBB2C49118700FDA982 /* WA_playerVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 752FFFB82C49118700FDA982 /* WA_playerVC.swift */; };
|
||||||
|
755EC36C2C4A378400919ACB /* WA_player4kVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 755EC36A2C4A378400919ACB /* WA_player4kVC.swift */; };
|
||||||
|
755EC36D2C4A378400919ACB /* WA_player4kVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 755EC36B2C4A378400919ACB /* WA_player4kVC.xib */; };
|
||||||
|
755EC3702C4A469A00919ACB /* WA_playerRankVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 755EC36E2C4A469A00919ACB /* WA_playerRankVC.swift */; };
|
||||||
|
755EC3712C4A469A00919ACB /* WA_playerRankVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 755EC36F2C4A469A00919ACB /* WA_playerRankVC.xib */; };
|
||||||
|
755EC3742C4A4F3600919ACB /* WA_CommunityPlayerVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 755EC3722C4A4F3600919ACB /* WA_CommunityPlayerVC.swift */; };
|
||||||
|
755EC3752C4A4F3600919ACB /* WA_CommunityPlayerVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 755EC3732C4A4F3600919ACB /* WA_CommunityPlayerVC.xib */; };
|
||||||
|
755EC3782C4A517500919ACB /* WA_AddPlayerVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 755EC3762C4A517500919ACB /* WA_AddPlayerVC.swift */; };
|
||||||
|
755EC3792C4A517500919ACB /* WA_AddPlayerVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 755EC3772C4A517500919ACB /* WA_AddPlayerVC.xib */; };
|
||||||
757DA8B82C1BE33E0046CAB6 /* stringADID.swift in Sources */ = {isa = PBXBuildFile; fileRef = 757DA8B72C1BE33D0046CAB6 /* stringADID.swift */; };
|
757DA8B82C1BE33E0046CAB6 /* stringADID.swift in Sources */ = {isa = PBXBuildFile; fileRef = 757DA8B72C1BE33D0046CAB6 /* stringADID.swift */; };
|
||||||
757E9AF22BD26A8000EF854A /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 757E9AF12BD26A8000EF854A /* GoogleService-Info.plist */; };
|
|
||||||
759BB0602BABE3EC001C0031 /* loanding.json in Resources */ = {isa = PBXBuildFile; fileRef = 759BB05F2BABE3EC001C0031 /* loanding.json */; };
|
759BB0602BABE3EC001C0031 /* loanding.json in Resources */ = {isa = PBXBuildFile; fileRef = 759BB05F2BABE3EC001C0031 /* loanding.json */; };
|
||||||
759BB0622BAD35D7001C0031 /* loadProgress.json in Resources */ = {isa = PBXBuildFile; fileRef = 759BB0612BAD35D6001C0031 /* loadProgress.json */; };
|
759BB0622BAD35D7001C0031 /* loadProgress.json in Resources */ = {isa = PBXBuildFile; fileRef = 759BB0612BAD35D6001C0031 /* loadProgress.json */; };
|
||||||
75A14D932BA1A9760091D9AD /* WA_PrivacyVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75A14D912BA1A9760091D9AD /* WA_PrivacyVC.swift */; };
|
75A14D932BA1A9760091D9AD /* WA_PrivacyVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75A14D912BA1A9760091D9AD /* WA_PrivacyVC.swift */; };
|
||||||
@ -140,8 +156,24 @@
|
|||||||
6E8D6164F3693D0725EEBE1E /* Pods-wallpaper_project.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-wallpaper_project.debug.xcconfig"; path = "Target Support Files/Pods-wallpaper_project/Pods-wallpaper_project.debug.xcconfig"; sourceTree = "<group>"; };
|
6E8D6164F3693D0725EEBE1E /* Pods-wallpaper_project.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-wallpaper_project.debug.xcconfig"; path = "Target Support Files/Pods-wallpaper_project/Pods-wallpaper_project.debug.xcconfig"; sourceTree = "<group>"; };
|
||||||
75200B6B2BA7D34F00BA65FD /* WA_limitsVCViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WA_limitsVCViewController.swift; sourceTree = "<group>"; };
|
75200B6B2BA7D34F00BA65FD /* WA_limitsVCViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WA_limitsVCViewController.swift; sourceTree = "<group>"; };
|
||||||
75200B6C2BA7D34F00BA65FD /* WA_limitsVCViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WA_limitsVCViewController.xib; sourceTree = "<group>"; };
|
75200B6C2BA7D34F00BA65FD /* WA_limitsVCViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WA_limitsVCViewController.xib; sourceTree = "<group>"; };
|
||||||
|
752FFF792C48B7EB00FDA982 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
|
||||||
|
752FFF852C48EC5000FDA982 /* WA_RankVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WA_RankVC.swift; sourceTree = "<group>"; };
|
||||||
|
752FFF862C48EC5000FDA982 /* WA_RankVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WA_RankVC.xib; sourceTree = "<group>"; };
|
||||||
|
752FFF892C48F35F00FDA982 /* custlayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = custlayout.swift; sourceTree = "<group>"; };
|
||||||
|
752FFF8C2C48F4E400FDA982 /* WA_RankCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WA_RankCollectionViewCell.swift; sourceTree = "<group>"; };
|
||||||
|
752FFF8D2C48F4E400FDA982 /* WA_RankCollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WA_RankCollectionViewCell.xib; sourceTree = "<group>"; };
|
||||||
|
752FFF912C48FEBE00FDA982 /* rank.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = rank.json; sourceTree = "<group>"; };
|
||||||
|
752FFFB82C49118700FDA982 /* WA_playerVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WA_playerVC.swift; sourceTree = "<group>"; };
|
||||||
|
752FFFB92C49118700FDA982 /* WA_playerVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WA_playerVC.xib; sourceTree = "<group>"; };
|
||||||
|
755EC36A2C4A378400919ACB /* WA_player4kVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WA_player4kVC.swift; sourceTree = "<group>"; };
|
||||||
|
755EC36B2C4A378400919ACB /* WA_player4kVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WA_player4kVC.xib; sourceTree = "<group>"; };
|
||||||
|
755EC36E2C4A469A00919ACB /* WA_playerRankVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WA_playerRankVC.swift; sourceTree = "<group>"; };
|
||||||
|
755EC36F2C4A469A00919ACB /* WA_playerRankVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WA_playerRankVC.xib; sourceTree = "<group>"; };
|
||||||
|
755EC3722C4A4F3600919ACB /* WA_CommunityPlayerVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WA_CommunityPlayerVC.swift; sourceTree = "<group>"; };
|
||||||
|
755EC3732C4A4F3600919ACB /* WA_CommunityPlayerVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WA_CommunityPlayerVC.xib; sourceTree = "<group>"; };
|
||||||
|
755EC3762C4A517500919ACB /* WA_AddPlayerVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WA_AddPlayerVC.swift; sourceTree = "<group>"; };
|
||||||
|
755EC3772C4A517500919ACB /* WA_AddPlayerVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WA_AddPlayerVC.xib; sourceTree = "<group>"; };
|
||||||
757DA8B72C1BE33D0046CAB6 /* stringADID.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = stringADID.swift; sourceTree = "<group>"; };
|
757DA8B72C1BE33D0046CAB6 /* stringADID.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = stringADID.swift; sourceTree = "<group>"; };
|
||||||
757E9AF12BD26A8000EF854A /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
|
|
||||||
759BB05F2BABE3EC001C0031 /* loanding.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = loanding.json; sourceTree = "<group>"; };
|
759BB05F2BABE3EC001C0031 /* loanding.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = loanding.json; sourceTree = "<group>"; };
|
||||||
759BB0612BAD35D6001C0031 /* loadProgress.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = loadProgress.json; sourceTree = "<group>"; };
|
759BB0612BAD35D6001C0031 /* loadProgress.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = loadProgress.json; sourceTree = "<group>"; };
|
||||||
75A14D912BA1A9760091D9AD /* WA_PrivacyVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WA_PrivacyVC.swift; sourceTree = "<group>"; };
|
75A14D912BA1A9760091D9AD /* WA_PrivacyVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WA_PrivacyVC.swift; sourceTree = "<group>"; };
|
||||||
@ -298,14 +330,67 @@
|
|||||||
path = Pods;
|
path = Pods;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
75A8F0E12BB3F28E004B0F5C /* Ranking */ = {
|
752FFF832C48EC3400FDA982 /* Rank */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
752FFF8B2C48F4D200FDA982 /* V */,
|
||||||
|
752FFF842C48EC3B00FDA982 /* C */,
|
||||||
|
);
|
||||||
|
path = Rank;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
752FFF842C48EC3B00FDA982 /* C */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
752FFF852C48EC5000FDA982 /* WA_RankVC.swift */,
|
||||||
|
752FFF862C48EC5000FDA982 /* WA_RankVC.xib */,
|
||||||
|
752FFF892C48F35F00FDA982 /* custlayout.swift */,
|
||||||
|
);
|
||||||
|
path = C;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
752FFF8B2C48F4D200FDA982 /* V */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
752FFF8C2C48F4E400FDA982 /* WA_RankCollectionViewCell.swift */,
|
||||||
|
752FFF8D2C48F4E400FDA982 /* WA_RankCollectionViewCell.xib */,
|
||||||
|
);
|
||||||
|
path = V;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
752FFFB62C49116500FDA982 /* PlayerVC */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
752FFFB72C49116C00FDA982 /* C */,
|
||||||
|
);
|
||||||
|
path = PlayerVC;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
752FFFB72C49116C00FDA982 /* C */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
752FFFB82C49118700FDA982 /* WA_playerVC.swift */,
|
||||||
|
752FFFB92C49118700FDA982 /* WA_playerVC.xib */,
|
||||||
|
755EC36A2C4A378400919ACB /* WA_player4kVC.swift */,
|
||||||
|
755EC36B2C4A378400919ACB /* WA_player4kVC.xib */,
|
||||||
|
755EC36E2C4A469A00919ACB /* WA_playerRankVC.swift */,
|
||||||
|
755EC36F2C4A469A00919ACB /* WA_playerRankVC.xib */,
|
||||||
|
755EC3722C4A4F3600919ACB /* WA_CommunityPlayerVC.swift */,
|
||||||
|
755EC3732C4A4F3600919ACB /* WA_CommunityPlayerVC.xib */,
|
||||||
|
755EC3762C4A517500919ACB /* WA_AddPlayerVC.swift */,
|
||||||
|
755EC3772C4A517500919ACB /* WA_AddPlayerVC.xib */,
|
||||||
|
);
|
||||||
|
path = C;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
75A8F0E12BB3F28E004B0F5C /* Community */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
75A8F1082BB42857004B0F5C /* M */,
|
75A8F1082BB42857004B0F5C /* M */,
|
||||||
75A8F0FE2BB40F43004B0F5C /* V */,
|
75A8F0FE2BB40F43004B0F5C /* V */,
|
||||||
75A8F0E22BB3F294004B0F5C /* C */,
|
75A8F0E22BB3F294004B0F5C /* C */,
|
||||||
);
|
);
|
||||||
path = Ranking;
|
path = Community;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
75A8F0E22BB3F294004B0F5C /* C */ = {
|
75A8F0E22BB3F294004B0F5C /* C */ = {
|
||||||
@ -445,7 +530,9 @@
|
|||||||
75E2881F2B9EB0700049AB56 /* wallpaper_project */ = {
|
75E2881F2B9EB0700049AB56 /* wallpaper_project */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
75A8F0E12BB3F28E004B0F5C /* Ranking */,
|
752FFFB62C49116500FDA982 /* PlayerVC */,
|
||||||
|
752FFF832C48EC3400FDA982 /* Rank */,
|
||||||
|
75A8F0E12BB3F28E004B0F5C /* Community */,
|
||||||
75E288A32BA0542F0049AB56 /* json */,
|
75E288A32BA0542F0049AB56 /* json */,
|
||||||
75E2886B2B9EB4670049AB56 /* Tool */,
|
75E2886B2B9EB4670049AB56 /* Tool */,
|
||||||
75E2885F2B9EB2AC0049AB56 /* Mine */,
|
75E2885F2B9EB2AC0049AB56 /* Mine */,
|
||||||
@ -607,7 +694,8 @@
|
|||||||
75E288A32BA0542F0049AB56 /* json */ = {
|
75E288A32BA0542F0049AB56 /* json */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
757E9AF12BD26A8000EF854A /* GoogleService-Info.plist */,
|
752FFF912C48FEBE00FDA982 /* rank.json */,
|
||||||
|
752FFF792C48B7EB00FDA982 /* GoogleService-Info.plist */,
|
||||||
75A8F1252BB54082004B0F5C /* my_wallpaper.json */,
|
75A8F1252BB54082004B0F5C /* my_wallpaper.json */,
|
||||||
75A8F10B2BB42A32004B0F5C /* rankJson.json */,
|
75A8F10B2BB42A32004B0F5C /* rankJson.json */,
|
||||||
759BB0612BAD35D6001C0031 /* loadProgress.json */,
|
759BB0612BAD35D6001C0031 /* loadProgress.json */,
|
||||||
@ -752,16 +840,19 @@
|
|||||||
75E2888D2B9EFC050049AB56 /* WA_DetailsVC.xib in Resources */,
|
75E2888D2B9EFC050049AB56 /* WA_DetailsVC.xib in Resources */,
|
||||||
75E288792B9ED2A70049AB56 /* WA_4KVC.xib in Resources */,
|
75E288792B9ED2A70049AB56 /* WA_4KVC.xib in Resources */,
|
||||||
75A8F1392BB54664004B0F5C /* WA_NewHometypeCell.xib in Resources */,
|
75A8F1392BB54664004B0F5C /* WA_NewHometypeCell.xib in Resources */,
|
||||||
|
755EC3712C4A469A00919ACB /* WA_playerRankVC.xib in Resources */,
|
||||||
75A8F1022BB40F6F004B0F5C /* WA_RakingCell.xib in Resources */,
|
75A8F1022BB40F6F004B0F5C /* WA_RakingCell.xib in Resources */,
|
||||||
75A8F1352BB54519004B0F5C /* WA_BannerPagerCell.xib in Resources */,
|
75A8F1352BB54519004B0F5C /* WA_BannerPagerCell.xib in Resources */,
|
||||||
75A8F11B2BB51092004B0F5C /* WA_RKDetailsVC.xib in Resources */,
|
75A8F11B2BB51092004B0F5C /* WA_RKDetailsVC.xib in Resources */,
|
||||||
75E2887E2B9EDDC60049AB56 /* WA_WallpaperCollectionCell.xib in Resources */,
|
75E2887E2B9EDDC60049AB56 /* WA_WallpaperCollectionCell.xib in Resources */,
|
||||||
75A8F13D2BB547A9004B0F5C /* WA_NHTypeCollectCell.xib in Resources */,
|
75A8F13D2BB547A9004B0F5C /* WA_NHTypeCollectCell.xib in Resources */,
|
||||||
75E288662B9EB2CF0049AB56 /* WA_HomeVC.xib in Resources */,
|
75E288662B9EB2CF0049AB56 /* WA_HomeVC.xib in Resources */,
|
||||||
757E9AF22BD26A8000EF854A /* GoogleService-Info.plist in Resources */,
|
752FFF7A2C48B7EB00FDA982 /* GoogleService-Info.plist in Resources */,
|
||||||
|
755EC36D2C4A378400919ACB /* WA_player4kVC.xib in Resources */,
|
||||||
75E288872B9EEA820049AB56 /* 4k.json in Resources */,
|
75E288872B9EEA820049AB56 /* 4k.json in Resources */,
|
||||||
75A8F0F02BB3FADF004B0F5C /* WA_HistoryCell.xib in Resources */,
|
75A8F0F02BB3FADF004B0F5C /* WA_HistoryCell.xib in Resources */,
|
||||||
75E2889D2BA034140049AB56 /* WA_LiveVideoVC.xib in Resources */,
|
75E2889D2BA034140049AB56 /* WA_LiveVideoVC.xib in Resources */,
|
||||||
|
752FFF8E2C48F4E400FDA982 /* WA_RankCollectionViewCell.xib in Resources */,
|
||||||
75A8F1232BB510D1004B0F5C /* WA_RKTopCell.xib in Resources */,
|
75A8F1232BB510D1004B0F5C /* WA_RKTopCell.xib in Resources */,
|
||||||
75A8F1312BB54459004B0F5C /* WA_NewHomeBannerCell.xib in Resources */,
|
75A8F1312BB54459004B0F5C /* WA_NewHomeBannerCell.xib in Resources */,
|
||||||
75E288952B9FED680049AB56 /* WA_PreView.xib in Resources */,
|
75E288952B9FED680049AB56 /* WA_PreView.xib in Resources */,
|
||||||
@ -772,15 +863,20 @@
|
|||||||
75A8F0E62BB3F2A6004B0F5C /* WA_RankingVC.xib in Resources */,
|
75A8F0E62BB3F2A6004B0F5C /* WA_RankingVC.xib in Resources */,
|
||||||
75E288752B9ED2970049AB56 /* WA_LIVEVC.xib in Resources */,
|
75E288752B9ED2970049AB56 /* WA_LIVEVC.xib in Resources */,
|
||||||
75A8F1222BB510D1004B0F5C /* WA_RKPLCell.xib in Resources */,
|
75A8F1222BB510D1004B0F5C /* WA_RKPLCell.xib in Resources */,
|
||||||
|
752FFFBA2C49118700FDA982 /* WA_playerVC.xib in Resources */,
|
||||||
|
752FFF872C48EC5000FDA982 /* WA_RankVC.xib in Resources */,
|
||||||
75A8F1262BB54083004B0F5C /* my_wallpaper.json in Resources */,
|
75A8F1262BB54083004B0F5C /* my_wallpaper.json in Resources */,
|
||||||
75A8F0FD2BB3FE0D004B0F5C /* WA_histortRankig.xib in Resources */,
|
75A8F0FD2BB3FE0D004B0F5C /* WA_histortRankig.xib in Resources */,
|
||||||
75A8F1182BB42B43004B0F5C /* WA_MineVC.xib in Resources */,
|
75A8F1182BB42B43004B0F5C /* WA_MineVC.xib in Resources */,
|
||||||
75E288892B9EEA910049AB56 /* live.json in Resources */,
|
75E288892B9EEA910049AB56 /* live.json in Resources */,
|
||||||
75A8F1472BB57742004B0F5C /* WA_ToDayCollectCell.xib in Resources */,
|
75A8F1472BB57742004B0F5C /* WA_ToDayCollectCell.xib in Resources */,
|
||||||
|
752FFF922C48FEBE00FDA982 /* rank.json in Resources */,
|
||||||
75200B6E2BA7D34F00BA65FD /* WA_limitsVCViewController.xib in Resources */,
|
75200B6E2BA7D34F00BA65FD /* WA_limitsVCViewController.xib in Resources */,
|
||||||
75A8F1432BB576C2004B0F5C /* WA_TodayCell.xib in Resources */,
|
75A8F1432BB576C2004B0F5C /* WA_TodayCell.xib in Resources */,
|
||||||
75E288822B9EE56C0049AB56 /* 3d.json in Resources */,
|
75E288822B9EE56C0049AB56 /* 3d.json in Resources */,
|
||||||
|
755EC3752C4A4F3600919ACB /* WA_CommunityPlayerVC.xib in Resources */,
|
||||||
75FEE6082BA420C400E83097 /* WA_TipVC.xib in Resources */,
|
75FEE6082BA420C400E83097 /* WA_TipVC.xib in Resources */,
|
||||||
|
755EC3792C4A517500919ACB /* WA_AddPlayerVC.xib in Resources */,
|
||||||
75A8F12A2BB54220004B0F5C /* WA_NewHomeVC.xib in Resources */,
|
75A8F12A2BB54220004B0F5C /* WA_NewHomeVC.xib in Resources */,
|
||||||
75A8F0F92BB3FDFE004B0F5C /* WA_history4K.xib in Resources */,
|
75A8F0F92BB3FDFE004B0F5C /* WA_history4K.xib in Resources */,
|
||||||
75A14D942BA1A9760091D9AD /* WA_PrivacyVC.xib in Resources */,
|
75A14D942BA1A9760091D9AD /* WA_PrivacyVC.xib in Resources */,
|
||||||
@ -869,9 +965,11 @@
|
|||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
75A8F14E2BB66017004B0F5C /* WA_SCVC.swift in Sources */,
|
75A8F14E2BB66017004B0F5C /* WA_SCVC.swift in Sources */,
|
||||||
|
752FFF882C48EC5000FDA982 /* WA_RankVC.swift in Sources */,
|
||||||
75A8F1242BB510D1004B0F5C /* WA_RKPLCell.swift in Sources */,
|
75A8F1242BB510D1004B0F5C /* WA_RKPLCell.swift in Sources */,
|
||||||
75A8F0F42BB3FDE9004B0F5C /* WA_historyLive.swift in Sources */,
|
75A8F0F42BB3FDE9004B0F5C /* WA_historyLive.swift in Sources */,
|
||||||
75D453892C0EE875003B6B24 /* idfaManager.swift in Sources */,
|
75D453892C0EE875003B6B24 /* idfaManager.swift in Sources */,
|
||||||
|
752FFF8F2C48F4E400FDA982 /* WA_RankCollectionViewCell.swift in Sources */,
|
||||||
75E2887D2B9EDDC60049AB56 /* WA_WallpaperCollectionCell.swift in Sources */,
|
75E2887D2B9EDDC60049AB56 /* WA_WallpaperCollectionCell.swift in Sources */,
|
||||||
75E2889F2BA043960049AB56 /* videoURL.swift in Sources */,
|
75E2889F2BA043960049AB56 /* videoURL.swift in Sources */,
|
||||||
75A8F1212BB510D1004B0F5C /* WA_RKTopCell.swift in Sources */,
|
75A8F1212BB510D1004B0F5C /* WA_RKTopCell.swift in Sources */,
|
||||||
@ -879,9 +977,11 @@
|
|||||||
75FEE6042BA3E14A00E83097 /* PrefixHeader.swift in Sources */,
|
75FEE6042BA3E14A00E83097 /* PrefixHeader.swift in Sources */,
|
||||||
75A8F0FC2BB3FE0D004B0F5C /* WA_histortRankig.swift in Sources */,
|
75A8F0FC2BB3FE0D004B0F5C /* WA_histortRankig.swift in Sources */,
|
||||||
75E2885C2B9EB22E0049AB56 /* WA_RootNAV.swift in Sources */,
|
75E2885C2B9EB22E0049AB56 /* WA_RootNAV.swift in Sources */,
|
||||||
|
752FFF8A2C48F35F00FDA982 /* custlayout.swift in Sources */,
|
||||||
75A8F1172BB42B43004B0F5C /* WA_MineVC.swift in Sources */,
|
75A8F1172BB42B43004B0F5C /* WA_MineVC.swift in Sources */,
|
||||||
75E2886D2B9EB48A0049AB56 /* colorManager.swift in Sources */,
|
75E2886D2B9EB48A0049AB56 /* colorManager.swift in Sources */,
|
||||||
75FEE6012BA3E0ED00E83097 /* Toast.swift in Sources */,
|
75FEE6012BA3E0ED00E83097 /* Toast.swift in Sources */,
|
||||||
|
755EC3782C4A517500919ACB /* WA_AddPlayerVC.swift in Sources */,
|
||||||
75D4538F2C0EFE3A003B6B24 /* NetworkManager.swift in Sources */,
|
75D4538F2C0EFE3A003B6B24 /* NetworkManager.swift in Sources */,
|
||||||
75A8F0E52BB3F2A6004B0F5C /* WA_RankingVC.swift in Sources */,
|
75A8F0E52BB3F2A6004B0F5C /* WA_RankingVC.swift in Sources */,
|
||||||
75E2885A2B9EB22E0049AB56 /* WA_TabButton.swift in Sources */,
|
75E2885A2B9EB22E0049AB56 /* WA_TabButton.swift in Sources */,
|
||||||
@ -893,6 +993,7 @@
|
|||||||
75A8F13F2BB56338004B0F5C /* WallpaperModel.swift in Sources */,
|
75A8F13F2BB56338004B0F5C /* WallpaperModel.swift in Sources */,
|
||||||
75A8F1462BB57742004B0F5C /* WA_ToDayCollectCell.swift in Sources */,
|
75A8F1462BB57742004B0F5C /* WA_ToDayCollectCell.swift in Sources */,
|
||||||
75E2889C2BA034140049AB56 /* WA_LiveVideoVC.swift in Sources */,
|
75E2889C2BA034140049AB56 /* WA_LiveVideoVC.swift in Sources */,
|
||||||
|
752FFFBB2C49118700FDA982 /* WA_playerVC.swift in Sources */,
|
||||||
75E288692B9EB2DF0049AB56 /* WA_SettingSVC.swift in Sources */,
|
75E288692B9EB2DF0049AB56 /* WA_SettingSVC.swift in Sources */,
|
||||||
75FEE5F92BA3037000E83097 /* testVideoVC.swift in Sources */,
|
75FEE5F92BA3037000E83097 /* testVideoVC.swift in Sources */,
|
||||||
75A8F10A2BB4286A004B0F5C /* WA_RakModel.swift in Sources */,
|
75A8F10A2BB4286A004B0F5C /* WA_RakModel.swift in Sources */,
|
||||||
@ -906,6 +1007,8 @@
|
|||||||
75E2885D2B9EB22E0049AB56 /* WA_RootTab.swift in Sources */,
|
75E2885D2B9EB22E0049AB56 /* WA_RootTab.swift in Sources */,
|
||||||
757DA8B82C1BE33E0046CAB6 /* stringADID.swift in Sources */,
|
757DA8B82C1BE33E0046CAB6 /* stringADID.swift in Sources */,
|
||||||
75E288252B9EB0700049AB56 /* ViewController.swift in Sources */,
|
75E288252B9EB0700049AB56 /* ViewController.swift in Sources */,
|
||||||
|
755EC36C2C4A378400919ACB /* WA_player4kVC.swift in Sources */,
|
||||||
|
755EC3742C4A4F3600919ACB /* WA_CommunityPlayerVC.swift in Sources */,
|
||||||
75E288852B9EE5A50049AB56 /* WA_3DModel.swift in Sources */,
|
75E288852B9EE5A50049AB56 /* WA_3DModel.swift in Sources */,
|
||||||
75200B6D2BA7D34F00BA65FD /* WA_limitsVCViewController.swift in Sources */,
|
75200B6D2BA7D34F00BA65FD /* WA_limitsVCViewController.swift in Sources */,
|
||||||
75E288212B9EB0700049AB56 /* AppDelegate.swift in Sources */,
|
75E288212B9EB0700049AB56 /* AppDelegate.swift in Sources */,
|
||||||
@ -914,6 +1017,7 @@
|
|||||||
75FEE60B2BA4212B00E83097 /* WA_tipCell.swift in Sources */,
|
75FEE60B2BA4212B00E83097 /* WA_tipCell.swift in Sources */,
|
||||||
75FEE6022BA3E0ED00E83097 /* JPEG.swift in Sources */,
|
75FEE6022BA3E0ED00E83097 /* JPEG.swift in Sources */,
|
||||||
75A8F13C2BB547A9004B0F5C /* WA_NHTypeCollectCell.swift in Sources */,
|
75A8F13C2BB547A9004B0F5C /* WA_NHTypeCollectCell.swift in Sources */,
|
||||||
|
755EC3702C4A469A00919ACB /* WA_playerRankVC.swift in Sources */,
|
||||||
75A8F0F82BB3FDFE004B0F5C /* WA_history4K.swift in Sources */,
|
75A8F0F82BB3FDFE004B0F5C /* WA_history4K.swift in Sources */,
|
||||||
75E288742B9ED2970049AB56 /* WA_LIVEVC.swift in Sources */,
|
75E288742B9ED2970049AB56 /* WA_LIVEVC.swift in Sources */,
|
||||||
75E288802B9EE36A0049AB56 /* CustomCollectionViewFlowLayout.swift in Sources */,
|
75E288802B9EE36A0049AB56 /* CustomCollectionViewFlowLayout.swift in Sources */,
|
||||||
@ -1112,7 +1216,7 @@
|
|||||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 5;
|
CURRENT_PROJECT_VERSION = 2;
|
||||||
DEVELOPMENT_TEAM = 6HWQW9JC74;
|
DEVELOPMENT_TEAM = 6HWQW9JC74;
|
||||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||||
EXCLUDED_ARCHS = "";
|
EXCLUDED_ARCHS = "";
|
||||||
@ -1133,7 +1237,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 3.5;
|
MARKETING_VERSION = 3.7;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.wallpapaer.hd.live.app;
|
PRODUCT_BUNDLE_IDENTIFIER = com.wallpapaer.hd.live.app;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
@ -1159,7 +1263,7 @@
|
|||||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 5;
|
CURRENT_PROJECT_VERSION = 2;
|
||||||
DEVELOPMENT_TEAM = 6HWQW9JC74;
|
DEVELOPMENT_TEAM = 6HWQW9JC74;
|
||||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||||
EXCLUDED_ARCHS = "";
|
EXCLUDED_ARCHS = "";
|
||||||
@ -1180,7 +1284,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 3.5;
|
MARKETING_VERSION = 3.7;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.wallpapaer.hd.live.app;
|
PRODUCT_BUNDLE_IDENTIFIER = com.wallpapaer.hd.live.app;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// AppDelegate.swift
|
// AppDelegate.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/11.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
import IQKeyboardManagerSwift
|
import IQKeyboardManagerSwift
|
||||||
@ -51,6 +49,16 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
|||||||
let mtgsdk = MTGSDK()
|
let mtgsdk = MTGSDK()
|
||||||
mtgsdk.setAppID("302071", apiKey: "8e642b70b909c249688ccbc7d7d7a164")
|
mtgsdk.setAppID("302071", apiKey: "8e642b70b909c249688ccbc7d7d7a164")
|
||||||
|
|
||||||
|
let userDefaults = UserDefaults.standard
|
||||||
|
if userDefaults.bool(forKey: hasLaunchedBeforeKey){
|
||||||
|
let tt = UserDefaults.standard
|
||||||
|
print("-------\(tt.bool(forKey: "iswindows"))")
|
||||||
|
}else{
|
||||||
|
//第一次启动
|
||||||
|
UserDefaults.standard.set(true, forKey: hasLaunchedBeforeKey)
|
||||||
|
UserDefaults.standard.set(false, forKey: "iswindows")
|
||||||
|
}
|
||||||
|
|
||||||
// let initConfig = ALSdkInitializationConfiguration(sdkKey: "O9SUDhhvnysqkmTqrvetcbJ1wp1OHnxXF9xdpu2TmR4Ppq3w35mn3d2iy2g4OHvGWPl0EJ6D7H5FpGK5izye1A") { builder in
|
// let initConfig = ALSdkInitializationConfiguration(sdkKey: "O9SUDhhvnysqkmTqrvetcbJ1wp1OHnxXF9xdpu2TmR4Ppq3w35mn3d2iy2g4OHvGWPl0EJ6D7H5FpGK5izye1A") { builder in
|
||||||
// builder.mediationProvider = ALMediationProviderMAX
|
// builder.mediationProvider = ALMediationProviderMAX
|
||||||
// }
|
// }
|
||||||
|
|||||||
BIN
wallpaper_project/Assets.xcassets/Tab/Community_n.imageset/Community_off.png
vendored
Normal file
BIN
wallpaper_project/Assets.xcassets/Tab/Community_n.imageset/Community_off.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1015 B |
BIN
wallpaper_project/Assets.xcassets/Tab/Community_n.imageset/Community_off@2x.png
vendored
Normal file
BIN
wallpaper_project/Assets.xcassets/Tab/Community_n.imageset/Community_off@2x.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
BIN
wallpaper_project/Assets.xcassets/Tab/Community_n.imageset/Community_off@3x.png
vendored
Normal file
BIN
wallpaper_project/Assets.xcassets/Tab/Community_n.imageset/Community_off@3x.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
23
wallpaper_project/Assets.xcassets/Tab/Community_n.imageset/Contents.json
vendored
Normal file
23
wallpaper_project/Assets.xcassets/Tab/Community_n.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"filename" : "Community_off.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "Community_off@2x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "Community_off@3x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
wallpaper_project/Assets.xcassets/Tab/Community_s.imageset/Community_on.png
vendored
Normal file
BIN
wallpaper_project/Assets.xcassets/Tab/Community_s.imageset/Community_on.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
BIN
wallpaper_project/Assets.xcassets/Tab/Community_s.imageset/Community_on@2x.png
vendored
Normal file
BIN
wallpaper_project/Assets.xcassets/Tab/Community_s.imageset/Community_on@2x.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
BIN
wallpaper_project/Assets.xcassets/Tab/Community_s.imageset/Community_on@3x.png
vendored
Normal file
BIN
wallpaper_project/Assets.xcassets/Tab/Community_s.imageset/Community_on@3x.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
23
wallpaper_project/Assets.xcassets/Tab/Community_s.imageset/Contents.json
vendored
Normal file
23
wallpaper_project/Assets.xcassets/Tab/Community_s.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"filename" : "Community_on.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "Community_on@2x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "Community_on@3x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_AddVC.swift
|
// WA_AddVC.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/27.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
import SVProgressHUD
|
import SVProgressHUD
|
||||||
@ -97,7 +95,7 @@ class WA_AddVC: WA_RootVC,UITextViewDelegate {
|
|||||||
self.fetchRemoteConfig()
|
self.fetchRemoteConfig()
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
WA_TabbarCommon.TabBarController()
|
// WA_TabbarCommon.TabBarController()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -263,6 +261,10 @@ extension WA_AddVC:MTGNewInterstitialBidAdDelegate{
|
|||||||
|
|
||||||
func newInterstitialBidAdShowFail(_ error: any Error, adManager: MTGNewInterstitialBidAdManager) {
|
func newInterstitialBidAdShowFail(_ error: any Error, adManager: MTGNewInterstitialBidAdManager) {
|
||||||
print("广告展示失败")
|
print("广告展示失败")
|
||||||
|
SVProgressHUD.showInfo(withStatus: "Successfully published, waiting for review")
|
||||||
|
DispatchQueue.global().asyncAfter(deadline: .now() + 2) {
|
||||||
|
SVProgressHUD.dismiss()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func newInterstitialBidAdPlayCompleted(_ adManager: MTGNewInterstitialBidAdManager) {
|
func newInterstitialBidAdPlayCompleted(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_RKDetailsVC.swift
|
// WA_RKDetailsVC.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/17.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
import SVProgressHUD
|
import SVProgressHUD
|
||||||
@ -77,11 +75,8 @@ class WA_RKDetailsVC: WA_RootVC,UITextFieldDelegate {
|
|||||||
override func viewWillAppear(_ animated: Bool) {
|
override func viewWillAppear(_ animated: Bool) {
|
||||||
super.viewWillAppear(animated)
|
super.viewWillAppear(animated)
|
||||||
// 初始化 Remote Config
|
// 初始化 Remote Config
|
||||||
// 初始化 Remote Config
|
|
||||||
remoteConfig = RemoteConfig.remoteConfig()
|
remoteConfig = RemoteConfig.remoteConfig()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 设置最小获取间隔(开发期间可以设置较小的值)
|
// 设置最小获取间隔(开发期间可以设置较小的值)
|
||||||
let settings = RemoteConfigSettings()
|
let settings = RemoteConfigSettings()
|
||||||
settings.minimumFetchInterval = 0
|
settings.minimumFetchInterval = 0
|
||||||
@ -90,19 +85,17 @@ class WA_RKDetailsVC: WA_RootVC,UITextFieldDelegate {
|
|||||||
remoteConfig.setDefaults(fromPlist: "isopen")
|
remoteConfig.setDefaults(fromPlist: "isopen")
|
||||||
// Fetch 配置值
|
// Fetch 配置值
|
||||||
|
|
||||||
let param = MTGBiddingRequestParameter(placementId: "1636950", unitId: "3501963", basePrice: nil)
|
let param = MTGBiddingRequestParameter(placementId: "1650169", unitId: "3158993", basePrice: nil)
|
||||||
|
|
||||||
MTGBiddingRequest.getBidWith(param) { bidResponse in
|
MTGBiddingRequest.getBidWith(param) { bidResponse in
|
||||||
if bidResponse.success{
|
if bidResponse.success{
|
||||||
self.bidToken = bidResponse.bidToken
|
self.bidToken = bidResponse.bidToken
|
||||||
bidResponse.notifyWin()
|
bidResponse.notifyWin()
|
||||||
self.newInterstitialAdManager = MTGNewInterstitialBidAdManager(placementId: "1636950", unitId: "3501963", delegate: self)
|
self.newInterstitialAdManager = MTGNewInterstitialBidAdManager(placementId: "1650169", unitId: "3158993", delegate: self)
|
||||||
self.newInterstitialAdManager?.loadAd(withBidToken:self.bidToken!)
|
self.newInterstitialAdManager?.loadAd(withBidToken:self.bidToken!)
|
||||||
self.fetchRemoteConfig()
|
self.fetchRemoteConfig()
|
||||||
|
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
WA_TabbarCommon.TabBarController()
|
// WA_TabbarCommon.TabBarController()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -428,6 +421,7 @@ extension WA_RKDetailsVC:MTGNewInterstitialBidAdDelegate{
|
|||||||
|
|
||||||
func newInterstitialBidAdLoadSuccess(_ adManager: MTGNewInterstitialBidAdManager) {
|
func newInterstitialBidAdLoadSuccess(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
print("广告加载成功")
|
print("广告加载成功")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -445,6 +439,17 @@ extension WA_RKDetailsVC:MTGNewInterstitialBidAdDelegate{
|
|||||||
|
|
||||||
func newInterstitialBidAdShowFail(_ error: any Error, adManager: MTGNewInterstitialBidAdManager) {
|
func newInterstitialBidAdShowFail(_ error: any Error, adManager: MTGNewInterstitialBidAdManager) {
|
||||||
print("广告展示失败")
|
print("广告展示失败")
|
||||||
|
if isLoggedIn(){
|
||||||
|
self.plBtn.isHidden = true
|
||||||
|
textField.isHidden = false
|
||||||
|
textField.becomeFirstResponder()
|
||||||
|
|
||||||
|
}else{
|
||||||
|
let vc = WA_LoginVC()
|
||||||
|
vc.type = 1
|
||||||
|
self.navigationController?.pushViewController(vc, animated: true)
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func newInterstitialBidAdPlayCompleted(_ adManager: MTGNewInterstitialBidAdManager) {
|
func newInterstitialBidAdPlayCompleted(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_RankingVC.swift
|
// WA_RankingVC.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/27.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
import FirebaseAnalytics
|
import FirebaseAnalytics
|
||||||
@ -123,11 +121,12 @@ class WA_RankingVC: WA_RootVC {
|
|||||||
self.bidToken = bidResponse.bidToken
|
self.bidToken = bidResponse.bidToken
|
||||||
bidResponse.notifyWin()
|
bidResponse.notifyWin()
|
||||||
self.newInterstitialAdManager = MTGNewInterstitialBidAdManager(placementId: "1636950", unitId: "3501963", delegate: self)
|
self.newInterstitialAdManager = MTGNewInterstitialBidAdManager(placementId: "1636950", unitId: "3501963", delegate: self)
|
||||||
|
StartManager.shared.ecpm = Float(bidResponse.price)
|
||||||
self.newInterstitialAdManager?.loadAd(withBidToken:self.bidToken!)
|
self.newInterstitialAdManager?.loadAd(withBidToken:self.bidToken!)
|
||||||
self.fetchRemoteConfig()
|
self.fetchRemoteConfig()
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
WA_TabbarCommon.TabBarController()
|
// WA_TabbarCommon.TabBarController()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -408,6 +407,7 @@ extension WA_RankingVC:UITableViewDelegate,UITableViewDataSource{
|
|||||||
if self.isadshow == true{
|
if self.isadshow == true{
|
||||||
if ((issureready) != nil) {
|
if ((issureready) != nil) {
|
||||||
newInterstitialAdManager?.show(from: self)
|
newInterstitialAdManager?.show(from: self)
|
||||||
|
setPostSHOW()
|
||||||
}else{
|
}else{
|
||||||
let vc = WA_RKDetailsVC()
|
let vc = WA_RKDetailsVC()
|
||||||
vc.model = MKArr[indexPath.row]
|
vc.model = MKArr[indexPath.row]
|
||||||
@ -434,6 +434,18 @@ extension WA_RankingVC:MTGNewInterstitialBidAdDelegate{
|
|||||||
|
|
||||||
func newInterstitialBidAdLoadSuccess(_ adManager: MTGNewInterstitialBidAdManager) {
|
func newInterstitialBidAdLoadSuccess(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
print("广告加载成功")
|
print("广告加载成功")
|
||||||
|
StartManager.shared.succeed = true
|
||||||
|
// StartManager.shared.loadTime = self.adLoadTime
|
||||||
|
StartManager.shared.adPlatform = "mbridge"
|
||||||
|
StartManager.shared.countryCode = ALSdk.shared().configuration.countryCode
|
||||||
|
StartManager.shared.adId = "3501963"
|
||||||
|
StartManager.shared.platformResponseTime = 0
|
||||||
|
// StartManager.shared.ecpm = Float(ad.revenue)
|
||||||
|
StartManager.shared.dsp = ""
|
||||||
|
StartManager.shared.network = ""
|
||||||
|
|
||||||
|
|
||||||
|
setPostload()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -451,6 +463,22 @@ extension WA_RankingVC:MTGNewInterstitialBidAdDelegate{
|
|||||||
|
|
||||||
func newInterstitialBidAdShowFail(_ error: any Error, adManager: MTGNewInterstitialBidAdManager) {
|
func newInterstitialBidAdShowFail(_ error: any Error, adManager: MTGNewInterstitialBidAdManager) {
|
||||||
print("广告展示失败")
|
print("广告展示失败")
|
||||||
|
if self.isseleted == false{
|
||||||
|
if isLoggedIn(){
|
||||||
|
let vc = WA_AddVC()
|
||||||
|
vc.modalPresentationStyle = .fullScreen
|
||||||
|
self.present(vc, animated: true)
|
||||||
|
|
||||||
|
}else{
|
||||||
|
let vc = WA_LoginVC()
|
||||||
|
self.navigationController?.pushViewController(vc, animated: true)
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
let vc = WA_RKDetailsVC()
|
||||||
|
vc.model = MKArr[indexrow!]
|
||||||
|
self.navigationController?.pushViewController(vc, animated: true)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func newInterstitialBidAdPlayCompleted(_ adManager: MTGNewInterstitialBidAdManager) {
|
func newInterstitialBidAdPlayCompleted(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_RakModel.swift
|
// WA_RakModel.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/27.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
@objcMembers
|
@objcMembers
|
||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_RKPLCell.swift
|
// WA_RKPLCell.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/17.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
import SDWebImage
|
import SDWebImage
|
||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_RKTopCell.swift
|
// WA_RKTopCell.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/17.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
@ -1,9 +1,8 @@
|
|||||||
//
|
//
|
||||||
// WA_RakingCell.swift
|
// WA_RakingCell.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/27.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WallPaperPCH.pch
|
// WallPaperPCH.pch
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/11.
|
|
||||||
//
|
|
||||||
#import "wallpaper_project"
|
#import "wallpaper_project"
|
||||||
#ifndef WallPaperPCH_pch
|
#ifndef WallPaperPCH_pch
|
||||||
#define WallPaperPCH_pch
|
#define WallPaperPCH_pch
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// Wallpaper_Header.h
|
// Wallpaper_Header.h
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/11.
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef Wallpaper_Header_h
|
#ifndef Wallpaper_Header_h
|
||||||
#define Wallpaper_Header_h
|
#define Wallpaper_Header_h
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_HistoryVC.swift
|
// WA_HistoryVC.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/27.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
import JXSegmentedView
|
import JXSegmentedView
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_histortRankig.swift
|
// WA_histortRankig.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/27.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
import JXSegmentedView
|
import JXSegmentedView
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_history4K.swift
|
// WA_history4K.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/27.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
import JXSegmentedView
|
import JXSegmentedView
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_historyLive.swift
|
// WA_historyLive.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/27.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
import JXSegmentedView
|
import JXSegmentedView
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_NewHomeVC.swift
|
// WA_NewHomeVC.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/28.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
import AppLovinSDK
|
import AppLovinSDK
|
||||||
@ -200,7 +198,6 @@ extension WA_NewHomeVC:UITableViewDelegate,UITableViewDataSource{
|
|||||||
let vc = WA_4KVC()
|
let vc = WA_4KVC()
|
||||||
vc.type = type
|
vc.type = type
|
||||||
self.navigationController?.pushViewController(vc, animated: true)
|
self.navigationController?.pushViewController(vc, animated: true)
|
||||||
|
|
||||||
}
|
}
|
||||||
return cell
|
return cell
|
||||||
}else if indexPath.section == 2{
|
}else if indexPath.section == 2{
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_BannerPagerCell.swift
|
// WA_BannerPagerCell.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/28.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
import FSPagerView
|
import FSPagerView
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_MonRankngCell.swift
|
// WA_MonRankngCell.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/28.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_NHTypeCollectCell.swift
|
// WA_NHTypeCollectCell.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/28.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_NewHomeBannerCell.swift
|
// WA_NewHomeBannerCell.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/28.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
import FSPagerView
|
import FSPagerView
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_NewHometypeCell.swift
|
// WA_NewHometypeCell.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/28.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_ToDayCollectCell.swift
|
// WA_ToDayCollectCell.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/28.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
import SDWebImage
|
import SDWebImage
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_TodayCell.swift
|
// WA_TodayCell.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/28.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_4KVC.swift
|
// WA_4KVC.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/11.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
import JXSegmentedView
|
import JXSegmentedView
|
||||||
@ -141,6 +139,7 @@ class WA_4KVC: WA_RootVC {
|
|||||||
if self.isadshow == true{
|
if self.isadshow == true{
|
||||||
if ((issureready) != nil) {
|
if ((issureready) != nil) {
|
||||||
newInterstitialAdManager?.show(from: self)
|
newInterstitialAdManager?.show(from: self)
|
||||||
|
self.setPostSHOW()
|
||||||
}else{
|
}else{
|
||||||
self.navigationController?.popViewController(animated: true)
|
self.navigationController?.popViewController(animated: true)
|
||||||
}
|
}
|
||||||
@ -204,18 +203,19 @@ class WA_4KVC: WA_RootVC {
|
|||||||
remoteConfig.configSettings = settings
|
remoteConfig.configSettings = settings
|
||||||
// Fetch 配置值
|
// Fetch 配置值
|
||||||
remoteConfig.setDefaults(fromPlist: "isopen")
|
remoteConfig.setDefaults(fromPlist: "isopen")
|
||||||
let param = MTGBiddingRequestParameter(placementId: "1636950", unitId: "3501963", basePrice: nil)
|
let param = MTGBiddingRequestParameter(placementId: "1650177", unitId: "3519003", basePrice: nil)
|
||||||
|
|
||||||
MTGBiddingRequest.getBidWith(param) { bidResponse in
|
MTGBiddingRequest.getBidWith(param) { bidResponse in
|
||||||
if bidResponse.success{
|
if bidResponse.success{
|
||||||
self.bidToken = bidResponse.bidToken
|
self.bidToken = bidResponse.bidToken
|
||||||
bidResponse.notifyWin()
|
bidResponse.notifyWin()
|
||||||
self.newInterstitialAdManager = MTGNewInterstitialBidAdManager(placementId: "1636950", unitId: "3501963", delegate: self)
|
self.newInterstitialAdManager = MTGNewInterstitialBidAdManager(placementId: "1650177", unitId: "3519003", delegate: self)
|
||||||
|
StartManager.shared.ecpm = Float(bidResponse.price)
|
||||||
self.newInterstitialAdManager?.loadAd(withBidToken:self.bidToken!)
|
self.newInterstitialAdManager?.loadAd(withBidToken:self.bidToken!)
|
||||||
self.fetchRemoteConfig()
|
self.fetchRemoteConfig()
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
WA_TabbarCommon.TabBarController()
|
// WA_TabbarCommon.TabBarController()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// fetchRemoteConfig()
|
// fetchRemoteConfig()
|
||||||
@ -449,6 +449,18 @@ extension WA_4KVC:MTGNewInterstitialBidAdDelegate{
|
|||||||
|
|
||||||
func newInterstitialBidAdLoadSuccess(_ adManager: MTGNewInterstitialBidAdManager) {
|
func newInterstitialBidAdLoadSuccess(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
print("广告加载成功")
|
print("广告加载成功")
|
||||||
|
StartManager.shared.succeed = true
|
||||||
|
// StartManager.shared.loadTime = self.adLoadTime
|
||||||
|
StartManager.shared.adPlatform = "mbridge"
|
||||||
|
StartManager.shared.countryCode = ALSdk.shared().configuration.countryCode
|
||||||
|
StartManager.shared.adId = "3519003"
|
||||||
|
StartManager.shared.platformResponseTime = 0
|
||||||
|
// StartManager.shared.ecpm = Float(ad.revenue)
|
||||||
|
StartManager.shared.dsp = ""
|
||||||
|
StartManager.shared.network = ""
|
||||||
|
|
||||||
|
|
||||||
|
setPostload()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -466,6 +478,7 @@ extension WA_4KVC:MTGNewInterstitialBidAdDelegate{
|
|||||||
|
|
||||||
func newInterstitialBidAdShowFail(_ error: any Error, adManager: MTGNewInterstitialBidAdManager) {
|
func newInterstitialBidAdShowFail(_ error: any Error, adManager: MTGNewInterstitialBidAdManager) {
|
||||||
print("广告展示失败")
|
print("广告展示失败")
|
||||||
|
self.navigationController?.popViewController(animated: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
func newInterstitialBidAdPlayCompleted(_ adManager: MTGNewInterstitialBidAdManager) {
|
func newInterstitialBidAdPlayCompleted(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
@ -587,6 +600,7 @@ extension WA_4KVC:UICollectionViewDelegate,UICollectionViewDataSource,UICollecti
|
|||||||
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
|
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
|
||||||
let vc = WA_DetailsVC()
|
let vc = WA_DetailsVC()
|
||||||
vc.type = self.type
|
vc.type = self.type
|
||||||
|
if StartManager.shared.superHero == true{
|
||||||
if self.type == 1{
|
if self.type == 1{
|
||||||
vc.model = self.wallpapers[indexPath.row]
|
vc.model = self.wallpapers[indexPath.row]
|
||||||
navigationController?.pushViewController(vc, animated: true)
|
navigationController?.pushViewController(vc, animated: true)
|
||||||
@ -606,9 +620,29 @@ extension WA_4KVC:UICollectionViewDelegate,UICollectionViewDataSource,UICollecti
|
|||||||
vc.modeltype = self.FlowersWallpapers[indexPath.row]
|
vc.modeltype = self.FlowersWallpapers[indexPath.row]
|
||||||
navigationController?.pushViewController(vc, animated: true)
|
navigationController?.pushViewController(vc, animated: true)
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
if self.type == 1{
|
||||||
|
vc.model = self.wallpapers[indexPath.row]
|
||||||
|
navigationController?.pushViewController(vc, animated: true)
|
||||||
|
}else if type == 2{
|
||||||
|
vc.modeltype = self.newestWallpapers[indexPath.row]
|
||||||
|
navigationController?.pushViewController(vc, animated: true)
|
||||||
|
}else if type == 3{
|
||||||
|
vc.modeltype = self.popularWallpapers[indexPath.row]
|
||||||
|
navigationController?.pushViewController(vc, animated: true)
|
||||||
|
}else if type == 4{
|
||||||
|
vc.modeltype = self.ChristmasWallpapers[indexPath.row]
|
||||||
|
navigationController?.pushViewController(vc, animated: true)
|
||||||
|
}else{
|
||||||
|
vc.modeltype = self.FlowersWallpapers[indexPath.row]
|
||||||
|
navigationController?.pushViewController(vc, animated: true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//if self.type == 1{
|
//if self.type == 1{
|
||||||
// return self.wallpapers.count
|
// return self.wallpapers.count
|
||||||
//}else if type == 2{
|
//}else if type == 2{
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_DetailsVC.swift
|
// WA_DetailsVC.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/11.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
import SDWebImage
|
import SDWebImage
|
||||||
@ -109,95 +107,96 @@ class WA_DetailsVC: WA_RootVC {
|
|||||||
Analytics.logEvent("touch_savephoto", parameters: nil)
|
Analytics.logEvent("touch_savephoto", parameters: nil)
|
||||||
self.activityView.startAnimating()
|
self.activityView.startAnimating()
|
||||||
saveImageToPhotoLibrary()
|
saveImageToPhotoLibrary()
|
||||||
//
|
//
|
||||||
// if self.isadshow == true{
|
// if self.isadshow == true{
|
||||||
// DispatchQueue.main.asyncAfter(wallDeadline: .now() + 0.5) {
|
// DispatchQueue.main.asyncAfter(wallDeadline: .now() + 0.5) {
|
||||||
// if self.interstitialAd.isReady {
|
// if self.interstitialAd.isReady {
|
||||||
// self.interstitialAd.show()
|
// self.interstitialAd.show()
|
||||||
// Analytics.logEvent("details_load_success", parameters: nil)
|
// Analytics.logEvent("details_load_success", parameters: nil)
|
||||||
// self.setPostSHOW()
|
// self.setPostSHOW()
|
||||||
// let logMessage = """
|
// let logMessage = """
|
||||||
// deviceId: \(StartManager.shared.devicID ?? "")
|
// deviceId: \(StartManager.shared.devicID ?? "")
|
||||||
// localIp: \(StartManager.shared.localIP ?? "")
|
// localIp: \(StartManager.shared.localIP ?? "")
|
||||||
// "deviceId": \(StartManager.shared.devicID ?? ""),
|
// "deviceId": \(StartManager.shared.devicID ?? ""),
|
||||||
// "localIp": \(StartManager.shared.localIP ?? ""),
|
// "localIp": \(StartManager.shared.localIP ?? ""),
|
||||||
// "remoteIp": \(StartManager.shared.publicIP ?? ""),
|
// "remoteIp": \(StartManager.shared.publicIP ?? ""),
|
||||||
// "linkId": "",
|
// "linkId": "",
|
||||||
// "packageName": "com.wallpapaer.hd.live.app",
|
// "packageName": "com.wallpapaer.hd.live.app",
|
||||||
// "gaid": \(StartManager.shared.idfaid ?? ""),
|
// "gaid": \(StartManager.shared.idfaid ?? ""),
|
||||||
// "dataId": "",
|
// "dataId": "",
|
||||||
// "shelfNumber": "壁纸详情点击保存",
|
// "shelfNumber": "壁纸详情点击保存",
|
||||||
// "succeed": \(StartManager.shared.succeed),
|
// "succeed": \(StartManager.shared.succeed),
|
||||||
// "loadTime": \(StartManager.shared.loadTime ?? 0),
|
// "loadTime": \(StartManager.shared.loadTime ?? 0),
|
||||||
// "adPlatform": \(StartManager.shared.adPlatform ?? ""),
|
// "adPlatform": \(StartManager.shared.adPlatform ?? ""),
|
||||||
// "countryCode": \(StartManager.shared.countryCode ?? ""),
|
// "countryCode": \(StartManager.shared.countryCode ?? ""),
|
||||||
// "adId": \(StartManager.shared.adId ?? ""),
|
// "adId": \(StartManager.shared.adId ?? ""),
|
||||||
// "platformResponseTime": \(StartManager.shared.platformResponseTime ?? 0.0),
|
// "platformResponseTime": \(StartManager.shared.platformResponseTime ?? 0.0),
|
||||||
// "getIpResponseTime": \(StartManager.shared.getIpResponseTime ?? 0.0),
|
// "getIpResponseTime": \(StartManager.shared.getIpResponseTime ?? 0.0),
|
||||||
// "ecpm": \(StartManager.shared.ecpm ?? 0.0),
|
// "ecpm": \(StartManager.shared.ecpm ?? 0.0),
|
||||||
// "dsp": \(StartManager.shared.dsp ?? ""),
|
// "dsp": \(StartManager.shared.dsp ?? ""),
|
||||||
// "network": \(StartManager.shared.network ?? "")
|
// "network": \(StartManager.shared.network ?? "")
|
||||||
// """
|
// """
|
||||||
// AppDelegate.shared.addLogMessage(logMessage)
|
// AppDelegate.shared.addLogMessage(logMessage)
|
||||||
// }else{
|
// }else{
|
||||||
// print("-------广告没准备好")
|
// print("-------广告没准备好")
|
||||||
// Analytics.logEvent("details_load_fail", parameters: nil)
|
// Analytics.logEvent("details_load_fail", parameters: nil)
|
||||||
// DispatchQueue.global().asyncAfter(deadline: .now() + 1.5) {
|
// DispatchQueue.global().asyncAfter(deadline: .now() + 1.5) {
|
||||||
// DispatchQueue.main.asyncAfter(deadline: .now() + 0){
|
// DispatchQueue.main.asyncAfter(deadline: .now() + 0){
|
||||||
// self.activityView.stopAnimating()
|
// self.activityView.stopAnimating()
|
||||||
// // self.view.makeToast("Save Success", duration: 1.5, position: .center)
|
// // self.view.makeToast("Save Success", duration: 1.5, position: .center)
|
||||||
// // 创建一个 UIAlertController
|
// // 创建一个 UIAlertController
|
||||||
// let alertController = UIAlertController(title: "Successfully saved", message: "Do you need to set up a tutorial", preferredStyle: .alert)
|
// let alertController = UIAlertController(title: "Successfully saved", message: "Do you need to set up a tutorial", preferredStyle: .alert)
|
||||||
//
|
//
|
||||||
// // 添加一个取消按钮
|
// // 添加一个取消按钮
|
||||||
// alertController.addAction(UIAlertAction(title: "cancel", style: .cancel, handler: nil))
|
// alertController.addAction(UIAlertAction(title: "cancel", style: .cancel, handler: nil))
|
||||||
//
|
//
|
||||||
// // 添加一个确定按钮
|
// // 添加一个确定按钮
|
||||||
// alertController.addAction(UIAlertAction(title: "Need", style: .default, handler: { action in
|
// alertController.addAction(UIAlertAction(title: "Need", style: .default, handler: { action in
|
||||||
// // 点击确定按钮后执行的操作
|
// // 点击确定按钮后执行的操作
|
||||||
// // print("点击了确定按钮")
|
// // print("点击了确定按钮")
|
||||||
// let vc = WA_TipVC()
|
// let vc = WA_TipVC()
|
||||||
// self.present(vc, animated: true)
|
// self.present(vc, animated: true)
|
||||||
// }))
|
// }))
|
||||||
//
|
//
|
||||||
// // 在当前视图控制器中 present 显示提示框
|
// // 在当前视图控制器中 present 显示提示框
|
||||||
// self.present(alertController, animated: true, completion: nil)
|
// self.present(alertController, animated: true, completion: nil)
|
||||||
//
|
//
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// }else{
|
// }else{
|
||||||
// Analytics.logEvent("details_load_fail", parameters: nil)
|
// Analytics.logEvent("details_load_fail", parameters: nil)
|
||||||
// DispatchQueue.global().asyncAfter(deadline: .now() + 1.5) {
|
// DispatchQueue.global().asyncAfter(deadline: .now() + 1.5) {
|
||||||
// DispatchQueue.main.asyncAfter(deadline: .now() + 0){
|
// DispatchQueue.main.asyncAfter(deadline: .now() + 0){
|
||||||
// self.activityView.stopAnimating()
|
// self.activityView.stopAnimating()
|
||||||
// // self.view.makeToast("Save Success", duration: 1.5, position: .center)
|
// // self.view.makeToast("Save Success", duration: 1.5, position: .center)
|
||||||
// // 创建一个 UIAlertController
|
// // 创建一个 UIAlertController
|
||||||
// let alertController = UIAlertController(title: "Successfully saved", message: "Do you need to set up a tutorial", preferredStyle: .alert)
|
// let alertController = UIAlertController(title: "Successfully saved", message: "Do you need to set up a tutorial", preferredStyle: .alert)
|
||||||
//
|
//
|
||||||
// // 添加一个取消按钮
|
// // 添加一个取消按钮
|
||||||
// alertController.addAction(UIAlertAction(title: "cancel", style: .cancel, handler: nil))
|
// alertController.addAction(UIAlertAction(title: "cancel", style: .cancel, handler: nil))
|
||||||
//
|
//
|
||||||
// // 添加一个确定按钮
|
// // 添加一个确定按钮
|
||||||
// alertController.addAction(UIAlertAction(title: "Need", style: .default, handler: { action in
|
// alertController.addAction(UIAlertAction(title: "Need", style: .default, handler: { action in
|
||||||
// // 点击确定按钮后执行的操作
|
// // 点击确定按钮后执行的操作
|
||||||
// // print("点击了确定按钮")
|
// // print("点击了确定按钮")
|
||||||
// let vc = WA_TipVC()
|
// let vc = WA_TipVC()
|
||||||
// self.present(vc, animated: true)
|
// self.present(vc, animated: true)
|
||||||
// }))
|
// }))
|
||||||
//
|
//
|
||||||
// // 在当前视图控制器中 present 显示提示框
|
// // 在当前视图控制器中 present 显示提示框
|
||||||
// self.present(alertController, animated: true, completion: nil)
|
// self.present(alertController, animated: true, completion: nil)
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// }
|
// }
|
||||||
let issureready = newInterstitialAdManager?.isAdReady()
|
let issureready = newInterstitialAdManager?.isAdReady()
|
||||||
if self.isadshow == true{
|
if self.isadshow == true{
|
||||||
if ((issureready) != nil) {
|
if ((issureready) != nil) {
|
||||||
newInterstitialAdManager?.show(from: self)
|
newInterstitialAdManager?.show(from: self)
|
||||||
|
self.setPostSHOW()
|
||||||
}else{
|
}else{
|
||||||
DispatchQueue.global().asyncAfter(deadline: .now() + 1.5) {
|
DispatchQueue.global().asyncAfter(deadline: .now() + 1.5) {
|
||||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0){
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0){
|
||||||
@ -253,7 +252,7 @@ class WA_DetailsVC: WA_RootVC {
|
|||||||
override func viewWillAppear(_ animated: Bool) {
|
override func viewWillAppear(_ animated: Bool) {
|
||||||
super.viewWillAppear(animated)
|
super.viewWillAppear(animated)
|
||||||
navigationController?.navigationBar.isHidden = true
|
navigationController?.navigationBar.isHidden = true
|
||||||
// self.createInterstitialAd()
|
// self.createInterstitialAd()
|
||||||
|
|
||||||
// 初始化 Remote Config
|
// 初始化 Remote Config
|
||||||
remoteConfig = RemoteConfig.remoteConfig()
|
remoteConfig = RemoteConfig.remoteConfig()
|
||||||
@ -278,7 +277,7 @@ class WA_DetailsVC: WA_RootVC {
|
|||||||
self.fetchRemoteConfig()
|
self.fetchRemoteConfig()
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
WA_TabbarCommon.TabBarController()
|
// WA_TabbarCommon.TabBarController()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -521,42 +520,42 @@ class WA_DetailsVC: WA_RootVC {
|
|||||||
@IBAction func back(_ sender: Any) {
|
@IBAction func back(_ sender: Any) {
|
||||||
isback = true
|
isback = true
|
||||||
|
|
||||||
// if self.isadshow == true{
|
// if self.isadshow == true{
|
||||||
// DispatchQueue.main.asyncAfter(wallDeadline: .now() + 0.5) {
|
// DispatchQueue.main.asyncAfter(wallDeadline: .now() + 0.5) {
|
||||||
// if self.interstitialAd.isReady {
|
// if self.interstitialAd.isReady {
|
||||||
// self.interstitialAd.show()
|
// self.interstitialAd.show()
|
||||||
// Analytics.logEvent("details_load_success", parameters: nil)
|
// Analytics.logEvent("details_load_success", parameters: nil)
|
||||||
// self.setPostSHOW()
|
// self.setPostSHOW()
|
||||||
// let logMessage = """
|
// let logMessage = """
|
||||||
// deviceId: \(StartManager.shared.devicID ?? "")
|
// deviceId: \(StartManager.shared.devicID ?? "")
|
||||||
// localIp: \(StartManager.shared.localIP ?? "")
|
// localIp: \(StartManager.shared.localIP ?? "")
|
||||||
// "deviceId": \(StartManager.shared.devicID ?? ""),
|
// "deviceId": \(StartManager.shared.devicID ?? ""),
|
||||||
// "localIp": \(StartManager.shared.localIP ?? ""),
|
// "localIp": \(StartManager.shared.localIP ?? ""),
|
||||||
// "remoteIp": \(StartManager.shared.publicIP ?? ""),
|
// "remoteIp": \(StartManager.shared.publicIP ?? ""),
|
||||||
// "linkId": "",
|
// "linkId": "",
|
||||||
// "packageName": "com.wallpapaer.hd.live.app",
|
// "packageName": "com.wallpapaer.hd.live.app",
|
||||||
// "gaid": \(StartManager.shared.idfaid ?? ""),
|
// "gaid": \(StartManager.shared.idfaid ?? ""),
|
||||||
// "dataId": "",
|
// "dataId": "",
|
||||||
// "shelfNumber": "壁纸详情返回",
|
// "shelfNumber": "壁纸详情返回",
|
||||||
// "succeed": \(StartManager.shared.succeed),
|
// "succeed": \(StartManager.shared.succeed),
|
||||||
// "loadTime": \(StartManager.shared.loadTime ?? 0),
|
// "loadTime": \(StartManager.shared.loadTime ?? 0),
|
||||||
// "adPlatform": \(StartManager.shared.adPlatform ?? ""),
|
// "adPlatform": \(StartManager.shared.adPlatform ?? ""),
|
||||||
// "countryCode": \(StartManager.shared.countryCode ?? ""),
|
// "countryCode": \(StartManager.shared.countryCode ?? ""),
|
||||||
// "adId": \(StartManager.shared.adId ?? ""),
|
// "adId": \(StartManager.shared.adId ?? ""),
|
||||||
// "platformResponseTime": \(StartManager.shared.platformResponseTime ?? 0.0),
|
// "platformResponseTime": \(StartManager.shared.platformResponseTime ?? 0.0),
|
||||||
// "getIpResponseTime": \(StartManager.shared.getIpResponseTime ?? 0.0),
|
// "getIpResponseTime": \(StartManager.shared.getIpResponseTime ?? 0.0),
|
||||||
// "ecpm": \(StartManager.shared.ecpm ?? 0.0),
|
// "ecpm": \(StartManager.shared.ecpm ?? 0.0),
|
||||||
// "dsp": \(StartManager.shared.dsp ?? ""),
|
// "dsp": \(StartManager.shared.dsp ?? ""),
|
||||||
// "network": \(StartManager.shared.network ?? "")
|
// "network": \(StartManager.shared.network ?? "")
|
||||||
// """
|
// """
|
||||||
// AppDelegate.shared.addLogMessage(logMessage)
|
// AppDelegate.shared.addLogMessage(logMessage)
|
||||||
// }else{
|
// }else{
|
||||||
// self.navigationController?.popViewController(animated: true)
|
// self.navigationController?.popViewController(animated: true)
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }else{
|
// }else{
|
||||||
// self.navigationController?.popViewController(animated: true)
|
// self.navigationController?.popViewController(animated: true)
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
let issureready = newInterstitialAdManager?.isAdReady()
|
let issureready = newInterstitialAdManager?.isAdReady()
|
||||||
@ -668,6 +667,18 @@ extension WA_DetailsVC:MTGNewInterstitialBidAdDelegate{
|
|||||||
|
|
||||||
func newInterstitialBidAdLoadSuccess(_ adManager: MTGNewInterstitialBidAdManager) {
|
func newInterstitialBidAdLoadSuccess(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
print("广告加载成功")
|
print("广告加载成功")
|
||||||
|
StartManager.shared.succeed = true
|
||||||
|
// StartManager.shared.loadTime = self.adLoadTime
|
||||||
|
StartManager.shared.adPlatform = "mbridge"
|
||||||
|
StartManager.shared.countryCode = ALSdk.shared().configuration.countryCode
|
||||||
|
StartManager.shared.adId = "3501963"
|
||||||
|
StartManager.shared.platformResponseTime = 0
|
||||||
|
// StartManager.shared.ecpm = Float(ad.revenue)
|
||||||
|
StartManager.shared.dsp = ""
|
||||||
|
StartManager.shared.network = ""
|
||||||
|
|
||||||
|
|
||||||
|
setPostload()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -685,6 +696,35 @@ extension WA_DetailsVC:MTGNewInterstitialBidAdDelegate{
|
|||||||
|
|
||||||
func newInterstitialBidAdShowFail(_ error: any Error, adManager: MTGNewInterstitialBidAdManager) {
|
func newInterstitialBidAdShowFail(_ error: any Error, adManager: MTGNewInterstitialBidAdManager) {
|
||||||
print("广告展示失败")
|
print("广告展示失败")
|
||||||
|
if isback == true{
|
||||||
|
self.navigationController?.popViewController(animated: true)
|
||||||
|
}else{
|
||||||
|
DispatchQueue.global().asyncAfter(deadline: .now() + 1.5) {
|
||||||
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0){
|
||||||
|
self.activityView.stopAnimating()
|
||||||
|
// self.view.makeToast("Save Success", duration: 1.5, position: .center)
|
||||||
|
// 创建一个 UIAlertController
|
||||||
|
let alertController = UIAlertController(title: "Successfully saved", message: "Do you need to set up a tutorial", preferredStyle: .alert)
|
||||||
|
|
||||||
|
// 添加一个取消按钮
|
||||||
|
alertController.addAction(UIAlertAction(title: "cancel", style: .cancel, handler: nil))
|
||||||
|
|
||||||
|
// 添加一个确定按钮
|
||||||
|
alertController.addAction(UIAlertAction(title: "Need", style: .default, handler: { action in
|
||||||
|
// 点击确定按钮后执行的操作
|
||||||
|
// print("点击了确定按钮")
|
||||||
|
let vc = WA_TipVC()
|
||||||
|
self.present(vc, animated: true)
|
||||||
|
}))
|
||||||
|
|
||||||
|
// 在当前视图控制器中 present 显示提示框
|
||||||
|
self.present(alertController, animated: true, completion: nil)
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func newInterstitialBidAdPlayCompleted(_ adManager: MTGNewInterstitialBidAdManager) {
|
func newInterstitialBidAdPlayCompleted(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
////
|
////
|
||||||
//// WA_HomeVC.swift
|
//// WA_HomeVC.swift
|
||||||
//// wallpaper_project
|
//// wallpaper_project
|
||||||
////
|
|
||||||
//// Created by 忆海16 on 2024/3/11.
|
|
||||||
////
|
|
||||||
//
|
//
|
||||||
import UIKit
|
import UIKit
|
||||||
//import JXSegmentedView
|
//import JXSegmentedView
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_LIVEVC.swift
|
// WA_LIVEVC.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/11.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
import JXSegmentedView
|
import JXSegmentedView
|
||||||
@ -98,6 +96,7 @@ class WA_LIVEVC: WA_RootVC {
|
|||||||
if self.isadshow == true{
|
if self.isadshow == true{
|
||||||
if ((issureready) != nil) {
|
if ((issureready) != nil) {
|
||||||
newInterstitialAdManager?.show(from: self)
|
newInterstitialAdManager?.show(from: self)
|
||||||
|
self.setPostSHOW()
|
||||||
}else{
|
}else{
|
||||||
self.navigationController?.popViewController(animated: true)
|
self.navigationController?.popViewController(animated: true)
|
||||||
}
|
}
|
||||||
@ -156,6 +155,7 @@ class WA_LIVEVC: WA_RootVC {
|
|||||||
currentPage += 1
|
currentPage += 1
|
||||||
setJsondata()
|
setJsondata()
|
||||||
}
|
}
|
||||||
|
|
||||||
func setJsondata(){
|
func setJsondata(){
|
||||||
// 读取 JSON 文件并解析
|
// 读取 JSON 文件并解析
|
||||||
if let path = Bundle.main.path(forResource: "live", ofType: "json") {
|
if let path = Bundle.main.path(forResource: "live", ofType: "json") {
|
||||||
@ -216,18 +216,19 @@ class WA_LIVEVC: WA_RootVC {
|
|||||||
// Fetch 配置值
|
// Fetch 配置值
|
||||||
// fetchRemoteConfig()
|
// fetchRemoteConfig()
|
||||||
|
|
||||||
let param = MTGBiddingRequestParameter(placementId: "1636952", unitId: "1636952", basePrice: nil)
|
let param = MTGBiddingRequestParameter(placementId: "1650177", unitId: "3519003", basePrice: nil)
|
||||||
|
|
||||||
MTGBiddingRequest.getBidWith(param) { bidResponse in
|
MTGBiddingRequest.getBidWith(param) { bidResponse in
|
||||||
if bidResponse.success{
|
if bidResponse.success{
|
||||||
self.bidToken = bidResponse.bidToken
|
self.bidToken = bidResponse.bidToken
|
||||||
bidResponse.notifyWin()
|
bidResponse.notifyWin()
|
||||||
self.newInterstitialAdManager = MTGNewInterstitialBidAdManager(placementId: "1636952", unitId: "1636952", delegate: self)
|
self.newInterstitialAdManager = MTGNewInterstitialBidAdManager(placementId: "1650177", unitId: "3519003", delegate: self)
|
||||||
|
StartManager.shared.ecpm = Float(bidResponse.price)
|
||||||
self.newInterstitialAdManager?.loadAd(withBidToken:self.bidToken!)
|
self.newInterstitialAdManager?.loadAd(withBidToken:self.bidToken!)
|
||||||
self.fetchRemoteConfig()
|
self.fetchRemoteConfig()
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
WA_TabbarCommon.TabBarController()
|
// WA_TabbarCommon.TabBarController()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -369,7 +370,6 @@ extension WA_LIVEVC:UICollectionViewDelegate,UICollectionViewDataSource,UICollec
|
|||||||
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
|
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
|
||||||
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "WA_WallpaperCollectionCell", for: indexPath)as!WA_WallpaperCollectionCell
|
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "WA_WallpaperCollectionCell", for: indexPath)as!WA_WallpaperCollectionCell
|
||||||
cell.model = self.wallpapers[indexPath.row]
|
cell.model = self.wallpapers[indexPath.row]
|
||||||
|
|
||||||
return cell
|
return cell
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -396,6 +396,18 @@ extension WA_LIVEVC:MTGNewInterstitialBidAdDelegate{
|
|||||||
|
|
||||||
func newInterstitialBidAdLoadSuccess(_ adManager: MTGNewInterstitialBidAdManager) {
|
func newInterstitialBidAdLoadSuccess(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
print("广告加载成功")
|
print("广告加载成功")
|
||||||
|
StartManager.shared.succeed = true
|
||||||
|
// StartManager.shared.loadTime = self.adLoadTime
|
||||||
|
StartManager.shared.adPlatform = "mbridge"
|
||||||
|
StartManager.shared.countryCode = ALSdk.shared().configuration.countryCode
|
||||||
|
StartManager.shared.adId = "1636952"
|
||||||
|
StartManager.shared.platformResponseTime = 0
|
||||||
|
// StartManager.shared.ecpm = Float(ad.revenue)
|
||||||
|
StartManager.shared.dsp = ""
|
||||||
|
StartManager.shared.network = ""
|
||||||
|
|
||||||
|
|
||||||
|
setPostload()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -413,6 +425,7 @@ extension WA_LIVEVC:MTGNewInterstitialBidAdDelegate{
|
|||||||
|
|
||||||
func newInterstitialBidAdShowFail(_ error: any Error, adManager: MTGNewInterstitialBidAdManager) {
|
func newInterstitialBidAdShowFail(_ error: any Error, adManager: MTGNewInterstitialBidAdManager) {
|
||||||
print("广告展示失败")
|
print("广告展示失败")
|
||||||
|
self.navigationController?.popViewController(animated: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
func newInterstitialBidAdPlayCompleted(_ adManager: MTGNewInterstitialBidAdManager) {
|
func newInterstitialBidAdPlayCompleted(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// WA_LiveVideoVC.swift
|
// WA_LiveVideoVC.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
// Created by 忆海16 on 2024/3/12.
|
|
||||||
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
@ -13,6 +13,12 @@ import PhotosUI
|
|||||||
import SVProgressHUD
|
import SVProgressHUD
|
||||||
import Lottie
|
import Lottie
|
||||||
|
|
||||||
|
import AppLovinSDK
|
||||||
|
import Alamofire
|
||||||
|
import FirebaseRemoteConfig
|
||||||
|
import MTGSDKNewInterstitial
|
||||||
|
import MTGSDKBidding
|
||||||
|
import MTGSDK
|
||||||
|
|
||||||
struct FilePaths {
|
struct FilePaths {
|
||||||
// 创建目录搜索路径的列表。
|
// 创建目录搜索路径的列表。
|
||||||
@ -47,6 +53,12 @@ class WA_LiveVideoVC: WA_RootVC {
|
|||||||
var animationDuration: TimeInterval = 1.0
|
var animationDuration: TimeInterval = 1.0
|
||||||
var workProgress: Float = 0.0
|
var workProgress: Float = 0.0
|
||||||
|
|
||||||
|
var remoteConfig: RemoteConfig!
|
||||||
|
|
||||||
|
var isadshow:Bool = false
|
||||||
|
var bidToken:String?
|
||||||
|
var newInterstitialAdManager:MTGNewInterstitialBidAdManager?
|
||||||
|
|
||||||
override func viewDidLoad() {
|
override func viewDidLoad() {
|
||||||
super.viewDidLoad()
|
super.viewDidLoad()
|
||||||
|
|
||||||
@ -140,7 +152,19 @@ class WA_LiveVideoVC: WA_RootVC {
|
|||||||
|
|
||||||
|
|
||||||
@objc func buttonTapped(){
|
@objc func buttonTapped(){
|
||||||
navigationController?.popViewController(animated: true)
|
let issureready = newInterstitialAdManager?.isAdReady()
|
||||||
|
if self.isadshow == true{
|
||||||
|
if ((issureready) != nil) {
|
||||||
|
newInterstitialAdManager?.show(from: self)
|
||||||
|
self.setPostSHOW()
|
||||||
|
}else{
|
||||||
|
self.navigationController?.popViewController(animated: true)
|
||||||
|
}
|
||||||
|
|
||||||
|
}else{
|
||||||
|
self.navigationController?.popViewController(animated: true)
|
||||||
|
}
|
||||||
|
// navigationController?.popViewController(animated: true)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -181,6 +205,152 @@ class WA_LiveVideoVC: WA_RootVC {
|
|||||||
self.navigationController?.navigationBar.isHidden = true
|
self.navigationController?.navigationBar.isHidden = true
|
||||||
let size = self.view.bounds.size
|
let size = self.view.bounds.size
|
||||||
self.sizi = size
|
self.sizi = size
|
||||||
|
|
||||||
|
// 初始化 Remote Config
|
||||||
|
remoteConfig = RemoteConfig.remoteConfig()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 设置最小获取间隔(开发期间可以设置较小的值)
|
||||||
|
let settings = RemoteConfigSettings()
|
||||||
|
settings.minimumFetchInterval = 0
|
||||||
|
remoteConfig.configSettings = settings
|
||||||
|
// Fetch 配置值
|
||||||
|
remoteConfig.setDefaults(fromPlist: "isopen")
|
||||||
|
let param = MTGBiddingRequestParameter(placementId: "1636950", unitId: "3501963", basePrice: nil)
|
||||||
|
|
||||||
|
MTGBiddingRequest.getBidWith(param) { bidResponse in
|
||||||
|
if bidResponse.success{
|
||||||
|
self.bidToken = bidResponse.bidToken
|
||||||
|
bidResponse.notifyWin()
|
||||||
|
self.newInterstitialAdManager = MTGNewInterstitialBidAdManager(placementId: "1636950", unitId: "3501963", delegate: self)
|
||||||
|
StartManager.shared.ecpm = Float(bidResponse.price)
|
||||||
|
self.newInterstitialAdManager?.loadAd(withBidToken:self.bidToken!)
|
||||||
|
self.fetchRemoteConfig()
|
||||||
|
|
||||||
|
}else{
|
||||||
|
// WA_TabbarCommon.TabBarController()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
///是否有广告
|
||||||
|
func fetchRemoteConfig() {
|
||||||
|
let localVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "0.0"
|
||||||
|
remoteConfig.fetch{ (status, error) -> Void in
|
||||||
|
if status == .success {
|
||||||
|
print("Config fetched!")
|
||||||
|
self.remoteConfig.activate { changed, error in
|
||||||
|
if error == nil{
|
||||||
|
let js = self.remoteConfig.configValue(forKey: "isopen").jsonValue as! [String:Any]
|
||||||
|
let valueopen = js["isadopen"] as! Bool
|
||||||
|
let valueversion = js["version"] as! String
|
||||||
|
DispatchQueue.main.async {
|
||||||
|
if valueversion == localVersion{
|
||||||
|
self.isadshow = false
|
||||||
|
}else{
|
||||||
|
if valueopen {
|
||||||
|
self.isadshow = true
|
||||||
|
} else {
|
||||||
|
self.isadshow = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
print("Config not fetched")
|
||||||
|
if let error = error {
|
||||||
|
print("Error: \(error.localizedDescription)")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func setPostload(){
|
||||||
|
let url = "http://111.9.47.226:38080/top_selection/save_ad_load_log"
|
||||||
|
let parameters:[String : Any] = [
|
||||||
|
"deviceId": StartManager.shared.devicID ?? "",
|
||||||
|
"localIp": StartManager.shared.localIP ?? "",
|
||||||
|
"remoteIp": StartManager.shared.publicIP ?? "",
|
||||||
|
"linkId": "",
|
||||||
|
"packageName": "com.wallpapaer.hd.live.app",
|
||||||
|
"gaid": StartManager.shared.idfaid ?? "",
|
||||||
|
"dataId": "",
|
||||||
|
"shelfNumber":"壁纸详情页返回加载",
|
||||||
|
"succeed": StartManager.shared.succeed,
|
||||||
|
"loadTime": "",
|
||||||
|
"adPlatform": StartManager.shared.adPlatform ?? "",
|
||||||
|
"countryCode": StartManager.shared.countryCode ?? "",
|
||||||
|
"adId": StartManager.shared.adId ?? "",
|
||||||
|
"platformResponseTime": StartManager.shared.platformResponseTime ?? "",
|
||||||
|
"getIpResponseTime": StartManager.shared.getIpResponseTime ?? "",
|
||||||
|
"ecpm": StartManager.shared.ecpm ?? "",
|
||||||
|
"dsp": StartManager.shared.dsp ?? "",
|
||||||
|
"network": StartManager.shared.network ?? "",
|
||||||
|
"showStatus": 0,
|
||||||
|
"washParam": true,
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
let headers: HTTPHeaders = [
|
||||||
|
"Content-Type": "application/json"
|
||||||
|
]
|
||||||
|
|
||||||
|
NetworkManager.shared.postRequest(url: url, parameters: parameters, headers: headers) { result in
|
||||||
|
switch result {
|
||||||
|
case .success(let data):
|
||||||
|
print("Response:--- \(data)")
|
||||||
|
case .failure(let error):
|
||||||
|
print("Error:--- \(error)")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
func setPostSHOW(){
|
||||||
|
let url = "http://111.9.47.226:38080/top_selection/save_ad_show_log"
|
||||||
|
let parameters:[String : Any] = [
|
||||||
|
"deviceId": StartManager.shared.devicID ?? "",
|
||||||
|
"localIp": StartManager.shared.localIP ?? "",
|
||||||
|
"remoteIp": StartManager.shared.publicIP ?? "",
|
||||||
|
"linkId": "",
|
||||||
|
"packageName": "com.wallpapaer.hd.live.app",
|
||||||
|
"gaid": StartManager.shared.idfaid ?? "",
|
||||||
|
"dataId": "",
|
||||||
|
"shelfNumber":"壁纸详情页返回展示",
|
||||||
|
"succeed": StartManager.shared.succeed,
|
||||||
|
"loadTime": "",
|
||||||
|
"adPlatform": StartManager.shared.adPlatform ?? "",
|
||||||
|
"countryCode": StartManager.shared.countryCode ?? "",
|
||||||
|
"adId": StartManager.shared.adId ?? "",
|
||||||
|
"platformResponseTime": StartManager.shared.platformResponseTime ?? "",
|
||||||
|
"getIpResponseTime": StartManager.shared.getIpResponseTime ?? "",
|
||||||
|
"ecpm": StartManager.shared.ecpm ?? "",
|
||||||
|
"dsp": StartManager.shared.dsp ?? "",
|
||||||
|
"network": StartManager.shared.network ?? "",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
let headers: HTTPHeaders = [
|
||||||
|
"Content-Type": "application/json"
|
||||||
|
]
|
||||||
|
|
||||||
|
NetworkManager.shared.postRequest(url: url, parameters: parameters, headers: headers) { result in
|
||||||
|
switch result {
|
||||||
|
case .success(let data):
|
||||||
|
print("Response:--- \(data)")
|
||||||
|
case .failure(let error):
|
||||||
|
print("Error:--- \(error)")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -460,3 +630,68 @@ class WA_LiveVideoVC: WA_RootVC {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
extension WA_LiveVideoVC:MTGNewInterstitialBidAdDelegate{
|
||||||
|
|
||||||
|
// func newInterstitialBidAdShowSuccess(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
// print("广告展示成功")
|
||||||
|
// }
|
||||||
|
|
||||||
|
func newInterstitialBidAdResourceLoadSuccess(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
print("资源加载成功,表示可播放状态")
|
||||||
|
}
|
||||||
|
|
||||||
|
func newInterstitialBidAdLoadSuccess(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
print("广告加载成功")
|
||||||
|
StartManager.shared.succeed = true
|
||||||
|
// StartManager.shared.loadTime = self.adLoadTime
|
||||||
|
StartManager.shared.adPlatform = "mbridge"
|
||||||
|
StartManager.shared.countryCode = ALSdk.shared().configuration.countryCode
|
||||||
|
StartManager.shared.adId = "3501963"
|
||||||
|
StartManager.shared.platformResponseTime = 0
|
||||||
|
// StartManager.shared.ecpm = Float(ad.revenue)
|
||||||
|
StartManager.shared.dsp = ""
|
||||||
|
StartManager.shared.network = ""
|
||||||
|
|
||||||
|
|
||||||
|
setPostload()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
func newInterstitialBidAdLoadFail(_ error: any Error, adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
|
||||||
|
print("-----\(error)")
|
||||||
|
// print(" 广告加载失败")
|
||||||
|
}
|
||||||
|
|
||||||
|
func newInterstitialBidAdShowSuccess(withBidToken bidToken: String, adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
|
||||||
|
print("广告展示成功")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
func newInterstitialBidAdShowFail(_ error: any Error, adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
print("广告展示失败")
|
||||||
|
self.navigationController?.popViewController(animated: true)
|
||||||
|
}
|
||||||
|
|
||||||
|
func newInterstitialBidAdPlayCompleted(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
|
||||||
|
print("广告播放完全播放回调")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
func newInterstitialBidAdEndCardShowSuccess(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
print("视频播放完成后展示结果页")
|
||||||
|
}
|
||||||
|
|
||||||
|
func newInterstitialBidAdClicked(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
|
||||||
|
print("广告被点击")
|
||||||
|
}
|
||||||
|
|
||||||
|
// 广告被关闭
|
||||||
|
func newInterstitialBidAdDidClosed(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
print("广告被关闭")
|
||||||
|
self.navigationController?.popViewController(animated: true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_TipVC.swift
|
// WA_TipVC.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/15.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_3DModel.swift
|
// WA_3DModel.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/11.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
@objcMembers
|
@objcMembers
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WallpaperModel.swift
|
// WallpaperModel.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/28.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
@objcMembers
|
@objcMembers
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_HistoryCell.swift
|
// WA_HistoryCell.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/27.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_PreView.swift
|
// WA_PreView.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/12.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_WallpaperCollectionCell.swift
|
// WA_WallpaperCollectionCell.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/11.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
import SDWebImage
|
import SDWebImage
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_tipCell.swift
|
// WA_tipCell.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/15.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// testVideoVC.swift
|
// testVideoVC.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/14.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
import AVFoundation
|
import AVFoundation
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_RootNAV.swift
|
// WA_RootNAV.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/11.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_RootTab.swift
|
// WA_RootTab.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/11.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_RootVC.swift
|
// WA_RootVC.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/11.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
import FirebaseAnalytics
|
import FirebaseAnalytics
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_TabButton.swift
|
// WA_TabButton.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/11.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
import CYLTabBarController
|
import CYLTabBarController
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_TabbarCommon.swift
|
// WA_TabbarCommon.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/11.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
import CYLTabBarController
|
import CYLTabBarController
|
||||||
@ -50,11 +48,15 @@ class WA_TabbarCommon: NSObject {
|
|||||||
|
|
||||||
home.tabBarItem.setTitleTextAttributes([NSAttributedString.Key.foregroundColor: UIColor.hexSting(color: "#28D36C", alpha: 1)], for: .selected)
|
home.tabBarItem.setTitleTextAttributes([NSAttributedString.Key.foregroundColor: UIColor.hexSting(color: "#28D36C", alpha: 1)], for: .selected)
|
||||||
|
|
||||||
let rank = WA_RootNAV(rootViewController: WA_RankingVC())
|
let rank = WA_RootNAV(rootViewController: WA_RankVC())
|
||||||
rank.tabBarItem.imageInsets = UIEdgeInsets.init(top: 11, left: 0, bottom: 11, right: 0)
|
rank.tabBarItem.imageInsets = UIEdgeInsets.init(top: 11, left: 0, bottom: 11, right: 0)
|
||||||
|
|
||||||
rank.tabBarItem.setTitleTextAttributes([NSAttributedString.Key.foregroundColor: UIColor.hexSting(color: "#28D36C", alpha: 1)], for: .selected)
|
rank.tabBarItem.setTitleTextAttributes([NSAttributedString.Key.foregroundColor: UIColor.hexSting(color: "#28D36C", alpha: 1)], for: .selected)
|
||||||
|
|
||||||
|
let communit = WA_RootNAV(rootViewController: WA_RankingVC())
|
||||||
|
|
||||||
|
communit.tabBarItem.setTitleTextAttributes([NSAttributedString.Key.foregroundColor: UIColor.hexSting(color: "#28D36C", alpha: 1)], for: .selected)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let mine = WA_RootNAV(rootViewController: WA_MineVC())
|
let mine = WA_RootNAV(rootViewController: WA_MineVC())
|
||||||
@ -62,7 +64,7 @@ class WA_TabbarCommon: NSObject {
|
|||||||
mine.tabBarItem.setTitleTextAttributes([NSAttributedString.Key.foregroundColor: UIColor.hexSting(color: "#28D36C", alpha: 1)], for: .selected)
|
mine.tabBarItem.setTitleTextAttributes([NSAttributedString.Key.foregroundColor: UIColor.hexSting(color: "#28D36C", alpha: 1)], for: .selected)
|
||||||
|
|
||||||
|
|
||||||
let viewControllers = [home,rank,mine]
|
let viewControllers = [home,rank,communit,mine]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -78,16 +80,20 @@ class WA_TabbarCommon: NSObject {
|
|||||||
CYLTabBarItemImage:"home_n",
|
CYLTabBarItemImage:"home_n",
|
||||||
CYLTabBarItemSelectedImage:"home_s"]
|
CYLTabBarItemSelectedImage:"home_s"]
|
||||||
|
|
||||||
let tabBarItemrank = [CYLTabBarItemTitle:"Community",
|
let tabBarItemrank = [CYLTabBarItemTitle:"Ranking",
|
||||||
CYLTabBarItemImage:"ranking_n",
|
CYLTabBarItemImage:"ranking_n",
|
||||||
CYLTabBarItemSelectedImage:"ranking_s"]
|
CYLTabBarItemSelectedImage:"ranking_s"]
|
||||||
|
|
||||||
|
let tabBarItemcommunit = [CYLTabBarItemTitle:"Community",
|
||||||
|
CYLTabBarItemImage:"Community_n",
|
||||||
|
CYLTabBarItemSelectedImage:"Community_s"]
|
||||||
|
|
||||||
let tabBarItemtwo = [CYLTabBarItemTitle:"Setting",
|
let tabBarItemtwo = [CYLTabBarItemTitle:"Setting",
|
||||||
CYLTabBarItemImage:"mine_n",
|
CYLTabBarItemImage:"mine_n",
|
||||||
CYLTabBarItemSelectedImage:"mine_s"]
|
CYLTabBarItemSelectedImage:"mine_s"]
|
||||||
|
|
||||||
|
|
||||||
let tabBarItemsAttributes = [tabBarItemOne,tabBarItemrank,tabBarItemtwo]
|
let tabBarItemsAttributes = [tabBarItemOne,tabBarItemrank,tabBarItemcommunit,tabBarItemtwo]
|
||||||
//
|
//
|
||||||
|
|
||||||
return tabBarItemsAttributes
|
return tabBarItemsAttributes
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_limitsVCViewController.swift
|
// WA_limitsVCViewController.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/18.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
import SVProgressHUD
|
import SVProgressHUD
|
||||||
@ -42,6 +40,7 @@ class WA_limitsVCViewController: WA_RootVC {
|
|||||||
|
|
||||||
// var ivAadManager:MTGNewInterstitialAdManager!
|
// var ivAadManager:MTGNewInterstitialAdManager!
|
||||||
var bidToken:String?
|
var bidToken:String?
|
||||||
|
var ecpmprice:Double?
|
||||||
var newInterstitialAdManager:MTGNewInterstitialBidAdManager?
|
var newInterstitialAdManager:MTGNewInterstitialBidAdManager?
|
||||||
override func viewDidLoad() {
|
override func viewDidLoad() {
|
||||||
super.viewDidLoad()
|
super.viewDidLoad()
|
||||||
@ -70,19 +69,30 @@ class WA_limitsVCViewController: WA_RootVC {
|
|||||||
|
|
||||||
self.view.addSubview(activityView)
|
self.view.addSubview(activityView)
|
||||||
self.activityView.startAnimating()
|
self.activityView.startAnimating()
|
||||||
let param = MTGBiddingRequestParameter(placementId: "1638986", unitId: "3504682", basePrice: nil)
|
let param = MTGBiddingRequestParameter(placementId: "1651004", unitId: "3520023", basePrice: nil)
|
||||||
|
|
||||||
MTGBiddingRequest.getBidWith(param) { bidResponse in
|
MTGBiddingRequest.getBidWith(param) { bidResponse in
|
||||||
if bidResponse.success{
|
if bidResponse.success{
|
||||||
self.bidToken = bidResponse.bidToken
|
self.bidToken = bidResponse.bidToken
|
||||||
bidResponse.notifyWin()
|
bidResponse.notifyWin()
|
||||||
self.newInterstitialAdManager = MTGNewInterstitialBidAdManager(placementId: "1638986", unitId: "3504682", delegate: self)
|
self.newInterstitialAdManager = MTGNewInterstitialBidAdManager(placementId: "1651004", unitId: "3520023", delegate: self)
|
||||||
|
StartManager.shared.ecpm = Float(bidResponse.price)
|
||||||
self.newInterstitialAdManager?.loadAd(withBidToken:self.bidToken!)
|
self.newInterstitialAdManager?.loadAd(withBidToken:self.bidToken!)
|
||||||
self.fetchRemoteConfig()
|
self.fetchRemoteConfig()
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
|
let userDefaults = UserDefaults.standard
|
||||||
|
if userDefaults.bool(forKey: "iswindows"){
|
||||||
|
let appDelegate = UIApplication.shared.delegate
|
||||||
|
appDelegate?.window??.rootViewController = WA_RootNAV(rootViewController: WA_playerVC())
|
||||||
|
|
||||||
|
}else{
|
||||||
|
|
||||||
WA_TabbarCommon.TabBarController()
|
WA_TabbarCommon.TabBarController()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -114,15 +124,6 @@ class WA_limitsVCViewController: WA_RootVC {
|
|||||||
override func viewDidAppear(_ animated: Bool) {
|
override func viewDidAppear(_ animated: Bool) {
|
||||||
super.viewDidAppear(animated)
|
super.viewDidAppear(animated)
|
||||||
|
|
||||||
if UserDefaults.standard.object(forKey: "iswindows") != nil {
|
|
||||||
if UserDefaults.standard.bool(forKey: "iswindows") {
|
|
||||||
AppDelegate.shared.showOverlayWindow()
|
|
||||||
} else {
|
|
||||||
UserDefaults.standard.set(false, forKey: "iswindows")
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
UserDefaults.standard.set(false, forKey: "iswindows")
|
|
||||||
}
|
|
||||||
|
|
||||||
DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
|
DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
|
||||||
// 请求跟踪授权
|
// 请求跟踪授权
|
||||||
@ -156,10 +157,20 @@ class WA_limitsVCViewController: WA_RootVC {
|
|||||||
let js = self.remoteConfig.configValue(forKey: "isopen").jsonValue as! [String: Any]
|
let js = self.remoteConfig.configValue(forKey: "isopen").jsonValue as! [String: Any]
|
||||||
let valueopen = js["isadopen"] as! Bool
|
let valueopen = js["isadopen"] as! Bool
|
||||||
let valueversion = js["version"] as! String
|
let valueversion = js["version"] as! String
|
||||||
|
let tt = UserDefaults.standard
|
||||||
|
print("-------\(tt.bool(forKey: "iswindows"))")
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
if valueversion == localVersion {
|
if valueversion == localVersion {
|
||||||
|
let userDefaults = UserDefaults.standard
|
||||||
|
if userDefaults.bool(forKey: "iswindows"){
|
||||||
|
|
||||||
|
let appDelegate = UIApplication.shared.delegate
|
||||||
|
appDelegate?.window??.rootViewController = WA_RootNAV(rootViewController: WA_playerVC())
|
||||||
|
}else{
|
||||||
|
|
||||||
|
|
||||||
WA_TabbarCommon.TabBarController()
|
WA_TabbarCommon.TabBarController()
|
||||||
|
}
|
||||||
StartManager.shared.superHero = false
|
StartManager.shared.superHero = false
|
||||||
} else {
|
} else {
|
||||||
if valueopen {
|
if valueopen {
|
||||||
@ -167,7 +178,16 @@ class WA_limitsVCViewController: WA_RootVC {
|
|||||||
self.startAdCheck()
|
self.startAdCheck()
|
||||||
StartManager.shared.superHero = true
|
StartManager.shared.superHero = true
|
||||||
} else {
|
} else {
|
||||||
|
let userDefaults = UserDefaults.standard
|
||||||
|
if userDefaults.bool(forKey: "iswindows"){
|
||||||
|
let appDelegate = UIApplication.shared.delegate
|
||||||
|
appDelegate?.window??.rootViewController = WA_RootNAV(rootViewController: WA_playerVC())
|
||||||
|
}else{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
WA_TabbarCommon.TabBarController()
|
WA_TabbarCommon.TabBarController()
|
||||||
|
}
|
||||||
StartManager.shared.superHero = false
|
StartManager.shared.superHero = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -178,6 +198,7 @@ class WA_limitsVCViewController: WA_RootVC {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
print("Config not fetched")
|
print("Config not fetched")
|
||||||
|
|
||||||
if let error = error {
|
if let error = error {
|
||||||
print("Error: \(error.localizedDescription)")
|
print("Error: \(error.localizedDescription)")
|
||||||
}
|
}
|
||||||
@ -192,11 +213,19 @@ class WA_limitsVCViewController: WA_RootVC {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
print("Max retry attempts reached. Stopping retries.")
|
print("Max retry attempts reached. Stopping retries.")
|
||||||
|
let userDefaults = UserDefaults.standard
|
||||||
|
if userDefaults.bool(forKey: "iswindows"){
|
||||||
|
let appDelegate = UIApplication.shared.delegate
|
||||||
|
appDelegate?.window??.rootViewController = WA_RootNAV(rootViewController: WA_playerVC())
|
||||||
|
}else{
|
||||||
|
|
||||||
|
|
||||||
WA_TabbarCommon.TabBarController()
|
WA_TabbarCommon.TabBarController()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// /定时加载
|
// /定时加载
|
||||||
func startAdCheck() {
|
func startAdCheck() {
|
||||||
@ -220,14 +249,22 @@ class WA_limitsVCViewController: WA_RootVC {
|
|||||||
adLoadTime = elapsedTimeInMilliseconds // 记录加载
|
adLoadTime = elapsedTimeInMilliseconds // 记录加载
|
||||||
adCheckTimer?.invalidate()
|
adCheckTimer?.invalidate()
|
||||||
self.activityView.stopAnimating()
|
self.activityView.stopAnimating()
|
||||||
// if StartManager.shared.idfaid == ""{
|
if StartManager.shared.idfaid == ""{
|
||||||
// self.fetchIDFAUntilSuccess()
|
self.fetchIDFAUntilSuccess()
|
||||||
// }else{
|
}else{
|
||||||
// self.setPostSHOW()
|
self.setPostSHOW()
|
||||||
// }
|
}
|
||||||
} else if elapsedTimeInMilliseconds >= 10000 { // 10000 毫秒 = 10 秒
|
} else if elapsedTimeInMilliseconds >= 10000 { // 10000 毫秒 = 10 秒
|
||||||
adCheckTimer?.invalidate()
|
adCheckTimer?.invalidate()
|
||||||
|
let userDefaults = UserDefaults.standard
|
||||||
|
if userDefaults.bool(forKey: "iswindows"){
|
||||||
|
let appDelegate = UIApplication.shared.delegate
|
||||||
|
appDelegate?.window??.rootViewController = WA_RootNAV(rootViewController: WA_playerVC())
|
||||||
|
}else{
|
||||||
|
|
||||||
|
|
||||||
WA_TabbarCommon.TabBarController()
|
WA_TabbarCommon.TabBarController()
|
||||||
|
}
|
||||||
Analytics.logEvent("open_load_fail", parameters: nil)
|
Analytics.logEvent("open_load_fail", parameters: nil)
|
||||||
self.activityView.stopAnimating()
|
self.activityView.stopAnimating()
|
||||||
|
|
||||||
@ -282,114 +319,114 @@ class WA_limitsVCViewController: WA_RootVC {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
// func setPostload(){
|
func setPostload(){
|
||||||
// let url = "http://111.9.47.226:38080/top_selection/save_ad_load_log"
|
let url = "http://111.9.47.226:38080/top_selection/save_ad_load_log"
|
||||||
// let parameters:[String : Any] = [
|
let parameters:[String : Any] = [
|
||||||
// "deviceId": StartManager.shared.devicID ?? "",
|
"deviceId": StartManager.shared.devicID ?? "",
|
||||||
// "localIp": StartManager.shared.localIP ?? "",
|
"localIp": StartManager.shared.localIP ?? "",
|
||||||
// "remoteIp": StartManager.shared.publicIP ?? "",
|
"remoteIp": StartManager.shared.publicIP ?? "",
|
||||||
// "linkId": "",
|
"linkId": "",
|
||||||
// "packageName": "com.wallpapaer.hd.live.app",
|
"packageName": "com.wallpapaer.hd.live.app",
|
||||||
// "gaid": StartManager.shared.idfaid ?? "",
|
"gaid": StartManager.shared.idfaid ?? "",
|
||||||
// "dataId": "",
|
"dataId": "",
|
||||||
// "shelfNumber":"开屏加载",
|
"shelfNumber":"开屏加载",
|
||||||
// "succeed": StartManager.shared.succeed,
|
"succeed": StartManager.shared.succeed,
|
||||||
// "loadTime":StartManager.shared.loadTime ?? "",
|
"loadTime":StartManager.shared.loadTime ?? "",
|
||||||
// "adPlatform": StartManager.shared.adPlatform ?? "",
|
"adPlatform": StartManager.shared.adPlatform ?? "",
|
||||||
// "countryCode": StartManager.shared.countryCode ?? "",
|
"countryCode": StartManager.shared.countryCode ?? "",
|
||||||
// "adId": StartManager.shared.adId ?? "",
|
"adId": StartManager.shared.adId ?? "",
|
||||||
// "platformResponseTime": StartManager.shared.platformResponseTime ?? "",
|
"platformResponseTime": StartManager.shared.platformResponseTime ?? "",
|
||||||
// "getIpResponseTime": StartManager.shared.getIpResponseTime ?? "",
|
"getIpResponseTime": StartManager.shared.getIpResponseTime ?? "",
|
||||||
// "ecpm": StartManager.shared.ecpm ?? "",
|
"ecpm": StartManager.shared.ecpm ?? "",
|
||||||
// "dsp": StartManager.shared.dsp ?? "",
|
"dsp": StartManager.shared.dsp ?? "",
|
||||||
// "network": StartManager.shared.network ?? "",
|
"network": StartManager.shared.network ?? "",
|
||||||
// "showStatus": 0,
|
"showStatus": 0,
|
||||||
// "washParam": true,
|
"washParam": true,
|
||||||
// ]
|
]
|
||||||
//
|
|
||||||
//
|
|
||||||
// let headers: HTTPHeaders = [
|
let headers: HTTPHeaders = [
|
||||||
// "Content-Type": "application/json"
|
"Content-Type": "application/json"
|
||||||
// ]
|
]
|
||||||
//
|
|
||||||
// NetworkManager.shared.postRequest(url: url, parameters: parameters, headers: headers) { result in
|
NetworkManager.shared.postRequest(url: url, parameters: parameters, headers: headers) { result in
|
||||||
// switch result {
|
switch result {
|
||||||
// case .success(let data):
|
case .success(let data):
|
||||||
// print("Response:--- \(data)")
|
print("Response:--- \(data)")
|
||||||
// case .failure(let error):
|
case .failure(let error):
|
||||||
// print("Error:--- \(error)")
|
print("Error:--- \(error)")
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
//
|
|
||||||
// func setPostSHOW(){
|
func setPostSHOW(){
|
||||||
// let url = "http://111.9.47.226:38080/top_selection/save_ad_show_log"
|
let url = "http://111.9.47.226:38080/top_selection/save_ad_show_log"
|
||||||
// let parameters:[String : Any] = [
|
let parameters:[String : Any] = [
|
||||||
// "deviceId": StartManager.shared.devicID ?? "",
|
"deviceId": StartManager.shared.devicID ?? "",
|
||||||
// "localIp": StartManager.shared.localIP ?? "",
|
"localIp": StartManager.shared.localIP ?? "",
|
||||||
// "remoteIp": StartManager.shared.publicIP ?? "",
|
"remoteIp": StartManager.shared.publicIP ?? "",
|
||||||
// "linkId": "",
|
"linkId": "",
|
||||||
// "packageName": "com.wallpapaer.hd.live.app",
|
"packageName": "com.wallpapaer.hd.live.app",
|
||||||
// "gaid": StartManager.shared.idfaid ?? "",
|
"gaid": StartManager.shared.idfaid ?? "",
|
||||||
// "dataId": "",
|
"dataId": "",
|
||||||
// "shelfNumber":"开屏展示",
|
"shelfNumber":"开屏展示",
|
||||||
// "succeed": StartManager.shared.succeed,
|
"succeed": StartManager.shared.succeed,
|
||||||
// "loadTime":StartManager.shared.loadTime ?? "",
|
"loadTime":StartManager.shared.loadTime ?? "",
|
||||||
// "adPlatform": StartManager.shared.adPlatform ?? "",
|
"adPlatform": StartManager.shared.adPlatform ?? "",
|
||||||
// "countryCode": StartManager.shared.countryCode ?? "",
|
"countryCode": StartManager.shared.countryCode ?? "",
|
||||||
// "adId": StartManager.shared.adId ?? "",
|
"adId": StartManager.shared.adId ?? "",
|
||||||
// "platformResponseTime": StartManager.shared.platformResponseTime ?? "",
|
"platformResponseTime": StartManager.shared.platformResponseTime ?? "",
|
||||||
// "getIpResponseTime": StartManager.shared.getIpResponseTime ?? "",
|
"getIpResponseTime": StartManager.shared.getIpResponseTime ?? "",
|
||||||
// "ecpm": StartManager.shared.ecpm ?? "",
|
"ecpm": StartManager.shared.ecpm ?? "",
|
||||||
// "dsp": StartManager.shared.dsp ?? "",
|
"dsp": StartManager.shared.dsp ?? "",
|
||||||
// "network": StartManager.shared.network ?? "",
|
"network": StartManager.shared.network ?? "",
|
||||||
// ]
|
]
|
||||||
//
|
|
||||||
// let headers: HTTPHeaders = [
|
let headers: HTTPHeaders = [
|
||||||
// "Content-Type": "application/json"
|
"Content-Type": "application/json"
|
||||||
// ]
|
]
|
||||||
//
|
|
||||||
// NetworkManager.shared.postRequest(url: url, parameters: parameters, headers: headers) { result in
|
NetworkManager.shared.postRequest(url: url, parameters: parameters, headers: headers) { result in
|
||||||
// switch result {
|
switch result {
|
||||||
// case .success(let data):
|
case .success(let data):
|
||||||
// print("Response:--- \(data)")
|
print("Response:--- \(data)")
|
||||||
// case .failure(let error):
|
case .failure(let error):
|
||||||
// print("Error:--- \(error)")
|
print("Error:--- \(error)")
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
//
|
|
||||||
// func fetchIDFAUntilSuccess() {
|
func fetchIDFAUntilSuccess() {
|
||||||
// DispatchQueue.global(qos: .background).async {
|
DispatchQueue.global(qos: .background).async {
|
||||||
// var idfaObtained = false
|
var idfaObtained = false
|
||||||
//
|
|
||||||
// while !idfaObtained {
|
while !idfaObtained {
|
||||||
// let semaphore = DispatchSemaphore(value: 0)
|
let semaphore = DispatchSemaphore(value: 0)
|
||||||
//
|
|
||||||
// requestIDFA { idfa in
|
requestIDFA { idfa in
|
||||||
// if let idfa = idfa {
|
if let idfa = idfa {
|
||||||
// print("Got IDFA: \(idfa)")
|
print("Got IDFA: \(idfa)")
|
||||||
// // 执行成功获取 IDFA 后的处理方法
|
// 执行成功获取 IDFA 后的处理方法
|
||||||
// // self.performActionWithIDFA(idfa)
|
// self.performActionWithIDFA(idfa)
|
||||||
// StartManager.shared.idfaid = idfa
|
StartManager.shared.idfaid = idfa
|
||||||
//// self.setPostSHOW()
|
// self.setPostSHOW()
|
||||||
// idfaObtained = true
|
idfaObtained = true
|
||||||
// } else {
|
} else {
|
||||||
// print("Failed to get IDFA, retrying...")
|
print("Failed to get IDFA, retrying...")
|
||||||
// DispatchQueue.global(qos: .background).asyncAfter(deadline: .now() + 1.0) {
|
DispatchQueue.global(qos: .background).asyncAfter(deadline: .now() + 1.0) {
|
||||||
// semaphore.signal()
|
semaphore.signal()
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// semaphore.wait()
|
semaphore.wait()
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -400,11 +437,25 @@ extension WA_limitsVCViewController:MTGNewInterstitialBidAdDelegate{
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
func newInterstitialBidAdResourceLoadSuccess(_ adManager: MTGNewInterstitialBidAdManager) {
|
func newInterstitialBidAdResourceLoadSuccess(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
|
||||||
print("资源加载成功,表示可播放状态")
|
print("资源加载成功,表示可播放状态")
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func newInterstitialBidAdLoadSuccess(_ adManager: MTGNewInterstitialBidAdManager) {
|
func newInterstitialBidAdLoadSuccess(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
print("广告加载成功")
|
print("广告加载成功")
|
||||||
|
StartManager.shared.shelfNumber = "开屏加载"
|
||||||
|
StartManager.shared.succeed = true
|
||||||
|
StartManager.shared.loadTime = self.adLoadTime
|
||||||
|
StartManager.shared.adPlatform = "mbridge"
|
||||||
|
StartManager.shared.countryCode = ALSdk.shared().configuration.countryCode
|
||||||
|
StartManager.shared.adId = self.idad
|
||||||
|
StartManager.shared.platformResponseTime = 0.0
|
||||||
|
// StartManager.shared.ecpm = Float(ad.revenue)
|
||||||
|
StartManager.shared.dsp = ""
|
||||||
|
StartManager.shared.network = ""
|
||||||
|
self.setPostload()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -422,6 +473,15 @@ extension WA_limitsVCViewController:MTGNewInterstitialBidAdDelegate{
|
|||||||
|
|
||||||
func newInterstitialBidAdShowFail(_ error: any Error, adManager: MTGNewInterstitialBidAdManager) {
|
func newInterstitialBidAdShowFail(_ error: any Error, adManager: MTGNewInterstitialBidAdManager) {
|
||||||
print("广告展示失败")
|
print("广告展示失败")
|
||||||
|
let userDefaults = UserDefaults.standard
|
||||||
|
if userDefaults.bool(forKey: "iswindows"){
|
||||||
|
let appDelegate = UIApplication.shared.delegate
|
||||||
|
appDelegate?.window??.rootViewController = WA_RootNAV(rootViewController: WA_playerVC())
|
||||||
|
}else{
|
||||||
|
|
||||||
|
|
||||||
|
WA_TabbarCommon.TabBarController()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func newInterstitialBidAdPlayCompleted(_ adManager: MTGNewInterstitialBidAdManager) {
|
func newInterstitialBidAdPlayCompleted(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
@ -442,8 +502,14 @@ extension WA_limitsVCViewController:MTGNewInterstitialBidAdDelegate{
|
|||||||
// 广告被关闭
|
// 广告被关闭
|
||||||
func newInterstitialBidAdDidClosed(_ adManager: MTGNewInterstitialBidAdManager) {
|
func newInterstitialBidAdDidClosed(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
// print("广告被关闭")
|
// print("广告被关闭")
|
||||||
|
let userDefaults = UserDefaults.standard
|
||||||
|
if userDefaults.bool(forKey: "iswindows"){
|
||||||
|
let appDelegate = UIApplication.shared.delegate
|
||||||
|
appDelegate?.window??.rootViewController = WA_RootNAV(rootViewController: WA_playerVC())
|
||||||
|
}else{
|
||||||
WA_TabbarCommon.TabBarController()
|
WA_TabbarCommon.TabBarController()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// /**
|
// /**
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_LoginVC.swift
|
// WA_LoginVC.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/16.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
import SVProgressHUD
|
import SVProgressHUD
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_MineVC.swift
|
// WA_MineVC.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/14.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
import SVProgressHUD
|
import SVProgressHUD
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_PrivacyVC.swift
|
// WA_PrivacyVC.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/13.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
import WebKit
|
import WebKit
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_SCVC.swift
|
// WA_SCVC.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/29.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WA_SettingSVC.swift
|
// WA_SettingSVC.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/11.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
import SVProgressHUD
|
import SVProgressHUD
|
||||||
@ -143,26 +141,12 @@ class WA_SettingSVC: WA_RootVC {
|
|||||||
if tapCount == 6 {
|
if tapCount == 6 {
|
||||||
// 执行你想要的操作
|
// 执行你想要的操作
|
||||||
print("连点6下")
|
print("连点6下")
|
||||||
// SVProgressHUD.showInfo(withStatus: "连点6下")
|
|
||||||
// DispatchQueue.main.asyncAfter(wallDeadline: .now() + 1.0) {
|
|
||||||
// SVProgressHUD.dismiss()
|
|
||||||
// }
|
|
||||||
// AppDelegate.shared.showOverlayWindow()
|
|
||||||
// UserDefaults.standard.set(true, forKey: "iswindows")
|
|
||||||
//
|
|
||||||
|
|
||||||
if UserDefaults.standard.object(forKey: "iswindows") != nil {
|
let appDelegate = UIApplication.shared.delegate
|
||||||
if UserDefaults.standard.bool(forKey: "iswindows") {
|
appDelegate?.window??.rootViewController = WA_RootNAV(rootViewController: WA_playerVC())
|
||||||
AppDelegate.shared.removeOverlayWindow()
|
// UserDefaults.standard.set(true, forKey: "iswindows")
|
||||||
UserDefaults.standard.set(false, forKey: "iswindows")
|
|
||||||
} else {
|
|
||||||
AppDelegate.shared.showOverlayWindow()
|
|
||||||
UserDefaults.standard.set(true, forKey: "iswindows")
|
UserDefaults.standard.set(true, forKey: "iswindows")
|
||||||
}
|
|
||||||
} else {
|
|
||||||
AppDelegate.shared.showOverlayWindow()
|
|
||||||
UserDefaults.standard.set(true, forKey: "iswindows")
|
|
||||||
}
|
|
||||||
|
|
||||||
resetTapCount()
|
resetTapCount()
|
||||||
}
|
}
|
||||||
@ -174,7 +158,4 @@ class WA_SettingSVC: WA_RootVC {
|
|||||||
timer?.invalidate()
|
timer?.invalidate()
|
||||||
timer = nil
|
timer = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
252
wallpaper_project/PlayerVC/C/WA_AddPlayerVC.swift
Normal file
252
wallpaper_project/PlayerVC/C/WA_AddPlayerVC.swift
Normal file
@ -0,0 +1,252 @@
|
|||||||
|
//
|
||||||
|
// WA_AddPlayerVC.swift
|
||||||
|
// wallpaper_project
|
||||||
|
//
|
||||||
|
// Created by 忆海16 on 2024/7/19.
|
||||||
|
//
|
||||||
|
|
||||||
|
import UIKit
|
||||||
|
|
||||||
|
import SVProgressHUD
|
||||||
|
import AppLovinSDK
|
||||||
|
import FirebaseAnalytics
|
||||||
|
import FirebaseCore
|
||||||
|
import FirebaseRemoteConfig
|
||||||
|
import MTGSDKNewInterstitial
|
||||||
|
import MTGSDKBidding
|
||||||
|
import MTGSDK
|
||||||
|
import Alamofire
|
||||||
|
|
||||||
|
class WA_AddPlayerVC: WA_RootVC {
|
||||||
|
|
||||||
|
|
||||||
|
let activityView = UIActivityIndicatorView()
|
||||||
|
|
||||||
|
var interstitialAd: MAInterstitialAd!
|
||||||
|
var retryAttempt = 0.0
|
||||||
|
var remoteConfig: RemoteConfig!
|
||||||
|
var isadshow:Bool = false
|
||||||
|
var bidToken:String?
|
||||||
|
var newInterstitialAdManager:MTGNewInterstitialBidAdManager?
|
||||||
|
|
||||||
|
|
||||||
|
var adCheckTimer: Timer?
|
||||||
|
var adCheckStartTime: Date?
|
||||||
|
var adLoadTime: Int = 0
|
||||||
|
|
||||||
|
override func viewDidLoad() {
|
||||||
|
super.viewDidLoad()
|
||||||
|
let param = MTGBiddingRequestParameter(placementId: "1651004", unitId: "3520023", basePrice: nil)
|
||||||
|
|
||||||
|
MTGBiddingRequest.getBidWith(param) { bidResponse in
|
||||||
|
if bidResponse.success{
|
||||||
|
self.bidToken = bidResponse.bidToken
|
||||||
|
bidResponse.notifyWin()
|
||||||
|
self.newInterstitialAdManager = MTGNewInterstitialBidAdManager(placementId: "1651004", unitId: "3520023", delegate: self)
|
||||||
|
self.newInterstitialAdManager?.loadAd(withBidToken:self.bidToken!)
|
||||||
|
|
||||||
|
self.startAdCheck()
|
||||||
|
}else{
|
||||||
|
self.navigationController?.popViewController(animated: true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Analytics.logEvent("in_release", parameters: nil)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
override func viewWillAppear(_ animated: Bool) {
|
||||||
|
super.viewWillAppear(animated)
|
||||||
|
|
||||||
|
self.navigationController?.navigationBar.isHidden = true
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// /定时加载
|
||||||
|
func startAdCheck() {
|
||||||
|
|
||||||
|
adCheckStartTime = Date()
|
||||||
|
adCheckTimer = Timer.scheduledTimer(timeInterval: 0.01, target: self, selector: #selector(checkAdStatus), userInfo: nil, repeats: true)
|
||||||
|
}
|
||||||
|
|
||||||
|
@objc func checkAdStatus() {
|
||||||
|
let elapsedTime = Date().timeIntervalSince(adCheckStartTime!)
|
||||||
|
let elapsedTimeInMilliseconds = Int(elapsedTime * 1000)
|
||||||
|
|
||||||
|
let issureready = newInterstitialAdManager!.isAdReady()
|
||||||
|
|
||||||
|
if issureready {
|
||||||
|
|
||||||
|
self.newInterstitialAdManager?.show(from: self)
|
||||||
|
self.setPostSHOW()
|
||||||
|
|
||||||
|
|
||||||
|
} else if elapsedTimeInMilliseconds >= 10000 { // 10000 毫秒 = 10 秒
|
||||||
|
adCheckTimer?.invalidate()
|
||||||
|
self.navigationController?.popViewController(animated: true)
|
||||||
|
} else {
|
||||||
|
print("广告未准备好,继续检查...")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func setPostload(){
|
||||||
|
let url = "http://111.9.47.226:38080/top_selection/save_ad_load_log"
|
||||||
|
let parameters:[String : Any] = [
|
||||||
|
"deviceId": StartManager.shared.devicID ?? "",
|
||||||
|
"localIp": StartManager.shared.localIP ?? "",
|
||||||
|
"remoteIp": StartManager.shared.publicIP ?? "",
|
||||||
|
"linkId": "",
|
||||||
|
"packageName": "com.wallpapaer.hd.live.app",
|
||||||
|
"gaid": StartManager.shared.idfaid ?? "",
|
||||||
|
"dataId": "",
|
||||||
|
"shelfNumber":"社区发布以及点击进入详情",
|
||||||
|
"succeed": StartManager.shared.succeed,
|
||||||
|
"loadTime": "",
|
||||||
|
"adPlatform": StartManager.shared.adPlatform ?? "",
|
||||||
|
"countryCode": StartManager.shared.countryCode ?? "",
|
||||||
|
"adId": StartManager.shared.adId ?? "",
|
||||||
|
"platformResponseTime": StartManager.shared.platformResponseTime ?? "",
|
||||||
|
"getIpResponseTime": StartManager.shared.getIpResponseTime ?? "",
|
||||||
|
"ecpm": StartManager.shared.ecpm ?? "",
|
||||||
|
"dsp": StartManager.shared.dsp ?? "",
|
||||||
|
"network": StartManager.shared.network ?? "",
|
||||||
|
"showStatus": 0,
|
||||||
|
"washParam": true,
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
let headers: HTTPHeaders = [
|
||||||
|
"Content-Type": "application/json"
|
||||||
|
]
|
||||||
|
|
||||||
|
NetworkManager.shared.postRequest(url: url, parameters: parameters, headers: headers) { result in
|
||||||
|
switch result {
|
||||||
|
case .success(let data):
|
||||||
|
print("Response:--- \(data)")
|
||||||
|
case .failure(let error):
|
||||||
|
print("Error:--- \(error)")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
func setPostSHOW(){
|
||||||
|
let url = "http://111.9.47.226:38080/top_selection/save_ad_show_log"
|
||||||
|
let parameters:[String : Any] = [
|
||||||
|
"deviceId": StartManager.shared.devicID ?? "",
|
||||||
|
"localIp": StartManager.shared.localIP ?? "",
|
||||||
|
"remoteIp": StartManager.shared.publicIP ?? "",
|
||||||
|
"linkId": "",
|
||||||
|
"packageName": "com.wallpapaer.hd.live.app",
|
||||||
|
"gaid": StartManager.shared.idfaid ?? "",
|
||||||
|
"dataId": "",
|
||||||
|
"shelfNumber":"社区发布以及点击进入详情",
|
||||||
|
"succeed": StartManager.shared.succeed,
|
||||||
|
"loadTime": "",
|
||||||
|
"adPlatform": StartManager.shared.adPlatform ?? "",
|
||||||
|
"countryCode": StartManager.shared.countryCode ?? "",
|
||||||
|
"adId": StartManager.shared.adId ?? "",
|
||||||
|
"platformResponseTime": StartManager.shared.platformResponseTime ?? "",
|
||||||
|
"getIpResponseTime": StartManager.shared.getIpResponseTime ?? "",
|
||||||
|
"ecpm": StartManager.shared.ecpm ?? "",
|
||||||
|
"dsp": StartManager.shared.dsp ?? "",
|
||||||
|
"network": StartManager.shared.network ?? "",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
let headers: HTTPHeaders = [
|
||||||
|
"Content-Type": "application/json"
|
||||||
|
]
|
||||||
|
|
||||||
|
NetworkManager.shared.postRequest(url: url, parameters: parameters, headers: headers) { result in
|
||||||
|
switch result {
|
||||||
|
case .success(let data):
|
||||||
|
print("Response:--- \(data)")
|
||||||
|
case .failure(let error):
|
||||||
|
print("Error:--- \(error)")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
//extension WA_AddPlayerVC: UIImagePickerControllerDelegate & UINavigationControllerDelegate {
|
||||||
|
// func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
|
||||||
|
// if let selectedImage = info[UIImagePickerController.InfoKey.originalImage] as? UIImage {
|
||||||
|
//// contentImageV.image = selectedImage
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// picker.dismiss(animated: true, completion: nil)
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// func imagePickerControllerDidCancel(_ picker: UIImagePickerController) {
|
||||||
|
// picker.dismiss(animated: true, completion: nil)
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
extension WA_AddPlayerVC:MTGNewInterstitialBidAdDelegate{
|
||||||
|
|
||||||
|
// func newInterstitialBidAdShowSuccess(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
// print("广告展示成功")
|
||||||
|
// }
|
||||||
|
|
||||||
|
func newInterstitialBidAdResourceLoadSuccess(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
print("资源加载成功,表示可播放状态")
|
||||||
|
}
|
||||||
|
|
||||||
|
func newInterstitialBidAdLoadSuccess(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
print("广告加载成功")
|
||||||
|
StartManager.shared.succeed = true
|
||||||
|
// StartManager.shared.loadTime = self.adLoadTime
|
||||||
|
StartManager.shared.adPlatform = "mbridge"
|
||||||
|
StartManager.shared.countryCode = ALSdk.shared().configuration.countryCode
|
||||||
|
StartManager.shared.adId = "3520023"
|
||||||
|
StartManager.shared.platformResponseTime = 0
|
||||||
|
// StartManager.shared.ecpm = Float(ad.revenue)
|
||||||
|
StartManager.shared.dsp = ""
|
||||||
|
StartManager.shared.network = ""
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
func newInterstitialBidAdLoadFail(_ error: any Error, adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
|
||||||
|
print("-----\(error)")
|
||||||
|
// print(" 广告加载失败")
|
||||||
|
self.navigationController?.popViewController(animated: true)
|
||||||
|
}
|
||||||
|
|
||||||
|
func newInterstitialBidAdShowSuccess(withBidToken bidToken: String, adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
|
||||||
|
print("广告展示成功")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
func newInterstitialBidAdShowFail(_ error: any Error, adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
print("广告展示失败")
|
||||||
|
self.navigationController?.popViewController(animated: true)
|
||||||
|
}
|
||||||
|
|
||||||
|
func newInterstitialBidAdPlayCompleted(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
|
||||||
|
print("广告播放完全播放回调")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
func newInterstitialBidAdEndCardShowSuccess(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
print("视频播放完成后展示结果页")
|
||||||
|
}
|
||||||
|
|
||||||
|
func newInterstitialBidAdClicked(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
|
||||||
|
print("广告被点击")
|
||||||
|
}
|
||||||
|
|
||||||
|
// 广告被关闭
|
||||||
|
func newInterstitialBidAdDidClosed(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
print("广告被关闭")
|
||||||
|
self.navigationController?.popViewController(animated: true)
|
||||||
|
}
|
||||||
|
}
|
||||||
116
wallpaper_project/PlayerVC/C/WA_AddPlayerVC.xib
Normal file
116
wallpaper_project/PlayerVC/C/WA_AddPlayerVC.xib
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||||
|
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||||
|
<dependencies>
|
||||||
|
<deployment identifier="iOS"/>
|
||||||
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/>
|
||||||
|
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||||
|
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||||
|
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||||
|
</dependencies>
|
||||||
|
<objects>
|
||||||
|
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="WA_AddPlayerVC" customModule="wallpaper_project" customModuleProvider="target">
|
||||||
|
<connections>
|
||||||
|
<outlet property="view" destination="f9C-Bz-ldZ" id="HKK-5l-LsT"/>
|
||||||
|
</connections>
|
||||||
|
</placeholder>
|
||||||
|
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||||
|
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="f9C-Bz-ldZ">
|
||||||
|
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
|
<subviews>
|
||||||
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Q5S-UO-5Ch">
|
||||||
|
<rect key="frame" x="20" y="59" width="40" height="40"/>
|
||||||
|
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstAttribute="height" constant="40" id="Twn-LZ-60t"/>
|
||||||
|
<constraint firstAttribute="width" constant="40" id="jne-Ss-pgu"/>
|
||||||
|
</constraints>
|
||||||
|
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||||
|
<state key="normal" image="back_black"/>
|
||||||
|
</button>
|
||||||
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Recommend my wallpaper" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8ix-Tu-TpG">
|
||||||
|
<rect key="frame" x="93.666666666666686" y="68.666666666666671" width="206" height="20.666666666666671"/>
|
||||||
|
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/>
|
||||||
|
<nil key="textColor"/>
|
||||||
|
<nil key="highlightedColor"/>
|
||||||
|
</label>
|
||||||
|
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="wT7-uV-4u8">
|
||||||
|
<rect key="frame" x="20" y="109.33333333333331" width="353" height="120"/>
|
||||||
|
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstAttribute="height" constant="120" id="3c6-66-2Os"/>
|
||||||
|
</constraints>
|
||||||
|
<color key="textColor" systemColor="labelColor"/>
|
||||||
|
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||||
|
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
|
||||||
|
</textView>
|
||||||
|
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="add_s" translatesAutoresizingMaskIntoConstraints="NO" id="gvf-Lg-vPP">
|
||||||
|
<rect key="frame" x="65" y="309.33333333333331" width="60" height="60"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstAttribute="width" constant="60" id="Yia-3M-phq"/>
|
||||||
|
<constraint firstAttribute="height" constant="60" id="uWh-0o-bs0"/>
|
||||||
|
</constraints>
|
||||||
|
</imageView>
|
||||||
|
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="PI4-1x-gN9">
|
||||||
|
<rect key="frame" x="20" y="239.33333333333337" width="150" height="200"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstAttribute="width" constant="150" id="jT4-43-xOi"/>
|
||||||
|
<constraint firstAttribute="height" constant="200" id="oeM-o4-w1k"/>
|
||||||
|
</constraints>
|
||||||
|
</imageView>
|
||||||
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XcR-29-QsU">
|
||||||
|
<rect key="frame" x="20" y="239.33333333333337" width="150" height="200"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstAttribute="height" constant="200" id="Oun-48-jxl"/>
|
||||||
|
<constraint firstAttribute="width" constant="150" id="ohH-DC-FgE"/>
|
||||||
|
</constraints>
|
||||||
|
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||||
|
</button>
|
||||||
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Sz5-1j-Mbd">
|
||||||
|
<rect key="frame" x="20" y="499.33333333333326" width="353" height="50"/>
|
||||||
|
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstAttribute="height" constant="50" id="YPD-Rl-6lM"/>
|
||||||
|
</constraints>
|
||||||
|
<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
|
||||||
|
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||||
|
<state key="normal" title="sure">
|
||||||
|
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
|
</state>
|
||||||
|
</button>
|
||||||
|
</subviews>
|
||||||
|
<viewLayoutGuide key="safeArea" id="Yb6-2I-07d"/>
|
||||||
|
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstItem="Q5S-UO-5Ch" firstAttribute="leading" secondItem="Yb6-2I-07d" secondAttribute="leading" constant="20" id="3VJ-3B-AZw"/>
|
||||||
|
<constraint firstItem="8ix-Tu-TpG" firstAttribute="centerX" secondItem="f9C-Bz-ldZ" secondAttribute="centerX" id="4f4-5W-i5d"/>
|
||||||
|
<constraint firstItem="gvf-Lg-vPP" firstAttribute="centerX" secondItem="PI4-1x-gN9" secondAttribute="centerX" id="BVK-UP-7aa"/>
|
||||||
|
<constraint firstItem="XcR-29-QsU" firstAttribute="leading" secondItem="Yb6-2I-07d" secondAttribute="leading" constant="20" id="ERC-o9-rtq"/>
|
||||||
|
<constraint firstItem="wT7-uV-4u8" firstAttribute="top" secondItem="8ix-Tu-TpG" secondAttribute="bottom" constant="20" id="EyE-MY-Wef"/>
|
||||||
|
<constraint firstItem="gvf-Lg-vPP" firstAttribute="centerY" secondItem="PI4-1x-gN9" secondAttribute="centerY" id="GDe-yf-jr7"/>
|
||||||
|
<constraint firstItem="XcR-29-QsU" firstAttribute="top" secondItem="wT7-uV-4u8" secondAttribute="bottom" constant="10" id="Kbi-QD-edL"/>
|
||||||
|
<constraint firstItem="PI4-1x-gN9" firstAttribute="leading" secondItem="Yb6-2I-07d" secondAttribute="leading" constant="20" id="Lt8-Kh-q1X"/>
|
||||||
|
<constraint firstItem="wT7-uV-4u8" firstAttribute="leading" secondItem="Yb6-2I-07d" secondAttribute="leading" constant="20" id="O0F-rF-0eK"/>
|
||||||
|
<constraint firstItem="Sz5-1j-Mbd" firstAttribute="top" secondItem="PI4-1x-gN9" secondAttribute="bottom" constant="60" id="ONk-v0-hCG"/>
|
||||||
|
<constraint firstItem="Yb6-2I-07d" firstAttribute="trailing" secondItem="Sz5-1j-Mbd" secondAttribute="trailing" constant="20" id="XMX-pj-E7S"/>
|
||||||
|
<constraint firstItem="Sz5-1j-Mbd" firstAttribute="leading" secondItem="Yb6-2I-07d" secondAttribute="leading" constant="20" id="ZAo-g5-jCr"/>
|
||||||
|
<constraint firstItem="8ix-Tu-TpG" firstAttribute="centerY" secondItem="Q5S-UO-5Ch" secondAttribute="centerY" id="bny-Xa-Ywf"/>
|
||||||
|
<constraint firstItem="PI4-1x-gN9" firstAttribute="top" secondItem="wT7-uV-4u8" secondAttribute="bottom" constant="10" id="jml-2u-QdW"/>
|
||||||
|
<constraint firstItem="Q5S-UO-5Ch" firstAttribute="top" secondItem="Yb6-2I-07d" secondAttribute="top" id="o2C-Dv-gDL"/>
|
||||||
|
<constraint firstItem="Yb6-2I-07d" firstAttribute="trailing" secondItem="wT7-uV-4u8" secondAttribute="trailing" constant="20" id="wGD-Ic-Nq9"/>
|
||||||
|
</constraints>
|
||||||
|
<point key="canvasLocation" x="132" y="-11"/>
|
||||||
|
</view>
|
||||||
|
</objects>
|
||||||
|
<resources>
|
||||||
|
<image name="add_s" width="48" height="48"/>
|
||||||
|
<image name="back_black" width="20" height="20"/>
|
||||||
|
<systemColor name="labelColor">
|
||||||
|
<color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
|
</systemColor>
|
||||||
|
<systemColor name="systemBackgroundColor">
|
||||||
|
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
|
</systemColor>
|
||||||
|
</resources>
|
||||||
|
</document>
|
||||||
325
wallpaper_project/PlayerVC/C/WA_CommunityPlayerVC.swift
Normal file
325
wallpaper_project/PlayerVC/C/WA_CommunityPlayerVC.swift
Normal file
@ -0,0 +1,325 @@
|
|||||||
|
//
|
||||||
|
// WA_CommunityPlayerVC.swift
|
||||||
|
// wallpaper_project
|
||||||
|
//
|
||||||
|
// Created by 忆海16 on 2024/7/19.
|
||||||
|
//
|
||||||
|
|
||||||
|
import UIKit
|
||||||
|
import FirebaseAnalytics
|
||||||
|
import FirebaseCore
|
||||||
|
import AppLovinSDK
|
||||||
|
import Alamofire
|
||||||
|
import SVProgressHUD
|
||||||
|
import FirebaseRemoteConfig
|
||||||
|
import MTGSDKNewInterstitial
|
||||||
|
import MTGSDKBidding
|
||||||
|
import MTGSDK
|
||||||
|
|
||||||
|
|
||||||
|
class WA_CommunityPlayerVC: WA_RootVC {
|
||||||
|
|
||||||
|
@IBOutlet weak var tableView: UITableView!
|
||||||
|
|
||||||
|
var MKArr = [WA_RakModel]()
|
||||||
|
var interstitialAd: MAInterstitialAd!
|
||||||
|
var retryAttempt = 0.0
|
||||||
|
var touchrelease:Bool = false
|
||||||
|
var indexrow:Int?
|
||||||
|
var isseleted:Bool = false
|
||||||
|
let activityView = UIActivityIndicatorView()
|
||||||
|
|
||||||
|
var remoteConfig: RemoteConfig!
|
||||||
|
|
||||||
|
var isadshow:Bool = false
|
||||||
|
|
||||||
|
var bidToken:String?
|
||||||
|
var newInterstitialAdManager:MTGNewInterstitialBidAdManager?
|
||||||
|
|
||||||
|
|
||||||
|
var adCheckTimer: Timer?
|
||||||
|
var adCheckStartTime: Date?
|
||||||
|
var adLoadTime: Int = 0
|
||||||
|
|
||||||
|
override func viewDidLoad() {
|
||||||
|
super.viewDidLoad()
|
||||||
|
// self.createInterstitialAd()
|
||||||
|
setNetwork()
|
||||||
|
settableView()
|
||||||
|
|
||||||
|
let param = MTGBiddingRequestParameter(placementId: "1650169", unitId: "3518993", basePrice: nil)
|
||||||
|
|
||||||
|
MTGBiddingRequest.getBidWith(param) { bidResponse in
|
||||||
|
if bidResponse.success{
|
||||||
|
self.bidToken = bidResponse.bidToken
|
||||||
|
bidResponse.notifyWin()
|
||||||
|
self.newInterstitialAdManager = MTGNewInterstitialBidAdManager(placementId: "1650169", unitId: "3518993", delegate: self)
|
||||||
|
StartManager.shared.ecpm = Float(bidResponse.price)
|
||||||
|
self.newInterstitialAdManager?.loadAd(withBidToken:self.bidToken!)
|
||||||
|
|
||||||
|
self.startAdCheck()
|
||||||
|
}else{
|
||||||
|
// WA_TabbarCommon.TabBarController()
|
||||||
|
self.navigationController?.popViewController(animated: true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func settableView(){
|
||||||
|
tableView.delegate = self
|
||||||
|
tableView.dataSource = self
|
||||||
|
tableView.register(UINib(nibName: "WA_RakingCell", bundle: nil), forCellReuseIdentifier: "WA_RakingCell")
|
||||||
|
}
|
||||||
|
|
||||||
|
func setNetwork(){
|
||||||
|
if let path = Bundle.main.path(forResource: "rankJson", ofType: "json"),
|
||||||
|
let jsonData = try? Data(contentsOf: URL(fileURLWithPath: path)),
|
||||||
|
let rkModels = try? JSONDecoder().decode([WA_RakModel].self, from: jsonData) {
|
||||||
|
MKArr = rkModels
|
||||||
|
} else {
|
||||||
|
print("Failed to read or parse JSON file.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
override func viewWillAppear(_ animated: Bool) {
|
||||||
|
super.viewWillAppear(animated)
|
||||||
|
self.navigationController?.navigationBar.isHidden = true
|
||||||
|
// 初始化 Remote Config
|
||||||
|
// remoteConfig = RemoteConfig.remoteConfig()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
// /定时加载
|
||||||
|
func startAdCheck() {
|
||||||
|
|
||||||
|
adCheckStartTime = Date()
|
||||||
|
adCheckTimer = Timer.scheduledTimer(timeInterval: 0.01, target: self, selector: #selector(checkAdStatus), userInfo: nil, repeats: true)
|
||||||
|
}
|
||||||
|
|
||||||
|
@objc func checkAdStatus() {
|
||||||
|
let elapsedTime = Date().timeIntervalSince(adCheckStartTime!)
|
||||||
|
let elapsedTimeInMilliseconds = Int(elapsedTime * 1000)
|
||||||
|
|
||||||
|
let issureready = newInterstitialAdManager!.isAdReady()
|
||||||
|
|
||||||
|
if issureready {
|
||||||
|
|
||||||
|
self.newInterstitialAdManager?.show(from: self)
|
||||||
|
self.setPostSHOW()
|
||||||
|
|
||||||
|
|
||||||
|
} else if elapsedTimeInMilliseconds >= 10000 { // 10000 毫秒 = 10 秒
|
||||||
|
adCheckTimer?.invalidate()
|
||||||
|
self.navigationController?.popViewController(animated: true)
|
||||||
|
} else {
|
||||||
|
print("广告未准备好,继续检查...")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@IBAction func addBtn(_ sender: Any) {
|
||||||
|
self.isseleted = false
|
||||||
|
|
||||||
|
let issureready = newInterstitialAdManager?.isAdReady()
|
||||||
|
if self.isadshow == true{
|
||||||
|
if ((issureready) != nil) {
|
||||||
|
newInterstitialAdManager?.show(from: self)
|
||||||
|
}else{
|
||||||
|
if isLoggedIn(){
|
||||||
|
let vc = WA_AddVC()
|
||||||
|
vc.modalPresentationStyle = .fullScreen
|
||||||
|
self.present(vc, animated: true)
|
||||||
|
|
||||||
|
}else{
|
||||||
|
let vc = WA_LoginVC()
|
||||||
|
self.navigationController?.pushViewController(vc, animated: true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}else{
|
||||||
|
if isLoggedIn(){
|
||||||
|
let vc = WA_AddVC()
|
||||||
|
vc.modalPresentationStyle = .fullScreen
|
||||||
|
self.present(vc, animated: true)
|
||||||
|
|
||||||
|
}else{
|
||||||
|
let vc = WA_LoginVC()
|
||||||
|
self.navigationController?.pushViewController(vc, animated: true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func setPostload(){
|
||||||
|
let url = "http://111.9.47.226:38080/top_selection/save_ad_load_log"
|
||||||
|
let parameters:[String : Any] = [
|
||||||
|
"deviceId": StartManager.shared.devicID ?? "",
|
||||||
|
"localIp": StartManager.shared.localIP ?? "",
|
||||||
|
"remoteIp": StartManager.shared.publicIP ?? "",
|
||||||
|
"linkId": "",
|
||||||
|
"packageName": "com.wallpapaer.hd.live.app",
|
||||||
|
"gaid": StartManager.shared.idfaid ?? "",
|
||||||
|
"dataId": "",
|
||||||
|
"shelfNumber":"社区发布以及点击进入详情",
|
||||||
|
"succeed": StartManager.shared.succeed,
|
||||||
|
"loadTime": "",
|
||||||
|
"adPlatform": StartManager.shared.adPlatform ?? "",
|
||||||
|
"countryCode": StartManager.shared.countryCode ?? "",
|
||||||
|
"adId": StartManager.shared.adId ?? "",
|
||||||
|
"platformResponseTime": StartManager.shared.platformResponseTime ?? "",
|
||||||
|
"getIpResponseTime": StartManager.shared.getIpResponseTime ?? "",
|
||||||
|
"ecpm": StartManager.shared.ecpm ?? "",
|
||||||
|
"dsp": StartManager.shared.dsp ?? "",
|
||||||
|
"network": StartManager.shared.network ?? "",
|
||||||
|
"showStatus": 0,
|
||||||
|
"washParam": true,
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
let headers: HTTPHeaders = [
|
||||||
|
"Content-Type": "application/json"
|
||||||
|
]
|
||||||
|
|
||||||
|
NetworkManager.shared.postRequest(url: url, parameters: parameters, headers: headers) { result in
|
||||||
|
switch result {
|
||||||
|
case .success(let data):
|
||||||
|
print("Response:--- \(data)")
|
||||||
|
case .failure(let error):
|
||||||
|
print("Error:--- \(error)")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
func setPostSHOW(){
|
||||||
|
let url = "http://111.9.47.226:38080/top_selection/save_ad_show_log"
|
||||||
|
let parameters:[String : Any] = [
|
||||||
|
"deviceId": StartManager.shared.devicID ?? "",
|
||||||
|
"localIp": StartManager.shared.localIP ?? "",
|
||||||
|
"remoteIp": StartManager.shared.publicIP ?? "",
|
||||||
|
"linkId": "",
|
||||||
|
"packageName": "com.wallpapaer.hd.live.app",
|
||||||
|
"gaid": StartManager.shared.idfaid ?? "",
|
||||||
|
"dataId": "",
|
||||||
|
"shelfNumber":"社区发布以及点击进入详情",
|
||||||
|
"succeed": StartManager.shared.succeed,
|
||||||
|
"loadTime": "",
|
||||||
|
"adPlatform": StartManager.shared.adPlatform ?? "",
|
||||||
|
"countryCode": StartManager.shared.countryCode ?? "",
|
||||||
|
"adId": StartManager.shared.adId ?? "",
|
||||||
|
"platformResponseTime": StartManager.shared.platformResponseTime ?? "",
|
||||||
|
"getIpResponseTime": StartManager.shared.getIpResponseTime ?? "",
|
||||||
|
"ecpm": StartManager.shared.ecpm ?? "",
|
||||||
|
"dsp": StartManager.shared.dsp ?? "",
|
||||||
|
"network": StartManager.shared.network ?? "",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
let headers: HTTPHeaders = [
|
||||||
|
"Content-Type": "application/json"
|
||||||
|
]
|
||||||
|
|
||||||
|
NetworkManager.shared.postRequest(url: url, parameters: parameters, headers: headers) { result in
|
||||||
|
switch result {
|
||||||
|
case .success(let data):
|
||||||
|
print("Response:--- \(data)")
|
||||||
|
case .failure(let error):
|
||||||
|
print("Error:--- \(error)")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
extension WA_CommunityPlayerVC:UITableViewDelegate,UITableViewDataSource{
|
||||||
|
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||||
|
return MKArr.count
|
||||||
|
}
|
||||||
|
|
||||||
|
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||||
|
|
||||||
|
let cell = tableView.dequeueReusableCell(withIdentifier: "WA_RakingCell", for: indexPath)as!WA_RakingCell
|
||||||
|
cell.model = MKArr[indexPath.row]
|
||||||
|
cell.shView.isHidden = true
|
||||||
|
|
||||||
|
return cell
|
||||||
|
|
||||||
|
}
|
||||||
|
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
extension WA_CommunityPlayerVC:MTGNewInterstitialBidAdDelegate{
|
||||||
|
|
||||||
|
func newInterstitialBidAdResourceLoadSuccess(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
print("资源加载成功,表示可播放状态")
|
||||||
|
}
|
||||||
|
|
||||||
|
func newInterstitialBidAdLoadSuccess(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
print("广告加载成功")
|
||||||
|
StartManager.shared.succeed = true
|
||||||
|
// StartManager.shared.loadTime = self.adLoadTime
|
||||||
|
StartManager.shared.adPlatform = "mbridge"
|
||||||
|
StartManager.shared.countryCode = ALSdk.shared().configuration.countryCode
|
||||||
|
StartManager.shared.adId = "3518993"
|
||||||
|
StartManager.shared.platformResponseTime = 0
|
||||||
|
// StartManager.shared.ecpm = Float(ad.revenue)
|
||||||
|
StartManager.shared.dsp = ""
|
||||||
|
StartManager.shared.network = ""
|
||||||
|
|
||||||
|
|
||||||
|
setPostload()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
func newInterstitialBidAdLoadFail(_ error: any Error, adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
|
||||||
|
print("-----\(error)")
|
||||||
|
// print(" 广告加载失败")
|
||||||
|
self.navigationController?.popViewController(animated: true)
|
||||||
|
}
|
||||||
|
|
||||||
|
func newInterstitialBidAdShowSuccess(withBidToken bidToken: String, adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
|
||||||
|
print("广告展示成功")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
func newInterstitialBidAdShowFail(_ error: any Error, adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
print("广告展示失败")
|
||||||
|
self.navigationController?.popViewController(animated: true)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func newInterstitialBidAdPlayCompleted(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
|
||||||
|
print("广告播放完全播放回调")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
func newInterstitialBidAdEndCardShowSuccess(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
print("视频播放完成后展示结果页")
|
||||||
|
}
|
||||||
|
|
||||||
|
func newInterstitialBidAdClicked(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
|
||||||
|
print("广告被点击")
|
||||||
|
}
|
||||||
|
|
||||||
|
// 广告被关闭
|
||||||
|
func newInterstitialBidAdDidClosed(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
print("广告被关闭")
|
||||||
|
self.navigationController?.popViewController(animated: true)
|
||||||
|
}
|
||||||
|
}
|
||||||
56
wallpaper_project/PlayerVC/C/WA_CommunityPlayerVC.xib
Normal file
56
wallpaper_project/PlayerVC/C/WA_CommunityPlayerVC.xib
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||||
|
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||||
|
<dependencies>
|
||||||
|
<deployment identifier="iOS"/>
|
||||||
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/>
|
||||||
|
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||||
|
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||||
|
</dependencies>
|
||||||
|
<objects>
|
||||||
|
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="WA_CommunityPlayerVC" customModule="wallpaper_project" customModuleProvider="target">
|
||||||
|
<connections>
|
||||||
|
<outlet property="tableView" destination="w0J-5u-6mc" id="xSh-sE-dqe"/>
|
||||||
|
<outlet property="view" destination="B1d-HQ-Adm" id="ukh-gK-6Yw"/>
|
||||||
|
</connections>
|
||||||
|
</placeholder>
|
||||||
|
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||||
|
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="B1d-HQ-Adm">
|
||||||
|
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
|
<subviews>
|
||||||
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Community" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MVk-Eu-3ba">
|
||||||
|
<rect key="frame" x="130.66666666666669" y="59" width="131.66666666666669" height="30"/>
|
||||||
|
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="25"/>
|
||||||
|
<nil key="textColor"/>
|
||||||
|
<nil key="highlightedColor"/>
|
||||||
|
</label>
|
||||||
|
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="w0J-5u-6mc">
|
||||||
|
<rect key="frame" x="0.0" y="109" width="393" height="709"/>
|
||||||
|
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
|
</tableView>
|
||||||
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Upo-Lg-CKV">
|
||||||
|
<rect key="frame" x="313" y="738" width="60" height="60"/>
|
||||||
|
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||||
|
<state key="normal" image="add"/>
|
||||||
|
</button>
|
||||||
|
</subviews>
|
||||||
|
<viewLayoutGuide key="safeArea" id="cMm-YL-WOc"/>
|
||||||
|
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstItem="w0J-5u-6mc" firstAttribute="top" secondItem="MVk-Eu-3ba" secondAttribute="bottom" constant="20" id="2vm-HT-hVd"/>
|
||||||
|
<constraint firstItem="cMm-YL-WOc" firstAttribute="trailing" secondItem="w0J-5u-6mc" secondAttribute="trailing" id="7d1-gs-jS8"/>
|
||||||
|
<constraint firstItem="cMm-YL-WOc" firstAttribute="trailing" secondItem="Upo-Lg-CKV" secondAttribute="trailing" constant="20" id="8AQ-bg-Ym2"/>
|
||||||
|
<constraint firstItem="w0J-5u-6mc" firstAttribute="leading" secondItem="cMm-YL-WOc" secondAttribute="leading" id="RQK-GM-hbN"/>
|
||||||
|
<constraint firstItem="MVk-Eu-3ba" firstAttribute="centerX" secondItem="B1d-HQ-Adm" secondAttribute="centerX" id="V26-IJ-uJr"/>
|
||||||
|
<constraint firstItem="MVk-Eu-3ba" firstAttribute="top" secondItem="cMm-YL-WOc" secondAttribute="top" id="Xrj-48-BdS"/>
|
||||||
|
<constraint firstItem="cMm-YL-WOc" firstAttribute="bottom" secondItem="Upo-Lg-CKV" secondAttribute="bottom" constant="20" id="bry-Ji-Hpn"/>
|
||||||
|
<constraint firstItem="cMm-YL-WOc" firstAttribute="bottom" secondItem="w0J-5u-6mc" secondAttribute="bottom" id="ywN-r1-uFY"/>
|
||||||
|
</constraints>
|
||||||
|
<point key="canvasLocation" x="-164" y="-38"/>
|
||||||
|
</view>
|
||||||
|
</objects>
|
||||||
|
<resources>
|
||||||
|
<image name="add" width="60" height="60"/>
|
||||||
|
</resources>
|
||||||
|
</document>
|
||||||
587
wallpaper_project/PlayerVC/C/WA_player4kVC.swift
Normal file
587
wallpaper_project/PlayerVC/C/WA_player4kVC.swift
Normal file
@ -0,0 +1,587 @@
|
|||||||
|
//
|
||||||
|
// WA_player4kVC.swift
|
||||||
|
// wallpaper_project
|
||||||
|
//
|
||||||
|
// Created by 忆海16 on 2024/7/19.
|
||||||
|
//
|
||||||
|
|
||||||
|
import UIKit
|
||||||
|
|
||||||
|
import JXSegmentedView
|
||||||
|
import MJExtension
|
||||||
|
import MJRefresh
|
||||||
|
import FirebaseAnalytics
|
||||||
|
import AppLovinSDK
|
||||||
|
import Alamofire
|
||||||
|
import FirebaseRemoteConfig
|
||||||
|
import MTGSDKNewInterstitial
|
||||||
|
import MTGSDKBidding
|
||||||
|
import MTGSDK
|
||||||
|
|
||||||
|
class WA_player4kVC: WA_RootVC {
|
||||||
|
@IBOutlet weak var collectionView: UICollectionView!
|
||||||
|
|
||||||
|
@IBOutlet weak var nameLabel: UILabel!
|
||||||
|
|
||||||
|
var wallpapers = [WA_3DModel]()
|
||||||
|
|
||||||
|
var currentPage: Int = 1 // 当前页数
|
||||||
|
let pageSize: Int = 10 // 每页加载的数量
|
||||||
|
var interstitialAd: MAInterstitialAd!
|
||||||
|
var retryAttempt = 0.0
|
||||||
|
// 顶部刷新
|
||||||
|
let header = MJRefreshNormalHeader()
|
||||||
|
// 底部刷新
|
||||||
|
let footer = MJRefreshAutoNormalFooter()
|
||||||
|
// var MKArr = [WallpaperModel]()
|
||||||
|
|
||||||
|
// 存储不同类型的壁纸数组
|
||||||
|
var newestWallpapers: [WallpaperData] = []
|
||||||
|
var popularWallpapers: [WallpaperData] = []
|
||||||
|
var FlowersWallpapers: [WallpaperData] = []
|
||||||
|
var SuperheroesWallpapers: [WallpaperData] = []
|
||||||
|
var ChristmasWallpapers: [WallpaperData] = []
|
||||||
|
|
||||||
|
|
||||||
|
var remoteConfig: RemoteConfig!
|
||||||
|
|
||||||
|
var isadshow:Bool = false
|
||||||
|
|
||||||
|
var bidToken:String?
|
||||||
|
var newInterstitialAdManager:MTGNewInterstitialBidAdManager?
|
||||||
|
var type:Int = 0
|
||||||
|
|
||||||
|
|
||||||
|
var adCheckTimer: Timer?
|
||||||
|
var adCheckStartTime: Date?
|
||||||
|
var adLoadTime: Int = 0
|
||||||
|
|
||||||
|
override func viewDidLoad() {
|
||||||
|
super.viewDidLoad()
|
||||||
|
let param = MTGBiddingRequestParameter(placementId: "1636950", unitId: "3501963", basePrice: nil)
|
||||||
|
|
||||||
|
MTGBiddingRequest.getBidWith(param) { bidResponse in
|
||||||
|
if bidResponse.success{
|
||||||
|
self.bidToken = bidResponse.bidToken
|
||||||
|
bidResponse.notifyWin()
|
||||||
|
self.newInterstitialAdManager = MTGNewInterstitialBidAdManager(placementId: "1636950", unitId: "3501963", delegate: self)
|
||||||
|
StartManager.shared.ecpm = Float(bidResponse.price)
|
||||||
|
self.newInterstitialAdManager?.loadAd(withBidToken:self.bidToken!)
|
||||||
|
|
||||||
|
|
||||||
|
self.startAdCheck()
|
||||||
|
}else{
|
||||||
|
|
||||||
|
self.navigationController?.popViewController(animated: true)
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// self.createInterstitialAd()
|
||||||
|
Analytics.logEvent("in_4k", parameters: nil)
|
||||||
|
self.view.backgroundColor = .white
|
||||||
|
setCollectionView()
|
||||||
|
|
||||||
|
setRefresh()
|
||||||
|
|
||||||
|
if StartManager.shared.superHero == true{
|
||||||
|
// return dataimag.count
|
||||||
|
// cell.typeImagV.image = UIImage(named: "\(self.dataimag[indexPath.row])")
|
||||||
|
if self.type == 1{
|
||||||
|
self.nameLabel.text = "4K"
|
||||||
|
// self.wallpapers.count
|
||||||
|
}else if type == 2{
|
||||||
|
self.nameLabel.text = "Newest"
|
||||||
|
}else if type == 3{
|
||||||
|
self.nameLabel.text = "Popular Wallpapers"
|
||||||
|
}else if type == 4{
|
||||||
|
self.nameLabel.text = "Superheroes"
|
||||||
|
}else if type == 5{
|
||||||
|
self.nameLabel.text = "Christmas Wallpapers"
|
||||||
|
}else{
|
||||||
|
self.nameLabel.text = "Flowers"
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
// return dataimaghero.count
|
||||||
|
// cell.typeImagV.image = UIImage(named: "\(self.dataimaghero[indexPath.row])")
|
||||||
|
if self.type == 1{
|
||||||
|
self.nameLabel.text = "4K"
|
||||||
|
// self.wallpapers.count
|
||||||
|
}else if type == 2{
|
||||||
|
self.nameLabel.text = "Newest"
|
||||||
|
}else if type == 3{
|
||||||
|
self.nameLabel.text = "Popular Wallpapers"
|
||||||
|
}else if type == 4{
|
||||||
|
self.nameLabel.text = "Christmas Wallpapers"
|
||||||
|
}else{
|
||||||
|
self.nameLabel.text = "Flowers"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
@IBAction func backbtn(_ sender: Any) {
|
||||||
|
|
||||||
|
let issureready = newInterstitialAdManager?.isAdReady()
|
||||||
|
if ((issureready) != nil) {
|
||||||
|
newInterstitialAdManager?.show(from: self)
|
||||||
|
self.setPostSHOW()
|
||||||
|
}else{
|
||||||
|
self.navigationController?.popViewController(animated: true)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
@objc func setRefresh(){
|
||||||
|
refreshData()
|
||||||
|
|
||||||
|
header.setRefreshingTarget(self, refreshingAction: #selector(WA_LIVEVC.setRefresh))
|
||||||
|
// 现在的版本要用mj_header
|
||||||
|
|
||||||
|
header.setTitle("pull-to-refresh", for: .idle)
|
||||||
|
header.setTitle("Release updates", for: .pulling)
|
||||||
|
header.setTitle("Refreshing...", for: .refreshing)
|
||||||
|
self.collectionView.mj_header = header
|
||||||
|
|
||||||
|
|
||||||
|
// 上拉刷新
|
||||||
|
footer.setRefreshingTarget(self, refreshingAction: #selector(WA_LIVEVC.loadMoreData))
|
||||||
|
footer.setTitle("Pull up loading", for: .idle)
|
||||||
|
footer.setTitle("Release Load", for: .pulling)
|
||||||
|
footer.setTitle("Loading...", for: .refreshing)
|
||||||
|
self.collectionView.mj_footer = footer
|
||||||
|
|
||||||
|
|
||||||
|
header.beginRefreshing()
|
||||||
|
// footer.beginRefreshing()
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
// 下拉刷新
|
||||||
|
@objc func refreshData() {
|
||||||
|
currentPage = 1
|
||||||
|
setJsondata()
|
||||||
|
settypeNetwork()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 上拉加载更多
|
||||||
|
@objc func loadMoreData() {
|
||||||
|
currentPage += 1
|
||||||
|
setJsondata()
|
||||||
|
settypeNetwork()
|
||||||
|
}
|
||||||
|
|
||||||
|
override func viewWillAppear(_ animated: Bool) {
|
||||||
|
super.viewWillAppear(animated)
|
||||||
|
navigationController?.navigationBar.isHidden = true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// /定时加载
|
||||||
|
func startAdCheck() {
|
||||||
|
|
||||||
|
adCheckStartTime = Date()
|
||||||
|
adCheckTimer = Timer.scheduledTimer(timeInterval: 0.01, target: self, selector: #selector(checkAdStatus), userInfo: nil, repeats: true)
|
||||||
|
}
|
||||||
|
|
||||||
|
@objc func checkAdStatus() {
|
||||||
|
let elapsedTime = Date().timeIntervalSince(adCheckStartTime!)
|
||||||
|
let elapsedTimeInMilliseconds = Int(elapsedTime * 1000)
|
||||||
|
|
||||||
|
let issureready = newInterstitialAdManager!.isAdReady()
|
||||||
|
|
||||||
|
if issureready {
|
||||||
|
|
||||||
|
self.newInterstitialAdManager?.show(from: self)
|
||||||
|
self.setPostSHOW()
|
||||||
|
|
||||||
|
} else if elapsedTimeInMilliseconds >= 10000 { // 10000 毫秒 = 10 秒
|
||||||
|
adCheckTimer?.invalidate()
|
||||||
|
self.navigationController?.popViewController(animated: true)
|
||||||
|
} else {
|
||||||
|
print("广告未准备好,继续检查...")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
func setCollectionView(){
|
||||||
|
collectionView.delegate = self
|
||||||
|
collectionView.dataSource = self
|
||||||
|
|
||||||
|
// 设置 collection view 的布局
|
||||||
|
let layout = CustomCollectionViewFlowLayout()
|
||||||
|
collectionView.collectionViewLayout = layout
|
||||||
|
layout.scrollDirection = .vertical
|
||||||
|
|
||||||
|
collectionView.register(UINib(nibName: "WA_WallpaperCollectionCell", bundle: nil), forCellWithReuseIdentifier: "WA_WallpaperCollectionCell")
|
||||||
|
|
||||||
|
}
|
||||||
|
func setJsondata(){
|
||||||
|
// 读取 JSON 文件并解析
|
||||||
|
if let path = Bundle.main.path(forResource: "4k", ofType: "json") {
|
||||||
|
do {
|
||||||
|
let data = try Data(contentsOf: URL(fileURLWithPath: path), options: .mappedIfSafe)
|
||||||
|
|
||||||
|
// 使用 MJExtension 解析 JSON 数据
|
||||||
|
let jsonArray = try JSONSerialization.jsonObject(with: data, options: .mutableContainers) as? [[String: Any]]
|
||||||
|
|
||||||
|
if let jsonArray = jsonArray {
|
||||||
|
// 使用 MJExtension 将 JSON 数组转换为模型数组
|
||||||
|
let wallpapersarr = (WA_3DModel.mj_objectArray(withKeyValuesArray: jsonArray) as? [WA_3DModel])!
|
||||||
|
|
||||||
|
if currentPage == 1 {
|
||||||
|
// 只取前10条数据
|
||||||
|
let firstTenWallpapers = Array(wallpapersarr.prefix(10))
|
||||||
|
self.wallpapers = firstTenWallpapers
|
||||||
|
collectionView.reloadData()
|
||||||
|
collectionView.mj_header?.endRefreshing()
|
||||||
|
} else {
|
||||||
|
// 上拉加载更多
|
||||||
|
let startIndex = currentPage * pageSize
|
||||||
|
let moreWallpapers = Array(wallpapersarr.prefix(startIndex))
|
||||||
|
DispatchQueue.main.asyncAfter(deadline: .now() + 1.5){
|
||||||
|
self.wallpapers = moreWallpapers
|
||||||
|
self.collectionView.reloadData()
|
||||||
|
self.collectionView.mj_footer?.endRefreshing()
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
print("Error reading JSON file:", error.localizedDescription)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
print("JSON file not found.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func settypeNetwork(){
|
||||||
|
// 读取 JSON 文件路径
|
||||||
|
guard let jsonFilePath = Bundle.main.path(forResource: "my_wallpaper", ofType: "json") else {
|
||||||
|
fatalError("Unable to locate my_wallpaper.json file.")
|
||||||
|
}
|
||||||
|
|
||||||
|
// 读取 JSON 数据
|
||||||
|
do {
|
||||||
|
// 读取 JSON 数据
|
||||||
|
let jsonData = try Data(contentsOf: URL(fileURLWithPath: jsonFilePath))
|
||||||
|
|
||||||
|
// 尝试将 JSON 数据转换为 Swift 对象
|
||||||
|
let decoder = JSONDecoder()
|
||||||
|
let wallpaperModels = try decoder.decode([WallpaperModel].self, from: jsonData)
|
||||||
|
|
||||||
|
// 遍历解析后的 WallpaperModel 对象数组
|
||||||
|
for wallpaperModel in wallpaperModels {
|
||||||
|
// 根据名称将数据放入不同的数组中
|
||||||
|
switch wallpaperModel.name {
|
||||||
|
case "Newest":
|
||||||
|
newestWallpapers = wallpaperModel.data
|
||||||
|
case "Popular Wallpapers":
|
||||||
|
popularWallpapers = wallpaperModel.data
|
||||||
|
case "Superheroes":
|
||||||
|
SuperheroesWallpapers = wallpaperModel.data
|
||||||
|
case "Christmas Wallpapers":
|
||||||
|
ChristmasWallpapers = wallpaperModel.data
|
||||||
|
case "Flowers":
|
||||||
|
FlowersWallpapers = wallpaperModel.data
|
||||||
|
default:
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch {
|
||||||
|
print("Error reading or parsing JSON file: \(error)")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
func setPostload(){
|
||||||
|
let url = "http://111.9.47.226:38080/top_selection/save_ad_load_log"
|
||||||
|
let parameters:[String : Any] = [
|
||||||
|
"deviceId": StartManager.shared.devicID ?? "",
|
||||||
|
"localIp": StartManager.shared.localIP ?? "",
|
||||||
|
"remoteIp": StartManager.shared.publicIP ?? "",
|
||||||
|
"linkId": "",
|
||||||
|
"packageName": "com.wallpapaer.hd.live.app",
|
||||||
|
"gaid": StartManager.shared.idfaid ?? "",
|
||||||
|
"dataId": "",
|
||||||
|
"shelfNumber":"壁纸详情页返回加载",
|
||||||
|
"succeed": StartManager.shared.succeed,
|
||||||
|
"loadTime": "",
|
||||||
|
"adPlatform": StartManager.shared.adPlatform ?? "",
|
||||||
|
"countryCode": StartManager.shared.countryCode ?? "",
|
||||||
|
"adId": StartManager.shared.adId ?? "",
|
||||||
|
"platformResponseTime": StartManager.shared.platformResponseTime ?? "",
|
||||||
|
"getIpResponseTime": StartManager.shared.getIpResponseTime ?? "",
|
||||||
|
"ecpm": StartManager.shared.ecpm ?? "",
|
||||||
|
"dsp": StartManager.shared.dsp ?? "",
|
||||||
|
"network": StartManager.shared.network ?? "",
|
||||||
|
"showStatus": 0,
|
||||||
|
"washParam": true,
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
let headers: HTTPHeaders = [
|
||||||
|
"Content-Type": "application/json"
|
||||||
|
]
|
||||||
|
|
||||||
|
NetworkManager.shared.postRequest(url: url, parameters: parameters, headers: headers) { result in
|
||||||
|
switch result {
|
||||||
|
case .success(let data):
|
||||||
|
print("Response:--- \(data)")
|
||||||
|
case .failure(let error):
|
||||||
|
print("Error:--- \(error)")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
func setPostSHOW(){
|
||||||
|
let url = "http://111.9.47.226:38080/top_selection/save_ad_show_log"
|
||||||
|
let parameters:[String : Any] = [
|
||||||
|
"deviceId": StartManager.shared.devicID ?? "",
|
||||||
|
"localIp": StartManager.shared.localIP ?? "",
|
||||||
|
"remoteIp": StartManager.shared.publicIP ?? "",
|
||||||
|
"linkId": "",
|
||||||
|
"packageName": "com.wallpapaer.hd.live.app",
|
||||||
|
"gaid": StartManager.shared.idfaid ?? "",
|
||||||
|
"dataId": "",
|
||||||
|
"shelfNumber":"壁纸详情页返回展示",
|
||||||
|
"succeed": StartManager.shared.succeed,
|
||||||
|
"loadTime": "",
|
||||||
|
"adPlatform": StartManager.shared.adPlatform ?? "",
|
||||||
|
"countryCode": StartManager.shared.countryCode ?? "",
|
||||||
|
"adId": StartManager.shared.adId ?? "",
|
||||||
|
"platformResponseTime": StartManager.shared.platformResponseTime ?? "",
|
||||||
|
"getIpResponseTime": StartManager.shared.getIpResponseTime ?? "",
|
||||||
|
"ecpm": StartManager.shared.ecpm ?? "",
|
||||||
|
"dsp": StartManager.shared.dsp ?? "",
|
||||||
|
"network": StartManager.shared.network ?? "",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
let headers: HTTPHeaders = [
|
||||||
|
"Content-Type": "application/json"
|
||||||
|
]
|
||||||
|
|
||||||
|
NetworkManager.shared.postRequest(url: url, parameters: parameters, headers: headers) { result in
|
||||||
|
switch result {
|
||||||
|
case .success(let data):
|
||||||
|
print("Response:--- \(data)")
|
||||||
|
case .failure(let error):
|
||||||
|
print("Error:--- \(error)")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
extension WA_player4kVC:MTGNewInterstitialBidAdDelegate{
|
||||||
|
|
||||||
|
// func newInterstitialBidAdShowSuccess(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
// print("广告展示成功")
|
||||||
|
// }
|
||||||
|
|
||||||
|
func newInterstitialBidAdResourceLoadSuccess(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
print("资源加载成功,表示可播放状态")
|
||||||
|
}
|
||||||
|
|
||||||
|
func newInterstitialBidAdLoadSuccess(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
print("广告加载成功")
|
||||||
|
StartManager.shared.succeed = true
|
||||||
|
// StartManager.shared.loadTime = self.adLoadTime
|
||||||
|
StartManager.shared.adPlatform = "mbridge"
|
||||||
|
StartManager.shared.countryCode = ALSdk.shared().configuration.countryCode
|
||||||
|
StartManager.shared.adId = "3501963"
|
||||||
|
StartManager.shared.platformResponseTime = 0
|
||||||
|
// StartManager.shared.ecpm = Float(ad.revenue)
|
||||||
|
StartManager.shared.dsp = ""
|
||||||
|
StartManager.shared.network = ""
|
||||||
|
|
||||||
|
|
||||||
|
setPostload()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
func newInterstitialBidAdLoadFail(_ error: any Error, adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
|
||||||
|
print("-----\(error)")
|
||||||
|
// print(" 广告加载失败")
|
||||||
|
self.navigationController?.popViewController(animated: true)
|
||||||
|
}
|
||||||
|
|
||||||
|
func newInterstitialBidAdShowSuccess(withBidToken bidToken: String, adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
|
||||||
|
print("广告展示成功")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
func newInterstitialBidAdShowFail(_ error: any Error, adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
print("广告展示失败")
|
||||||
|
self.navigationController?.popViewController(animated: true)
|
||||||
|
}
|
||||||
|
|
||||||
|
func newInterstitialBidAdPlayCompleted(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
|
||||||
|
print("广告播放完全播放回调")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
func newInterstitialBidAdEndCardShowSuccess(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
print("视频播放完成后展示结果页")
|
||||||
|
}
|
||||||
|
|
||||||
|
func newInterstitialBidAdClicked(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
|
||||||
|
print("广告被点击")
|
||||||
|
}
|
||||||
|
|
||||||
|
// 广告被关闭
|
||||||
|
func newInterstitialBidAdDidClosed(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
print("广告被关闭")
|
||||||
|
self.navigationController?.popViewController(animated: true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
extension WA_player4kVC:UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout{
|
||||||
|
|
||||||
|
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
|
||||||
|
if StartManager.shared.superHero == true{
|
||||||
|
if self.type == 1{
|
||||||
|
return self.wallpapers.count
|
||||||
|
}else if type == 2{
|
||||||
|
return self.newestWallpapers.count
|
||||||
|
}else if type == 3{
|
||||||
|
return self.popularWallpapers.count
|
||||||
|
}else if type == 4{
|
||||||
|
return self.SuperheroesWallpapers.count
|
||||||
|
}else if type == 5{
|
||||||
|
return self.ChristmasWallpapers.count
|
||||||
|
}else{
|
||||||
|
return self.FlowersWallpapers.count
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if self.type == 1{
|
||||||
|
return self.wallpapers.count
|
||||||
|
}else if type == 2{
|
||||||
|
return self.newestWallpapers.count
|
||||||
|
}else if type == 3{
|
||||||
|
return self.popularWallpapers.count
|
||||||
|
}else if type == 4{
|
||||||
|
return self.ChristmasWallpapers.count
|
||||||
|
}else{
|
||||||
|
return self.FlowersWallpapers.count
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
|
||||||
|
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "WA_WallpaperCollectionCell", for: indexPath)as!WA_WallpaperCollectionCell
|
||||||
|
if StartManager.shared.superHero == true{
|
||||||
|
if self.type == 1{
|
||||||
|
cell.model = self.wallpapers[indexPath.row]
|
||||||
|
}else if type == 2{
|
||||||
|
let model = self.newestWallpapers[indexPath.row]
|
||||||
|
if let imageURL = URL(string: model.previewThumb ?? "") {
|
||||||
|
cell.wpImagV.sd_setImage(with: imageURL, placeholderImage: UIImage(named: "Rectangle"))
|
||||||
|
}
|
||||||
|
}else if type == 3{
|
||||||
|
let model = self.popularWallpapers[indexPath.row]
|
||||||
|
if let imageURL = URL(string: model.previewThumb ?? "") {
|
||||||
|
cell.wpImagV.sd_setImage(with: imageURL, placeholderImage: UIImage(named: "Rectangle"))
|
||||||
|
}
|
||||||
|
}else if type == 4{
|
||||||
|
let model = self.SuperheroesWallpapers[indexPath.row]
|
||||||
|
if let imageURL = URL(string: model.previewThumb ?? "") {
|
||||||
|
cell.wpImagV.sd_setImage(with: imageURL, placeholderImage: UIImage(named: "Rectangle"))
|
||||||
|
}
|
||||||
|
}else if type == 5{
|
||||||
|
let model = self.ChristmasWallpapers[indexPath.row]
|
||||||
|
if let imageURL = URL(string: model.previewThumb ?? "") {
|
||||||
|
cell.wpImagV.sd_setImage(with: imageURL, placeholderImage: UIImage(named: "Rectangle"))
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
let model = self.FlowersWallpapers[indexPath.row]
|
||||||
|
if let imageURL = URL(string: model.previewThumb ?? "") {
|
||||||
|
cell.wpImagV.sd_setImage(with: imageURL, placeholderImage: UIImage(named: "Rectangle"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if self.type == 1{
|
||||||
|
cell.model = self.wallpapers[indexPath.row]
|
||||||
|
}else if type == 2{
|
||||||
|
let model = self.newestWallpapers[indexPath.row]
|
||||||
|
if let imageURL = URL(string: model.previewThumb ?? "") {
|
||||||
|
cell.wpImagV.sd_setImage(with: imageURL, placeholderImage: UIImage(named: "Rectangle"))
|
||||||
|
}
|
||||||
|
}else if type == 3{
|
||||||
|
let model = self.popularWallpapers[indexPath.row]
|
||||||
|
if let imageURL = URL(string: model.previewThumb ?? "") {
|
||||||
|
cell.wpImagV.sd_setImage(with: imageURL, placeholderImage: UIImage(named: "Rectangle"))
|
||||||
|
}
|
||||||
|
}else if type == 4{
|
||||||
|
let model = self.ChristmasWallpapers[indexPath.row]
|
||||||
|
if let imageURL = URL(string: model.previewThumb ?? "") {
|
||||||
|
cell.wpImagV.sd_setImage(with: imageURL, placeholderImage: UIImage(named: "Rectangle"))
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
let model = self.FlowersWallpapers[indexPath.row]
|
||||||
|
if let imageURL = URL(string: model.previewThumb ?? "") {
|
||||||
|
cell.wpImagV.sd_setImage(with: imageURL, placeholderImage: UIImage(named: "Rectangle"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return cell
|
||||||
|
}
|
||||||
|
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
|
||||||
|
let vc = WA_DetailsVC()
|
||||||
|
vc.type = self.type
|
||||||
|
if StartManager.shared.superHero == true{
|
||||||
|
if self.type == 1{
|
||||||
|
vc.model = self.wallpapers[indexPath.row]
|
||||||
|
navigationController?.pushViewController(vc, animated: true)
|
||||||
|
}else if type == 2{
|
||||||
|
vc.modeltype = self.newestWallpapers[indexPath.row]
|
||||||
|
navigationController?.pushViewController(vc, animated: true)
|
||||||
|
}else if type == 3{
|
||||||
|
vc.modeltype = self.popularWallpapers[indexPath.row]
|
||||||
|
navigationController?.pushViewController(vc, animated: true)
|
||||||
|
}else if type == 4{
|
||||||
|
vc.modeltype = self.SuperheroesWallpapers[indexPath.row]
|
||||||
|
navigationController?.pushViewController(vc, animated: true)
|
||||||
|
}else if type == 5{
|
||||||
|
vc.modeltype = self.ChristmasWallpapers[indexPath.row]
|
||||||
|
navigationController?.pushViewController(vc, animated: true)
|
||||||
|
}else{
|
||||||
|
vc.modeltype = self.FlowersWallpapers[indexPath.row]
|
||||||
|
navigationController?.pushViewController(vc, animated: true)
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if self.type == 1{
|
||||||
|
vc.model = self.wallpapers[indexPath.row]
|
||||||
|
navigationController?.pushViewController(vc, animated: true)
|
||||||
|
}else if type == 2{
|
||||||
|
vc.modeltype = self.newestWallpapers[indexPath.row]
|
||||||
|
navigationController?.pushViewController(vc, animated: true)
|
||||||
|
}else if type == 3{
|
||||||
|
vc.modeltype = self.popularWallpapers[indexPath.row]
|
||||||
|
navigationController?.pushViewController(vc, animated: true)
|
||||||
|
}else if type == 4{
|
||||||
|
vc.modeltype = self.ChristmasWallpapers[indexPath.row]
|
||||||
|
navigationController?.pushViewController(vc, animated: true)
|
||||||
|
}else{
|
||||||
|
vc.modeltype = self.FlowersWallpapers[indexPath.row]
|
||||||
|
navigationController?.pushViewController(vc, animated: true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
71
wallpaper_project/PlayerVC/C/WA_player4kVC.xib
Normal file
71
wallpaper_project/PlayerVC/C/WA_player4kVC.xib
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||||
|
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||||
|
<dependencies>
|
||||||
|
<deployment identifier="iOS"/>
|
||||||
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/>
|
||||||
|
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||||
|
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||||
|
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||||
|
</dependencies>
|
||||||
|
<objects>
|
||||||
|
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="WA_player4kVC" customModule="wallpaper_project" customModuleProvider="target">
|
||||||
|
<connections>
|
||||||
|
<outlet property="collectionView" destination="N65-R7-GMt" id="NRN-FE-QJK"/>
|
||||||
|
<outlet property="nameLabel" destination="dgk-r1-J69" id="7WZ-Rn-AVz"/>
|
||||||
|
<outlet property="view" destination="rzF-3r-OTD" id="O3s-ce-SGA"/>
|
||||||
|
</connections>
|
||||||
|
</placeholder>
|
||||||
|
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||||
|
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="rzF-3r-OTD">
|
||||||
|
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
|
<subviews>
|
||||||
|
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="N65-R7-GMt">
|
||||||
|
<rect key="frame" x="0.0" y="119" width="393" height="699"/>
|
||||||
|
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
|
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="ZtU-IF-r6v">
|
||||||
|
<size key="itemSize" width="128" height="128"/>
|
||||||
|
<size key="headerReferenceSize" width="0.0" height="0.0"/>
|
||||||
|
<size key="footerReferenceSize" width="0.0" height="0.0"/>
|
||||||
|
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
|
||||||
|
</collectionViewFlowLayout>
|
||||||
|
</collectionView>
|
||||||
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Live" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dgk-r1-J69">
|
||||||
|
<rect key="frame" x="176" y="65.666666666666671" width="41" height="26.666666666666671"/>
|
||||||
|
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="22"/>
|
||||||
|
<nil key="textColor"/>
|
||||||
|
<nil key="highlightedColor"/>
|
||||||
|
</label>
|
||||||
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6Yc-FF-sMc">
|
||||||
|
<rect key="frame" x="20" y="59" width="40" height="40"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstAttribute="width" constant="40" id="8AT-V4-4rI"/>
|
||||||
|
<constraint firstAttribute="height" constant="40" id="DHb-pU-Yjs"/>
|
||||||
|
</constraints>
|
||||||
|
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||||
|
<state key="normal" image="back_black"/>
|
||||||
|
</button>
|
||||||
|
</subviews>
|
||||||
|
<viewLayoutGuide key="safeArea" id="MbL-3O-g4d"/>
|
||||||
|
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstItem="6Yc-FF-sMc" firstAttribute="centerY" secondItem="dgk-r1-J69" secondAttribute="centerY" id="CXt-hq-VDw"/>
|
||||||
|
<constraint firstItem="6Yc-FF-sMc" firstAttribute="top" secondItem="MbL-3O-g4d" secondAttribute="top" id="VdK-DC-orA"/>
|
||||||
|
<constraint firstItem="N65-R7-GMt" firstAttribute="leading" secondItem="MbL-3O-g4d" secondAttribute="leading" id="Xd2-7k-39Y"/>
|
||||||
|
<constraint firstItem="dgk-r1-J69" firstAttribute="centerX" secondItem="rzF-3r-OTD" secondAttribute="centerX" id="fJz-eP-dFW"/>
|
||||||
|
<constraint firstItem="MbL-3O-g4d" firstAttribute="bottom" secondItem="N65-R7-GMt" secondAttribute="bottom" id="ygx-29-T8R"/>
|
||||||
|
<constraint firstItem="MbL-3O-g4d" firstAttribute="trailing" secondItem="N65-R7-GMt" secondAttribute="trailing" id="yrI-ch-Z9z"/>
|
||||||
|
<constraint firstItem="6Yc-FF-sMc" firstAttribute="leading" secondItem="MbL-3O-g4d" secondAttribute="leading" constant="20" id="zlt-ly-ZIF"/>
|
||||||
|
<constraint firstItem="N65-R7-GMt" firstAttribute="top" secondItem="MbL-3O-g4d" secondAttribute="top" constant="60" id="zpf-Ny-gHy"/>
|
||||||
|
</constraints>
|
||||||
|
<point key="canvasLocation" x="47" y="-11"/>
|
||||||
|
</view>
|
||||||
|
</objects>
|
||||||
|
<resources>
|
||||||
|
<image name="back_black" width="20" height="20"/>
|
||||||
|
<systemColor name="systemBackgroundColor">
|
||||||
|
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
|
</systemColor>
|
||||||
|
</resources>
|
||||||
|
</document>
|
||||||
308
wallpaper_project/PlayerVC/C/WA_playerRankVC.swift
Normal file
308
wallpaper_project/PlayerVC/C/WA_playerRankVC.swift
Normal file
@ -0,0 +1,308 @@
|
|||||||
|
//
|
||||||
|
// WA_playerRankVC.swift
|
||||||
|
// wallpaper_project
|
||||||
|
//
|
||||||
|
// Created by 忆海16 on 2024/7/19.
|
||||||
|
//
|
||||||
|
|
||||||
|
import UIKit
|
||||||
|
import MJExtension
|
||||||
|
import MTGSDKNewInterstitial
|
||||||
|
import MTGSDKBidding
|
||||||
|
import MTGSDK
|
||||||
|
import Alamofire
|
||||||
|
|
||||||
|
|
||||||
|
class WA_playerRankVC: WA_RootVC {
|
||||||
|
@IBOutlet weak var collectionView: UICollectionView!
|
||||||
|
var wallpapers = [WA_3DModel]()
|
||||||
|
|
||||||
|
var bidToken:String?
|
||||||
|
var newInterstitialAdManager:MTGNewInterstitialBidAdManager?
|
||||||
|
|
||||||
|
var adCheckTimer: Timer?
|
||||||
|
var adCheckStartTime: Date?
|
||||||
|
var adLoadTime: Int = 0
|
||||||
|
|
||||||
|
override func viewDidLoad() {
|
||||||
|
super.viewDidLoad()
|
||||||
|
let param = MTGBiddingRequestParameter(placementId: "1650177", unitId: "3519003", basePrice: nil)
|
||||||
|
|
||||||
|
MTGBiddingRequest.getBidWith(param) { bidResponse in
|
||||||
|
if bidResponse.success{
|
||||||
|
self.bidToken = bidResponse.bidToken
|
||||||
|
bidResponse.notifyWin()
|
||||||
|
self.newInterstitialAdManager = MTGNewInterstitialBidAdManager(placementId: "1650177", unitId: "3519003", delegate: self)
|
||||||
|
StartManager.shared.ecpm = Float(bidResponse.price)
|
||||||
|
self.newInterstitialAdManager?.loadAd(withBidToken:self.bidToken!)
|
||||||
|
|
||||||
|
self.startAdCheck()
|
||||||
|
|
||||||
|
|
||||||
|
}else{
|
||||||
|
|
||||||
|
self.navigationController?.popViewController(animated: true)
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let layout = CustomLayout()
|
||||||
|
collectionView.collectionViewLayout = layout
|
||||||
|
collectionView.backgroundColor = .white
|
||||||
|
collectionView.dataSource = self
|
||||||
|
collectionView.delegate = self
|
||||||
|
collectionView.register(UINib(nibName: "WA_RankCollectionViewCell", bundle: nil), forCellWithReuseIdentifier: "WA_RankCollectionViewCell")
|
||||||
|
setJsondata()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override func viewWillAppear(_ animated: Bool) {
|
||||||
|
super.viewWillAppear(animated)
|
||||||
|
self.navigationController?.navigationBar.isHidden = true
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// /定时加载
|
||||||
|
func startAdCheck() {
|
||||||
|
|
||||||
|
adCheckStartTime = Date()
|
||||||
|
adCheckTimer = Timer.scheduledTimer(timeInterval: 0.01, target: self, selector: #selector(checkAdStatus), userInfo: nil, repeats: true)
|
||||||
|
}
|
||||||
|
|
||||||
|
@objc func checkAdStatus() {
|
||||||
|
let elapsedTime = Date().timeIntervalSince(adCheckStartTime!)
|
||||||
|
let elapsedTimeInMilliseconds = Int(elapsedTime * 1000)
|
||||||
|
|
||||||
|
let issureready = newInterstitialAdManager!.isAdReady()
|
||||||
|
|
||||||
|
if issureready {
|
||||||
|
|
||||||
|
self.newInterstitialAdManager?.show(from: self)
|
||||||
|
self.setPostSHOW()
|
||||||
|
|
||||||
|
|
||||||
|
} else if elapsedTimeInMilliseconds >= 10000 { // 10000 毫秒 = 10 秒
|
||||||
|
adCheckTimer?.invalidate()
|
||||||
|
self.navigationController?.popViewController(animated: true)
|
||||||
|
} else {
|
||||||
|
print("广告未准备好,继续检查...")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
func setJsondata(){
|
||||||
|
// 读取 JSON 文件并解析
|
||||||
|
if let path = Bundle.main.path(forResource: "rank", ofType: "json") {
|
||||||
|
do {
|
||||||
|
let data = try Data(contentsOf: URL(fileURLWithPath: path), options: .mappedIfSafe)
|
||||||
|
|
||||||
|
// 使用 MJExtension 解析 JSON 数据
|
||||||
|
let jsonArray = try JSONSerialization.jsonObject(with: data, options: .mutableContainers) as? [[String: Any]]
|
||||||
|
|
||||||
|
if let jsonArray = jsonArray {
|
||||||
|
// 使用 MJExtension 将 JSON 数组转换为模型数组
|
||||||
|
|
||||||
|
let wallpapersarr = (WA_3DModel.mj_objectArray(withKeyValuesArray: jsonArray) as? [WA_3DModel])!
|
||||||
|
self.wallpapers = wallpapersarr
|
||||||
|
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
print("Error reading JSON file:", error.localizedDescription)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
print("JSON file not found.")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
func setPostload(){
|
||||||
|
let url = "http://111.9.47.226:38080/top_selection/save_ad_load_log"
|
||||||
|
let parameters:[String : Any] = [
|
||||||
|
"deviceId": StartManager.shared.devicID ?? "",
|
||||||
|
"localIp": StartManager.shared.localIP ?? "",
|
||||||
|
"remoteIp": StartManager.shared.publicIP ?? "",
|
||||||
|
"linkId": "",
|
||||||
|
"packageName": "com.wallpapaer.hd.live.app",
|
||||||
|
"gaid": StartManager.shared.idfaid ?? "",
|
||||||
|
"dataId": "",
|
||||||
|
"shelfNumber":"壁纸详情页返回加载",
|
||||||
|
"succeed": StartManager.shared.succeed,
|
||||||
|
"loadTime": "",
|
||||||
|
"adPlatform": StartManager.shared.adPlatform ?? "",
|
||||||
|
"countryCode": StartManager.shared.countryCode ?? "",
|
||||||
|
"adId": StartManager.shared.adId ?? "",
|
||||||
|
"platformResponseTime": StartManager.shared.platformResponseTime ?? "",
|
||||||
|
"getIpResponseTime": StartManager.shared.getIpResponseTime ?? "",
|
||||||
|
"ecpm": StartManager.shared.ecpm ?? "",
|
||||||
|
"dsp": StartManager.shared.dsp ?? "",
|
||||||
|
"network": StartManager.shared.network ?? "",
|
||||||
|
"showStatus": 0,
|
||||||
|
"washParam": true,
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
let headers: HTTPHeaders = [
|
||||||
|
"Content-Type": "application/json"
|
||||||
|
]
|
||||||
|
|
||||||
|
NetworkManager.shared.postRequest(url: url, parameters: parameters, headers: headers) { result in
|
||||||
|
switch result {
|
||||||
|
case .success(let data):
|
||||||
|
print("Response:--- \(data)")
|
||||||
|
case .failure(let error):
|
||||||
|
print("Error:--- \(error)")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
func setPostSHOW(){
|
||||||
|
let url = "http://111.9.47.226:38080/top_selection/save_ad_show_log"
|
||||||
|
let parameters:[String : Any] = [
|
||||||
|
"deviceId": StartManager.shared.devicID ?? "",
|
||||||
|
"localIp": StartManager.shared.localIP ?? "",
|
||||||
|
"remoteIp": StartManager.shared.publicIP ?? "",
|
||||||
|
"linkId": "",
|
||||||
|
"packageName": "com.wallpapaer.hd.live.app",
|
||||||
|
"gaid": StartManager.shared.idfaid ?? "",
|
||||||
|
"dataId": "",
|
||||||
|
"shelfNumber":"壁纸详情页返回展示",
|
||||||
|
"succeed": StartManager.shared.succeed,
|
||||||
|
"loadTime": "",
|
||||||
|
"adPlatform": StartManager.shared.adPlatform ?? "",
|
||||||
|
"countryCode": StartManager.shared.countryCode ?? "",
|
||||||
|
"adId": StartManager.shared.adId ?? "",
|
||||||
|
"platformResponseTime": StartManager.shared.platformResponseTime ?? "",
|
||||||
|
"getIpResponseTime": StartManager.shared.getIpResponseTime ?? "",
|
||||||
|
"ecpm": StartManager.shared.ecpm ?? "",
|
||||||
|
"dsp": StartManager.shared.dsp ?? "",
|
||||||
|
"network": StartManager.shared.network ?? "",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
let headers: HTTPHeaders = [
|
||||||
|
"Content-Type": "application/json"
|
||||||
|
]
|
||||||
|
|
||||||
|
NetworkManager.shared.postRequest(url: url, parameters: parameters, headers: headers) { result in
|
||||||
|
switch result {
|
||||||
|
case .success(let data):
|
||||||
|
print("Response:--- \(data)")
|
||||||
|
case .failure(let error):
|
||||||
|
print("Error:--- \(error)")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
extension WA_playerRankVC:MTGNewInterstitialBidAdDelegate{
|
||||||
|
|
||||||
|
// func newInterstitialBidAdShowSuccess(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
// print("广告展示成功")
|
||||||
|
// }
|
||||||
|
|
||||||
|
func newInterstitialBidAdResourceLoadSuccess(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
print("资源加载成功,表示可播放状态")
|
||||||
|
}
|
||||||
|
|
||||||
|
func newInterstitialBidAdLoadSuccess(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
print("广告加载成功")
|
||||||
|
StartManager.shared.succeed = true
|
||||||
|
// StartManager.shared.loadTime = self.adLoadTime
|
||||||
|
StartManager.shared.adPlatform = "mbridge"
|
||||||
|
// StartManager.shared.countryCode = ALSdk.shared().configuration.countryCode
|
||||||
|
StartManager.shared.adId = "3519003"
|
||||||
|
StartManager.shared.platformResponseTime = 0
|
||||||
|
// StartManager.shared.ecpm = Float(ad.revenue)
|
||||||
|
StartManager.shared.dsp = ""
|
||||||
|
StartManager.shared.network = ""
|
||||||
|
|
||||||
|
|
||||||
|
setPostload()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
func newInterstitialBidAdLoadFail(_ error: any Error, adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
|
||||||
|
print("-----\(error)")
|
||||||
|
// print(" 广告加载失败")
|
||||||
|
self.navigationController?.popViewController(animated: true)
|
||||||
|
}
|
||||||
|
|
||||||
|
func newInterstitialBidAdShowSuccess(withBidToken bidToken: String, adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
|
||||||
|
print("广告展示成功")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
func newInterstitialBidAdShowFail(_ error: any Error, adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
print("广告展示失败")
|
||||||
|
self.navigationController?.popViewController(animated: true)
|
||||||
|
}
|
||||||
|
|
||||||
|
func newInterstitialBidAdPlayCompleted(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
|
||||||
|
print("广告播放完全播放回调")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
func newInterstitialBidAdEndCardShowSuccess(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
print("视频播放完成后展示结果页")
|
||||||
|
}
|
||||||
|
|
||||||
|
func newInterstitialBidAdClicked(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
|
||||||
|
print("广告被点击")
|
||||||
|
}
|
||||||
|
|
||||||
|
// 广告被关闭
|
||||||
|
func newInterstitialBidAdDidClosed(_ adManager: MTGNewInterstitialBidAdManager) {
|
||||||
|
print("广告被关闭")
|
||||||
|
self.navigationController?.popViewController(animated: true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension WA_playerRankVC:UICollectionViewDataSource, UICollectionViewDelegate{
|
||||||
|
|
||||||
|
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
|
||||||
|
return wallpapers.count // 你可以设置你的图片数量
|
||||||
|
}
|
||||||
|
|
||||||
|
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
|
||||||
|
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "WA_RankCollectionViewCell", for: indexPath) as! WA_RankCollectionViewCell
|
||||||
|
|
||||||
|
cell.model = self.wallpapers[indexPath.row]
|
||||||
|
return cell
|
||||||
|
}
|
||||||
|
|
||||||
|
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
|
||||||
|
let vc = WA_LiveVideoVC()
|
||||||
|
vc.model = self.wallpapers[indexPath.row]
|
||||||
|
navigationController?.pushViewController(vc, animated: true)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer<CGPoint>) {
|
||||||
|
guard let collectionView = collectionView else { return }
|
||||||
|
|
||||||
|
let itemHeight = collectionView.bounds.height * 2.5 / 3
|
||||||
|
let currentOffset = scrollView.contentOffset.y
|
||||||
|
let targetOffset = targetContentOffset.pointee.y
|
||||||
|
|
||||||
|
let currentItemIndex = round(currentOffset / itemHeight)
|
||||||
|
let targetItemIndex = targetOffset > currentOffset ? currentItemIndex + 1 : currentItemIndex - 1
|
||||||
|
|
||||||
|
let newOffsetY = targetItemIndex * itemHeight
|
||||||
|
targetContentOffset.pointee.y = newOffsetY
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
58
wallpaper_project/PlayerVC/C/WA_playerRankVC.xib
Normal file
58
wallpaper_project/PlayerVC/C/WA_playerRankVC.xib
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||||
|
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||||
|
<dependencies>
|
||||||
|
<deployment identifier="iOS"/>
|
||||||
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/>
|
||||||
|
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||||
|
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||||
|
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||||
|
</dependencies>
|
||||||
|
<objects>
|
||||||
|
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="WA_playerRankVC" customModule="wallpaper_project" customModuleProvider="target">
|
||||||
|
<connections>
|
||||||
|
<outlet property="collectionView" destination="As2-4W-aPD" id="nj5-SN-Wzs"/>
|
||||||
|
<outlet property="view" destination="1G9-dP-o0x" id="7uv-oU-Ybd"/>
|
||||||
|
</connections>
|
||||||
|
</placeholder>
|
||||||
|
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||||
|
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="1G9-dP-o0x">
|
||||||
|
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
|
<subviews>
|
||||||
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Rank" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MBO-nn-Txo">
|
||||||
|
<rect key="frame" x="20" y="79" width="80.666666666666671" height="39.666666666666657"/>
|
||||||
|
<fontDescription key="fontDescription" type="system" weight="heavy" pointSize="33"/>
|
||||||
|
<color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
|
<nil key="highlightedColor"/>
|
||||||
|
</label>
|
||||||
|
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="As2-4W-aPD">
|
||||||
|
<rect key="frame" x="0.0" y="133.66666666666669" width="393" height="684.33333333333326"/>
|
||||||
|
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
|
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="3vV-dq-oqb">
|
||||||
|
<size key="itemSize" width="128" height="128"/>
|
||||||
|
<size key="headerReferenceSize" width="0.0" height="0.0"/>
|
||||||
|
<size key="footerReferenceSize" width="0.0" height="0.0"/>
|
||||||
|
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
|
||||||
|
</collectionViewFlowLayout>
|
||||||
|
</collectionView>
|
||||||
|
</subviews>
|
||||||
|
<viewLayoutGuide key="safeArea" id="Sgx-tr-akm"/>
|
||||||
|
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstItem="MBO-nn-Txo" firstAttribute="leading" secondItem="Sgx-tr-akm" secondAttribute="leading" constant="20" id="BDF-Ib-8TL"/>
|
||||||
|
<constraint firstItem="Sgx-tr-akm" firstAttribute="trailing" secondItem="As2-4W-aPD" secondAttribute="trailing" id="M26-bT-d5B"/>
|
||||||
|
<constraint firstItem="As2-4W-aPD" firstAttribute="leading" secondItem="Sgx-tr-akm" secondAttribute="leading" id="MSX-WI-sAE"/>
|
||||||
|
<constraint firstItem="MBO-nn-Txo" firstAttribute="top" secondItem="Sgx-tr-akm" secondAttribute="top" constant="20" id="QQj-FA-8Ss"/>
|
||||||
|
<constraint firstItem="As2-4W-aPD" firstAttribute="top" secondItem="MBO-nn-Txo" secondAttribute="bottom" constant="15" id="Zjf-wP-QKR"/>
|
||||||
|
<constraint firstItem="Sgx-tr-akm" firstAttribute="bottom" secondItem="As2-4W-aPD" secondAttribute="bottom" id="vQJ-A8-22J"/>
|
||||||
|
</constraints>
|
||||||
|
<point key="canvasLocation" x="108" y="-12"/>
|
||||||
|
</view>
|
||||||
|
</objects>
|
||||||
|
<resources>
|
||||||
|
<systemColor name="systemBackgroundColor">
|
||||||
|
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
|
</systemColor>
|
||||||
|
</resources>
|
||||||
|
</document>
|
||||||
67
wallpaper_project/PlayerVC/C/WA_playerVC.swift
Normal file
67
wallpaper_project/PlayerVC/C/WA_playerVC.swift
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
//
|
||||||
|
// WA_playerVC.swift
|
||||||
|
// wallpaper_project
|
||||||
|
|
||||||
|
|
||||||
|
import UIKit
|
||||||
|
|
||||||
|
class WA_playerVC: WA_RootVC {
|
||||||
|
|
||||||
|
override func viewDidLoad() {
|
||||||
|
super.viewDidLoad()
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//3519003
|
||||||
|
@IBAction func one(_ sender: Any) {
|
||||||
|
|
||||||
|
let vc = WA_playerRankVC()
|
||||||
|
navigationController?.pushViewController(vc, animated: true)
|
||||||
|
}
|
||||||
|
//3519003
|
||||||
|
@IBAction func two(_ sender: Any) {
|
||||||
|
|
||||||
|
let vc = WA_playerRankVC()
|
||||||
|
navigationController?.pushViewController(vc, animated: true)
|
||||||
|
}
|
||||||
|
//3519003
|
||||||
|
@IBAction func three(_ sender: Any) {
|
||||||
|
|
||||||
|
let vc = WA_playerRankVC()
|
||||||
|
navigationController?.pushViewController(vc, animated: true)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3501963
|
||||||
|
@IBAction func four(_ sender: Any) {
|
||||||
|
|
||||||
|
let vc = WA_player4kVC()
|
||||||
|
navigationController?.pushViewController(vc, animated: true)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3501963
|
||||||
|
@IBAction func five(_ sender: Any) {
|
||||||
|
|
||||||
|
let vc = WA_player4kVC()
|
||||||
|
navigationController?.pushViewController(vc, animated: true)
|
||||||
|
}
|
||||||
|
// 3158993
|
||||||
|
@IBAction func six(_ sender: Any) {
|
||||||
|
let vc = WA_CommunityPlayerVC()
|
||||||
|
navigationController?.pushViewController(vc, animated: true)
|
||||||
|
}
|
||||||
|
|
||||||
|
//3519003
|
||||||
|
@IBAction func ID35(_ sender: Any) {
|
||||||
|
let vc = WA_player4kVC()
|
||||||
|
navigationController?.pushViewController(vc, animated: true)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@IBAction func back(_ sender: Any) {
|
||||||
|
WA_TabbarCommon.TabBarController()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
197
wallpaper_project/PlayerVC/C/WA_playerVC.xib
Normal file
197
wallpaper_project/PlayerVC/C/WA_playerVC.xib
Normal file
@ -0,0 +1,197 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||||
|
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||||
|
<dependencies>
|
||||||
|
<deployment identifier="iOS"/>
|
||||||
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/>
|
||||||
|
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||||
|
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||||
|
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||||
|
</dependencies>
|
||||||
|
<objects>
|
||||||
|
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="WA_playerVC" customModule="wallpaper_project" customModuleProvider="target">
|
||||||
|
<connections>
|
||||||
|
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
|
||||||
|
</connections>
|
||||||
|
</placeholder>
|
||||||
|
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||||
|
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
|
||||||
|
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
|
<subviews>
|
||||||
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="VkR-sE-9sa">
|
||||||
|
<rect key="frame" x="0.0" y="228" width="414" height="40"/>
|
||||||
|
<color key="backgroundColor" systemColor="systemBrownColor"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstAttribute="height" constant="40" id="Ara-bB-nS8"/>
|
||||||
|
</constraints>
|
||||||
|
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="22"/>
|
||||||
|
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||||
|
<state key="normal" title="ID:3501963">
|
||||||
|
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
|
</state>
|
||||||
|
<connections>
|
||||||
|
<action selector="four:" destination="-1" eventType="touchUpInside" id="giV-HD-cJo"/>
|
||||||
|
</connections>
|
||||||
|
</button>
|
||||||
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ndr-X1-Nep">
|
||||||
|
<rect key="frame" x="0.0" y="138" width="414" height="40"/>
|
||||||
|
<color key="backgroundColor" systemColor="systemPurpleColor"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstAttribute="height" constant="40" id="4Bf-ei-9mn"/>
|
||||||
|
</constraints>
|
||||||
|
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="22"/>
|
||||||
|
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||||
|
<state key="normal" title="ID:3519003">
|
||||||
|
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
|
</state>
|
||||||
|
<connections>
|
||||||
|
<action selector="three:" destination="-1" eventType="touchUpInside" id="hoW-FZ-Z5A"/>
|
||||||
|
</connections>
|
||||||
|
</button>
|
||||||
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="iPL-jk-PZJ">
|
||||||
|
<rect key="frame" x="0.0" y="93" width="414" height="40"/>
|
||||||
|
<color key="backgroundColor" systemColor="systemGreenColor"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstAttribute="height" constant="40" id="PMq-MZ-llS"/>
|
||||||
|
</constraints>
|
||||||
|
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="22"/>
|
||||||
|
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||||
|
<state key="normal" title="ID:3519003">
|
||||||
|
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
|
</state>
|
||||||
|
<connections>
|
||||||
|
<action selector="two:" destination="-1" eventType="touchUpInside" id="jkK-A6-XJx"/>
|
||||||
|
</connections>
|
||||||
|
</button>
|
||||||
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Bei-WL-J7H">
|
||||||
|
<rect key="frame" x="0.0" y="48" width="414" height="40"/>
|
||||||
|
<color key="backgroundColor" systemColor="systemRedColor"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstAttribute="height" constant="40" id="hBo-Rl-aMe"/>
|
||||||
|
</constraints>
|
||||||
|
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="22"/>
|
||||||
|
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||||
|
<state key="normal" title="ID:3519003">
|
||||||
|
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
|
</state>
|
||||||
|
<connections>
|
||||||
|
<action selector="one:" destination="-1" eventType="touchUpInside" id="caT-me-p7n"/>
|
||||||
|
</connections>
|
||||||
|
</button>
|
||||||
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="TjA-3a-vmx">
|
||||||
|
<rect key="frame" x="0.0" y="273" width="414" height="40"/>
|
||||||
|
<color key="backgroundColor" systemColor="tableCellBlueTextColor"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstAttribute="height" constant="40" id="Q9c-XW-5i1"/>
|
||||||
|
</constraints>
|
||||||
|
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="22"/>
|
||||||
|
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||||
|
<state key="normal" title="ID:3501963">
|
||||||
|
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
|
</state>
|
||||||
|
<connections>
|
||||||
|
<action selector="five:" destination="-1" eventType="touchUpInside" id="8tM-TW-ZD0"/>
|
||||||
|
</connections>
|
||||||
|
</button>
|
||||||
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="K9a-r1-8BN">
|
||||||
|
<rect key="frame" x="0.0" y="318" width="414" height="40"/>
|
||||||
|
<color key="backgroundColor" systemColor="systemGray2Color"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstAttribute="height" constant="40" id="mcm-5A-dmE"/>
|
||||||
|
</constraints>
|
||||||
|
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="22"/>
|
||||||
|
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||||
|
<state key="normal" title="ID:3158993">
|
||||||
|
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
|
</state>
|
||||||
|
<connections>
|
||||||
|
<action selector="six:" destination="-1" eventType="touchUpInside" id="HfE-qa-XHc"/>
|
||||||
|
</connections>
|
||||||
|
</button>
|
||||||
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="cHG-tj-5ow">
|
||||||
|
<rect key="frame" x="314" y="812" width="100" height="50"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstAttribute="width" constant="100" id="Btu-IH-6xM"/>
|
||||||
|
<constraint firstAttribute="height" constant="50" id="QQf-YO-APv"/>
|
||||||
|
</constraints>
|
||||||
|
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||||
|
<state key="normal" title="返回"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="back:" destination="-1" eventType="touchUpInside" id="sBL-Uc-ade"/>
|
||||||
|
</connections>
|
||||||
|
</button>
|
||||||
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Vh6-3h-QE2">
|
||||||
|
<rect key="frame" x="0.0" y="183" width="414" height="40"/>
|
||||||
|
<color key="backgroundColor" systemColor="systemOrangeColor"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstAttribute="height" constant="40" id="ned-20-CrZ"/>
|
||||||
|
</constraints>
|
||||||
|
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="22"/>
|
||||||
|
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||||
|
<state key="normal" title="ID:3519003">
|
||||||
|
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
|
</state>
|
||||||
|
<connections>
|
||||||
|
<action selector="ID35:" destination="-1" eventType="touchUpInside" id="UDg-jr-nFe"/>
|
||||||
|
</connections>
|
||||||
|
</button>
|
||||||
|
</subviews>
|
||||||
|
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
|
||||||
|
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstItem="Vh6-3h-QE2" firstAttribute="top" secondItem="Ndr-X1-Nep" secondAttribute="bottom" constant="5" id="0Ho-fc-ch4"/>
|
||||||
|
<constraint firstAttribute="trailing" secondItem="K9a-r1-8BN" secondAttribute="trailing" id="6Bx-jw-kaw"/>
|
||||||
|
<constraint firstItem="TjA-3a-vmx" firstAttribute="top" secondItem="VkR-sE-9sa" secondAttribute="bottom" constant="5" id="7IN-Ku-sdS"/>
|
||||||
|
<constraint firstItem="Ndr-X1-Nep" firstAttribute="top" secondItem="iPL-jk-PZJ" secondAttribute="bottom" constant="5" id="96k-4z-mKX"/>
|
||||||
|
<constraint firstItem="K9a-r1-8BN" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="9QR-k6-AmQ"/>
|
||||||
|
<constraint firstAttribute="trailing" secondItem="TjA-3a-vmx" secondAttribute="trailing" id="9or-Ch-wjI"/>
|
||||||
|
<constraint firstItem="VkR-sE-9sa" firstAttribute="top" secondItem="Vh6-3h-QE2" secondAttribute="bottom" constant="5" id="AYQ-rk-3XF"/>
|
||||||
|
<constraint firstAttribute="trailing" secondItem="Bei-WL-J7H" secondAttribute="trailing" id="DXf-Qx-3Jg"/>
|
||||||
|
<constraint firstAttribute="trailing" secondItem="iPL-jk-PZJ" secondAttribute="trailing" id="F59-s0-O8O"/>
|
||||||
|
<constraint firstItem="iPL-jk-PZJ" firstAttribute="top" secondItem="Bei-WL-J7H" secondAttribute="bottom" constant="5" id="FzF-1g-hBE"/>
|
||||||
|
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="VkR-sE-9sa" secondAttribute="trailing" id="G48-Ql-cwG"/>
|
||||||
|
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="Vh6-3h-QE2" secondAttribute="trailing" id="K5p-lS-vPR"/>
|
||||||
|
<constraint firstItem="Bei-WL-J7H" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="NhC-9j-SZC"/>
|
||||||
|
<constraint firstItem="TjA-3a-vmx" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="QUV-Ls-F2m"/>
|
||||||
|
<constraint firstItem="Ndr-X1-Nep" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="WFX-ue-h9N"/>
|
||||||
|
<constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="cHG-tj-5ow" secondAttribute="bottom" id="ZIr-rV-0l5"/>
|
||||||
|
<constraint firstItem="K9a-r1-8BN" firstAttribute="top" secondItem="TjA-3a-vmx" secondAttribute="bottom" constant="5" id="j5l-Bi-I0Q"/>
|
||||||
|
<constraint firstItem="Vh6-3h-QE2" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="k1W-1d-1rF"/>
|
||||||
|
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="Ndr-X1-Nep" secondAttribute="trailing" id="l7L-kt-BmJ"/>
|
||||||
|
<constraint firstItem="Bei-WL-J7H" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="or9-qE-cH2"/>
|
||||||
|
<constraint firstItem="VkR-sE-9sa" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="pcn-o5-hBR"/>
|
||||||
|
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="cHG-tj-5ow" secondAttribute="trailing" id="ptr-LK-rxd"/>
|
||||||
|
<constraint firstItem="iPL-jk-PZJ" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="s1G-9q-YZa"/>
|
||||||
|
<constraint firstItem="Ndr-X1-Nep" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="txO-KL-qwv"/>
|
||||||
|
</constraints>
|
||||||
|
<point key="canvasLocation" x="8.6956521739130448" y="-12.053571428571429"/>
|
||||||
|
</view>
|
||||||
|
</objects>
|
||||||
|
<resources>
|
||||||
|
<systemColor name="systemBackgroundColor">
|
||||||
|
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
|
</systemColor>
|
||||||
|
<systemColor name="systemBrownColor">
|
||||||
|
<color red="0.63529411759999999" green="0.51764705879999995" blue="0.36862745099999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||||
|
</systemColor>
|
||||||
|
<systemColor name="systemGray2Color">
|
||||||
|
<color red="0.68235294120000001" green="0.68235294120000001" blue="0.69803921570000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||||
|
</systemColor>
|
||||||
|
<systemColor name="systemGreenColor">
|
||||||
|
<color red="0.20392156859999999" green="0.78039215689999997" blue="0.34901960780000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||||
|
</systemColor>
|
||||||
|
<systemColor name="systemOrangeColor">
|
||||||
|
<color red="1" green="0.58431372550000005" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||||
|
</systemColor>
|
||||||
|
<systemColor name="systemPurpleColor">
|
||||||
|
<color red="0.68627450980000004" green="0.32156862749999998" blue="0.87058823529999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||||
|
</systemColor>
|
||||||
|
<systemColor name="systemRedColor">
|
||||||
|
<color red="1" green="0.23137254900000001" blue="0.18823529410000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||||
|
</systemColor>
|
||||||
|
<systemColor name="tableCellBlueTextColor">
|
||||||
|
<color red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||||
|
</systemColor>
|
||||||
|
</resources>
|
||||||
|
</document>
|
||||||
92
wallpaper_project/Rank/C/WA_RankVC.swift
Normal file
92
wallpaper_project/Rank/C/WA_RankVC.swift
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
//
|
||||||
|
// WA_RankVC.swift
|
||||||
|
// wallpaper_project
|
||||||
|
|
||||||
|
|
||||||
|
import UIKit
|
||||||
|
import MJExtension
|
||||||
|
|
||||||
|
class WA_RankVC: WA_RootVC {
|
||||||
|
|
||||||
|
@IBOutlet weak var collectionView: UICollectionView!
|
||||||
|
var wallpapers = [WA_3DModel]()
|
||||||
|
override func viewDidLoad() {
|
||||||
|
super.viewDidLoad()
|
||||||
|
|
||||||
|
let layout = CustomLayout()
|
||||||
|
collectionView.collectionViewLayout = layout
|
||||||
|
collectionView.backgroundColor = .white
|
||||||
|
collectionView.dataSource = self
|
||||||
|
collectionView.delegate = self
|
||||||
|
collectionView.register(UINib(nibName: "WA_RankCollectionViewCell", bundle: nil), forCellWithReuseIdentifier: "WA_RankCollectionViewCell")
|
||||||
|
setJsondata()
|
||||||
|
}
|
||||||
|
|
||||||
|
override func viewWillAppear(_ animated: Bool) {
|
||||||
|
super.viewWillAppear(animated)
|
||||||
|
self.navigationController?.navigationBar.isHidden = true
|
||||||
|
}
|
||||||
|
func setJsondata(){
|
||||||
|
// 读取 JSON 文件并解析
|
||||||
|
if let path = Bundle.main.path(forResource: "rank", ofType: "json") {
|
||||||
|
do {
|
||||||
|
let data = try Data(contentsOf: URL(fileURLWithPath: path), options: .mappedIfSafe)
|
||||||
|
|
||||||
|
// 使用 MJExtension 解析 JSON 数据
|
||||||
|
let jsonArray = try JSONSerialization.jsonObject(with: data, options: .mutableContainers) as? [[String: Any]]
|
||||||
|
|
||||||
|
if let jsonArray = jsonArray {
|
||||||
|
// 使用 MJExtension 将 JSON 数组转换为模型数组
|
||||||
|
|
||||||
|
let wallpapersarr = (WA_3DModel.mj_objectArray(withKeyValuesArray: jsonArray) as? [WA_3DModel])!
|
||||||
|
self.wallpapers = wallpapersarr
|
||||||
|
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
print("Error reading JSON file:", error.localizedDescription)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
print("JSON file not found.")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
extension WA_RankVC:UICollectionViewDataSource, UICollectionViewDelegate{
|
||||||
|
|
||||||
|
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
|
||||||
|
return wallpapers.count // 你可以设置你的图片数量
|
||||||
|
}
|
||||||
|
|
||||||
|
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
|
||||||
|
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "WA_RankCollectionViewCell", for: indexPath) as! WA_RankCollectionViewCell
|
||||||
|
|
||||||
|
cell.model = self.wallpapers[indexPath.row]
|
||||||
|
return cell
|
||||||
|
}
|
||||||
|
|
||||||
|
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
|
||||||
|
let vc = WA_LiveVideoVC()
|
||||||
|
vc.model = self.wallpapers[indexPath.row]
|
||||||
|
navigationController?.pushViewController(vc, animated: true)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer<CGPoint>) {
|
||||||
|
guard let collectionView = collectionView else { return }
|
||||||
|
|
||||||
|
let itemHeight = collectionView.bounds.height * 2.5 / 3
|
||||||
|
let currentOffset = scrollView.contentOffset.y
|
||||||
|
let targetOffset = targetContentOffset.pointee.y
|
||||||
|
|
||||||
|
let currentItemIndex = round(currentOffset / itemHeight)
|
||||||
|
let targetItemIndex = targetOffset > currentOffset ? currentItemIndex + 1 : currentItemIndex - 1
|
||||||
|
|
||||||
|
let newOffsetY = targetItemIndex * itemHeight
|
||||||
|
targetContentOffset.pointee.y = newOffsetY
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
58
wallpaper_project/Rank/C/WA_RankVC.xib
Normal file
58
wallpaper_project/Rank/C/WA_RankVC.xib
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||||
|
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||||
|
<dependencies>
|
||||||
|
<deployment identifier="iOS"/>
|
||||||
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/>
|
||||||
|
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||||
|
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||||
|
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||||
|
</dependencies>
|
||||||
|
<objects>
|
||||||
|
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="WA_RankVC" customModule="wallpaper_project" customModuleProvider="target">
|
||||||
|
<connections>
|
||||||
|
<outlet property="collectionView" destination="d7N-da-az1" id="I12-6k-B7W"/>
|
||||||
|
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
|
||||||
|
</connections>
|
||||||
|
</placeholder>
|
||||||
|
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||||
|
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
|
||||||
|
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
|
<subviews>
|
||||||
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Rank" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lOh-ki-Zlw">
|
||||||
|
<rect key="frame" x="20" y="68" width="80.5" height="39.5"/>
|
||||||
|
<fontDescription key="fontDescription" type="system" weight="heavy" pointSize="33"/>
|
||||||
|
<color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
|
<nil key="highlightedColor"/>
|
||||||
|
</label>
|
||||||
|
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="d7N-da-az1">
|
||||||
|
<rect key="frame" x="0.0" y="122.5" width="414" height="739.5"/>
|
||||||
|
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
|
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="Wgs-Re-J6w">
|
||||||
|
<size key="itemSize" width="128" height="128"/>
|
||||||
|
<size key="headerReferenceSize" width="0.0" height="0.0"/>
|
||||||
|
<size key="footerReferenceSize" width="0.0" height="0.0"/>
|
||||||
|
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
|
||||||
|
</collectionViewFlowLayout>
|
||||||
|
</collectionView>
|
||||||
|
</subviews>
|
||||||
|
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
|
||||||
|
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="d7N-da-az1" secondAttribute="bottom" id="8JQ-Bl-E7v"/>
|
||||||
|
<constraint firstItem="d7N-da-az1" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="YRU-L9-SIy"/>
|
||||||
|
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="d7N-da-az1" secondAttribute="trailing" id="d2u-Xe-tff"/>
|
||||||
|
<constraint firstItem="lOh-ki-Zlw" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="20" id="i36-r5-wKR"/>
|
||||||
|
<constraint firstItem="d7N-da-az1" firstAttribute="top" secondItem="lOh-ki-Zlw" secondAttribute="bottom" constant="15" id="oFZ-Su-zaX"/>
|
||||||
|
<constraint firstItem="lOh-ki-Zlw" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="20" id="yi9-OL-hJL"/>
|
||||||
|
</constraints>
|
||||||
|
<point key="canvasLocation" x="108" y="-12"/>
|
||||||
|
</view>
|
||||||
|
</objects>
|
||||||
|
<resources>
|
||||||
|
<systemColor name="systemBackgroundColor">
|
||||||
|
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
|
</systemColor>
|
||||||
|
</resources>
|
||||||
|
</document>
|
||||||
85
wallpaper_project/Rank/C/custlayout.swift
Normal file
85
wallpaper_project/Rank/C/custlayout.swift
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
//
|
||||||
|
// custlayout.swift
|
||||||
|
// wallpaper_project
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
import UIKit
|
||||||
|
|
||||||
|
|
||||||
|
//class CustomLayout: UICollectionViewLayout {
|
||||||
|
// private var cache: [UICollectionViewLayoutAttributes] = []
|
||||||
|
// private var contentHeight: CGFloat = 0
|
||||||
|
//
|
||||||
|
// override var collectionViewContentSize: CGSize {
|
||||||
|
// return CGSize(width: collectionView?.bounds.width ?? 0, height: contentHeight)
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// override func prepare() {
|
||||||
|
// guard let collectionView = collectionView else { return }
|
||||||
|
// cache.removeAll()
|
||||||
|
//
|
||||||
|
// let width = collectionView.bounds.width
|
||||||
|
// var yOffset: CGFloat = 0
|
||||||
|
//
|
||||||
|
// for item in 0..<collectionView.numberOfItems(inSection: 0) {
|
||||||
|
// let indexPath = IndexPath(item: item, section: 0)
|
||||||
|
// let attributes = UICollectionViewLayoutAttributes(forCellWith: indexPath)
|
||||||
|
//
|
||||||
|
// let frame = CGRect(x: 0, y: yOffset, width: width, height: collectionView.bounds.height * 2.5 / 3)
|
||||||
|
// yOffset += collectionView.bounds.height * 2.5 / 3
|
||||||
|
//
|
||||||
|
// attributes.frame = frame
|
||||||
|
// cache.append(attributes)
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// contentHeight = yOffset
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// override func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? {
|
||||||
|
// return cache.filter { $0.frame.intersects(rect) }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// override func layoutAttributesForItem(at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? {
|
||||||
|
// return cache[indexPath.item]
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
|
class CustomLayout: UICollectionViewLayout {
|
||||||
|
private var cache: [UICollectionViewLayoutAttributes] = []
|
||||||
|
private var contentHeight: CGFloat = 0
|
||||||
|
|
||||||
|
override var collectionViewContentSize: CGSize {
|
||||||
|
return CGSize(width: collectionView?.bounds.width ?? 0, height: contentHeight)
|
||||||
|
}
|
||||||
|
|
||||||
|
override func prepare() {
|
||||||
|
guard let collectionView = collectionView else { return }
|
||||||
|
cache.removeAll()
|
||||||
|
|
||||||
|
let width = collectionView.bounds.width
|
||||||
|
var yOffset: CGFloat = 0
|
||||||
|
|
||||||
|
for item in 0..<collectionView.numberOfItems(inSection: 0) {
|
||||||
|
let indexPath = IndexPath(item: item, section: 0)
|
||||||
|
let attributes = UICollectionViewLayoutAttributes(forCellWith: indexPath)
|
||||||
|
|
||||||
|
let frame = CGRect(x: 0, y: yOffset, width: width, height: collectionView.bounds.height * 2.5 / 3)
|
||||||
|
yOffset += collectionView.bounds.height * 2.5 / 3
|
||||||
|
|
||||||
|
attributes.frame = frame
|
||||||
|
cache.append(attributes)
|
||||||
|
}
|
||||||
|
|
||||||
|
contentHeight = yOffset
|
||||||
|
}
|
||||||
|
|
||||||
|
override func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? {
|
||||||
|
return cache.filter { $0.frame.intersects(rect) }
|
||||||
|
}
|
||||||
|
|
||||||
|
override func layoutAttributesForItem(at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? {
|
||||||
|
return cache[indexPath.item]
|
||||||
|
}
|
||||||
|
}
|
||||||
25
wallpaper_project/Rank/V/WA_RankCollectionViewCell.swift
Normal file
25
wallpaper_project/Rank/V/WA_RankCollectionViewCell.swift
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
//
|
||||||
|
// WA_RankCollectionViewCell.swift
|
||||||
|
// wallpaper_project
|
||||||
|
|
||||||
|
|
||||||
|
import UIKit
|
||||||
|
import SDWebImage
|
||||||
|
|
||||||
|
class WA_RankCollectionViewCell: UICollectionViewCell {
|
||||||
|
@IBOutlet weak var bgImageV: UIImageView!
|
||||||
|
|
||||||
|
override func awakeFromNib() {
|
||||||
|
super.awakeFromNib()
|
||||||
|
bgImageV.layer.cornerRadius = 18
|
||||||
|
}
|
||||||
|
var model:WA_3DModel?{
|
||||||
|
didSet{
|
||||||
|
if let imageURL = URL(string: model!.thumbnail ?? "") {
|
||||||
|
|
||||||
|
bgImageV.sd_setImage(with: imageURL, placeholderImage: UIImage(named: "Rectangle"))
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
39
wallpaper_project/Rank/V/WA_RankCollectionViewCell.xib
Normal file
39
wallpaper_project/Rank/V/WA_RankCollectionViewCell.xib
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||||
|
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||||
|
<dependencies>
|
||||||
|
<deployment identifier="iOS"/>
|
||||||
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/>
|
||||||
|
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||||
|
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||||
|
</dependencies>
|
||||||
|
<objects>
|
||||||
|
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||||
|
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||||
|
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="WA_RankCollectionViewCell" customModule="wallpaper_project" customModuleProvider="target">
|
||||||
|
<rect key="frame" x="0.0" y="0.0" width="291" height="262"/>
|
||||||
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
|
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||||
|
<rect key="frame" x="0.0" y="0.0" width="291" height="262"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||||
|
<subviews>
|
||||||
|
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="uJA-c4-Wea">
|
||||||
|
<rect key="frame" x="20" y="10" width="251" height="247"/>
|
||||||
|
</imageView>
|
||||||
|
</subviews>
|
||||||
|
</view>
|
||||||
|
<viewLayoutGuide key="safeArea" id="ZTg-uK-7eu"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstItem="uJA-c4-Wea" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="10" id="IKm-3z-p8i"/>
|
||||||
|
<constraint firstAttribute="trailing" secondItem="uJA-c4-Wea" secondAttribute="trailing" constant="20" id="LqX-LS-2QB"/>
|
||||||
|
<constraint firstItem="uJA-c4-Wea" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" constant="20" id="r8m-3g-9QK"/>
|
||||||
|
<constraint firstAttribute="bottom" secondItem="uJA-c4-Wea" secondAttribute="bottom" constant="5" id="yjI-sa-j1C"/>
|
||||||
|
</constraints>
|
||||||
|
<size key="customSize" width="291" height="262"/>
|
||||||
|
<connections>
|
||||||
|
<outlet property="bgImageV" destination="uJA-c4-Wea" id="v8W-Rv-cjc"/>
|
||||||
|
</connections>
|
||||||
|
<point key="canvasLocation" x="191.6030534351145" y="61.971830985915496"/>
|
||||||
|
</collectionViewCell>
|
||||||
|
</objects>
|
||||||
|
</document>
|
||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// AccountManager.swift
|
// AccountManager.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/4/16.
|
|
||||||
//
|
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// CustomCollectionViewFlowLayout.swift
|
// CustomCollectionViewFlowLayout.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/11.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// idfaManager.swift
|
// idfaManager.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/6/4.
|
|
||||||
//
|
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// NetworkManager.swift
|
// NetworkManager.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/6/4.
|
|
||||||
//
|
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import Alamofire
|
import Alamofire
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// PrefixHeader.swift
|
// PrefixHeader.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/15.
|
|
||||||
//
|
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// colorManager.swift
|
// colorManager.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/11.
|
|
||||||
//
|
|
||||||
import UIKit
|
import UIKit
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// historyManager.swift
|
// historyManager.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/27.
|
|
||||||
//
|
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// ipManager.swift
|
// ipManager.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/6/4.
|
|
||||||
//
|
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// stringADID.swift
|
// stringADID.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/6/14.
|
|
||||||
//
|
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
let strings = ["789b377f3ac4010e", "880a042774979c3c", "83802ca889ba09e6","8e1bc1f22c8d6c9d"]
|
let strings = ["789b377f3ac4010e", "880a042774979c3c", "83802ca889ba09e6","8e1bc1f22c8d6c9d"]
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// videoURL.swift
|
// videoURL.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/12.
|
|
||||||
//
|
|
||||||
|
|
||||||
//import Foundation
|
//import Foundation
|
||||||
//import EZPlayer
|
//import EZPlayer
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
//
|
//
|
||||||
// ViewController.swift
|
// ViewController.swift
|
||||||
// wallpaper_project
|
// wallpaper_project
|
||||||
//
|
|
||||||
// Created by 忆海16 on 2024/3/11.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
@ -15,6 +13,5 @@ class ViewController: UIViewController {
|
|||||||
print("----test")
|
print("----test")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,17 +3,17 @@
|
|||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>API_KEY</key>
|
<key>API_KEY</key>
|
||||||
<string>AIzaSyCSllhrjLODy6W-0IE9JEu50nFP4eUgwNA</string>
|
<string>AIzaSyCq2p7AsEC-eBHe69m8ojAP_jbGLlyWuao</string>
|
||||||
<key>GCM_SENDER_ID</key>
|
<key>GCM_SENDER_ID</key>
|
||||||
<string>157500622168</string>
|
<string>77595458034</string>
|
||||||
<key>PLIST_VERSION</key>
|
<key>PLIST_VERSION</key>
|
||||||
<string>1</string>
|
<string>1</string>
|
||||||
<key>BUNDLE_ID</key>
|
<key>BUNDLE_ID</key>
|
||||||
<string>com.wallpapaer.hd.live.app</string>
|
<string>com.wallpapaer.hd.live.app</string>
|
||||||
<key>PROJECT_ID</key>
|
<key>PROJECT_ID</key>
|
||||||
<string>wallpaper-home-546b3</string>
|
<string>wallpaperhome-1bfa3</string>
|
||||||
<key>STORAGE_BUCKET</key>
|
<key>STORAGE_BUCKET</key>
|
||||||
<string>wallpaper-home-546b3.appspot.com</string>
|
<string>wallpaperhome-1bfa3.appspot.com</string>
|
||||||
<key>IS_ADS_ENABLED</key>
|
<key>IS_ADS_ENABLED</key>
|
||||||
<false></false>
|
<false></false>
|
||||||
<key>IS_ANALYTICS_ENABLED</key>
|
<key>IS_ANALYTICS_ENABLED</key>
|
||||||
@ -25,6 +25,6 @@
|
|||||||
<key>IS_SIGNIN_ENABLED</key>
|
<key>IS_SIGNIN_ENABLED</key>
|
||||||
<true></true>
|
<true></true>
|
||||||
<key>GOOGLE_APP_ID</key>
|
<key>GOOGLE_APP_ID</key>
|
||||||
<string>1:157500622168:ios:84591532a0a06f1f40912d</string>
|
<string>1:77595458034:ios:f05d4f84f221414b3fd36b</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
82
wallpaper_project/json/rank.json
Normal file
82
wallpaper_project/json/rank.json
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
|
||||||
|
[{
|
||||||
|
"title": "gsgsdfg",
|
||||||
|
"thumbnail": "http://d.c-launcher.com/wallpaper_video/20200526/030753047830.jpg",
|
||||||
|
"preview": "http://d.c-launcher.com/wallpaper_video/20200526/030753262473.mp4",
|
||||||
|
"is_free": 0,
|
||||||
|
"category": 367,
|
||||||
|
"id": 5484,
|
||||||
|
"cnt_like": 580199
|
||||||
|
}, {
|
||||||
|
"title": "cool",
|
||||||
|
"thumbnail": "http://d.c-launcher.com/wallpaper_video/20201225/101558598645.jpg",
|
||||||
|
"preview": "http://d.c-launcher.com/wallpaper_video/20201225/101558989358.mp4",
|
||||||
|
"is_free": 1,
|
||||||
|
"category": 367,
|
||||||
|
"id": 11172,
|
||||||
|
"cnt_like": 330817
|
||||||
|
},{
|
||||||
|
"title": "AbstractSpiderweb",
|
||||||
|
"thumbnail": "http://d.c-launcher.com/wallpaper_video/20191118/095153473153.jpg",
|
||||||
|
"preview": "http://d.c-launcher.com/wallpaper_video/20191118/095153829550.mp4",
|
||||||
|
"is_free": 1,
|
||||||
|
"category": 15,
|
||||||
|
"id": 808,
|
||||||
|
"cnt_like": 722194
|
||||||
|
}, {
|
||||||
|
"title": "Shake2",
|
||||||
|
"thumbnail": "http://d.c-launcher.com/wallpaper_video/20200708/131257561446.jpg",
|
||||||
|
"preview": "http://d.c-launcher.com/wallpaper_video/20200708/131257866722.mp4",
|
||||||
|
"is_free": 1,
|
||||||
|
"category": 371,
|
||||||
|
"id": 10310,
|
||||||
|
"cnt_like": 522499
|
||||||
|
},{
|
||||||
|
"title": "Sea",
|
||||||
|
"thumbnail": "http://d.c-launcher.com/wallpaper_video/20200803/110534554895.jpg",
|
||||||
|
"preview": "http://d.c-launcher.com/wallpaper_video/20200803/110534950027.mp4",
|
||||||
|
"is_free": 1,
|
||||||
|
"category": 391,
|
||||||
|
"id": 10352,
|
||||||
|
"cnt_like": 485270
|
||||||
|
},{
|
||||||
|
"title": "fire",
|
||||||
|
"thumbnail": "http://d.c-launcher.com/wallpaper_video/20201204/163107574309.jpg",
|
||||||
|
"preview": "http://d.c-launcher.com/wallpaper_video/20201204/163107814554.mp4",
|
||||||
|
"is_free": 1,
|
||||||
|
"category": 391,
|
||||||
|
"id": 11300,
|
||||||
|
"cnt_like": 308773
|
||||||
|
},{
|
||||||
|
"title": "lighting",
|
||||||
|
"thumbnail": "http://d.c-launcher.com/wallpaper_video/20200803/105150461948.jpg",
|
||||||
|
"preview": "http://d.c-launcher.com/wallpaper_video/20200803/105150744153.mp4",
|
||||||
|
"is_free": 1,
|
||||||
|
"category": 391,
|
||||||
|
"id": 10333,
|
||||||
|
"cnt_like": 485266
|
||||||
|
},{
|
||||||
|
"title": "ghfdhfh",
|
||||||
|
"thumbnail": "http://d.c-launcher.com/wallpaper_video/20200526/025406797409.jpg",
|
||||||
|
"preview": "http://d.c-launcher.com/wallpaper_video/20200526/025407069762.mp4",
|
||||||
|
"is_free": 1,
|
||||||
|
"category": 49,
|
||||||
|
"id": 5481,
|
||||||
|
"cnt_like": 580260
|
||||||
|
},{
|
||||||
|
"title": "cute",
|
||||||
|
"thumbnail": "http://d.c-launcher.com/wallpaper_video/20200803/110356370090.jpg",
|
||||||
|
"preview": "http://d.c-launcher.com/wallpaper_video/20200803/110356680630.mp4",
|
||||||
|
"is_free": 1,
|
||||||
|
"category": 403,
|
||||||
|
"id": 10350,
|
||||||
|
"cnt_like": 485270
|
||||||
|
},{
|
||||||
|
"title": "lan_10",
|
||||||
|
"thumbnail": "http://d.c-launcher.com/wallpaper_video/20191017/083614723679.jpg",
|
||||||
|
"preview": "http://d.c-launcher.com/wallpaper_video/20191029/023550003790.mp4",
|
||||||
|
"is_free": 1,
|
||||||
|
"category": 5,
|
||||||
|
"id": 796,
|
||||||
|
"cnt_like": 722181
|
||||||
|
}]
|
||||||
Loading…
Reference in New Issue
Block a user