删除账号优化

This commit is contained in:
lishuo 2022-07-18 18:37:42 +08:00
parent e6fbad7021
commit c209811f9f

View File

@ -1,7 +1,6 @@
using Assets.Scripts;
using System.Linq;
using Assets.Scripts.UI.Control;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
@ -30,6 +29,10 @@ public class DeleteAccount : PFUIPanel
var res1 = await ConfigHelper.userApi.DeleteAccount(pwd, false);
if (res1.result)
{
var userinfos = UIManager.Instance.userInfos;
UIManager.Instance.userInfos = userinfos.Where(x => x.Phone != App.CurrentUser.Phone).ToList();
var index = PlayerPrefs.GetInt("UserInfoIndex");
PlayerPrefs.SetInt("UserInfoIndex", (index - 1) >= 0 ? (index - 1) : 0);
#if !(UNITY_ANDROID || UNITY_IOS)
SceneManager.LoadScene("Login");
#else