From 5ff1070967349270134c07c58f566a8a8719eb6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BF=86=E6=B5=B716?= <> Date: Tue, 23 Jul 2024 11:44:01 +0800 Subject: [PATCH] mtg --- wallpaper_project.xcodeproj/project.pbxproj | 126 +++- wallpaper_project/AppDelegate.swift | 14 +- .../Community_n.imageset/Community_off.png | Bin 0 -> 1015 bytes .../Community_n.imageset/Community_off@2x.png | Bin 0 -> 1615 bytes .../Community_n.imageset/Community_off@3x.png | Bin 0 -> 2207 bytes .../Tab/Community_n.imageset/Contents.json | 23 + .../Tab/Community_s.imageset/Community_on.png | Bin 0 -> 1032 bytes .../Community_s.imageset/Community_on@2x.png | Bin 0 -> 1800 bytes .../Community_s.imageset/Community_on@3x.png | Bin 0 -> 2465 bytes .../Tab/Community_s.imageset/Contents.json | 23 + .../{Ranking => Community}/C/WA_AddVC.swift | 10 +- .../{Ranking => Community}/C/WA_AddVC.xib | 0 .../C/WA_RKDetailsVC.swift | 29 +- .../C/WA_RKDetailsVC.xib | 0 .../C/WA_RankingVC.swift | 36 +- .../{Ranking => Community}/C/WA_RankingVC.xib | 0 .../M/WA_RakModel.swift | 4 +- .../V/WA_RKPLCell.swift | 4 +- .../{Ranking => Community}/V/WA_RKPLCell.xib | 0 .../V/WA_RKTopCell.swift | 4 +- .../{Ranking => Community}/V/WA_RKTopCell.xib | 0 .../V/WA_RakingCell.swift | 5 +- .../V/WA_RakingCell.xib | 0 wallpaper_project/Header/WallPaperPCH.pch | 4 +- wallpaper_project/Header/Wallpaper_Header.h | 4 +- .../Home/C/History/WA_HistoryVC.swift | 4 +- .../Home/C/History/WA_histortRankig.swift | 4 +- .../Home/C/History/WA_history4K.swift | 4 +- .../Home/C/History/WA_historyLive.swift | 4 +- .../Home/C/NewHome/C/WA_NewHomeVC.swift | 5 +- .../Home/C/NewHome/V/WA_BannerPagerCell.swift | 4 +- .../Home/C/NewHome/V/WA_MonRankngCell.swift | 4 +- .../C/NewHome/V/WA_NHTypeCollectCell.swift | 4 +- .../C/NewHome/V/WA_NewHomeBannerCell.swift | 4 +- .../Home/C/NewHome/V/WA_NewHometypeCell.swift | 4 +- .../C/NewHome/V/WA_ToDayCollectCell.swift | 4 +- .../Home/C/NewHome/V/WA_TodayCell.swift | 4 +- wallpaper_project/Home/C/WA_4KVC.swift | 80 ++- wallpaper_project/Home/C/WA_DetailsVC.swift | 294 +++++---- wallpaper_project/Home/C/WA_HomeVC.swift | 4 +- wallpaper_project/Home/C/WA_LIVEVC.swift | 27 +- wallpaper_project/Home/C/WA_LiveVideoVC.swift | 239 ++++++- wallpaper_project/Home/C/WA_TipVC.swift | 4 +- wallpaper_project/Home/M/WA_3DModel.swift | 4 +- wallpaper_project/Home/M/WallpaperModel.swift | 4 +- wallpaper_project/Home/V/WA_HistoryCell.swift | 4 +- wallpaper_project/Home/V/WA_PreView.swift | 4 +- .../Home/V/WA_WallpaperCollectionCell.swift | 4 +- wallpaper_project/Home/V/WA_tipCell.swift | 4 +- wallpaper_project/Home/test/testVideoVC.swift | 4 +- wallpaper_project/Main/WA_RootNAV.swift | 4 +- wallpaper_project/Main/WA_RootTab.swift | 4 +- wallpaper_project/Main/WA_RootVC.swift | 4 +- wallpaper_project/Main/WA_TabButton.swift | 4 +- wallpaper_project/Main/WA_TabbarCommon.swift | 20 +- .../Main/WA_limitsVCViewController.swift | 336 ++++++---- wallpaper_project/Mine/C/WA_LoginVC.swift | 4 +- wallpaper_project/Mine/C/WA_MineVC.swift | 4 +- wallpaper_project/Mine/C/WA_PrivacyVC.swift | 4 +- wallpaper_project/Mine/C/WA_SCVC.swift | 4 +- wallpaper_project/Mine/C/WA_SettingSVC.swift | 33 +- .../PlayerVC/C/WA_AddPlayerVC.swift | 252 ++++++++ .../PlayerVC/C/WA_AddPlayerVC.xib | 116 ++++ .../PlayerVC/C/WA_CommunityPlayerVC.swift | 325 ++++++++++ .../PlayerVC/C/WA_CommunityPlayerVC.xib | 56 ++ .../PlayerVC/C/WA_player4kVC.swift | 587 ++++++++++++++++++ .../PlayerVC/C/WA_player4kVC.xib | 71 +++ .../PlayerVC/C/WA_playerRankVC.swift | 308 +++++++++ .../PlayerVC/C/WA_playerRankVC.xib | 58 ++ .../PlayerVC/C/WA_playerVC.swift | 67 ++ wallpaper_project/PlayerVC/C/WA_playerVC.xib | 197 ++++++ wallpaper_project/Rank/C/WA_RankVC.swift | 92 +++ wallpaper_project/Rank/C/WA_RankVC.xib | 58 ++ wallpaper_project/Rank/C/custlayout.swift | 85 +++ .../Rank/V/WA_RankCollectionViewCell.swift | 25 + .../Rank/V/WA_RankCollectionViewCell.xib | 39 ++ wallpaper_project/Tool/AccountManager.swift | 4 +- .../Tool/CustomCollectionViewFlowLayout.swift | 4 +- wallpaper_project/Tool/IDFA/idfaManager.swift | 4 +- .../Tool/Network/NetworkManager.swift | 4 +- wallpaper_project/Tool/PrefixHeader.swift | 4 +- wallpaper_project/Tool/colorManager.swift | 4 +- wallpaper_project/Tool/historyManager.swift | 4 +- wallpaper_project/Tool/ip/ipManager.swift | 4 +- wallpaper_project/Tool/stringADID.swift | 4 +- wallpaper_project/Tool/videoURL.swift | 4 +- wallpaper_project/ViewController.swift | 7 +- .../json/GoogleService-Info.plist | 10 +- wallpaper_project/json/rank.json | 82 +++ 89 files changed, 3400 insertions(+), 507 deletions(-) create mode 100644 wallpaper_project/Assets.xcassets/Tab/Community_n.imageset/Community_off.png create mode 100644 wallpaper_project/Assets.xcassets/Tab/Community_n.imageset/Community_off@2x.png create mode 100644 wallpaper_project/Assets.xcassets/Tab/Community_n.imageset/Community_off@3x.png create mode 100644 wallpaper_project/Assets.xcassets/Tab/Community_n.imageset/Contents.json create mode 100644 wallpaper_project/Assets.xcassets/Tab/Community_s.imageset/Community_on.png create mode 100644 wallpaper_project/Assets.xcassets/Tab/Community_s.imageset/Community_on@2x.png create mode 100644 wallpaper_project/Assets.xcassets/Tab/Community_s.imageset/Community_on@3x.png create mode 100644 wallpaper_project/Assets.xcassets/Tab/Community_s.imageset/Contents.json rename wallpaper_project/{Ranking => Community}/C/WA_AddVC.swift (97%) rename wallpaper_project/{Ranking => Community}/C/WA_AddVC.xib (100%) rename wallpaper_project/{Ranking => Community}/C/WA_RKDetailsVC.swift (97%) rename wallpaper_project/{Ranking => Community}/C/WA_RKDetailsVC.xib (100%) rename wallpaper_project/{Ranking => Community}/C/WA_RankingVC.swift (94%) rename wallpaper_project/{Ranking => Community}/C/WA_RankingVC.xib (100%) rename wallpaper_project/{Ranking => Community}/M/WA_RakModel.swift (92%) rename wallpaper_project/{Ranking => Community}/V/WA_RKPLCell.swift (97%) rename wallpaper_project/{Ranking => Community}/V/WA_RKPLCell.xib (100%) rename wallpaper_project/{Ranking => Community}/V/WA_RKTopCell.swift (92%) rename wallpaper_project/{Ranking => Community}/V/WA_RKTopCell.xib (100%) rename wallpaper_project/{Ranking => Community}/V/WA_RakingCell.swift (98%) rename wallpaper_project/{Ranking => Community}/V/WA_RakingCell.xib (100%) create mode 100644 wallpaper_project/PlayerVC/C/WA_AddPlayerVC.swift create mode 100644 wallpaper_project/PlayerVC/C/WA_AddPlayerVC.xib create mode 100644 wallpaper_project/PlayerVC/C/WA_CommunityPlayerVC.swift create mode 100644 wallpaper_project/PlayerVC/C/WA_CommunityPlayerVC.xib create mode 100644 wallpaper_project/PlayerVC/C/WA_player4kVC.swift create mode 100644 wallpaper_project/PlayerVC/C/WA_player4kVC.xib create mode 100644 wallpaper_project/PlayerVC/C/WA_playerRankVC.swift create mode 100644 wallpaper_project/PlayerVC/C/WA_playerRankVC.xib create mode 100644 wallpaper_project/PlayerVC/C/WA_playerVC.swift create mode 100644 wallpaper_project/PlayerVC/C/WA_playerVC.xib create mode 100644 wallpaper_project/Rank/C/WA_RankVC.swift create mode 100644 wallpaper_project/Rank/C/WA_RankVC.xib create mode 100644 wallpaper_project/Rank/C/custlayout.swift create mode 100644 wallpaper_project/Rank/V/WA_RankCollectionViewCell.swift create mode 100644 wallpaper_project/Rank/V/WA_RankCollectionViewCell.xib create mode 100644 wallpaper_project/json/rank.json diff --git a/wallpaper_project.xcodeproj/project.pbxproj b/wallpaper_project.xcodeproj/project.pbxproj index 839b462..718a4d9 100644 --- a/wallpaper_project.xcodeproj/project.pbxproj +++ b/wallpaper_project.xcodeproj/project.pbxproj @@ -10,8 +10,24 @@ 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 */; }; 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 */; }; - 757E9AF22BD26A8000EF854A /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 757E9AF12BD26A8000EF854A /* GoogleService-Info.plist */; }; 759BB0602BABE3EC001C0031 /* loanding.json in Resources */ = {isa = PBXBuildFile; fileRef = 759BB05F2BABE3EC001C0031 /* loanding.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 */; }; @@ -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 = ""; }; 75200B6B2BA7D34F00BA65FD /* WA_limitsVCViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WA_limitsVCViewController.swift; sourceTree = ""; }; 75200B6C2BA7D34F00BA65FD /* WA_limitsVCViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WA_limitsVCViewController.xib; sourceTree = ""; }; + 752FFF792C48B7EB00FDA982 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; + 752FFF852C48EC5000FDA982 /* WA_RankVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WA_RankVC.swift; sourceTree = ""; }; + 752FFF862C48EC5000FDA982 /* WA_RankVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WA_RankVC.xib; sourceTree = ""; }; + 752FFF892C48F35F00FDA982 /* custlayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = custlayout.swift; sourceTree = ""; }; + 752FFF8C2C48F4E400FDA982 /* WA_RankCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WA_RankCollectionViewCell.swift; sourceTree = ""; }; + 752FFF8D2C48F4E400FDA982 /* WA_RankCollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WA_RankCollectionViewCell.xib; sourceTree = ""; }; + 752FFF912C48FEBE00FDA982 /* rank.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = rank.json; sourceTree = ""; }; + 752FFFB82C49118700FDA982 /* WA_playerVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WA_playerVC.swift; sourceTree = ""; }; + 752FFFB92C49118700FDA982 /* WA_playerVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WA_playerVC.xib; sourceTree = ""; }; + 755EC36A2C4A378400919ACB /* WA_player4kVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WA_player4kVC.swift; sourceTree = ""; }; + 755EC36B2C4A378400919ACB /* WA_player4kVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WA_player4kVC.xib; sourceTree = ""; }; + 755EC36E2C4A469A00919ACB /* WA_playerRankVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WA_playerRankVC.swift; sourceTree = ""; }; + 755EC36F2C4A469A00919ACB /* WA_playerRankVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WA_playerRankVC.xib; sourceTree = ""; }; + 755EC3722C4A4F3600919ACB /* WA_CommunityPlayerVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WA_CommunityPlayerVC.swift; sourceTree = ""; }; + 755EC3732C4A4F3600919ACB /* WA_CommunityPlayerVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WA_CommunityPlayerVC.xib; sourceTree = ""; }; + 755EC3762C4A517500919ACB /* WA_AddPlayerVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WA_AddPlayerVC.swift; sourceTree = ""; }; + 755EC3772C4A517500919ACB /* WA_AddPlayerVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WA_AddPlayerVC.xib; sourceTree = ""; }; 757DA8B72C1BE33D0046CAB6 /* stringADID.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = stringADID.swift; sourceTree = ""; }; - 757E9AF12BD26A8000EF854A /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; 759BB05F2BABE3EC001C0031 /* loanding.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = loanding.json; sourceTree = ""; }; 759BB0612BAD35D6001C0031 /* loadProgress.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = loadProgress.json; sourceTree = ""; }; 75A14D912BA1A9760091D9AD /* WA_PrivacyVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WA_PrivacyVC.swift; sourceTree = ""; }; @@ -298,14 +330,67 @@ path = Pods; sourceTree = ""; }; - 75A8F0E12BB3F28E004B0F5C /* Ranking */ = { + 752FFF832C48EC3400FDA982 /* Rank */ = { + isa = PBXGroup; + children = ( + 752FFF8B2C48F4D200FDA982 /* V */, + 752FFF842C48EC3B00FDA982 /* C */, + ); + path = Rank; + sourceTree = ""; + }; + 752FFF842C48EC3B00FDA982 /* C */ = { + isa = PBXGroup; + children = ( + 752FFF852C48EC5000FDA982 /* WA_RankVC.swift */, + 752FFF862C48EC5000FDA982 /* WA_RankVC.xib */, + 752FFF892C48F35F00FDA982 /* custlayout.swift */, + ); + path = C; + sourceTree = ""; + }; + 752FFF8B2C48F4D200FDA982 /* V */ = { + isa = PBXGroup; + children = ( + 752FFF8C2C48F4E400FDA982 /* WA_RankCollectionViewCell.swift */, + 752FFF8D2C48F4E400FDA982 /* WA_RankCollectionViewCell.xib */, + ); + path = V; + sourceTree = ""; + }; + 752FFFB62C49116500FDA982 /* PlayerVC */ = { + isa = PBXGroup; + children = ( + 752FFFB72C49116C00FDA982 /* C */, + ); + path = PlayerVC; + sourceTree = ""; + }; + 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 = ""; + }; + 75A8F0E12BB3F28E004B0F5C /* Community */ = { isa = PBXGroup; children = ( 75A8F1082BB42857004B0F5C /* M */, 75A8F0FE2BB40F43004B0F5C /* V */, 75A8F0E22BB3F294004B0F5C /* C */, ); - path = Ranking; + path = Community; sourceTree = ""; }; 75A8F0E22BB3F294004B0F5C /* C */ = { @@ -445,7 +530,9 @@ 75E2881F2B9EB0700049AB56 /* wallpaper_project */ = { isa = PBXGroup; children = ( - 75A8F0E12BB3F28E004B0F5C /* Ranking */, + 752FFFB62C49116500FDA982 /* PlayerVC */, + 752FFF832C48EC3400FDA982 /* Rank */, + 75A8F0E12BB3F28E004B0F5C /* Community */, 75E288A32BA0542F0049AB56 /* json */, 75E2886B2B9EB4670049AB56 /* Tool */, 75E2885F2B9EB2AC0049AB56 /* Mine */, @@ -607,7 +694,8 @@ 75E288A32BA0542F0049AB56 /* json */ = { isa = PBXGroup; children = ( - 757E9AF12BD26A8000EF854A /* GoogleService-Info.plist */, + 752FFF912C48FEBE00FDA982 /* rank.json */, + 752FFF792C48B7EB00FDA982 /* GoogleService-Info.plist */, 75A8F1252BB54082004B0F5C /* my_wallpaper.json */, 75A8F10B2BB42A32004B0F5C /* rankJson.json */, 759BB0612BAD35D6001C0031 /* loadProgress.json */, @@ -752,16 +840,19 @@ 75E2888D2B9EFC050049AB56 /* WA_DetailsVC.xib in Resources */, 75E288792B9ED2A70049AB56 /* WA_4KVC.xib in Resources */, 75A8F1392BB54664004B0F5C /* WA_NewHometypeCell.xib in Resources */, + 755EC3712C4A469A00919ACB /* WA_playerRankVC.xib in Resources */, 75A8F1022BB40F6F004B0F5C /* WA_RakingCell.xib in Resources */, 75A8F1352BB54519004B0F5C /* WA_BannerPagerCell.xib in Resources */, 75A8F11B2BB51092004B0F5C /* WA_RKDetailsVC.xib in Resources */, 75E2887E2B9EDDC60049AB56 /* WA_WallpaperCollectionCell.xib in Resources */, 75A8F13D2BB547A9004B0F5C /* WA_NHTypeCollectCell.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 */, 75A8F0F02BB3FADF004B0F5C /* WA_HistoryCell.xib in Resources */, 75E2889D2BA034140049AB56 /* WA_LiveVideoVC.xib in Resources */, + 752FFF8E2C48F4E400FDA982 /* WA_RankCollectionViewCell.xib in Resources */, 75A8F1232BB510D1004B0F5C /* WA_RKTopCell.xib in Resources */, 75A8F1312BB54459004B0F5C /* WA_NewHomeBannerCell.xib in Resources */, 75E288952B9FED680049AB56 /* WA_PreView.xib in Resources */, @@ -772,15 +863,20 @@ 75A8F0E62BB3F2A6004B0F5C /* WA_RankingVC.xib in Resources */, 75E288752B9ED2970049AB56 /* WA_LIVEVC.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 */, 75A8F0FD2BB3FE0D004B0F5C /* WA_histortRankig.xib in Resources */, 75A8F1182BB42B43004B0F5C /* WA_MineVC.xib in Resources */, 75E288892B9EEA910049AB56 /* live.json in Resources */, 75A8F1472BB57742004B0F5C /* WA_ToDayCollectCell.xib in Resources */, + 752FFF922C48FEBE00FDA982 /* rank.json in Resources */, 75200B6E2BA7D34F00BA65FD /* WA_limitsVCViewController.xib in Resources */, 75A8F1432BB576C2004B0F5C /* WA_TodayCell.xib in Resources */, 75E288822B9EE56C0049AB56 /* 3d.json in Resources */, + 755EC3752C4A4F3600919ACB /* WA_CommunityPlayerVC.xib in Resources */, 75FEE6082BA420C400E83097 /* WA_TipVC.xib in Resources */, + 755EC3792C4A517500919ACB /* WA_AddPlayerVC.xib in Resources */, 75A8F12A2BB54220004B0F5C /* WA_NewHomeVC.xib in Resources */, 75A8F0F92BB3FDFE004B0F5C /* WA_history4K.xib in Resources */, 75A14D942BA1A9760091D9AD /* WA_PrivacyVC.xib in Resources */, @@ -869,9 +965,11 @@ buildActionMask = 2147483647; files = ( 75A8F14E2BB66017004B0F5C /* WA_SCVC.swift in Sources */, + 752FFF882C48EC5000FDA982 /* WA_RankVC.swift in Sources */, 75A8F1242BB510D1004B0F5C /* WA_RKPLCell.swift in Sources */, 75A8F0F42BB3FDE9004B0F5C /* WA_historyLive.swift in Sources */, 75D453892C0EE875003B6B24 /* idfaManager.swift in Sources */, + 752FFF8F2C48F4E400FDA982 /* WA_RankCollectionViewCell.swift in Sources */, 75E2887D2B9EDDC60049AB56 /* WA_WallpaperCollectionCell.swift in Sources */, 75E2889F2BA043960049AB56 /* videoURL.swift in Sources */, 75A8F1212BB510D1004B0F5C /* WA_RKTopCell.swift in Sources */, @@ -879,9 +977,11 @@ 75FEE6042BA3E14A00E83097 /* PrefixHeader.swift in Sources */, 75A8F0FC2BB3FE0D004B0F5C /* WA_histortRankig.swift in Sources */, 75E2885C2B9EB22E0049AB56 /* WA_RootNAV.swift in Sources */, + 752FFF8A2C48F35F00FDA982 /* custlayout.swift in Sources */, 75A8F1172BB42B43004B0F5C /* WA_MineVC.swift in Sources */, 75E2886D2B9EB48A0049AB56 /* colorManager.swift in Sources */, 75FEE6012BA3E0ED00E83097 /* Toast.swift in Sources */, + 755EC3782C4A517500919ACB /* WA_AddPlayerVC.swift in Sources */, 75D4538F2C0EFE3A003B6B24 /* NetworkManager.swift in Sources */, 75A8F0E52BB3F2A6004B0F5C /* WA_RankingVC.swift in Sources */, 75E2885A2B9EB22E0049AB56 /* WA_TabButton.swift in Sources */, @@ -893,6 +993,7 @@ 75A8F13F2BB56338004B0F5C /* WallpaperModel.swift in Sources */, 75A8F1462BB57742004B0F5C /* WA_ToDayCollectCell.swift in Sources */, 75E2889C2BA034140049AB56 /* WA_LiveVideoVC.swift in Sources */, + 752FFFBB2C49118700FDA982 /* WA_playerVC.swift in Sources */, 75E288692B9EB2DF0049AB56 /* WA_SettingSVC.swift in Sources */, 75FEE5F92BA3037000E83097 /* testVideoVC.swift in Sources */, 75A8F10A2BB4286A004B0F5C /* WA_RakModel.swift in Sources */, @@ -906,6 +1007,8 @@ 75E2885D2B9EB22E0049AB56 /* WA_RootTab.swift in Sources */, 757DA8B82C1BE33E0046CAB6 /* stringADID.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 */, 75200B6D2BA7D34F00BA65FD /* WA_limitsVCViewController.swift in Sources */, 75E288212B9EB0700049AB56 /* AppDelegate.swift in Sources */, @@ -914,6 +1017,7 @@ 75FEE60B2BA4212B00E83097 /* WA_tipCell.swift in Sources */, 75FEE6022BA3E0ED00E83097 /* JPEG.swift in Sources */, 75A8F13C2BB547A9004B0F5C /* WA_NHTypeCollectCell.swift in Sources */, + 755EC3702C4A469A00919ACB /* WA_playerRankVC.swift in Sources */, 75A8F0F82BB3FDFE004B0F5C /* WA_history4K.swift in Sources */, 75E288742B9ED2970049AB56 /* WA_LIVEVC.swift in Sources */, 75E288802B9EE36A0049AB56 /* CustomCollectionViewFlowLayout.swift in Sources */, @@ -1112,7 +1216,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 5; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = 6HWQW9JC74; ENABLE_USER_SCRIPT_SANDBOXING = NO; EXCLUDED_ARCHS = ""; @@ -1133,7 +1237,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 3.5; + MARKETING_VERSION = 3.7; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.wallpapaer.hd.live.app; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -1159,7 +1263,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 5; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = 6HWQW9JC74; ENABLE_USER_SCRIPT_SANDBOXING = NO; EXCLUDED_ARCHS = ""; @@ -1180,7 +1284,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 3.5; + MARKETING_VERSION = 3.7; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.wallpapaer.hd.live.app; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/wallpaper_project/AppDelegate.swift b/wallpaper_project/AppDelegate.swift index 0a08709..7e3a942 100644 --- a/wallpaper_project/AppDelegate.swift +++ b/wallpaper_project/AppDelegate.swift @@ -1,9 +1,7 @@ // // AppDelegate.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/11. -// + import UIKit import IQKeyboardManagerSwift @@ -51,6 +49,16 @@ class AppDelegate: UIResponder, UIApplicationDelegate { let mtgsdk = MTGSDK() 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 // builder.mediationProvider = ALMediationProviderMAX // } diff --git a/wallpaper_project/Assets.xcassets/Tab/Community_n.imageset/Community_off.png b/wallpaper_project/Assets.xcassets/Tab/Community_n.imageset/Community_off.png new file mode 100644 index 0000000000000000000000000000000000000000..fd81f24b29c41ab1357b52c7c910d2ad2461cdd0 GIT binary patch literal 1015 zcmVU>h*?d$b`aT5T$j!+ zmv){4Q-A$k)t||l8vWnYL5&#};E{=yZHo!sB_1(oDdMW&yvxUe(=MMoo|R;r_?B4G z3TlS9Ni3&3^n3@Gie;^}gV^4m)mN9r9O_ZbVG|}8icnF31O?%L{L_vm;#3HD6?Va!XbBie+=k*;rwF^@ErnnmGiG7&g~k7pMfj= z2Nx-7yi*22%K!iXIAvH#W=%~1DgXcg2mk?xX#fNO00031000^Q000000-yo_1ONa4 z0RR917@z|H1ONa40RR917ytkO0KxrNmjD0(`AI}UR7efgRn2MwK@6TgnAST zz4t+Ek9`k|k5KSY3at;~y(f-E~~_j|*&P@~b1DS4Mz z;4fUL100RQvqWI#mysu_QmG_G#$v?|G)36OdwxQURKN>`g5eMXkU8f7dc|@b$RiT_ zm@|4tPT)?b6Ay7xDwRBkj-g_?4jlc@lsQkMTCJ9*Qn}Uu519}$bpn^LV-IEmYJGBT|}QeitQ9cfLHd+hpe lKO7f?h5zp_)5W{Y`4>B;(`aTa<}UyM002ovPDHLkV1oXMx%L16 literal 0 HcmV?d00001 diff --git a/wallpaper_project/Assets.xcassets/Tab/Community_n.imageset/Community_off@2x.png b/wallpaper_project/Assets.xcassets/Tab/Community_n.imageset/Community_off@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..ad47390ad48a1e3779f00267912c3da3f32baac3 GIT binary patch literal 1615 zcmV-V2C(^wP)U>h*?d$b`aT5T$j!+ zmv){4Q-A$k)t||l8vWnYL5&#};E{=yZHo!sB_1(oDdMW&yvxUe(=MMoo|R;r_?B4G z3TlS9Ni3&3^n3@Gie;^}gV^4m)mN9r9O_ZbVG|}8icnF31O?%L{L_vm;#3HD6?Va!XbBie+=k*;rwF^@ErnnmGiG7&g~k7pMfj= z2Nx-7yi*22%K!iXIAvH#W=%~1DgXcg2mk?xX#fNO00031000^Q000000-yo_1ONa4 z0RR91FrWhf1ONa40RR91FaQ7m0Qmn-HUIzwQAtEWRA>e5Sv^l1K@hz&77(z61jq&p zDo`p?<%cAoL@CpwP$hMM)TE2jr;Lb#_#srGOe!QBn~%z1K!Ee!=?<3Nx!qf18zH>X z>GpPKXWq=t%zj)D^h@6YPul`vr_`_2YIC_6cBxeQ$Bz4! zdnvHLzh4{}82Hd?wHCuLT<`&dF}oPEb#-<1ZE9+&?lV@UZA*cAyRB-m#3#hRsB{x3~8UR3_GvyVvSMpme|QmCm{Grr4sqK-e>zB85zk0o;)OMh614De%`w< zqonz`joIkvsI6P?Gq6c9z{7}Fp`Yt+Lzkd+S=c8jN1EZ`VINrrwvH&k45JnTo1UHy zkjF?vykI?hvJYaBm}J7t*s`QjUFkjIb?ZF%*zoXeT4H zXuFV=HlbsN8Xq4|K7HQ?HbVheZaWKCT3GUb+gMt@TrLOLnAylu`y_0}UWlV{nE8YJ zypYNX9dwVQqazzh)W>YYfTho?snt19BS5_E;!yKKYYwCs;Nr3cLaPF{Eim1LplR_o zQl*YD`i?Ofec}vcInd}cz!jB%X=!c`_}#(ccc9_P2Nz5m0I-$@BFW>N3GU|!o|f-Y z*^o|Sl$C0xM}Mg2EdbnL8A=+a#IQOV+-F7EL45==Z z07UuZUsf=jiTJK^ z6=R$;mzA$ZN5FKOFD}a`8s<*2vQpuo7GE z8Bm#U#m4?-1)D5hgju&9>NwT`_~Cx?>0tQ%P`_CvEd92=1)h=x{sR{?+0QMKgrNWc N002ovPDHLkV1hlO<}UyM literal 0 HcmV?d00001 diff --git a/wallpaper_project/Assets.xcassets/Tab/Community_n.imageset/Community_off@3x.png b/wallpaper_project/Assets.xcassets/Tab/Community_n.imageset/Community_off@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..d42c20df59bae82d7789dd8b182dde0e4cbcd3b7 GIT binary patch literal 2207 zcmV;Q2w?Y#P)U>h*?d$b`aT5T$j!+ zmv){4Q-A$k)t||l8vWnYL5&#};E{=yZHo!sB_1(oDdMW&yvxUe(=MMoo|R;r_?B4G z3TlS9Ni3&3^n3@Gie;^}gV^4m)mN9r9O_ZbVG|}8icnF31O?%L{L_vm;#3HD6?Va!XbBie+=k*;rwF^@ErnnmGiG7&g~k7pMfj= z2Nx-7yi*22%K!iXIAvH#W=%~1DgXcg2mk?xX#fNO00031000^Q000000-yo_1ONa4 z0RR91NT34%1ONa40RR91NB{r;0JHgI)c^nnp-DtRRCodHT)R&kM;Kq=IG*N+5RW5G z8ic4_B$1qeyF{`SDIIB?E`IR@`DN^X-I7F5uyN(cbxDyCP$D8Ao z-|w_X_Kuxz9y@z1%6`&_-I@7bzy0Q$+1WXQAg3IG9Dy8x9Dy8x+loL}rw!lS+#Kxd z>$`V(d3pEZ;$jy1XS=(*r*M6ztE=k{?Lpff>h@4q#qBz-*U|RoFMc1_UROL z1fXiQI?>b9^97vx9OZqKqN9U#@V!QPetv%bY-(z1%TbOoTdDwUZEbywC;tts`2?k4 zY?WEZGjv-;v^|=bn0RT%V&5wjfVQ`{7huYFDEI75a^hG6*SF*2<1d`J1tzZm0hls$ zJwaI%bf(#~0^v&ls^UwDH-IplKE-gNfhAwYIm)SF*ezn%{p!fy!q(k#=Xit2Spqn} zfc>Vyp$8?}LYo}jX< zb^i=-K6F*y2|j@I3QK~|%H{I5i$13z#>lx1;1Cc#K-x;1I|fiVtTG)rQ7{M+ZI0HN zURy^{n2b0nvkCtVV^RSpWLa?V!Pz)Hq4D7>z!)H)Uxp)pp=4nyPl9O; z%yXuTNt;OE3i-B!LtyCxeK8`V2txEMK-zCc5s2o4Vq1MC%D*)u#m9E^>PUELdA(5H`deYFvU=$VI*7dk;{ zwb$$Q1|S6H?2J1c@r1o0>qtT*&g-^HOd{y(c$3nr#mcu4DFlT8nGmDPcBo&T|jhI}wQ8-Q7lsCRjrzQ!A!JRkvFF3*bWYrlarH;>E3~rEOjgw-cfxmQ7#nuX$H(*!C~b12B%Oc zBmsv26+>TneT|d=!I`_)dMB*lu;Sv*Ck+h^B^D?7sssqRVK%Ymh=69^iBx&HbeOrW z>6LtylC)QVI9o{xnUT<(i8#%34Wy%Du^6y;Af>NLfcQC>Pu&+u4r4WY1rGHQEEeV~ ziF^z%%BQa?J<bnQ`j(lzW;`lk1{4q%5wD z;HaXpIjrLNbZuDV#j#n}NxmupveqInsG>(;(Kh)=&RQktpacj{e9uIHt`A>4rFScr zHm;g|4KLa+`Kkm6iOUN>QgWtoY>xv;n#mHrT2O5ZNxmv)F(j@kp459Sk{oXK_xH72 zoUNkCS^|f{d`1uD(O3SBBPBrSypHlg9Fu7s_i{{E&Wt2ov{5gfcG6diIP>XiEJ;I5 z$rLLorZSD>JTfwpIMp5f@EZZ$Tz{)H!7J*fN)@P z4NPYHoiWn+Y9Z|*$FPW11cxhb&S0LY&cmT9nM#1d{Sh9RbRu8T!<;iZIvU_~M!>C& z6zH{TFNnHy8lR(&_R~na(Ofkr$v=z|PUW1f_}wdosEL|PAC)A=tLvsc!NKPurBYP` zUo8j>3nQlklx)+UyZvx<6^1^rG1hcyr%dJ+e)waw_XdCr1&@@CVS_ltn#_ozKX7ez=6PplCy1`1Ib@=Fr78Oc|E}R% znl`_h0<-`}tPd|>`fPmn;xJ-Y+G!O*P2oJ=4~4Iq_gVi-TWPb4olX%%Mfpz= zG;s5`4|po~8M>OTH`YwsXrt@zG-$YU1Vz2Z8i~{9_b5(7HY&^0HD}so%vMj5%JTvc zjX>hge^4hqjd1#$L!T9?U&?LNJ!dUfMewV#DU_G9Fl-`jQjx=$s7+KtQqu|PW_!hM2&P4SjrTBHqjL2cfYBakDI hBakDIBk(^&;9srfiazk|^b-I8002ovPDHLkV1fta{)_+s literal 0 HcmV?d00001 diff --git a/wallpaper_project/Assets.xcassets/Tab/Community_n.imageset/Contents.json b/wallpaper_project/Assets.xcassets/Tab/Community_n.imageset/Contents.json new file mode 100644 index 0000000..f43b61c --- /dev/null +++ b/wallpaper_project/Assets.xcassets/Tab/Community_n.imageset/Contents.json @@ -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 + } +} diff --git a/wallpaper_project/Assets.xcassets/Tab/Community_s.imageset/Community_on.png b/wallpaper_project/Assets.xcassets/Tab/Community_s.imageset/Community_on.png new file mode 100644 index 0000000000000000000000000000000000000000..2a5287aedde8ca7f2ce08aca3189a4afc8c1a051 GIT binary patch literal 1032 zcmV+j1o!)iP)U>h*?d$b`aT5T$j!+ zmv){4Q-A$k)t||l8vWnYL5&#};E{=yZHo!sB_1(oDdMW&yvxUe(=MMoo|R;r_?B4G z3TlS9Ni3&3^n3@Gie;^}gV^4m)mN9r9O_ZbVG|}8icnF31O?%L{L_vm;#3HD6?Va!XbBie+=k*;rwF^@ErnnmGiG7&g~k7pMfj= z2Nx-7yi*22%K!iXIAvH#W=%~1DgXcg2mk?xX#fNO00031000^Q000000-yo_1ONa4 z0RR917@z|H1ONa40RR917ytkO0KxrNmjD0)3Q0skR7efgRZB|)F%X{Y`s#w0DoX1E zMHKXEK@fWOsvi9x6@P-zpCYJN&w?P-vnNq}v?$tReX))6rJL*oyA_Ha9LVM|neUrS zCbLBUT~x0F)O2m|wHa@cZf|O(O1!t2?5``WYovnXTs}N5snTZ_PA0+W^ZAx0s*=(R zS;l5vt1AYnl*iYOy6yW$ptTN8o9Fwyxzf#`$6B?VU)xhkwdI}xIl;J3aF|xu7X2QL z@h(IrTY6k*Ol`VvHR!r^OZB%WYU?!A9sy$*ETRLjIs&93DR-dMBOX1xJ6@T`_ktDzI%anNkbNmHSGS`lCY7oKz0000U>h*?d$b`aT5T$j!+ zmv){4Q-A$k)t||l8vWnYL5&#};E{=yZHo!sB_1(oDdMW&yvxUe(=MMoo|R;r_?B4G z3TlS9Ni3&3^n3@Gie;^}gV^4m)mN9r9O_ZbVG|}8icnF31O?%L{L_vm;#3HD6?Va!XbBie+=k*;rwF^@ErnnmGiG7&g~k7pMfj= z2Nx-7yi*22%K!iXIAvH#W=%~1DgXcg2mk?xX#fNO00031000^Q000000-yo_1ONa4 z0RR91FrWhf1ONa40RR91FaQ7m0Qmn-HUIzx3Q0skRA>e5SxszHM-ZO%v!mE?)P$e} zLc>2?09A;p5u{NSsi(G5X+_i{_o^IFdoF=?rp0cD`pnvwpk#e&Qquk(H9&ot>TiW_NaW-k4~+Z12F!y#r#S)Sp_OI#hL2 z?~|lcG9~)C?q}KfLzyQ*^P(zI|C(~DH;1~0{;CbN_P-?srXEi9x*6vaLGlAh;&>7$ zJm(LdbHgdSSBG{DJxVfH5Q&%c}y{(JlxQUsT-Umm|F+g{1Qn zEAYePTOX!`xF(7Ek}ej;&p;NcQhxl_&ePY!_=01pAi>s`Qi{pN+n0n8-)uB^tO=Qr zjWw{A4M&h3i*b5xI$O!5zT(NFK>?f8A5Ryn=g$nBDMiVTJOS*+7J~=oQLGu~Bq9~~ zap|YeAuwtuHer0UzILeSP!qz1g4>aLlVqvgtfM!G`GBV^$|97yznK228q7~g$`sK+Tx?h@)Vr`5&!l83}-l2@J>}7+K$Z_1m!6;U{ z#9m0OOp4nC_-`M6p9nl;4`g@80uNpjHcbI`2&cfDv|#7gs^z59=wNPd{5b|}+PT#~ zM&b))PS||VY%-|~?a%G;vawP5Fc@SvmZpN7hJ zup@!_)Fx`1Yf`}eEUK&5+mG4L$8nXxsh#OO^|W;d$x(d`n@NEOQBu_L;O=7#HecX- z;TN<)Q_F#l0ks>qtzpye0A~;Q9vqD$5#hmXso8um4;L0T@0*S35+BH|Ljhn56ior7 zK4i>`h1kXx9zY2MYNoO`+fSYK3vL>>(Y&-wU{E(9&f5fdtlgmZu`((HZS0|5?|x08 zBxoA2X$m0e6h|aNVnmfm3U>azU2jv)X-_h(!E3^1bi$L1w|@Xbt%PWt#0?KOU48iUNJ3u_XQ_yklTNI}-Jc=Bvi?4-^^`?>ze q7X*X;^ZJ?9gk_tyy#p`P4*U;~HsY%~=?xM90000U>h*?d$b`aT5T$j!+ zmv){4Q-A$k)t||l8vWnYL5&#};E{=yZHo!sB_1(oDdMW&yvxUe(=MMoo|R;r_?B4G z3TlS9Ni3&3^n3@Gie;^}gV^4m)mN9r9O_ZbVG|}8icnF31O?%L{L_vm;#3HD6?Va!XbBie+=k*;rwF^@ErnnmGiG7&g~k7pMfj= z2Nx-7yi*22%K!iXIAvH#W=%~1DgXcg2mk?xX#fNO00031000^Q000000-yo_1ONa4 z0RR91NT34%1ONa40RR91NB{r;0JHgI)c^noqe(G+Wt2!Ow1tfiVq)U1ZgA%xfVy+#PBd}rPBwH$Vqy?i(4jcRRO3n^;Sr$F($ba! zea_?h{ci6JGt+y{J?GpzV;k>DCUfsO-}5)$Jc{2%a*y%PFtr}OieNdDDfiEMyoYHvEp7+xWHo{OI1k-t*Ode64OsYr1+6;NKg9Bij+}XYo$Vw69uC1;p zNvr@-hO#uV^n~V9FQ~1yh1zR(Xlv!Q+bNZ`o6-u~U3h965hjC8Hcc(h(A~v{^kC@` zrLw8K_=Ao6sHf%4{JqMB>r{x8TZ>z*Vf-=_U?&JCl24JCjn!u}#Wi zq%^t~71Gx7yD|}=@LV$$xAe=rhILGosn1%b38S! zuetl8Zy`X=xm6Kq@EbfzG;L2SIkC&ea`y52T0gi-@y0wvLf@$ya#L#c3Z>iZ%+pD()wh_LHga`rR zpv7@;Xa%!juL5ueoH@)Zb^9ASsjGeu4Re1b11Xf~VWVWeiXXAHvvMz=wCgYl#5~8V zAaXkEUxAaOK^@ve1;FlOAVVt13-Bxz0SGf>(IhbUSb13|Yuj1ZMh)>gFE*1pBY;d4 zdGd%JFHd5{N?CL%iclhxMG#U@0v9Yiv9=NwbjYG2YOAv1w3qv+5R1^)vIB%wxvZnb zXf?hxxz1PAq0OscQ3{YkEJA>UqZm)YIeCfp2Q>lS8eyhY5u;!I)XI!>5802uv>o7J*D&PH8ERIM99pU`cP|78*`yrEH*$o!-=Yyn zR}T7|H@3e{@9i9*#wy{qjjq@{J$#g9&I&teNZ{W6B7gPer72$E+zLlCrUg-gp&V12l5?n6cy3kN?sbo~)vmf74k%p>d#Kvd zQt2g9r4F0+7i5G|E3n(2c$&P-KjDWmA*F3N@l-9%HBE$h4HljuuC3J6a~iSiL<2&k z06ALX_P3PP0|>{#vVv{W?#51MFFB0;9GNaz8*;2=?Pyb)P$XtXuQ9Dw&hzN(pLBcS zeqKM0X0U$3jJdtGl@%+g&hwYyVx+&d$G3m=k07=TN!omteMQGeoRuGF+)Fs|Y^vVs zoLiY5&FJV=rG-x_w8}ptM-e)+K^38!fM$rJ2Zy4*MK}*y$H^J&T<5>ATF1EIDv&@0 zUzCb6K*-2K20Kg5DoNg$L`cCKRLw4f3(5e27`c5svHB9%o3X%lo%}@jsN4q?0+N_X z{>ZFn3hOrhwSB(7wf9q9JGCMxCmiYhe4WhQZ-VcnYqPegMgTeQK5%;fCIQKL6~Xj< z4I_Z?GvM8amo2lWcu9L+`)8>b172pCJ!Sfy2Fx_-gG&8F20IJ-hU<+1FO?baK8p@{ zptT1t_XR4U00ax77wUX|2WR-?40a|P@*yo}GhWF&qC1q!3<@oR3YA1J^%kNbxps1_ zoiyU|y%tWq9n;_Z&alLcKuu+dpi+yXKNcuOL~?KX*AzI0!byv4gI%IFYKjnu5Qq?n f5Qq@?A0qHCf~1WQ&pv(f00000NkvXXu0mjf)c=L_ literal 0 HcmV?d00001 diff --git a/wallpaper_project/Assets.xcassets/Tab/Community_s.imageset/Contents.json b/wallpaper_project/Assets.xcassets/Tab/Community_s.imageset/Contents.json new file mode 100644 index 0000000..02c1f8a --- /dev/null +++ b/wallpaper_project/Assets.xcassets/Tab/Community_s.imageset/Contents.json @@ -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 + } +} diff --git a/wallpaper_project/Ranking/C/WA_AddVC.swift b/wallpaper_project/Community/C/WA_AddVC.swift similarity index 97% rename from wallpaper_project/Ranking/C/WA_AddVC.swift rename to wallpaper_project/Community/C/WA_AddVC.swift index 6d9b350..5269181 100644 --- a/wallpaper_project/Ranking/C/WA_AddVC.swift +++ b/wallpaper_project/Community/C/WA_AddVC.swift @@ -1,9 +1,7 @@ // // WA_AddVC.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/27. -// + import UIKit import SVProgressHUD @@ -97,7 +95,7 @@ class WA_AddVC: WA_RootVC,UITextViewDelegate { self.fetchRemoteConfig() }else{ - WA_TabbarCommon.TabBarController() +// WA_TabbarCommon.TabBarController() } } } @@ -263,6 +261,10 @@ extension WA_AddVC:MTGNewInterstitialBidAdDelegate{ func newInterstitialBidAdShowFail(_ error: any Error, adManager: MTGNewInterstitialBidAdManager) { print("广告展示失败") + SVProgressHUD.showInfo(withStatus: "Successfully published, waiting for review") + DispatchQueue.global().asyncAfter(deadline: .now() + 2) { + SVProgressHUD.dismiss() + } } func newInterstitialBidAdPlayCompleted(_ adManager: MTGNewInterstitialBidAdManager) { diff --git a/wallpaper_project/Ranking/C/WA_AddVC.xib b/wallpaper_project/Community/C/WA_AddVC.xib similarity index 100% rename from wallpaper_project/Ranking/C/WA_AddVC.xib rename to wallpaper_project/Community/C/WA_AddVC.xib diff --git a/wallpaper_project/Ranking/C/WA_RKDetailsVC.swift b/wallpaper_project/Community/C/WA_RKDetailsVC.swift similarity index 97% rename from wallpaper_project/Ranking/C/WA_RKDetailsVC.swift rename to wallpaper_project/Community/C/WA_RKDetailsVC.swift index 5e306db..5bae64d 100644 --- a/wallpaper_project/Ranking/C/WA_RKDetailsVC.swift +++ b/wallpaper_project/Community/C/WA_RKDetailsVC.swift @@ -1,9 +1,7 @@ // // WA_RKDetailsVC.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/17. -// + import UIKit import SVProgressHUD @@ -77,11 +75,8 @@ class WA_RKDetailsVC: WA_RootVC,UITextFieldDelegate { override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) // 初始化 Remote Config - // 初始化 Remote Config remoteConfig = RemoteConfig.remoteConfig() - - - + // 设置最小获取间隔(开发期间可以设置较小的值) let settings = RemoteConfigSettings() settings.minimumFetchInterval = 0 @@ -90,19 +85,17 @@ class WA_RKDetailsVC: WA_RootVC,UITextFieldDelegate { remoteConfig.setDefaults(fromPlist: "isopen") // Fetch 配置值 - let param = MTGBiddingRequestParameter(placementId: "1636950", unitId: "3501963", basePrice: nil) + let param = MTGBiddingRequestParameter(placementId: "1650169", unitId: "3158993", 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) + self.newInterstitialAdManager = MTGNewInterstitialBidAdManager(placementId: "1650169", unitId: "3158993", delegate: self) self.newInterstitialAdManager?.loadAd(withBidToken:self.bidToken!) self.fetchRemoteConfig() - - }else{ - WA_TabbarCommon.TabBarController() +// WA_TabbarCommon.TabBarController() } } } @@ -428,6 +421,7 @@ extension WA_RKDetailsVC:MTGNewInterstitialBidAdDelegate{ func newInterstitialBidAdLoadSuccess(_ adManager: MTGNewInterstitialBidAdManager) { print("广告加载成功") + } @@ -445,6 +439,17 @@ extension WA_RKDetailsVC:MTGNewInterstitialBidAdDelegate{ func newInterstitialBidAdShowFail(_ error: any Error, adManager: MTGNewInterstitialBidAdManager) { 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) { diff --git a/wallpaper_project/Ranking/C/WA_RKDetailsVC.xib b/wallpaper_project/Community/C/WA_RKDetailsVC.xib similarity index 100% rename from wallpaper_project/Ranking/C/WA_RKDetailsVC.xib rename to wallpaper_project/Community/C/WA_RKDetailsVC.xib diff --git a/wallpaper_project/Ranking/C/WA_RankingVC.swift b/wallpaper_project/Community/C/WA_RankingVC.swift similarity index 94% rename from wallpaper_project/Ranking/C/WA_RankingVC.swift rename to wallpaper_project/Community/C/WA_RankingVC.swift index 186962f..d797055 100644 --- a/wallpaper_project/Ranking/C/WA_RankingVC.swift +++ b/wallpaper_project/Community/C/WA_RankingVC.swift @@ -1,9 +1,7 @@ // // WA_RankingVC.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/27. -// + import UIKit import FirebaseAnalytics @@ -123,11 +121,12 @@ class WA_RankingVC: WA_RootVC { 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() +// WA_TabbarCommon.TabBarController() } } } @@ -408,6 +407,7 @@ extension WA_RankingVC:UITableViewDelegate,UITableViewDataSource{ if self.isadshow == true{ if ((issureready) != nil) { newInterstitialAdManager?.show(from: self) + setPostSHOW() }else{ let vc = WA_RKDetailsVC() vc.model = MKArr[indexPath.row] @@ -434,6 +434,18 @@ extension WA_RankingVC:MTGNewInterstitialBidAdDelegate{ 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() } @@ -451,6 +463,22 @@ extension WA_RankingVC:MTGNewInterstitialBidAdDelegate{ func newInterstitialBidAdShowFail(_ error: any Error, adManager: MTGNewInterstitialBidAdManager) { 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) { diff --git a/wallpaper_project/Ranking/C/WA_RankingVC.xib b/wallpaper_project/Community/C/WA_RankingVC.xib similarity index 100% rename from wallpaper_project/Ranking/C/WA_RankingVC.xib rename to wallpaper_project/Community/C/WA_RankingVC.xib diff --git a/wallpaper_project/Ranking/M/WA_RakModel.swift b/wallpaper_project/Community/M/WA_RakModel.swift similarity index 92% rename from wallpaper_project/Ranking/M/WA_RakModel.swift rename to wallpaper_project/Community/M/WA_RakModel.swift index db88445..098323e 100644 --- a/wallpaper_project/Ranking/M/WA_RakModel.swift +++ b/wallpaper_project/Community/M/WA_RakModel.swift @@ -1,9 +1,7 @@ // // WA_RakModel.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/27. -// + import UIKit @objcMembers diff --git a/wallpaper_project/Ranking/V/WA_RKPLCell.swift b/wallpaper_project/Community/V/WA_RKPLCell.swift similarity index 97% rename from wallpaper_project/Ranking/V/WA_RKPLCell.swift rename to wallpaper_project/Community/V/WA_RKPLCell.swift index 051bddb..ac99d25 100644 --- a/wallpaper_project/Ranking/V/WA_RKPLCell.swift +++ b/wallpaper_project/Community/V/WA_RKPLCell.swift @@ -1,9 +1,7 @@ // // WA_RKPLCell.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/17. -// + import UIKit import SDWebImage diff --git a/wallpaper_project/Ranking/V/WA_RKPLCell.xib b/wallpaper_project/Community/V/WA_RKPLCell.xib similarity index 100% rename from wallpaper_project/Ranking/V/WA_RKPLCell.xib rename to wallpaper_project/Community/V/WA_RKPLCell.xib diff --git a/wallpaper_project/Ranking/V/WA_RKTopCell.swift b/wallpaper_project/Community/V/WA_RKTopCell.swift similarity index 92% rename from wallpaper_project/Ranking/V/WA_RKTopCell.swift rename to wallpaper_project/Community/V/WA_RKTopCell.swift index 45b7824..6801a00 100644 --- a/wallpaper_project/Ranking/V/WA_RKTopCell.swift +++ b/wallpaper_project/Community/V/WA_RKTopCell.swift @@ -1,9 +1,7 @@ // // WA_RKTopCell.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/17. -// + import UIKit diff --git a/wallpaper_project/Ranking/V/WA_RKTopCell.xib b/wallpaper_project/Community/V/WA_RKTopCell.xib similarity index 100% rename from wallpaper_project/Ranking/V/WA_RKTopCell.xib rename to wallpaper_project/Community/V/WA_RKTopCell.xib diff --git a/wallpaper_project/Ranking/V/WA_RakingCell.swift b/wallpaper_project/Community/V/WA_RakingCell.swift similarity index 98% rename from wallpaper_project/Ranking/V/WA_RakingCell.swift rename to wallpaper_project/Community/V/WA_RakingCell.swift index d4db7d2..389b43d 100644 --- a/wallpaper_project/Ranking/V/WA_RakingCell.swift +++ b/wallpaper_project/Community/V/WA_RakingCell.swift @@ -1,9 +1,8 @@ // // WA_RakingCell.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/27. -// + + import UIKit diff --git a/wallpaper_project/Ranking/V/WA_RakingCell.xib b/wallpaper_project/Community/V/WA_RakingCell.xib similarity index 100% rename from wallpaper_project/Ranking/V/WA_RakingCell.xib rename to wallpaper_project/Community/V/WA_RakingCell.xib diff --git a/wallpaper_project/Header/WallPaperPCH.pch b/wallpaper_project/Header/WallPaperPCH.pch index b834615..8242001 100644 --- a/wallpaper_project/Header/WallPaperPCH.pch +++ b/wallpaper_project/Header/WallPaperPCH.pch @@ -1,9 +1,7 @@ // // WallPaperPCH.pch // wallpaper_project -// -// Created by 忆海16 on 2024/3/11. -// + #import "wallpaper_project" #ifndef WallPaperPCH_pch #define WallPaperPCH_pch diff --git a/wallpaper_project/Header/Wallpaper_Header.h b/wallpaper_project/Header/Wallpaper_Header.h index 3758524..05b31d8 100644 --- a/wallpaper_project/Header/Wallpaper_Header.h +++ b/wallpaper_project/Header/Wallpaper_Header.h @@ -1,9 +1,7 @@ // // Wallpaper_Header.h // wallpaper_project -// -// Created by 忆海16 on 2024/3/11. -// + #ifndef Wallpaper_Header_h #define Wallpaper_Header_h diff --git a/wallpaper_project/Home/C/History/WA_HistoryVC.swift b/wallpaper_project/Home/C/History/WA_HistoryVC.swift index 52544d5..c574fdd 100644 --- a/wallpaper_project/Home/C/History/WA_HistoryVC.swift +++ b/wallpaper_project/Home/C/History/WA_HistoryVC.swift @@ -1,9 +1,7 @@ // // WA_HistoryVC.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/27. -// + import UIKit import JXSegmentedView diff --git a/wallpaper_project/Home/C/History/WA_histortRankig.swift b/wallpaper_project/Home/C/History/WA_histortRankig.swift index f82e323..67f6e8f 100644 --- a/wallpaper_project/Home/C/History/WA_histortRankig.swift +++ b/wallpaper_project/Home/C/History/WA_histortRankig.swift @@ -1,9 +1,7 @@ // // WA_histortRankig.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/27. -// + import UIKit import JXSegmentedView diff --git a/wallpaper_project/Home/C/History/WA_history4K.swift b/wallpaper_project/Home/C/History/WA_history4K.swift index 1ff0bbc..a49e47e 100644 --- a/wallpaper_project/Home/C/History/WA_history4K.swift +++ b/wallpaper_project/Home/C/History/WA_history4K.swift @@ -1,9 +1,7 @@ // // WA_history4K.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/27. -// + import UIKit import JXSegmentedView diff --git a/wallpaper_project/Home/C/History/WA_historyLive.swift b/wallpaper_project/Home/C/History/WA_historyLive.swift index 1d141f1..771eb9a 100644 --- a/wallpaper_project/Home/C/History/WA_historyLive.swift +++ b/wallpaper_project/Home/C/History/WA_historyLive.swift @@ -1,9 +1,7 @@ // // WA_historyLive.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/27. -// + import UIKit import JXSegmentedView diff --git a/wallpaper_project/Home/C/NewHome/C/WA_NewHomeVC.swift b/wallpaper_project/Home/C/NewHome/C/WA_NewHomeVC.swift index 31989c7..47f31c3 100644 --- a/wallpaper_project/Home/C/NewHome/C/WA_NewHomeVC.swift +++ b/wallpaper_project/Home/C/NewHome/C/WA_NewHomeVC.swift @@ -1,9 +1,7 @@ // // WA_NewHomeVC.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/28. -// + import UIKit import AppLovinSDK @@ -200,7 +198,6 @@ extension WA_NewHomeVC:UITableViewDelegate,UITableViewDataSource{ let vc = WA_4KVC() vc.type = type self.navigationController?.pushViewController(vc, animated: true) - } return cell }else if indexPath.section == 2{ diff --git a/wallpaper_project/Home/C/NewHome/V/WA_BannerPagerCell.swift b/wallpaper_project/Home/C/NewHome/V/WA_BannerPagerCell.swift index aa1600f..40129d1 100644 --- a/wallpaper_project/Home/C/NewHome/V/WA_BannerPagerCell.swift +++ b/wallpaper_project/Home/C/NewHome/V/WA_BannerPagerCell.swift @@ -1,9 +1,7 @@ // // WA_BannerPagerCell.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/28. -// + import UIKit import FSPagerView diff --git a/wallpaper_project/Home/C/NewHome/V/WA_MonRankngCell.swift b/wallpaper_project/Home/C/NewHome/V/WA_MonRankngCell.swift index 1b36a31..23bf814 100644 --- a/wallpaper_project/Home/C/NewHome/V/WA_MonRankngCell.swift +++ b/wallpaper_project/Home/C/NewHome/V/WA_MonRankngCell.swift @@ -1,9 +1,7 @@ // // WA_MonRankngCell.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/28. -// + import UIKit diff --git a/wallpaper_project/Home/C/NewHome/V/WA_NHTypeCollectCell.swift b/wallpaper_project/Home/C/NewHome/V/WA_NHTypeCollectCell.swift index 5315df9..c76dd17 100644 --- a/wallpaper_project/Home/C/NewHome/V/WA_NHTypeCollectCell.swift +++ b/wallpaper_project/Home/C/NewHome/V/WA_NHTypeCollectCell.swift @@ -1,9 +1,7 @@ // // WA_NHTypeCollectCell.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/28. -// + import UIKit diff --git a/wallpaper_project/Home/C/NewHome/V/WA_NewHomeBannerCell.swift b/wallpaper_project/Home/C/NewHome/V/WA_NewHomeBannerCell.swift index eec83aa..e84fa41 100644 --- a/wallpaper_project/Home/C/NewHome/V/WA_NewHomeBannerCell.swift +++ b/wallpaper_project/Home/C/NewHome/V/WA_NewHomeBannerCell.swift @@ -1,9 +1,7 @@ // // WA_NewHomeBannerCell.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/28. -// + import UIKit import FSPagerView diff --git a/wallpaper_project/Home/C/NewHome/V/WA_NewHometypeCell.swift b/wallpaper_project/Home/C/NewHome/V/WA_NewHometypeCell.swift index 61e92f9..e1d2769 100644 --- a/wallpaper_project/Home/C/NewHome/V/WA_NewHometypeCell.swift +++ b/wallpaper_project/Home/C/NewHome/V/WA_NewHometypeCell.swift @@ -1,9 +1,7 @@ // // WA_NewHometypeCell.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/28. -// + import UIKit diff --git a/wallpaper_project/Home/C/NewHome/V/WA_ToDayCollectCell.swift b/wallpaper_project/Home/C/NewHome/V/WA_ToDayCollectCell.swift index 08c7d0a..2ff5cf9 100644 --- a/wallpaper_project/Home/C/NewHome/V/WA_ToDayCollectCell.swift +++ b/wallpaper_project/Home/C/NewHome/V/WA_ToDayCollectCell.swift @@ -1,9 +1,7 @@ // // WA_ToDayCollectCell.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/28. -// + import UIKit import SDWebImage diff --git a/wallpaper_project/Home/C/NewHome/V/WA_TodayCell.swift b/wallpaper_project/Home/C/NewHome/V/WA_TodayCell.swift index 068ab7f..4c4a845 100644 --- a/wallpaper_project/Home/C/NewHome/V/WA_TodayCell.swift +++ b/wallpaper_project/Home/C/NewHome/V/WA_TodayCell.swift @@ -1,9 +1,7 @@ // // WA_TodayCell.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/28. -// + import UIKit diff --git a/wallpaper_project/Home/C/WA_4KVC.swift b/wallpaper_project/Home/C/WA_4KVC.swift index ad03c64..ffd172c 100644 --- a/wallpaper_project/Home/C/WA_4KVC.swift +++ b/wallpaper_project/Home/C/WA_4KVC.swift @@ -1,9 +1,7 @@ // // WA_4KVC.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/11. -// + import UIKit import JXSegmentedView @@ -141,6 +139,7 @@ class WA_4KVC: WA_RootVC { if self.isadshow == true{ if ((issureready) != nil) { newInterstitialAdManager?.show(from: self) + self.setPostSHOW() }else{ self.navigationController?.popViewController(animated: true) } @@ -204,18 +203,19 @@ class WA_4KVC: WA_RootVC { remoteConfig.configSettings = settings // Fetch 配置值 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 if bidResponse.success{ self.bidToken = bidResponse.bidToken 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.fetchRemoteConfig() }else{ - WA_TabbarCommon.TabBarController() +// WA_TabbarCommon.TabBarController() } } // fetchRemoteConfig() @@ -449,6 +449,18 @@ extension WA_4KVC:MTGNewInterstitialBidAdDelegate{ 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() } @@ -466,6 +478,7 @@ extension WA_4KVC:MTGNewInterstitialBidAdDelegate{ func newInterstitialBidAdShowFail(_ error: any Error, adManager: MTGNewInterstitialBidAdManager) { print("广告展示失败") + self.navigationController?.popViewController(animated: true) } func newInterstitialBidAdPlayCompleted(_ adManager: MTGNewInterstitialBidAdManager) { @@ -587,28 +600,49 @@ extension WA_4KVC:UICollectionViewDelegate,UICollectionViewDataSource,UICollecti func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { let vc = WA_DetailsVC() vc.type = self.type - 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) + 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{ - vc.modeltype = self.FlowersWallpapers[indexPath.row] - navigationController?.pushViewController(vc, animated: 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.ChristmasWallpapers[indexPath.row] + navigationController?.pushViewController(vc, animated: true) + }else{ + vc.modeltype = self.FlowersWallpapers[indexPath.row] + navigationController?.pushViewController(vc, animated: true) + } } + } } + //if self.type == 1{ // return self.wallpapers.count //}else if type == 2{ diff --git a/wallpaper_project/Home/C/WA_DetailsVC.swift b/wallpaper_project/Home/C/WA_DetailsVC.swift index 6d7a996..f9472c1 100644 --- a/wallpaper_project/Home/C/WA_DetailsVC.swift +++ b/wallpaper_project/Home/C/WA_DetailsVC.swift @@ -1,9 +1,7 @@ // // WA_DetailsVC.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/11. -// + import UIKit import SDWebImage @@ -109,95 +107,96 @@ class WA_DetailsVC: WA_RootVC { Analytics.logEvent("touch_savephoto", parameters: nil) self.activityView.startAnimating() saveImageToPhotoLibrary() -// -// if self.isadshow == true{ -// DispatchQueue.main.asyncAfter(wallDeadline: .now() + 0.5) { -// if self.interstitialAd.isReady { -// self.interstitialAd.show() -// Analytics.logEvent("details_load_success", parameters: nil) -// self.setPostSHOW() -// let logMessage = """ -// deviceId: \(StartManager.shared.devicID ?? "") -// localIp: \(StartManager.shared.localIP ?? "") -// "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": \(StartManager.shared.loadTime ?? 0), -// "adPlatform": \(StartManager.shared.adPlatform ?? ""), -// "countryCode": \(StartManager.shared.countryCode ?? ""), -// "adId": \(StartManager.shared.adId ?? ""), -// "platformResponseTime": \(StartManager.shared.platformResponseTime ?? 0.0), -// "getIpResponseTime": \(StartManager.shared.getIpResponseTime ?? 0.0), -// "ecpm": \(StartManager.shared.ecpm ?? 0.0), -// "dsp": \(StartManager.shared.dsp ?? ""), -// "network": \(StartManager.shared.network ?? "") -// """ -// AppDelegate.shared.addLogMessage(logMessage) -// }else{ -// print("-------广告没准备好") -// Analytics.logEvent("details_load_fail", parameters: nil) -// 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) -// -// } -// } -// } -// } -// -// }else{ -// Analytics.logEvent("details_load_fail", parameters: nil) -// 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) -// } -// } - -// } + // + // if self.isadshow == true{ + // DispatchQueue.main.asyncAfter(wallDeadline: .now() + 0.5) { + // if self.interstitialAd.isReady { + // self.interstitialAd.show() + // Analytics.logEvent("details_load_success", parameters: nil) + // self.setPostSHOW() + // let logMessage = """ + // deviceId: \(StartManager.shared.devicID ?? "") + // localIp: \(StartManager.shared.localIP ?? "") + // "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": \(StartManager.shared.loadTime ?? 0), + // "adPlatform": \(StartManager.shared.adPlatform ?? ""), + // "countryCode": \(StartManager.shared.countryCode ?? ""), + // "adId": \(StartManager.shared.adId ?? ""), + // "platformResponseTime": \(StartManager.shared.platformResponseTime ?? 0.0), + // "getIpResponseTime": \(StartManager.shared.getIpResponseTime ?? 0.0), + // "ecpm": \(StartManager.shared.ecpm ?? 0.0), + // "dsp": \(StartManager.shared.dsp ?? ""), + // "network": \(StartManager.shared.network ?? "") + // """ + // AppDelegate.shared.addLogMessage(logMessage) + // }else{ + // print("-------广告没准备好") + // Analytics.logEvent("details_load_fail", parameters: nil) + // 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) + // + // } + // } + // } + // } + // + // }else{ + // Analytics.logEvent("details_load_fail", parameters: nil) + // 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) + // } + // } + + // } let issureready = newInterstitialAdManager?.isAdReady() if self.isadshow == true{ if ((issureready) != nil) { newInterstitialAdManager?.show(from: self) + self.setPostSHOW() }else{ DispatchQueue.global().asyncAfter(deadline: .now() + 1.5) { DispatchQueue.main.asyncAfter(deadline: .now() + 0){ @@ -253,7 +252,7 @@ class WA_DetailsVC: WA_RootVC { override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) navigationController?.navigationBar.isHidden = true -// self.createInterstitialAd() + // self.createInterstitialAd() // 初始化 Remote Config remoteConfig = RemoteConfig.remoteConfig() @@ -278,10 +277,10 @@ class WA_DetailsVC: WA_RootVC { self.fetchRemoteConfig() }else{ - WA_TabbarCommon.TabBarController() +// WA_TabbarCommon.TabBarController() } } - + } ///是否有广告 @@ -521,42 +520,42 @@ class WA_DetailsVC: WA_RootVC { @IBAction func back(_ sender: Any) { isback = true -// if self.isadshow == true{ -// DispatchQueue.main.asyncAfter(wallDeadline: .now() + 0.5) { -// if self.interstitialAd.isReady { -// self.interstitialAd.show() -// Analytics.logEvent("details_load_success", parameters: nil) -// self.setPostSHOW() -// let logMessage = """ -// deviceId: \(StartManager.shared.devicID ?? "") -// localIp: \(StartManager.shared.localIP ?? "") -// "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": \(StartManager.shared.loadTime ?? 0), -// "adPlatform": \(StartManager.shared.adPlatform ?? ""), -// "countryCode": \(StartManager.shared.countryCode ?? ""), -// "adId": \(StartManager.shared.adId ?? ""), -// "platformResponseTime": \(StartManager.shared.platformResponseTime ?? 0.0), -// "getIpResponseTime": \(StartManager.shared.getIpResponseTime ?? 0.0), -// "ecpm": \(StartManager.shared.ecpm ?? 0.0), -// "dsp": \(StartManager.shared.dsp ?? ""), -// "network": \(StartManager.shared.network ?? "") -// """ -// AppDelegate.shared.addLogMessage(logMessage) -// }else{ -// self.navigationController?.popViewController(animated: true) -// } -// } -// }else{ -// self.navigationController?.popViewController(animated: true) -// } + // if self.isadshow == true{ + // DispatchQueue.main.asyncAfter(wallDeadline: .now() + 0.5) { + // if self.interstitialAd.isReady { + // self.interstitialAd.show() + // Analytics.logEvent("details_load_success", parameters: nil) + // self.setPostSHOW() + // let logMessage = """ + // deviceId: \(StartManager.shared.devicID ?? "") + // localIp: \(StartManager.shared.localIP ?? "") + // "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": \(StartManager.shared.loadTime ?? 0), + // "adPlatform": \(StartManager.shared.adPlatform ?? ""), + // "countryCode": \(StartManager.shared.countryCode ?? ""), + // "adId": \(StartManager.shared.adId ?? ""), + // "platformResponseTime": \(StartManager.shared.platformResponseTime ?? 0.0), + // "getIpResponseTime": \(StartManager.shared.getIpResponseTime ?? 0.0), + // "ecpm": \(StartManager.shared.ecpm ?? 0.0), + // "dsp": \(StartManager.shared.dsp ?? ""), + // "network": \(StartManager.shared.network ?? "") + // """ + // AppDelegate.shared.addLogMessage(logMessage) + // }else{ + // self.navigationController?.popViewController(animated: true) + // } + // } + // }else{ + // self.navigationController?.popViewController(animated: true) + // } let issureready = newInterstitialAdManager?.isAdReady() @@ -668,6 +667,18 @@ extension WA_DetailsVC:MTGNewInterstitialBidAdDelegate{ 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() } @@ -685,6 +696,35 @@ extension WA_DetailsVC:MTGNewInterstitialBidAdDelegate{ func newInterstitialBidAdShowFail(_ error: any Error, adManager: MTGNewInterstitialBidAdManager) { 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) { diff --git a/wallpaper_project/Home/C/WA_HomeVC.swift b/wallpaper_project/Home/C/WA_HomeVC.swift index 740cd36..c3489d9 100644 --- a/wallpaper_project/Home/C/WA_HomeVC.swift +++ b/wallpaper_project/Home/C/WA_HomeVC.swift @@ -1,9 +1,7 @@ //// //// WA_HomeVC.swift //// wallpaper_project -//// -//// Created by 忆海16 on 2024/3/11. -//// + // import UIKit //import JXSegmentedView diff --git a/wallpaper_project/Home/C/WA_LIVEVC.swift b/wallpaper_project/Home/C/WA_LIVEVC.swift index ef6ed1b..7d33901 100644 --- a/wallpaper_project/Home/C/WA_LIVEVC.swift +++ b/wallpaper_project/Home/C/WA_LIVEVC.swift @@ -1,9 +1,7 @@ // // WA_LIVEVC.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/11. -// + import UIKit import JXSegmentedView @@ -98,6 +96,7 @@ class WA_LIVEVC: WA_RootVC { if self.isadshow == true{ if ((issureready) != nil) { newInterstitialAdManager?.show(from: self) + self.setPostSHOW() }else{ self.navigationController?.popViewController(animated: true) } @@ -156,6 +155,7 @@ class WA_LIVEVC: WA_RootVC { currentPage += 1 setJsondata() } + func setJsondata(){ // 读取 JSON 文件并解析 if let path = Bundle.main.path(forResource: "live", ofType: "json") { @@ -216,18 +216,19 @@ class WA_LIVEVC: WA_RootVC { // Fetch 配置值 // fetchRemoteConfig() - let param = MTGBiddingRequestParameter(placementId: "1636952", unitId: "1636952", basePrice: nil) + 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: "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.fetchRemoteConfig() }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 { let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "WA_WallpaperCollectionCell", for: indexPath)as!WA_WallpaperCollectionCell cell.model = self.wallpapers[indexPath.row] - return cell } @@ -396,6 +396,18 @@ extension WA_LIVEVC:MTGNewInterstitialBidAdDelegate{ 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 = "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) { print("广告展示失败") + self.navigationController?.popViewController(animated: true) } func newInterstitialBidAdPlayCompleted(_ adManager: MTGNewInterstitialBidAdManager) { diff --git a/wallpaper_project/Home/C/WA_LiveVideoVC.swift b/wallpaper_project/Home/C/WA_LiveVideoVC.swift index 9c5bad1..0f97a8d 100644 --- a/wallpaper_project/Home/C/WA_LiveVideoVC.swift +++ b/wallpaper_project/Home/C/WA_LiveVideoVC.swift @@ -1,6 +1,6 @@ // WA_LiveVideoVC.swift // wallpaper_project -// Created by 忆海16 on 2024/3/12. + import UIKit @@ -13,6 +13,12 @@ import PhotosUI import SVProgressHUD import Lottie +import AppLovinSDK +import Alamofire +import FirebaseRemoteConfig +import MTGSDKNewInterstitial +import MTGSDKBidding +import MTGSDK struct FilePaths { // 创建目录搜索路径的列表。 @@ -47,6 +53,12 @@ class WA_LiveVideoVC: WA_RootVC { var animationDuration: TimeInterval = 1.0 var workProgress: Float = 0.0 + var remoteConfig: RemoteConfig! + + var isadshow:Bool = false + var bidToken:String? + var newInterstitialAdManager:MTGNewInterstitialBidAdManager? + override func viewDidLoad() { super.viewDidLoad() @@ -140,7 +152,19 @@ class WA_LiveVideoVC: WA_RootVC { @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 let size = self.view.bounds.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) + } +} diff --git a/wallpaper_project/Home/C/WA_TipVC.swift b/wallpaper_project/Home/C/WA_TipVC.swift index bfac103..070f1c6 100644 --- a/wallpaper_project/Home/C/WA_TipVC.swift +++ b/wallpaper_project/Home/C/WA_TipVC.swift @@ -1,9 +1,7 @@ // // WA_TipVC.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/15. -// + import UIKit diff --git a/wallpaper_project/Home/M/WA_3DModel.swift b/wallpaper_project/Home/M/WA_3DModel.swift index 112f3ca..94cf975 100644 --- a/wallpaper_project/Home/M/WA_3DModel.swift +++ b/wallpaper_project/Home/M/WA_3DModel.swift @@ -1,9 +1,7 @@ // // WA_3DModel.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/11. -// + import UIKit @objcMembers diff --git a/wallpaper_project/Home/M/WallpaperModel.swift b/wallpaper_project/Home/M/WallpaperModel.swift index c2e40df..09a24b2 100644 --- a/wallpaper_project/Home/M/WallpaperModel.swift +++ b/wallpaper_project/Home/M/WallpaperModel.swift @@ -1,9 +1,7 @@ // // WallpaperModel.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/28. -// + import UIKit @objcMembers diff --git a/wallpaper_project/Home/V/WA_HistoryCell.swift b/wallpaper_project/Home/V/WA_HistoryCell.swift index edb272c..ea0f167 100644 --- a/wallpaper_project/Home/V/WA_HistoryCell.swift +++ b/wallpaper_project/Home/V/WA_HistoryCell.swift @@ -1,9 +1,7 @@ // // WA_HistoryCell.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/27. -// + import UIKit diff --git a/wallpaper_project/Home/V/WA_PreView.swift b/wallpaper_project/Home/V/WA_PreView.swift index 50270c8..7d6b486 100644 --- a/wallpaper_project/Home/V/WA_PreView.swift +++ b/wallpaper_project/Home/V/WA_PreView.swift @@ -1,9 +1,7 @@ // // WA_PreView.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/12. -// + import UIKit diff --git a/wallpaper_project/Home/V/WA_WallpaperCollectionCell.swift b/wallpaper_project/Home/V/WA_WallpaperCollectionCell.swift index 033d3d1..a8c6493 100644 --- a/wallpaper_project/Home/V/WA_WallpaperCollectionCell.swift +++ b/wallpaper_project/Home/V/WA_WallpaperCollectionCell.swift @@ -1,9 +1,7 @@ // // WA_WallpaperCollectionCell.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/11. -// + import UIKit import SDWebImage diff --git a/wallpaper_project/Home/V/WA_tipCell.swift b/wallpaper_project/Home/V/WA_tipCell.swift index d80704b..e42b4b5 100644 --- a/wallpaper_project/Home/V/WA_tipCell.swift +++ b/wallpaper_project/Home/V/WA_tipCell.swift @@ -1,9 +1,7 @@ // // WA_tipCell.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/15. -// + import UIKit diff --git a/wallpaper_project/Home/test/testVideoVC.swift b/wallpaper_project/Home/test/testVideoVC.swift index fafa07b..8da8a37 100644 --- a/wallpaper_project/Home/test/testVideoVC.swift +++ b/wallpaper_project/Home/test/testVideoVC.swift @@ -1,9 +1,7 @@ // // testVideoVC.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/14. -// + import UIKit import AVFoundation diff --git a/wallpaper_project/Main/WA_RootNAV.swift b/wallpaper_project/Main/WA_RootNAV.swift index 212d0e1..5da5c3c 100644 --- a/wallpaper_project/Main/WA_RootNAV.swift +++ b/wallpaper_project/Main/WA_RootNAV.swift @@ -1,9 +1,7 @@ // // WA_RootNAV.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/11. -// + import UIKit diff --git a/wallpaper_project/Main/WA_RootTab.swift b/wallpaper_project/Main/WA_RootTab.swift index fe61d52..3bc9495 100644 --- a/wallpaper_project/Main/WA_RootTab.swift +++ b/wallpaper_project/Main/WA_RootTab.swift @@ -1,9 +1,7 @@ // // WA_RootTab.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/11. -// + import UIKit diff --git a/wallpaper_project/Main/WA_RootVC.swift b/wallpaper_project/Main/WA_RootVC.swift index 92d0c37..cba895f 100644 --- a/wallpaper_project/Main/WA_RootVC.swift +++ b/wallpaper_project/Main/WA_RootVC.swift @@ -1,9 +1,7 @@ // // WA_RootVC.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/11. -// + import UIKit import FirebaseAnalytics diff --git a/wallpaper_project/Main/WA_TabButton.swift b/wallpaper_project/Main/WA_TabButton.swift index a9a1818..3bba5da 100644 --- a/wallpaper_project/Main/WA_TabButton.swift +++ b/wallpaper_project/Main/WA_TabButton.swift @@ -1,9 +1,7 @@ // // WA_TabButton.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/11. -// + import UIKit import CYLTabBarController diff --git a/wallpaper_project/Main/WA_TabbarCommon.swift b/wallpaper_project/Main/WA_TabbarCommon.swift index 037ba4d..d21a201 100644 --- a/wallpaper_project/Main/WA_TabbarCommon.swift +++ b/wallpaper_project/Main/WA_TabbarCommon.swift @@ -1,9 +1,7 @@ // // WA_TabbarCommon.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/11. -// + import UIKit import CYLTabBarController @@ -50,11 +48,15 @@ class WA_TabbarCommon: NSObject { 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.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()) @@ -62,7 +64,7 @@ class WA_TabbarCommon: NSObject { 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", CYLTabBarItemSelectedImage:"home_s"] - let tabBarItemrank = [CYLTabBarItemTitle:"Community", + let tabBarItemrank = [CYLTabBarItemTitle:"Ranking", CYLTabBarItemImage:"ranking_n", CYLTabBarItemSelectedImage:"ranking_s"] + let tabBarItemcommunit = [CYLTabBarItemTitle:"Community", + CYLTabBarItemImage:"Community_n", + CYLTabBarItemSelectedImage:"Community_s"] + let tabBarItemtwo = [CYLTabBarItemTitle:"Setting", CYLTabBarItemImage:"mine_n", CYLTabBarItemSelectedImage:"mine_s"] - let tabBarItemsAttributes = [tabBarItemOne,tabBarItemrank,tabBarItemtwo] + let tabBarItemsAttributes = [tabBarItemOne,tabBarItemrank,tabBarItemcommunit,tabBarItemtwo] // return tabBarItemsAttributes diff --git a/wallpaper_project/Main/WA_limitsVCViewController.swift b/wallpaper_project/Main/WA_limitsVCViewController.swift index ec64c7e..5cd9abc 100644 --- a/wallpaper_project/Main/WA_limitsVCViewController.swift +++ b/wallpaper_project/Main/WA_limitsVCViewController.swift @@ -1,9 +1,7 @@ // // WA_limitsVCViewController.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/18. -// + import UIKit import SVProgressHUD @@ -42,6 +40,7 @@ class WA_limitsVCViewController: WA_RootVC { // var ivAadManager:MTGNewInterstitialAdManager! var bidToken:String? + var ecpmprice:Double? var newInterstitialAdManager:MTGNewInterstitialBidAdManager? override func viewDidLoad() { super.viewDidLoad() @@ -70,18 +69,29 @@ class WA_limitsVCViewController: WA_RootVC { self.view.addSubview(activityView) 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 if bidResponse.success{ self.bidToken = bidResponse.bidToken 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.fetchRemoteConfig() }else{ - WA_TabbarCommon.TabBarController() + + 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() + } + } } @@ -113,16 +123,7 @@ class WA_limitsVCViewController: WA_RootVC { override func viewDidAppear(_ animated: Bool) { 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) { // 请求跟踪授权 @@ -156,10 +157,20 @@ class WA_limitsVCViewController: WA_RootVC { let js = self.remoteConfig.configValue(forKey: "isopen").jsonValue as! [String: Any] let valueopen = js["isadopen"] as! Bool let valueversion = js["version"] as! String - + let tt = UserDefaults.standard + print("-------\(tt.bool(forKey: "iswindows"))") DispatchQueue.main.async { if valueversion == localVersion { - WA_TabbarCommon.TabBarController() + 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() + } StartManager.shared.superHero = false } else { if valueopen { @@ -167,7 +178,16 @@ class WA_limitsVCViewController: WA_RootVC { self.startAdCheck() StartManager.shared.superHero = true } else { - WA_TabbarCommon.TabBarController() + 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() + } StartManager.shared.superHero = false } } @@ -178,6 +198,7 @@ class WA_limitsVCViewController: WA_RootVC { } else { print("Config not fetched") + if let error = error { print("Error: \(error.localizedDescription)") } @@ -192,7 +213,15 @@ class WA_limitsVCViewController: WA_RootVC { } } else { print("Max retry attempts reached. Stopping retries.") - WA_TabbarCommon.TabBarController() + 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() + } } } } @@ -220,14 +249,22 @@ class WA_limitsVCViewController: WA_RootVC { adLoadTime = elapsedTimeInMilliseconds // 记录加载 adCheckTimer?.invalidate() self.activityView.stopAnimating() -// if StartManager.shared.idfaid == ""{ -// self.fetchIDFAUntilSuccess() -// }else{ -// self.setPostSHOW() -// } + if StartManager.shared.idfaid == ""{ + self.fetchIDFAUntilSuccess() + }else{ + self.setPostSHOW() + } } else if elapsedTimeInMilliseconds >= 10000 { // 10000 毫秒 = 10 秒 adCheckTimer?.invalidate() - WA_TabbarCommon.TabBarController() + 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() + } Analytics.logEvent("open_load_fail", parameters: nil) self.activityView.stopAnimating() @@ -282,114 +319,114 @@ class WA_limitsVCViewController: WA_RootVC { -// 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":StartManager.shared.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":StartManager.shared.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)") -// } -// } -// -// } -// -// -// func fetchIDFAUntilSuccess() { -// DispatchQueue.global(qos: .background).async { -// var idfaObtained = false -// -// while !idfaObtained { -// let semaphore = DispatchSemaphore(value: 0) -// -// requestIDFA { idfa in -// if let idfa = idfa { -// print("Got IDFA: \(idfa)") -// // 执行成功获取 IDFA 后的处理方法 -// // self.performActionWithIDFA(idfa) -// StartManager.shared.idfaid = idfa -//// self.setPostSHOW() -// idfaObtained = true -// } else { -// print("Failed to get IDFA, retrying...") -// DispatchQueue.global(qos: .background).asyncAfter(deadline: .now() + 1.0) { -// semaphore.signal() -// } -// } -// } -// -// semaphore.wait() -// } -// } -// } + 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":StartManager.shared.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":StartManager.shared.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)") + } + } + + } + + + func fetchIDFAUntilSuccess() { + DispatchQueue.global(qos: .background).async { + var idfaObtained = false + + while !idfaObtained { + let semaphore = DispatchSemaphore(value: 0) + + requestIDFA { idfa in + if let idfa = idfa { + print("Got IDFA: \(idfa)") + // 执行成功获取 IDFA 后的处理方法 + // self.performActionWithIDFA(idfa) + StartManager.shared.idfaid = idfa +// self.setPostSHOW() + idfaObtained = true + } else { + print("Failed to get IDFA, retrying...") + DispatchQueue.global(qos: .background).asyncAfter(deadline: .now() + 1.0) { + semaphore.signal() + } + } + } + + semaphore.wait() + } + } + } } @@ -400,11 +437,25 @@ extension WA_limitsVCViewController:MTGNewInterstitialBidAdDelegate{ // } func newInterstitialBidAdResourceLoadSuccess(_ adManager: MTGNewInterstitialBidAdManager) { + print("资源加载成功,表示可播放状态") + + } func newInterstitialBidAdLoadSuccess(_ adManager: MTGNewInterstitialBidAdManager) { 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) { 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) { @@ -442,7 +502,13 @@ extension WA_limitsVCViewController:MTGNewInterstitialBidAdDelegate{ // 广告被关闭 func newInterstitialBidAdDidClosed(_ adManager: MTGNewInterstitialBidAdManager) { // print("广告被关闭") - WA_TabbarCommon.TabBarController() + 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() + } } // diff --git a/wallpaper_project/Mine/C/WA_LoginVC.swift b/wallpaper_project/Mine/C/WA_LoginVC.swift index 8cdfee6..449df66 100644 --- a/wallpaper_project/Mine/C/WA_LoginVC.swift +++ b/wallpaper_project/Mine/C/WA_LoginVC.swift @@ -1,9 +1,7 @@ // // WA_LoginVC.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/16. -// + import UIKit import SVProgressHUD diff --git a/wallpaper_project/Mine/C/WA_MineVC.swift b/wallpaper_project/Mine/C/WA_MineVC.swift index cb47718..4d7c5aa 100644 --- a/wallpaper_project/Mine/C/WA_MineVC.swift +++ b/wallpaper_project/Mine/C/WA_MineVC.swift @@ -1,9 +1,7 @@ // // WA_MineVC.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/14. -// + import UIKit import SVProgressHUD diff --git a/wallpaper_project/Mine/C/WA_PrivacyVC.swift b/wallpaper_project/Mine/C/WA_PrivacyVC.swift index b6d295e..5e4a010 100644 --- a/wallpaper_project/Mine/C/WA_PrivacyVC.swift +++ b/wallpaper_project/Mine/C/WA_PrivacyVC.swift @@ -1,9 +1,7 @@ // // WA_PrivacyVC.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/13. -// + import UIKit import WebKit diff --git a/wallpaper_project/Mine/C/WA_SCVC.swift b/wallpaper_project/Mine/C/WA_SCVC.swift index 9e45d7f..4e5993a 100644 --- a/wallpaper_project/Mine/C/WA_SCVC.swift +++ b/wallpaper_project/Mine/C/WA_SCVC.swift @@ -1,9 +1,7 @@ // // WA_SCVC.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/29. -// + import UIKit diff --git a/wallpaper_project/Mine/C/WA_SettingSVC.swift b/wallpaper_project/Mine/C/WA_SettingSVC.swift index b9995a3..68d5422 100644 --- a/wallpaper_project/Mine/C/WA_SettingSVC.swift +++ b/wallpaper_project/Mine/C/WA_SettingSVC.swift @@ -1,9 +1,7 @@ // // WA_SettingSVC.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/11. -// + import UIKit import SVProgressHUD @@ -57,7 +55,7 @@ class WA_SettingSVC: WA_RootVC { } @IBAction func back(_ sender: Any) { - + self.navigationController?.popViewController(animated: true) } @@ -143,26 +141,12 @@ class WA_SettingSVC: WA_RootVC { if tapCount == 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 { - if UserDefaults.standard.bool(forKey: "iswindows") { - AppDelegate.shared.removeOverlayWindow() - UserDefaults.standard.set(false, forKey: "iswindows") - } else { - AppDelegate.shared.showOverlayWindow() - UserDefaults.standard.set(true, forKey: "iswindows") - } - } else { - AppDelegate.shared.showOverlayWindow() - UserDefaults.standard.set(true, forKey: "iswindows") - } + let appDelegate = UIApplication.shared.delegate + appDelegate?.window??.rootViewController = WA_RootNAV(rootViewController: WA_playerVC()) +// UserDefaults.standard.set(true, forKey: "iswindows") + UserDefaults.standard.set(true, forKey: "iswindows") + resetTapCount() } @@ -174,7 +158,4 @@ class WA_SettingSVC: WA_RootVC { timer?.invalidate() timer = nil } - - - } diff --git a/wallpaper_project/PlayerVC/C/WA_AddPlayerVC.swift b/wallpaper_project/PlayerVC/C/WA_AddPlayerVC.swift new file mode 100644 index 0000000..fea2947 --- /dev/null +++ b/wallpaper_project/PlayerVC/C/WA_AddPlayerVC.swift @@ -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) + } +} diff --git a/wallpaper_project/PlayerVC/C/WA_AddPlayerVC.xib b/wallpaper_project/PlayerVC/C/WA_AddPlayerVC.xib new file mode 100644 index 0000000..c888306 --- /dev/null +++ b/wallpaper_project/PlayerVC/C/WA_AddPlayerVC.xib @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wallpaper_project/PlayerVC/C/WA_CommunityPlayerVC.swift b/wallpaper_project/PlayerVC/C/WA_CommunityPlayerVC.swift new file mode 100644 index 0000000..18f504e --- /dev/null +++ b/wallpaper_project/PlayerVC/C/WA_CommunityPlayerVC.swift @@ -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) + } +} diff --git a/wallpaper_project/PlayerVC/C/WA_CommunityPlayerVC.xib b/wallpaper_project/PlayerVC/C/WA_CommunityPlayerVC.xib new file mode 100644 index 0000000..96db3ae --- /dev/null +++ b/wallpaper_project/PlayerVC/C/WA_CommunityPlayerVC.xib @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wallpaper_project/PlayerVC/C/WA_player4kVC.swift b/wallpaper_project/PlayerVC/C/WA_player4kVC.swift new file mode 100644 index 0000000..bb18e88 --- /dev/null +++ b/wallpaper_project/PlayerVC/C/WA_player4kVC.swift @@ -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) + } + } + + + } +} diff --git a/wallpaper_project/PlayerVC/C/WA_player4kVC.xib b/wallpaper_project/PlayerVC/C/WA_player4kVC.xib new file mode 100644 index 0000000..c176cd4 --- /dev/null +++ b/wallpaper_project/PlayerVC/C/WA_player4kVC.xib @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wallpaper_project/PlayerVC/C/WA_playerRankVC.swift b/wallpaper_project/PlayerVC/C/WA_playerRankVC.swift new file mode 100644 index 0000000..9d3c279 --- /dev/null +++ b/wallpaper_project/PlayerVC/C/WA_playerRankVC.swift @@ -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) { + 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 + + } + +} + + + diff --git a/wallpaper_project/PlayerVC/C/WA_playerRankVC.xib b/wallpaper_project/PlayerVC/C/WA_playerRankVC.xib new file mode 100644 index 0000000..7a8cc0d --- /dev/null +++ b/wallpaper_project/PlayerVC/C/WA_playerRankVC.xib @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wallpaper_project/PlayerVC/C/WA_playerVC.swift b/wallpaper_project/PlayerVC/C/WA_playerVC.swift new file mode 100644 index 0000000..bc32c64 --- /dev/null +++ b/wallpaper_project/PlayerVC/C/WA_playerVC.swift @@ -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() + } + + +} diff --git a/wallpaper_project/PlayerVC/C/WA_playerVC.xib b/wallpaper_project/PlayerVC/C/WA_playerVC.xib new file mode 100644 index 0000000..d50ab30 --- /dev/null +++ b/wallpaper_project/PlayerVC/C/WA_playerVC.xib @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wallpaper_project/Rank/C/WA_RankVC.swift b/wallpaper_project/Rank/C/WA_RankVC.swift new file mode 100644 index 0000000..c9309d5 --- /dev/null +++ b/wallpaper_project/Rank/C/WA_RankVC.swift @@ -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) { + 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 + + } + +} diff --git a/wallpaper_project/Rank/C/WA_RankVC.xib b/wallpaper_project/Rank/C/WA_RankVC.xib new file mode 100644 index 0000000..9dd4db0 --- /dev/null +++ b/wallpaper_project/Rank/C/WA_RankVC.xib @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wallpaper_project/Rank/C/custlayout.swift b/wallpaper_project/Rank/C/custlayout.swift new file mode 100644 index 0000000..ce7c4d4 --- /dev/null +++ b/wallpaper_project/Rank/C/custlayout.swift @@ -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.. [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.. [UICollectionViewLayoutAttributes]? { + return cache.filter { $0.frame.intersects(rect) } + } + + override func layoutAttributesForItem(at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? { + return cache[indexPath.item] + } +} diff --git a/wallpaper_project/Rank/V/WA_RankCollectionViewCell.swift b/wallpaper_project/Rank/V/WA_RankCollectionViewCell.swift new file mode 100644 index 0000000..7042461 --- /dev/null +++ b/wallpaper_project/Rank/V/WA_RankCollectionViewCell.swift @@ -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")) + } + + } + } +} diff --git a/wallpaper_project/Rank/V/WA_RankCollectionViewCell.xib b/wallpaper_project/Rank/V/WA_RankCollectionViewCell.xib new file mode 100644 index 0000000..e4c240a --- /dev/null +++ b/wallpaper_project/Rank/V/WA_RankCollectionViewCell.xib @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wallpaper_project/Tool/AccountManager.swift b/wallpaper_project/Tool/AccountManager.swift index 14aad86..ee7ed68 100644 --- a/wallpaper_project/Tool/AccountManager.swift +++ b/wallpaper_project/Tool/AccountManager.swift @@ -1,9 +1,7 @@ // // AccountManager.swift // wallpaper_project -// -// Created by 忆海16 on 2024/4/16. -// + import Foundation import UIKit diff --git a/wallpaper_project/Tool/CustomCollectionViewFlowLayout.swift b/wallpaper_project/Tool/CustomCollectionViewFlowLayout.swift index 96504f0..4008c71 100644 --- a/wallpaper_project/Tool/CustomCollectionViewFlowLayout.swift +++ b/wallpaper_project/Tool/CustomCollectionViewFlowLayout.swift @@ -1,9 +1,7 @@ // // CustomCollectionViewFlowLayout.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/11. -// + import UIKit diff --git a/wallpaper_project/Tool/IDFA/idfaManager.swift b/wallpaper_project/Tool/IDFA/idfaManager.swift index 638bafd..d30641c 100644 --- a/wallpaper_project/Tool/IDFA/idfaManager.swift +++ b/wallpaper_project/Tool/IDFA/idfaManager.swift @@ -1,9 +1,7 @@ // // idfaManager.swift // wallpaper_project -// -// Created by 忆海16 on 2024/6/4. -// + import Foundation import UIKit diff --git a/wallpaper_project/Tool/Network/NetworkManager.swift b/wallpaper_project/Tool/Network/NetworkManager.swift index 43b0bf9..18f11ec 100644 --- a/wallpaper_project/Tool/Network/NetworkManager.swift +++ b/wallpaper_project/Tool/Network/NetworkManager.swift @@ -1,9 +1,7 @@ // // NetworkManager.swift // wallpaper_project -// -// Created by 忆海16 on 2024/6/4. -// + import Foundation import Alamofire diff --git a/wallpaper_project/Tool/PrefixHeader.swift b/wallpaper_project/Tool/PrefixHeader.swift index 61b9de9..7e608d4 100644 --- a/wallpaper_project/Tool/PrefixHeader.swift +++ b/wallpaper_project/Tool/PrefixHeader.swift @@ -1,9 +1,7 @@ // // PrefixHeader.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/15. -// + import Foundation import UIKit diff --git a/wallpaper_project/Tool/colorManager.swift b/wallpaper_project/Tool/colorManager.swift index 0261477..036b5ab 100644 --- a/wallpaper_project/Tool/colorManager.swift +++ b/wallpaper_project/Tool/colorManager.swift @@ -1,9 +1,7 @@ // // colorManager.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/11. -// + import UIKit import Foundation diff --git a/wallpaper_project/Tool/historyManager.swift b/wallpaper_project/Tool/historyManager.swift index 29753b1..3f15087 100644 --- a/wallpaper_project/Tool/historyManager.swift +++ b/wallpaper_project/Tool/historyManager.swift @@ -1,9 +1,7 @@ // // historyManager.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/27. -// + import Foundation diff --git a/wallpaper_project/Tool/ip/ipManager.swift b/wallpaper_project/Tool/ip/ipManager.swift index 4aa88f2..ca7cb60 100644 --- a/wallpaper_project/Tool/ip/ipManager.swift +++ b/wallpaper_project/Tool/ip/ipManager.swift @@ -1,9 +1,7 @@ // // ipManager.swift // wallpaper_project -// -// Created by 忆海16 on 2024/6/4. -// + import Foundation import UIKit diff --git a/wallpaper_project/Tool/stringADID.swift b/wallpaper_project/Tool/stringADID.swift index a4d7ff6..aef2522 100644 --- a/wallpaper_project/Tool/stringADID.swift +++ b/wallpaper_project/Tool/stringADID.swift @@ -1,9 +1,7 @@ // // stringADID.swift // wallpaper_project -// -// Created by 忆海16 on 2024/6/14. -// + import Foundation let strings = ["789b377f3ac4010e", "880a042774979c3c", "83802ca889ba09e6","8e1bc1f22c8d6c9d"] diff --git a/wallpaper_project/Tool/videoURL.swift b/wallpaper_project/Tool/videoURL.swift index c56e8c2..48d5eb2 100644 --- a/wallpaper_project/Tool/videoURL.swift +++ b/wallpaper_project/Tool/videoURL.swift @@ -1,9 +1,7 @@ // // videoURL.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/12. -// + //import Foundation //import EZPlayer diff --git a/wallpaper_project/ViewController.swift b/wallpaper_project/ViewController.swift index 9df70df..a2f0021 100644 --- a/wallpaper_project/ViewController.swift +++ b/wallpaper_project/ViewController.swift @@ -1,9 +1,7 @@ // // ViewController.swift // wallpaper_project -// -// Created by 忆海16 on 2024/3/11. -// + import UIKit @@ -14,7 +12,6 @@ class ViewController: UIViewController { // Do any additional setup after loading the view. print("----test") } - - + } diff --git a/wallpaper_project/json/GoogleService-Info.plist b/wallpaper_project/json/GoogleService-Info.plist index 1c7b55d..08a26f7 100644 --- a/wallpaper_project/json/GoogleService-Info.plist +++ b/wallpaper_project/json/GoogleService-Info.plist @@ -3,17 +3,17 @@ API_KEY - AIzaSyCSllhrjLODy6W-0IE9JEu50nFP4eUgwNA + AIzaSyCq2p7AsEC-eBHe69m8ojAP_jbGLlyWuao GCM_SENDER_ID - 157500622168 + 77595458034 PLIST_VERSION 1 BUNDLE_ID com.wallpapaer.hd.live.app PROJECT_ID - wallpaper-home-546b3 + wallpaperhome-1bfa3 STORAGE_BUCKET - wallpaper-home-546b3.appspot.com + wallpaperhome-1bfa3.appspot.com IS_ADS_ENABLED IS_ANALYTICS_ENABLED @@ -25,6 +25,6 @@ IS_SIGNIN_ENABLED GOOGLE_APP_ID - 1:157500622168:ios:84591532a0a06f1f40912d + 1:77595458034:ios:f05d4f84f221414b3fd36b \ No newline at end of file diff --git a/wallpaper_project/json/rank.json b/wallpaper_project/json/rank.json new file mode 100644 index 0000000..87a19e3 --- /dev/null +++ b/wallpaper_project/json/rank.json @@ -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 +}]