1. 新增将WiFi和蓝牙状态存入DataManager全局管理 2. 更新多语言文案,优化反馈提示文本 3. 修复校验密码页面清空错误提示逻辑 4. 重构设备恢复出厂设置流程,适配WiFi和蓝牙两种连接模式 5. 调整设备信息页面UI布局与绑定控件
61 lines
1.6 KiB
C#
61 lines
1.6 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Kill.Managers;
|
|
using Kill.Network;
|
|
using Kill.UI.Components;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
namespace Kill.UI.Pages
|
|
{
|
|
public class CheckPasswordPage : MonoBehaviour
|
|
{
|
|
class PasswordRequest
|
|
{
|
|
public string password;
|
|
}
|
|
public InputField passwordInput;
|
|
public Text errorText;
|
|
public GameObject plane;
|
|
public void OnEnable()
|
|
{
|
|
errorText.text="";
|
|
}
|
|
public async void OnConfirm()
|
|
{
|
|
errorText.text="";
|
|
LoadingUI.Show();
|
|
string password = passwordInput != null ? passwordInput.text : "";
|
|
if (string.IsNullOrEmpty(password))
|
|
{
|
|
errorText.text = LanguageManager.Instance.GetLanguage("100040");
|
|
LoadingUI.Hide();
|
|
return;
|
|
}
|
|
PasswordRequest requestData=new PasswordRequest
|
|
{
|
|
password=passwordInput.text
|
|
};
|
|
|
|
var response = await NetworkCtrl.Instance.Post<LoginResponse>("/api/v1/auth/password/verify", requestData);
|
|
|
|
LoadingUI.Hide();
|
|
|
|
if (response.Data.code == 200)
|
|
{
|
|
plane.SetActive(false);
|
|
gameObject.SetActive(false);
|
|
errorText.text="";
|
|
passwordInput.text="";
|
|
UIManager.Instance.isFirstTime=false;
|
|
}
|
|
else
|
|
{
|
|
errorText.text = LanguageManager.Instance.GetLanguage("100040");
|
|
passwordInput.text="";
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|