From 30976352710e1695095b879b1cf98c0400418708 Mon Sep 17 00:00:00 2001 From: huyufei Date: Tue, 23 Apr 2024 14:09:35 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E6=9B=B4=E6=96=B0=E6=89=93=E5=BC=80?= =?UTF-8?q?=E9=9A=90=E7=A7=81=E5=92=8C=E6=9C=8D=E5=8A=A1=E6=9D=A1=E6=AC=BE?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Runtime/Code/SDK/GuruSDK.Properties.cs | 6 +++++- Runtime/Code/SDK/GuruSDK.System.cs | 27 ++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/Runtime/Code/SDK/GuruSDK.Properties.cs b/Runtime/Code/SDK/GuruSDK.Properties.cs index 012f8a7..c55417a 100644 --- a/Runtime/Code/SDK/GuruSDK.Properties.cs +++ b/Runtime/Code/SDK/GuruSDK.Properties.cs @@ -25,7 +25,11 @@ namespace Guru } } - public static string AppVersion =>GuruAppVersion.version; + public static string PrivacyUrl => GuruSettings.PriacyUrl ?? ""; + + public static string TermsUrl => GuruSettings.TermsUrl ?? ""; + + public static string AppVersion => GuruAppVersion.version; public static string AppVersionCode => GuruAppVersion.code; diff --git a/Runtime/Code/SDK/GuruSDK.System.cs b/Runtime/Code/SDK/GuruSDK.System.cs index 663b6a3..0d69685 100644 --- a/Runtime/Code/SDK/GuruSDK.System.cs +++ b/Runtime/Code/SDK/GuruSDK.System.cs @@ -13,6 +13,33 @@ namespace Guru GuruWebview.OpenPage(url); } + /// + /// 打开隐私协议页面 + /// + public static void OpenPrivacyPage() + { + if (string.IsNullOrEmpty(PrivacyUrl)) + { + LogE("PrivacyUrl is null"); + return; + } + + OpenURL(PrivacyUrl); + } + + /// + /// 打开服务条款页面 + /// + public static void OpenTermsPage() + { + if (string.IsNullOrEmpty(TermsUrl)) + { + LogE("TermsUrl is null"); + return; + } + OpenURL(TermsUrl); + } + #endregion } } \ No newline at end of file