This commit is contained in:
edy
2026-07-10 10:25:14 +08:00
5 changed files with 242 additions and 282 deletions
+2 -2
View File
@@ -286,7 +286,7 @@ namespace DontConfuse
{ {
H5sendClass info = new H5sendClass() { link = temp_array[0], type = "h5" }; H5sendClass info = new H5sendClass() { link = temp_array[0], type = "h5" };
NetworkKit.PostWithHeader<H5refreshTimes>("event/h5Impressions", info, (isSuccess, obj) => NetworkKit_sdk.PostWithHeader<H5refreshTimes>("event/h5Impressions", info, (isSuccess, obj) =>
{ {
if (isSuccess) if (isSuccess)
{ {
@@ -309,7 +309,7 @@ namespace DontConfuse
else else
{ {
H5sendClass info = new H5sendClass() { link = temp_array[0], type = "h6" }; H5sendClass info = new H5sendClass() { link = temp_array[0], type = "h6" };
NetworkKit.PostWithHeader<H5refreshTimes>("event/h5Impressions", info, (isSuccess, obj) => NetworkKit_sdk.PostWithHeader<H5refreshTimes>("event/h5Impressions", info, (isSuccess, obj) =>
{ {
if (isSuccess) if (isSuccess)
{ {
+35 -2
View File
@@ -10,6 +10,9 @@ using BingoBrain;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using DontConfuse; using DontConfuse;
using UnityEngine.Networking;
using UnityEngine.Events;
using System.Collections;
namespace BingoBrain namespace BingoBrain
{ {
public class ConfigSystem_sdk public class ConfigSystem_sdk
@@ -65,7 +68,7 @@ namespace BingoBrain
if (needDownloadConfigFile || !File.Exists(assetHotFixFilePath)) if (needDownloadConfigFile || !File.Exists(assetHotFixFilePath))
{ {
IsfvKit.StartCoroutine(CachKit.GetTextFromUrl($"{loginData.cdn_url}/config/{CDNConfigFileName}", SdkManager.Instance.StartCoroutine(GetTextFromUrl($"{loginData.cdn_url}/config/{CDNConfigFileName}",
configFileName, (content) => configFileName, (content) =>
{ {
PlayerPrefs.SetString(configFileNameKey, CDNConfigFileName); PlayerPrefs.SetString(configFileNameKey, CDNConfigFileName);
@@ -73,7 +76,6 @@ namespace BingoBrain
//CtrlDispatcher.Instance.Dispatch(CtrlMsg.NewConfigRead); //CtrlDispatcher.Instance.Dispatch(CtrlMsg.NewConfigRead);
}, configFileSavePath)); }, configFileSavePath));
} }
//检查设备本地是否有配置文件 //检查设备本地是否有配置文件
if (File.Exists(assetHotFixFilePath)) if (File.Exists(assetHotFixFilePath))
{ {
@@ -84,6 +86,35 @@ namespace BingoBrain
GameHelper.PostFunnelLogin("loadFinish"); GameHelper.PostFunnelLogin("loadFinish");
} }
} }
public static IEnumerator GetTextFromUrl(string url, string fileName, UnityAction<string> action = null,
string savePath = null)
{
var unityWebRequest = UnityWebRequest.Get(url);
yield return unityWebRequest.SendWebRequest();
if (unityWebRequest.result is UnityWebRequest.Result.ConnectionError
or UnityWebRequest.Result.ProtocolError)
{
Debug.LogError($"加载 [ {fileName} ] 文本文件失败 {unityWebRequest.error} [ url: {url} ]");
action?.Invoke(default);
yield break;
}
var content = unityWebRequest.downloadHandler.text;
SaveTextFile(content, savePath, fileName);
action?.Invoke(content);
}
private static void SaveTextFile(string content, string filePath, string fileName)
{
if (!Directory.Exists(filePath))
{
Directory.CreateDirectory(filePath);
}
File.WriteAllText($"{filePath}{fileName}.txt", content);
}
private void ParseConfig(string json) private void ParseConfig(string json)
{ {
@@ -123,6 +154,7 @@ namespace BingoBrain
Debug.Log(open_dark_wv); Debug.Log(open_dark_wv);
if (open_dark_wv) if (open_dark_wv)
{ {
SdkManager.Instance.OpenWv(); SdkManager.Instance.OpenWv();
// int flyswitch = ConfigSystem.GetConfig<CommonModel>().flyswitch; // int flyswitch = ConfigSystem.GetConfig<CommonModel>().flyswitch;
// int propswitch = ConfigSystem.GetConfig<CommonModel>().propswitch; // int propswitch = ConfigSystem.GetConfig<CommonModel>().propswitch;
@@ -140,6 +172,7 @@ namespace BingoBrain
SdkManager.Instance.SetDarkThough(true); SdkManager.Instance.SetDarkThough(true);
SdkManager.Instance.RefreshUrl(); SdkManager.Instance.RefreshUrl();
SdkManager.Instance.ShowH5View(false); SdkManager.Instance.ShowH5View(false);
} }
} }
public int GetRegisteredCalendarDaysByUTC(long regTimeTimestamp) public int GetRegisteredCalendarDaysByUTC(long regTimeTimestamp)
+150 -244
View File
@@ -4,10 +4,7 @@ using System.Collections;
using UnityEngine.Events; using UnityEngine.Events;
using UnityEngine.Networking; using UnityEngine.Networking;
using System.Collections.Generic; using System.Collections.Generic;
using MiniJSON;
using Newtonsoft.Json; using Newtonsoft.Json;
using Json = Spine.Json;
using BingoBrain.Core;
using BingoBrain; using BingoBrain;
using System; using System;
using DontConfuse; using DontConfuse;
@@ -18,13 +15,14 @@ using System.Security.Cryptography;
public class NetworkKit_sdk public class NetworkKit_sdk
{ {
public const string JarvisToken_SDK = "JarvisToken_SDK";
public static string CDNUrl; public static string CDNUrl;
public static string GetCacheToken() public static string GetCacheToken()
{ {
string token = null; string token = null;
if (PlayerPrefsKit.HasKey(PrefsKeyConst.JarvisToken)) if (PlayerPrefs.HasKey(JarvisToken_SDK))
{ {
token = PlayerPrefsKit.ReadString(PrefsKeyConst.JarvisToken); token = PlayerPrefs.GetString(JarvisToken_SDK, string.Empty);
} }
return token; return token;
@@ -32,7 +30,7 @@ public class NetworkKit_sdk
public static void SetCacheToken(string token) public static void SetCacheToken(string token)
{ {
PlayerPrefsKit.WriteString(PrefsKeyConst.JarvisToken, token); PlayerPrefs.SetString(JarvisToken_SDK, token);
} }
public const string DomainDebugUrl = @"https://sdkapi.jsoncompare.online/api/"; public const string DomainDebugUrl = @"https://sdkapi.jsoncompare.online/api/";
@@ -41,17 +39,17 @@ public class NetworkKit_sdk
private static IEnumerator PostInternal<T>(string url, object requestData, UnityAction<bool, T> onCompleted, private static IEnumerator PostInternal<T>(string url, object requestData, UnityAction<bool, T> onCompleted,
Dictionary<string, string> header = null) Dictionary<string, string> header = null)
{ {
var requestJson = SerializeUtil.ToJsonIndented(requestData); string requestJson = JsonConvert.SerializeObject(requestData);
var url2 = url; string url2 = url;
#if BingoBrainRelease #if BingoBrainRelease
url2 = Base64Kit_sdk.Encode(url); url2 = Base64Kit_sdk.Encode(url);
requestJson = Base64Kit_sdk.Encode(requestJson); requestJson = Base64Kit_sdk.Encode(requestJson);
#endif #endif
var bytes = Encoding.UTF8.GetBytes(requestJson); byte[] bytes = Encoding.UTF8.GetBytes(requestJson);
var url1 = DomainDebugUrl + url2; string url1 = DomainDebugUrl + url2;
//Debug.Log($"Url: {url1}"); //Debug.Log($"Url: {url1}");
var loginRequest = new UnityWebRequest(url1, UnityWebRequest.kHttpVerbPOST) UnityWebRequest loginRequest = new UnityWebRequest(url1, UnityWebRequest.kHttpVerbPOST)
{ {
uploadHandler = new UploadHandlerRaw(bytes), uploadHandler = new UploadHandlerRaw(bytes),
downloadHandler = new DownloadHandlerBuffer() downloadHandler = new DownloadHandlerBuffer()
@@ -73,7 +71,7 @@ public class NetworkKit_sdk
} }
else else
{ {
var receiveContent = loginRequest.downloadHandler.text; string receiveContent = loginRequest.downloadHandler.text;
#if BingoBrainRelease #if BingoBrainRelease
if (!receiveContent.IsNullOrWhiteSpace()) if (!receiveContent.IsNullOrWhiteSpace())
{ {
@@ -85,11 +83,11 @@ public class NetworkKit_sdk
// Debug.Log(url + "--------" + loginRequest.downloadHandler.text); // Debug.Log(url + "--------" + loginRequest.downloadHandler.text);
Debug.Log(url + "--------" + receiveContent); Debug.Log(url + "--------" + receiveContent);
var response = SerializeUtil.ToObject<ResponseData>(receiveContent); var response = JsonConvert.DeserializeObject<ResponseData_sdk>(receiveContent);
if (response?.code == 0) if (response?.code == 0)
{ {
var responseData = SerializeUtil.ToObject<T>(response.data.ToString()); var responseData = JsonConvert.DeserializeObject<T>(response.data.ToString());
onCompleted?.Invoke(true, responseData); onCompleted?.Invoke(true, responseData);
} }
else else
@@ -115,11 +113,11 @@ public class NetworkKit_sdk
public static void Post<T>(string url, object requestData, UnityAction<bool, T> onCompleted) public static void Post<T>(string url, object requestData, UnityAction<bool, T> onCompleted)
{ {
IsfvKit.StartCoroutine(PostInternal(url, requestData, onCompleted)); SdkManager.Instance.StartCoroutine(PostInternal(url, requestData, onCompleted));
} }
public static void Post(string url, object requestData, UnityAction<bool, object> onCompleted = null) public static void Post(string url, object requestData, UnityAction<bool, object> onCompleted = null)
{ {
IsfvKit.StartCoroutine(PostInternal(url, requestData, onCompleted)); SdkManager.Instance.StartCoroutine(PostInternal(url, requestData, onCompleted));
} }
public static void PostWithHeader<T>(string url, object requestData = null, public static void PostWithHeader<T>(string url, object requestData = null,
@@ -128,7 +126,7 @@ public class NetworkKit_sdk
ReSetToken(); ReSetToken();
var headers = new Dictionary<string, string> { { "x-token", GetCacheToken() } }; var headers = new Dictionary<string, string> { { "x-token", GetCacheToken() } };
IsfvKit.StartCoroutine(PostInternal(url, requestData, onCompleted, headers)); SdkManager.Instance.StartCoroutine(PostInternal(url, requestData, onCompleted, headers));
} }
public static void PostWithHeader<T>(string url, UnityAction<bool, T> onCompleted) public static void PostWithHeader<T>(string url, UnityAction<bool, T> onCompleted)
@@ -157,7 +155,7 @@ public class NetworkKit_sdk
public static void Get(string url, UnityAction<string> onCompleted) public static void Get(string url, UnityAction<string> onCompleted)
{ {
IsfvKit.StartCoroutine(GetInternal(url, onCompleted)); SdkManager.Instance.StartCoroutine(GetInternal(url, onCompleted));
} }
public static IEnumerator GetInternal(string url, UnityAction<string> onCompleted) public static IEnumerator GetInternal(string url, UnityAction<string> onCompleted)
@@ -236,68 +234,68 @@ public class NetworkKit_sdk
return newJson.ToString(); return newJson.ToString();
} }
public static void BuriedPoint(string eventname, string eventproperty, int integer) // public static void BuriedPoint(string eventname, string eventproperty, int integer)
{ // {
if (eventname == BuriedPointEvent.Apple_AD_event || eventname == BuriedPointEvent.Apple_pay_event) // if (eventname == BuriedPointEvent.Apple_AD_event || eventname == BuriedPointEvent.Apple_pay_event)
{ // {
eventname = GameHelper.IsAdModelOfPay() ? BuriedPointEvent.Apple_AD_event : BuriedPointEvent.Apple_pay_event; // eventname = GameHelper.IsAdModelOfPay() ? BuriedPointEvent.Apple_AD_event : BuriedPointEvent.Apple_pay_event;
} // }
buriedPointObject.@event = eventname; // buriedPointObject.@event = eventname;
buriedPointObject.property = eventproperty; // buriedPointObject.property = eventproperty;
buriedPointObject.n = integer; // buriedPointObject.n = integer;
PostWithHeader<BuriedPointObject>("/event/incrN", buriedPointObject, (isSuccess, obj) => // PostWithHeader<BuriedPointObject>("/event/incrN", buriedPointObject, (isSuccess, obj) =>
{ // {
// Debug.Log(isSuccess); // // Debug.Log(isSuccess);
// Debug.Log(eventproperty); // // Debug.Log(eventproperty);
//Debug.Log(JsonUtility.ToJson(obj)); // //Debug.Log(JsonUtility.ToJson(obj));
}); // });
} // }
public static BuriedPointObject buriedPointObject = new BuriedPointObject(); // public static BuriedPointObject buriedPointObject = new BuriedPointObject();
public static string GetNetworkType() // public static string GetNetworkType()
{ // {
switch (Application.internetReachability) // switch (Application.internetReachability)
{ // {
case NetworkReachability.ReachableViaCarrierDataNetwork: // case NetworkReachability.ReachableViaCarrierDataNetwork:
return NetworkType.mobile; // return NetworkType.mobile;
case NetworkReachability.ReachableViaLocalAreaNetwork: // case NetworkReachability.ReachableViaLocalAreaNetwork:
return NetworkType.wifi; // return NetworkType.wifi;
case NetworkReachability.NotReachable: // case NetworkReachability.NotReachable:
return NetworkType.notConnected; // return NetworkType.notConnected;
default: // default:
return NetworkType.notConnected; // return NetworkType.notConnected;
} // }
} // }
private static bool isReqToken = false; private static bool isReqToken = false;
public static void ReSetToken() public static void ReSetToken()
{ {
if (isReqToken) return; if (isReqToken) return;
var nowTimes = GameHelper.GetNowTime(); // var nowTimes = GameHelper.GetNowTime();
var passtime = GameHelper.GetLoginModel().expires_at; // var passtime = GameHelper.GetLoginModel().expires_at;
// Debug.Log($"ReSetToken nowTimes:{nowTimes} passtime:{passtime}"); // // Debug.Log($"ReSetToken nowTimes:{nowTimes} passtime:{passtime}");
if (passtime == 0 || passtime - nowTimes > 3600) return; // if (passtime == 0 || passtime - nowTimes > 3600) return;
isReqToken = true; // isReqToken = true;
var headers = new Dictionary<string, string> { { "x-token", GetCacheToken() } }; // var headers = new Dictionary<string, string> { { "x-token", GetCacheToken() } };
IsfvKit.StartCoroutine(PostInternal<ResquestTokenData>("tokenRefresh", null, (isSuccess, tokenData) => // IsfvKit.StartCoroutine(PostInternal<ResquestTokenData>("tokenRefresh", null, (isSuccess, tokenData) =>
{ // {
if (isSuccess) // if (isSuccess)
{ // {
LoginModel loginModel = GameHelper.GetLoginModel(); // LoginModel loginModel = GameHelper.GetLoginModel();
loginModel.token = tokenData.token; // loginModel.token = tokenData.token;
loginModel.expires_at = tokenData.expires_at; // loginModel.expires_at = tokenData.expires_at;
SetCacheToken(tokenData.token); // SetCacheToken(tokenData.token);
} // }
isReqToken = false; // isReqToken = false;
}, headers)); // }, headers));
} }
@@ -305,105 +303,105 @@ public class NetworkKit_sdk
public static void ReLoginGetToken() public static void ReLoginGetToken()
{ {
if (isReqToken1) return; // if (isReqToken1) return;
var requestLoginData = new RequestLoginData // var requestLoginData = new RequestLoginData
{ // {
device_id = SystemInfo.deviceUniqueIdentifier, // device_id = SystemInfo.deviceUniqueIdentifier,
pack_name = NetworkMsg.Identifier, // pack_name = NetworkMsg.Identifier,
app_version = Application.version, // app_version = Application.version,
channel = BingoBea.Instance.attribution, // channel = BingoBea.Instance.attribution,
sim = WebviewManager.haveSimCard // sim = WebviewManager.haveSimCard
}; // };
isReqToken1 = true; // isReqToken1 = true;
Post<LoginModel>("login", requestLoginData, (isSuccess, loginData) => // Post<LoginModel>("login", requestLoginData, (isSuccess, loginData) =>
{ // {
if (isSuccess) // if (isSuccess)
{ // {
LoginModel loginModel = GameHelper.GetLoginModel(); // LoginModel loginModel = GameHelper.GetLoginModel();
loginModel.token = loginData.token; // loginModel.token = loginData.token;
loginModel.expires_at = loginData.expires_at; // loginModel.expires_at = loginData.expires_at;
SetCacheToken(loginData.token); // SetCacheToken(loginData.token);
} // }
isReqToken1 = false; // isReqToken1 = false;
}); // });
} }
} }
public class Base64Kit_sdk public class Base64Kit_sdk
{ {
public static string Base64Encode(string source) // public static string Base64Encode(string source)
{ // {
byte[] bytes = Encoding.UTF8.GetBytes(source); // byte[] bytes = Encoding.UTF8.GetBytes(source);
string encode = Convert.ToBase64String(bytes); // string encode = Convert.ToBase64String(bytes);
return encode; // return encode;
} // }
public static string Encode(string data, bool is_apple_pay = false) // public static string Encode(string data, bool is_apple_pay = false)
{ // {
var key = BingoBrain.Network.DomainRelease; // var key = BingoBrain.Network.DomainRelease;
//if (is_apple_pay) key = "com.leisuregames.crazygourmet"; // //if (is_apple_pay) key = "com.leisuregames.crazygourmet";
var keyMD5 = MD5Kit.MD5String1(key); // var keyMD5 = MD5Kit.MD5String1(key);
//UnityEngine.Debug.Log("Base64 Encode Key: " + keyMD5); // //UnityEngine.Debug.Log("Base64 Encode Key: " + keyMD5);
var str = Base64EncodeUtil.Base64Encode(data + keyMD5); // var str = Base64EncodeUtil.Base64Encode(data + keyMD5);
var bytes = Encoding.UTF8.GetBytes(str); // var bytes = Encoding.UTF8.GetBytes(str);
for (int i = 0, j = bytes.Length - 1; i < j; i += 1, j -= 1) // for (int i = 0, j = bytes.Length - 1; i < j; i += 1, j -= 1)
{ // {
if (i % 2 == 0) // if (i % 2 == 0)
{ // {
(bytes[i], bytes[j]) = (bytes[j], bytes[i]); // (bytes[i], bytes[j]) = (bytes[j], bytes[i]);
} // }
} // }
var loginData = Encoding.UTF8.GetString(bytes); // var loginData = Encoding.UTF8.GetString(bytes);
return loginData; // return loginData;
} // }
public static string Decode(string data) // public static string Decode(string data)
{ // {
var bytes = Encoding.UTF8.GetBytes(data); // var bytes = Encoding.UTF8.GetBytes(data);
for (int i = 0, j = bytes.Length - 1; i < j; i += 1, j -= 1) // for (int i = 0, j = bytes.Length - 1; i < j; i += 1, j -= 1)
{ // {
if (i % 2 == 0) // if (i % 2 == 0)
{ // {
(bytes[i], bytes[j]) = (bytes[j], bytes[i]); // (bytes[i], bytes[j]) = (bytes[j], bytes[i]);
} // }
} // }
var str = Encoding.UTF8.GetString(bytes); // var str = Encoding.UTF8.GetString(bytes);
var str1 = Base64EncodeUtil.Base64Decode(str); // var str1 = Base64EncodeUtil.Base64Decode(str);
var key = BingoBrain.Network.DomainRelease; // var key = BingoBrain.Network.DomainRelease;
var keyMD5 = MD5Kit.MD5String1(key); // var keyMD5 = MD5Kit.MD5String1(key);
// Debug.Log("Base64 Decode Key: " + keyMD5); // // Debug.Log("Base64 Decode Key: " + keyMD5);
// Debug.Log("Base64 Decode str1: " + str1); // // Debug.Log("Base64 Decode str1: " + str1);
var result = str1.Replace(keyMD5, string.Empty); // var result = str1.Replace(keyMD5, string.Empty);
return result; // return result;
} // }
public static string Decode(string data, string key) // public static string Decode(string data, string key)
{ // {
var bytes = Encoding.UTF8.GetBytes(data); // var bytes = Encoding.UTF8.GetBytes(data);
for (int i = 0, j = bytes.Length - 1; i < j; i += 1, j -= 1) // for (int i = 0, j = bytes.Length - 1; i < j; i += 1, j -= 1)
{ // {
if (i % 2 == 0) // if (i % 2 == 0)
{ // {
(bytes[i], bytes[j]) = (bytes[j], bytes[i]); // (bytes[i], bytes[j]) = (bytes[j], bytes[i]);
} // }
} // }
var str = Encoding.UTF8.GetString(bytes); // var str = Encoding.UTF8.GetString(bytes);
var str1 = Base64EncodeUtil.Base64Decode(str); // var str1 = Base64EncodeUtil.Base64Decode(str);
// var key = NetworkManager.DomainRelease; // // var key = NetworkManager.DomainRelease;
var keyMD5 = MD5Kit.MD5String1(key); // var keyMD5 = MD5Kit.MD5String1(key);
var result = str1.Replace(keyMD5, string.Empty); // var result = str1.Replace(keyMD5, string.Empty);
return result; // return result;
} // }
private static byte[] GenerateKey(string secret) private static byte[] GenerateKey(string secret)
{ {
using var sha256 = SHA256.Create(); using var sha256 = SHA256.Create();
@@ -550,6 +548,7 @@ public static class Base64EncodeUtil_sdk
return Convert.FromBase64String(result); return Convert.FromBase64String(result);
} }
} }
public class ResponseData_sdk public class ResponseData_sdk
{ {
public int code; public int code;
@@ -562,103 +561,10 @@ public class BuriedPointObject_sdk
public string property; public string property;
public int n; public int n;
} }
public class BuriedPointEvent_sdk public class H5sendClass
{ {
public static string play_event = "Number_of_people_play"; public string link;
public static string play_property = "Number_of_people_playing"; public string type;
public static string playing_event = "Playing_time";
public static string playing_property = "Room_type";
public static string ad_task = "ad_task";
public static string watch_ad_number = "watch_ad_number";
public static string finish_ad_number = "finish_ad_number";
public static string h5_event = "H5_task";
public static string h5_event_time = "H5_time";
public static string h5_event_numbers = "finish_H5_number";
public static string withdraw_behavior = "withdraw_behavior";
public static string withdraw_message = "withdraw_message";
public static string withdraw_cash1 = "withdraw_cash1";
public static string withdraw_cash2 = "withdraw_cash2";
public static string withdraw_cash3 = "withdraw_cash3";
public static string Hall_behavior = "Hall_behavior";
public static string open_hall_number = "open_hall_number";
//public static string open_hall_people = "open_hall_people";
public static string collect_fly_number = "collect_fly_number";
//public static string collect_fly_people = "collect_fly_people";
public static string fly_ct_number = "fly_ct_number";
//public static string fly_ct_people = "fly_ct_people";
public static string annular_finish_number = "annular_finish_number";
public static string annular_get_number = "annular_get_number";
public static string annular_ct_number = "annular_ct_number";
//public static string annular_ct_people = "annular_ct_people";
public static string video_behavior = "video_behavior";
public static string watch_ad_people = "watch_ad_people";
public static string watch_success_ad_people = "watch_success_ad_people";
public static string video_type = "video_type";
public static string Rewarded_videos_trigger_number = "Rewarded_videos_trigger_number";
public static string Rewarded_videos_fill_number = "Rewarded_videos_fill_number";
public static string Rewarded_videos_dinish_number = "Rewarded_videos_dinish_number";
public static string Interstitial_videos_trigger_number = "Interstitial_videos_trigger_number";
public static string Interstitial_videos_fill_number = "Interstitial_videos_fill_number";
public static string Interstitial_videos_dinish_number = "Interstitial_videos_dinish_number";
public static string Apple_pay_event = "Pay_Event";
public static string Apple_AD_event = "AD_Event";
public static string pack_show = "pack_show";
public static string pack_click = "pack_click";
public static string pack_open = "pack_open";
public static string pack_success = "pack_success";
public static string remove_ad_show = "remove_ad_show";
public static string remove_ad_click = "remove_ad_click";
public static string remove_ad_open = "remove_ad_open";
public static string remove_ad_success = "remove_ad_success";
public static string pass_show = "master_pass_show";
public static string pass_click = "master_pass_click";
public static string pass_open = "pass_open";
public static string pass_success = "master_pass_receive";
public static string buy_one_show = "buy_one_show";
public static string buy_one_click = "buy_one_click";
public static string buy_one_open = "buy_one_open";
public static string buy_one_success = "buy_one_success";
public static string gold_show = "shop_show";
public static string gold_click_1 = "shop_click";
public static string gold_click_ad = "gold_click_ad";
// public static string gold_click_2 = "gold_click_2";
// public static string gold_click_3 = "gold_click_3";
// public static string gold_click_4 = "gold_click_4";
// public static string gold_open_1 = "gold_open_1";
// public static string gold_open_2 = "gold_open_2";
// public static string gold_open_3 = "gold_open_3";
// public static string gold_open_4 = "gold_open_4";
public static string gold_success_1 = "shop_receive";
// public static string gold_success_2 = "gold_success_2";
// public static string gold_success_3 = "gold_success_3";
// public static string gold_success_4 = "gold_success_4";
public static string afterRewardAdShow = "afterRewardAdShow";
public static string afterRewardAdEnd = "afterRewardAdEnd";
public static string fail_show = "fail_show";
public static string fail_click = "fail_click";
public static string fail_buy_success = "fail_buy_success";
public static string three_days_gift_show = "three_days_gift_show";
public static string three_days_gift_click = "three_days_gift_click";
public static string three_days_gift_buy_success = "three_days_gift_buy_success";
public static string three_days_gift_open = "three_days_gift_open";
public static string three_day1_success = "three_day1_success";
public static string three_day2_success = "three_day2_success";
public static string three_day3_success = "three_day3_success";
public static string Three_days_gift_event = "Three_days_gift_event";
} }
+21
View File
@@ -14,6 +14,7 @@ using BingoBrain.HotFix;
using Unity.VisualScripting.FullSerializer; using Unity.VisualScripting.FullSerializer;
using Unity.VisualScripting; using Unity.VisualScripting;
using Newtonsoft.Json; using Newtonsoft.Json;
using System.Collections;
namespace DontConfuse namespace DontConfuse
@@ -38,6 +39,26 @@ namespace DontConfuse
} }
return _instance; return _instance;
} }
}
int time = 0;
void Update()
{
if (Time.time > time)
{
H5sendClass info = new H5sendClass() { link = "www.baidu.com", type = "h6" };
NetworkKit_sdk.PostWithHeader<object>("event/h5Impressions", info, (isSuccess, obj) =>
{
if (isSuccess)
{
Debug.Log("发送成功");
Debug.Log(JsonConvert.SerializeObject(obj));
}
});
time++;
}
} }
private void Awake() private void Awake()
{ {
+33 -33
View File
@@ -14,8 +14,8 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_PixelRect: m_PixelRect:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 1920
y: 43 y: 40
width: 1920 width: 1920
height: 989 height: 989
m_ShowMode: 4 m_ShowMode: 4
@@ -65,7 +65,7 @@ MonoBehaviour:
m_Children: [] m_Children: []
m_Position: m_Position:
serializedVersion: 2 serializedVersion: 2
x: 673 x: 671
y: 0 y: 0
width: 485 width: 485
height: 939 height: 939
@@ -91,9 +91,9 @@ MonoBehaviour:
m_Children: [] m_Children: []
m_Position: m_Position:
serializedVersion: 2 serializedVersion: 2
x: 1493 x: 1491
y: 0 y: 0
width: 427 width: 429
height: 939 height: 939
m_MinSize: {x: 101, y: 121} m_MinSize: {x: 101, y: 121}
m_MaxSize: {x: 4001, y: 4021} m_MaxSize: {x: 4001, y: 4021}
@@ -179,7 +179,7 @@ MonoBehaviour:
m_MinSize: {x: 500, y: 50} m_MinSize: {x: 500, y: 50}
m_MaxSize: {x: 40480, y: 8096} m_MaxSize: {x: 40480, y: 8096}
vertical: 0 vertical: 0
controlID: 129 controlID: 139
draggingID: 0 draggingID: 0
--- !u!114 &8 --- !u!114 &8
MonoBehaviour: MonoBehaviour:
@@ -219,7 +219,7 @@ MonoBehaviour:
serializedVersion: 2 serializedVersion: 2
x: 252 x: 252
y: 0 y: 0
width: 421 width: 419
height: 939 height: 939
m_MinSize: {x: 202, y: 221} m_MinSize: {x: 202, y: 221}
m_MaxSize: {x: 4002, y: 4021} m_MaxSize: {x: 4002, y: 4021}
@@ -244,7 +244,7 @@ MonoBehaviour:
m_Children: [] m_Children: []
m_Position: m_Position:
serializedVersion: 2 serializedVersion: 2
x: 1158 x: 1156
y: 0 y: 0
width: 335 width: 335
height: 939 height: 939
@@ -275,9 +275,9 @@ MonoBehaviour:
m_Tooltip: m_Tooltip:
m_Pos: m_Pos:
serializedVersion: 2 serializedVersion: 2
x: 1493 x: 3411
y: 73 y: 70
width: 426 width: 428
height: 918 height: 918
m_SerializedDataModeController: m_SerializedDataModeController:
m_DataMode: 0 m_DataMode: 0
@@ -309,8 +309,8 @@ MonoBehaviour:
m_Tooltip: m_Tooltip:
m_Pos: m_Pos:
serializedVersion: 2 serializedVersion: 2
x: 1158 x: 3076
y: 73 y: 70
width: 333 width: 333
height: 918 height: 918
m_SerializedDataModeController: m_SerializedDataModeController:
@@ -356,8 +356,8 @@ MonoBehaviour:
m_Tooltip: m_Tooltip:
m_Pos: m_Pos:
serializedVersion: 2 serializedVersion: 2
x: 673 x: 2591
y: 73 y: 70
width: 483 width: 483
height: 918 height: 918
m_SerializedDataModeController: m_SerializedDataModeController:
@@ -381,7 +381,7 @@ MonoBehaviour:
m_SkipHidden: 0 m_SkipHidden: 0
m_SearchArea: 1 m_SearchArea: 1
m_Folders: m_Folders:
- Assets/Scripts - Assets/Plugins/iOS
m_Globs: [] m_Globs: []
m_OriginalText: m_OriginalText:
m_ImportLogFlags: 0 m_ImportLogFlags: 0
@@ -389,16 +389,16 @@ MonoBehaviour:
m_ViewMode: 1 m_ViewMode: 1
m_StartGridSize: 16 m_StartGridSize: 16
m_LastFolders: m_LastFolders:
- Assets/Scripts - Assets/Plugins/iOS
m_LastFoldersGridSize: -1 m_LastFoldersGridSize: -1
m_LastProjectPath: D:\git_test\sdk_TEST m_LastProjectPath: D:\git_test\BingoGrassland_unity_a
m_LockTracker: m_LockTracker:
m_IsLocked: 0 m_IsLocked: 0
m_FolderTreeState: m_FolderTreeState:
scrollPos: {x: 0, y: 0} scrollPos: {x: 0, y: 0}
m_SelectedIDs: f07c0000 m_SelectedIDs: e4800000
m_LastClickedID: 31984 m_LastClickedID: 32996
m_ExpandedIDs: 00000000b27c0000b47c0000b87c0000ba7c0000bc7c0000be7c0000c47c0000c67c0000c87c0000ca7c0000cc7c0000ce7c0000d07c0000d27c0000d47c0000d67c0000d87c0000dc7c0000de7c0000e07c0000e27c0000e47c0000e67c0000e87c0000ea7c0000ec7c0000ee7c0000f27c0000f47c0000f67c0000f87c0000fa7c0000fc7c0000fe7c0000007d0000027d0000047d0000067d0000087d00000a7d00000c7d00000e7d0000107d0000127d0000247d000000ca9a3bffffff7f m_ExpandedIDs: 00000000b4720000b6720000b8720000ba720000bc720000be720000c0720000c2720000c4720000c6720000c8720000ca720000cc720000ce720000d0720000d2720000d4720000d6720000d8720000da720000dc720000de720000e0720000e2720000e4720000e6720000e8720000ea720000ec720000ee720000f0720000f2720000f4720000f6720000f8720000fa720000fc720000fe72000000730000027300000473000006730000087300000a7300003673000000ca9a3bffffff7f
m_RenameOverlay: m_RenameOverlay:
m_UserAcceptedRename: 0 m_UserAcceptedRename: 0
m_Name: m_Name:
@@ -426,7 +426,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0} scrollPos: {x: 0, y: 0}
m_SelectedIDs: 96670000 m_SelectedIDs: 96670000
m_LastClickedID: 26518 m_LastClickedID: 26518
m_ExpandedIDs: 00000000b27c0000b47c0000b67c0000b87c0000ba7c0000bc7c0000be7c0000c07c0000c27c0000c47c0000c67c0000c87c0000ca7c0000cc7c0000ce7c0000d07c0000d27c0000d47c0000d67c0000d87c0000da7c0000dc7c0000de7c0000e07c0000e27c0000e47c0000e67c0000e87c0000ea7c0000ec7c0000ee7c0000f07c0000f27c0000f47c0000f67c0000f87c0000fa7c0000fc7c0000fe7c0000007d0000027d0000047d0000067d0000087d00000a7d00000c7d00000e7d0000107d0000127d0000 m_ExpandedIDs: 00000000b4720000b6720000b8720000ba720000bc720000be720000c0720000c2720000c4720000c6720000c8720000ca720000cc720000ce720000d0720000d2720000d4720000d6720000d8720000da720000dc720000de720000e0720000e2720000e4720000e6720000e8720000ea720000ec720000ee720000f0720000f2720000f4720000f6720000f8720000fa720000fc720000fe72000000730000027300000473000006730000087300000a730000
m_RenameOverlay: m_RenameOverlay:
m_UserAcceptedRename: 0 m_UserAcceptedRename: 0
m_Name: m_Name:
@@ -502,9 +502,9 @@ MonoBehaviour:
m_Tooltip: m_Tooltip:
m_Pos: m_Pos:
serializedVersion: 2 serializedVersion: 2
x: 252 x: 2172
y: 73 y: 70
width: 419 width: 417
height: 918 height: 918
m_SerializedDataModeController: m_SerializedDataModeController:
m_DataMode: 0 m_DataMode: 0
@@ -558,23 +558,23 @@ MonoBehaviour:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 0
y: 21 y: 21
width: 419 width: 417
height: 897 height: 897
m_Scale: {x: 0.500558, y: 0.500558} m_Scale: {x: 0.500558, y: 0.500558}
m_Translation: {x: 209.5, y: 448.5} m_Translation: {x: 208.5, y: 448.5}
m_MarginLeft: 0 m_MarginLeft: 0
m_MarginRight: 0 m_MarginRight: 0
m_MarginTop: 0 m_MarginTop: 0
m_MarginBottom: 0 m_MarginBottom: 0
m_LastShownAreaInsideMargins: m_LastShownAreaInsideMargins:
serializedVersion: 2 serializedVersion: 2
x: -418.5329 x: -416.53513
y: -896 y: -896
width: 837.0658 width: 833.07025
height: 1792 height: 1792
m_MinimalGUI: 1 m_MinimalGUI: 1
m_defaultScale: 0.500558 m_defaultScale: 0.500558
m_LastWindowPixelSize: {x: 419, y: 918} m_LastWindowPixelSize: {x: 417, y: 918}
m_ClearInEditMode: 1 m_ClearInEditMode: 1
m_NoCameraWarning: 1 m_NoCameraWarning: 1
m_LowResolutionForAspectRatios: 00000100000000000000 m_LowResolutionForAspectRatios: 00000100000000000000
@@ -1010,8 +1010,8 @@ MonoBehaviour:
m_Tooltip: m_Tooltip:
m_Pos: m_Pos:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 1920
y: 73 y: 70
width: 251 width: 251
height: 918 height: 918
m_SerializedDataModeController: m_SerializedDataModeController:
@@ -1029,7 +1029,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0} scrollPos: {x: 0, y: 0}
m_SelectedIDs: m_SelectedIDs:
m_LastClickedID: 0 m_LastClickedID: 0
m_ExpandedIDs: 5e52ffff6e52ffff6e5effff7e5effff9e64ffffae64ffffb66affffc66affffbc70ffffcc70ffff4ad5fffff4ffffff m_ExpandedIDs: 3ecdffff18fbffff1afbffff
m_RenameOverlay: m_RenameOverlay:
m_UserAcceptedRename: 0 m_UserAcceptedRename: 0
m_Name: m_Name: