//--------------------------------------------------------
|
// [Author]: 第二世界
|
// [ Date ]: Saturday, December 16, 2017
|
//--------------------------------------------------------
|
|
using System;
|
using System.Collections;
|
using System.Collections.Generic;
|
using UnityEngine;
|
using UnityEngine.UI;
|
|
|
namespace vnxbqy.UI
|
{
|
public class ServerForceExitHintWin : Window
|
{
|
public static int reason = 0;
|
|
[SerializeField] Text m_Reason;
|
[SerializeField] Button m_Confirm;
|
|
#region Built-in
|
protected override void BindController()
|
{
|
}
|
|
protected override void AddListeners()
|
{
|
m_Confirm.AddListener(ReturnToLogin);
|
}
|
|
protected override void OnPreOpen()
|
{
|
var kickConfig = KickOutReasonConfig.Get(reason);
|
m_Reason.text = kickConfig == null ? "" : kickConfig.kickout;
|
}
|
|
protected override void OnAfterOpen()
|
{
|
}
|
|
protected override void OnPreClose()
|
{
|
}
|
|
protected override void OnAfterClose()
|
{
|
}
|
#endregion
|
|
private void ReturnToLogin()
|
{
|
reason = 0;
|
CloseClick();
|
switch (VersionConfig.Get().versionAuthority)
|
{
|
case VersionAuthority.InterTest:
|
GameNotice.OpenGameNotice();
|
break;
|
case VersionAuthority.Release:
|
if (!VersionConfig.Get().isBanShu)
|
{
|
if (!ModelCenter.Instance.GetModel<LoginModel>().sdkLogined)
|
{
|
ynmbxxjUtil.Instance.FreePlatformLogin();
|
OperationLogCollect.Instance.RecordLauchEvent(4);
|
OperationLogCollect.Instance.RecordEvent(4);
|
}
|
}
|
break;
|
}
|
}
|
|
}
|
|
}
|