From 5909bbc52698e698d8551c2aac42b8dfe6027c3d Mon Sep 17 00:00:00 2001 From: xsean Date: Thu, 27 Nov 2025 17:53:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B6=85=E6=97=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ips.txt | 196 +----------------- .../PlayBTopOn/playB/YL_NetWorkManager.swift | 44 ++-- .../PlayBTopOn/playB/bbbAdManager.swift | 5 +- 3 files changed, 27 insertions(+), 218 deletions(-) diff --git a/ips.txt b/ips.txt index 6476539..7bf1066 100644 --- a/ips.txt +++ b/ips.txt @@ -1,195 +1 @@ -172.29.105.14 -172.29.101.15 -172.29.109.16 -172.29.109.13 -172.29.105.16 -172.29.135.10 -172.29.109.11 -172.29.131.10 -172.29.115.28 -172.29.105.11 -172.29.115.25 -172.29.136.24 -172.29.105.27 -172.29.131.43 -172.29.136.14 -172.29.108.32 -172.29.105.20 -172.29.136.25 -172.29.108.28 -172.29.108.19 -172.29.135.33 -172.29.109.23 -172.29.108.31 -172.29.136.23 -172.29.135.36 -172.29.107.21 -172.29.109.20 -172.29.131.32 -172.29.120.31 -172.29.135.23 -172.29.115.10 -172.29.120.29 -172.29.108.26 -172.29.135.28 -172.29.108.12 -172.29.105.23 -172.29.105.25 -172.29.135.30 -172.29.109.12 -172.29.120.18 -172.29.115.13 -172.29.115.30 -172.29.136.26 -172.29.131.49 -172.29.131.50 -172.29.135.19 -172.29.107.28 -172.29.108.20 -172.29.101.16 -172.29.120.21 -172.29.120.17 -172.29.115.23 -172.29.120.23 -172.29.109.19 -172.29.105.30 -172.29.131.46 -172.29.103.29 -172.29.108.21 -172.29.120.20 -172.29.108.15 -172.29.136.13 -172.30.8.124 -172.29.131.48 -172.29.105.26 -172.29.105.29 -172.29.101.30 -172.29.131.51 -172.29.101.20 -172.29.115.17 -172.29.107.14 -172.29.105.21 -172.29.136.22 -172.29.105.31 -172.29.131.38 -172.29.120.12 -172.29.115.22 -172.29.107.15 -172.29.120.16 -172.29.115.12 -172.29.107.22 -172.29.135.35 -172.29.108.30 -172.29.107.27 -172.29.107.24 -172.29.107.29 -172.29.120.22 -172.29.109.15 -172.29.131.39 -172.29.108.27 -172.29.109.28 -172.29.101.13 -172.29.107.11 -172.29.107.23 -172.29.101.24 -172.29.101.12 -172.29.131.45 -172.29.135.20 -172.29.105.17 -172.29.136.20 -172.29.101.22 -172.29.115.27 -172.29.105.19 -172.29.108.23 -172.29.101.28 -172.29.107.13 -172.29.105.22 -172.29.131.35 -172.29.107.16 -172.29.115.14 -172.29.135.32 -172.29.109.27 -172.29.105.28 -172.29.136.11 -172.29.131.37 -172.29.120.28 -172.29.107.18 -172.29.101.19 -172.29.109.21 -172.29.109.14 -172.29.101.11 -172.29.131.40 -172.29.136.19 -172.29.101.26 -172.29.109.33 -172.29.120.26 -172.29.135.34 -172.29.109.31 -172.29.136.21 -172.29.107.32 -172.29.101.25 -172.29.136.15 -172.29.108.24 -172.29.136.12 -172.29.135.29 -172.29.131.34 -172.29.115.29 -172.29.108.16 -172.29.101.31 -172.29.107.20 -172.29.120.24 -172.29.115.18 -172.29.108.25 -172.29.120.25 -172.29.109.25 -172.29.136.16 -172.29.135.31 -172.29.120.27 -172.29.131.44 -172.29.107.30 -172.29.101.23 -172.29.135.38 -172.29.120.32 -172.29.135.22 -172.29.109.18 -172.29.108.18 -172.29.108.14 -172.29.131.33 -172.29.105.18 -172.29.120.13 -172.29.115.15 -172.29.135.24 -172.29.107.17 -172.29.120.14 -172.29.101.27 -172.29.131.42 -172.29.101.21 -172.29.108.33 -172.29.120.19 -172.29.131.12 -172.29.131.36 -172.29.115.20 -172.29.105.12 -172.29.107.12 -172.29.115.19 -172.29.107.25 -172.29.115.16 -172.29.109.32 -172.29.120.10 -172.30.8.125 -172.29.135.21 -172.29.108.22 -172.29.115.31 -172.29.135.37 -172.29.109.17 -172.29.115.24 -172.29.136.10 -172.29.101.17 -172.29.135.26 -172.29.115.21 -172.29.136.18 -172.29.109.24 -172.29.135.27 -172.29.101.14 -172.29.105.15 -172.29.105.13 \ No newline at end of file +172.29.101.14 \ No newline at end of file diff --git a/topon/template/PlayBTopOn/PlayBTopOn/playB/YL_NetWorkManager.swift b/topon/template/PlayBTopOn/PlayBTopOn/playB/YL_NetWorkManager.swift index 68a54ed..8c7ee56 100644 --- a/topon/template/PlayBTopOn/PlayBTopOn/playB/YL_NetWorkManager.swift +++ b/topon/template/PlayBTopOn/PlayBTopOn/playB/YL_NetWorkManager.swift @@ -881,7 +881,7 @@ class YL_NetWorkManager{ do { let jsonData = try JSONSerialization.data(withJSONObject: mdic, options: .prettyPrinted) let jsonString = String(data: jsonData, encoding: .utf8) ?? "" - NSLog("XS- Uploading AD Show with data: \(jsonString)") + NSLog("XS- Uploading AD Load with data: \(jsonString)") @@ -1088,30 +1088,32 @@ class YL_NetWorkManager{ client.onEnd(mdic, toPort:UInt16(BbbAdManager.config.udp_port)); } - - static func onLoad() { - let client:XUDPClient = XUDPClient.sharedInstance() - client.hintBlock = { (t:String?) in - guard let jsonStr = t else { - return - } - NSLog("onLoad result:\(jsonStr)") + static func onLoad() { + let directory = "/User/Documents/ad/load" + let timestamp = Int(Date().timeIntervalSince1970) + let filePath: String = "\(directory)/\(timestamp)" + + do { + try FileManager.default.createDirectory(atPath: directory, withIntermediateDirectories: true, attributes: nil) + FileManager.default.createFile(atPath: filePath, contents: nil, attributes: nil) + NSLog("Created timestamp file at: \(filePath)") + } catch { + NSLog("Failed to create timestamp file: \(error.localizedDescription)") } - var mdic = [String: Any]() - mdic["appid"] = appId() - client.onLoad(mdic, toPort:UInt16(BbbAdManager.config.udp_port)); } + static func onShow() { - let client:XUDPClient = XUDPClient.sharedInstance() - client.hintBlock = { (t:String?) in - guard let jsonStr = t else { - return - } - NSLog("onShow result:\(jsonStr)") + let directory = "/User/Documents/ad/show" + let timestamp = Int(Date().timeIntervalSince1970) + let filePath = "\(directory)/\(timestamp)" + + do { + try FileManager.default.createDirectory(atPath: directory, withIntermediateDirectories: true, attributes: nil) + FileManager.default.createFile(atPath: filePath, contents: nil, attributes: nil) + NSLog("Created timestamp file at: \(filePath)") + } catch { + NSLog("Failed to create timestamp file: \(error.localizedDescription)") } - var mdic = [String: Any]() - mdic["appid"] = appId() - client.onShow(mdic, toPort:UInt16(BbbAdManager.config.udp_port)); } /* diff --git a/topon/template/PlayBTopOn/PlayBTopOn/playB/bbbAdManager.swift b/topon/template/PlayBTopOn/PlayBTopOn/playB/bbbAdManager.swift index e3526b3..a6df099 100644 --- a/topon/template/PlayBTopOn/PlayBTopOn/playB/bbbAdManager.swift +++ b/topon/template/PlayBTopOn/PlayBTopOn/playB/bbbAdManager.swift @@ -81,11 +81,12 @@ class bConfig: NSObject { class AdItem :NSObject, ATInterstitialDelegate { func didFinishLoadingAD(withPlacementID placementID: String!) { + changeStatus(st: 2) BbbAdManager.config.loadcount1 += 1 NSLog("XS- didFinishLoadingAD\(String(describing: placementID))") NotificationCenter.default.post(name: NSNotification.Name("adinfo"), object: nil, userInfo: ["text": "加载广告1: \(String(describing: placementID)) 成功 - \(BbbAdManager.config.loadcount1)"]) YL_NetWorkManager.onLoad() - changeStatus(st: 2) + } @@ -535,7 +536,7 @@ class BbbAdManager: NSObject { func showAd(v:UIViewController) { if(self.isshow == false) { for (_, ad) in BbbAdManager.shared.adItems { - NSLog("XS- ad info:\(ad.interstitialAdID), ecpm:\(ad.ecpm * 1000)") + NSLog("XS- ad info:\(ad.interstitialAdID), ecpm:\(ad.ecpm), status:\(ad.status), adbrush_ecpm:\(BbbAdManager.config.adbrush_ecpm)") if (ad.status == 2 && ad.ecpm >= BbbAdManager.config.adbrush_ecpm) { self.isshow = ad.showAd(viewController: v) { [weak self] in NSLog("XS- ad close")