Compare commits
No commits in common. "9afdd9b4f5b35f254fc97dc01db55950f078e34c" and "4ec85ab30e4d7aca4a6a5a17ba39ab3c415e5ae1" have entirely different histories.
9afdd9b4f5
...
4ec85ab30e
|
|
@ -1 +1 @@
|
|||
127.0.0.1:48888
|
||||
172.20.10.5:48888
|
||||
|
|
@ -1 +1 @@
|
|||
127.0.0.1
|
||||
172.20.10.5
|
||||
|
|
@ -1,10 +1,11 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
using XFrame.Core.UI;
|
||||
using static InterfaceManager;
|
||||
|
||||
public class Main_interface_Panel : XUIPanel
|
||||
{
|
||||
|
|
@ -24,14 +25,38 @@ public class Main_interface_Panel : XUIPanel
|
|||
fanhui_btn = this.transform.Find("UPBG/Back_bton").GetComponent<Button>();
|
||||
fanhui_btn.onClick.AddListener(() =>
|
||||
{
|
||||
UIBootstrap.Instance.OnLogout();
|
||||
SceneManager.LoadScene("SampleScene");
|
||||
|
||||
});
|
||||
ShowPanel<View_Panel2>();
|
||||
|
||||
this.transform.Find("UPBG/Back_bton").GetComponent<Button>().onClick.AddListener(() =>
|
||||
{
|
||||
GameObject obj = GameObject.Find("Canvas");
|
||||
if (obj != null)
|
||||
{
|
||||
Login_panl login_panl = obj.GetComponent<Login_panl>();
|
||||
if (login_panl != null)
|
||||
{
|
||||
login_panl.AddGetString(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
replay.onClick.AddListener(() => { ReplayPanel(); });
|
||||
train.onClick.AddListener(() => { TrainPanel(); });
|
||||
appQuet.onClick.AddListener(() => { Application.Quit();
|
||||
appQuet.onClick.AddListener(() => {
|
||||
GameObject obj = GameObject.Find("Canvas");
|
||||
if (obj != null)
|
||||
{
|
||||
Login_panl login_panl = obj.GetComponent<Login_panl>();
|
||||
if (login_panl != null)
|
||||
{
|
||||
login_panl.AddGetString(false);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//Debug.Log("退出");
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -163,17 +163,4 @@ public class UIBootstrap : MonoSingleton<UIBootstrap>
|
|||
Debug.Log("OnDestory");
|
||||
AdamSync.SyncCreateRoom.leaveRoomRequset -= OnLeaveRoomInfo;
|
||||
}
|
||||
|
||||
public void OnLogout()
|
||||
{
|
||||
Dictionary<string, string> replaceInfoDic = new Dictionary<string, string>();
|
||||
replaceInfoDic.Add("login_name", GlobalFlag.currentUser.login_name);
|
||||
StartCoroutine(AsyncWebReq.PostData2(Url_LoginCheck, replaceInfoDic));
|
||||
Debug.Log("OnLogout");
|
||||
}
|
||||
|
||||
private void OnApplicationQuit()
|
||||
{
|
||||
OnLogout();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,9 +79,9 @@ public static class AsyncWebReq
|
|||
else
|
||||
{
|
||||
if (!string.IsNullOrEmpty(request.downloadHandler.text))
|
||||
action?.Invoke(request.downloadHandler.text);
|
||||
action(request.downloadHandler.text);
|
||||
else
|
||||
action?.Invoke(null);
|
||||
action(null);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,10 +35,6 @@ public static class InterfaceManager
|
|||
|
||||
|
||||
#region 接口
|
||||
/// <summary>
|
||||
/// 登出接口 Handler/User.ashx?action=exit&login_name=test0001
|
||||
/// </summary>
|
||||
public static string Url_LoginCheck { get => IpAddress + "/Handler/User.ashx?action=exit&"; }
|
||||
|
||||
/// <summary>
|
||||
/// 想定Wbe接口
|
||||
|
|
|
|||
Loading…
Reference in New Issue