删除用户pc

This commit is contained in:
Caiyanpeng committed 2022-07-15 14:27:05 +08:00
1 parent bf3b0d2642
commit 3207d7b191
18 files changed
+1088 -67

No files matched your search

+5
View File
@@ -85,6 +85,11 @@ namespace Assets.Scripts.Apis
}
}
public async Task<JsonResult<object>> DeleteAccount(string pwd)
{
return await PostAsync<JsonResult<object>>("User/DeleteAccount", new { pwd });
}
public async Task<JsonResult<object>> AppleCompleteInfo(string phone, string Captcha, string pwd)
{
return await PostAsync<JsonResult<object>>("User/AppleCompleteInfo", new { phone, Captcha, pwd });
+2 -2
View File
@@ -21,7 +21,7 @@ public delegate void ChangeLanguageDelegate();
public static class App
{
public static string Host = "http://192.168.0.102:5082/";
public static string Host = "http://192.168.0.101:5087/";
public static string AppVersion = Application.version;
@@ -218,7 +218,7 @@ public static class App
static App()
{
InitLanguage();
Host = "http://pf.juze.pro/";
//Host = "http://pf.juze.pro/";
//UdpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21000);
//TcpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21001);
#if !UNITY_EDITOR
+1 -1
View File
@@ -292,7 +292,7 @@ public class LoginController : BaseScene
if (wxLock) return;
wxLock = true;
//wxState = (DateTime.Now.ToUniversalTime().Ticks / 10000 * new System.Random().Next(1, 5)).ToString();
wxBrowser.Url = $"https://open.weixin.qq.com/connect/qrconnect?appid={App.WxAppId}&redirect_uri=https%3A%2F%2Fwx.powerfun.com.cn%2FNoAuth%2Fv1%2FWxWebLogin&response_type=code&scope=snsapi_login&state=unity#wechat_redirect";
wxBrowser.Url = $"https://open.weixin.qq.com/connect/qrconnect?appid={App.WxAppId}&redirect_uri=https%3A%2F%2Fwx.powerfun.com.cn%2FNoAuth%2Fv1%2FWxWebLogin&response_type=code&scope=snsapi_login&state=unity&style=black#wechat_redirect";
AdjustWxQrCode();
//wxBrowser.RegisterFunction("isFinish", args =>
//{
@@ -1,7 +1,9 @@
using Assets.Scripts.UI.Control;
using Assets.Scripts;
using Assets.Scripts.UI.Control;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class DeleteAccount : PFUIPanel
{
@@ -10,13 +12,30 @@ public class DeleteAccount : PFUIPanel
PFUIInputField password = transform.Find("Content/Password").GetComponent<PFUIInputField>();
UIManager.AddEvent(transform.Find("Content/Delete").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
{
print(password.Text);
Delete(password.Text);
});
UIManager.AddEvent(transform.Find("Content/Cancel").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
{
Close();
});
}
async void Delete(string pwd)
{
var res = await ConfigHelper.userApi.DeleteAccount(pwd);
if (res.result)
{
#if !(UNITY_ANDROID || UNITY_IOS)
SceneManager.LoadScene("Login");
#else
SceneManager.LoadScene("Login-Mobile");
#endif
Close();
}
else
{
Utils.showToast(null, res.errMsg);
}
}
// Start is called before the first frame update
void Start()
{
@@ -307,6 +307,10 @@ public class EditUserController : PFUIPanel, INativeOnMobileImageSelect
UIManager.AddEvent(mSaveButton.gameObject, EventTriggerType.PointerClick, Save);
UIManager.AddEvent(mCancelButton.gameObject, EventTriggerType.PointerClick, Cancel);
UIManager.AddEvent(mSwitchButton.gameObject, EventTriggerType.PointerClick, Switch);
UIManager.AddEvent(transform.Find("LogoutButton").gameObject, EventTriggerType.PointerClick, b =>
{
UIManager.ShowDeleteAccount();
});
}
public override void Show()
{
@@ -34,6 +34,10 @@ public class UserInfoController : PFUIPanel
//{
// UIManager.ShowHomePanel();
//});
UIManager.AddEvent(transform.Find("InfoPanel/LogoutButton").gameObject, EventTriggerType.PointerClick, b =>
{
UIManager.ShowDeleteAccount();
});
UIManager.AddEvent(transform.Find("InfoPanel").Find("SwitchAccountButton").gameObject,
EventTriggerType.PointerClick, (b) =>
{
+1 -1
View File
@@ -291,7 +291,7 @@ public class UIManager : MonoBehaviour
{
get
{
return this.GetPanelInstance("DeleteAccount", ref this.mDeleteAccount);
return this.GetPanelInstance("DeleteModal", ref this.mDeleteAccount);
}
}
public static void ShowDeleteAccount()