111 lines
2.5 KiB
C#
111 lines
2.5 KiB
C#
![]() |
// ***********************************************************************
|
|||
|
// Assembly : Game
|
|||
|
// Author : Kimch
|
|||
|
// Created : 2020-12-23
|
|||
|
// Description :
|
|||
|
// Last Modified By :
|
|||
|
// Last Modified On :
|
|||
|
// ***********************************************************************
|
|||
|
// <copyright file= "NoticeBox.View" company="Kunpo"></copyright>
|
|||
|
// <summary></summary>
|
|||
|
// ***********************************************************************
|
|||
|
namespace G.UI
|
|||
|
{
|
|||
|
using TMPro;
|
|||
|
using UnityEngine;
|
|||
|
using UnityEngine.UI;
|
|||
|
|
|||
|
/// <summary>
|
|||
|
///
|
|||
|
/// </summary>
|
|||
|
partial class NoticeBox
|
|||
|
{
|
|||
|
#region Field
|
|||
|
|
|||
|
#pragma warning disable CS0649 // 从未对字段赋值,字段将一直保持其默认值 null
|
|||
|
[KUIFlag]
|
|||
|
Button _btnConfirm;
|
|||
|
[KUIFlag]
|
|||
|
Button _btnClose;
|
|||
|
[KUIFlag]
|
|||
|
TextMeshProUGUI _tmpConfirm;
|
|||
|
[KUIFlag]
|
|||
|
TextMeshProUGUI _tmpContent;
|
|||
|
#pragma warning restore CS0649 // 从未对字段赋值,字段将一直保持其默认值 null
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Method
|
|||
|
|
|||
|
/// <summary>
|
|||
|
///
|
|||
|
/// </summary>
|
|||
|
public void InitView()
|
|||
|
{
|
|||
|
SetViewData();
|
|||
|
|
|||
|
_btnClose.onClick.AddListener(this.OnCloseBtnClick);
|
|||
|
|
|||
|
if (KRemoteConfig.Instance.isReview)
|
|||
|
{
|
|||
|
_tmpConfirm.text = "确定";
|
|||
|
_btnConfirm.onClick.AddListener(this.OnCloseBtnClick);
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
_btnConfirm.onClick.AddListener(this.OnConfirmBtnClick);
|
|||
|
}
|
|||
|
|
|||
|
//显示
|
|||
|
if (!string.IsNullOrEmpty(KRemoteConfig.Instance.notice))
|
|||
|
{
|
|||
|
_tmpContent.text = KRemoteConfig.Instance.notice;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
///
|
|||
|
/// </summary>
|
|||
|
public void RefreshView()
|
|||
|
{
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
private void OnConfirmBtnClick()
|
|||
|
{
|
|||
|
#if UNITY_IOS
|
|||
|
var qqGroupURL = KRemoteConfig.Instance.groupURL;
|
|||
|
if (string.IsNullOrEmpty(qqGroupURL))
|
|||
|
Application.OpenURL(@"https://qm.qq.com/cgi-bin/qm/qr?k=y4t4XSMynpq0Omuwq3KDXyDwURuFI0cn");
|
|||
|
else
|
|||
|
Application.OpenURL(qqGroupURL);
|
|||
|
#elif UNITY_ANDROID
|
|||
|
var qqGroupURL = KRemoteConfig.Instance.groupURL;
|
|||
|
if (string.IsNullOrEmpty(qqGroupURL))
|
|||
|
{
|
|||
|
var appId = Application.identifier;
|
|||
|
switch (Application.identifier)
|
|||
|
{
|
|||
|
case "com.kunpo.litaibai.android.vapp"://vapp
|
|||
|
qqGroupURL = @"https://qm.qq.com/cgi-bin/qm/qr?k=Dtpm-AIpWJUCbW8TqGqk4DPIyjy-J77x";
|
|||
|
break;
|
|||
|
default:
|
|||
|
qqGroupURL = @"https://qm.qq.com/cgi-bin/qm/qr?k=UsMn1MkoA-3B9CLzP9f6pIX8BXG2XZ9d";
|
|||
|
break;
|
|||
|
}
|
|||
|
}
|
|||
|
Application.OpenURL(qqGroupURL);
|
|||
|
|
|||
|
#endif
|
|||
|
CloseWindow(this);
|
|||
|
}
|
|||
|
|
|||
|
private void OnCloseBtnClick()
|
|||
|
{
|
|||
|
CloseWindow(this);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
}
|
|||
|
}
|