diff --git a/RustTools/ApiFox/user.cs b/RustTools/ApiFox/user.cs index 86a1d2f..279deca 100644 --- a/RustTools/ApiFox/user.cs +++ b/RustTools/ApiFox/user.cs @@ -1,15 +1,25 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Security.Principal; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; using RustTools.muqing; +using RustTools.Views; namespace RustTools.ApiFox; +#pragma warning disable CS8981 // 该类型名称仅包含小写 ascii 字符。此类名称可能会成为该语言的保留值。 +#pragma warning disable IDE1006 // 命名样式 public class user { + /// + /// 登陆 + /// + /// + /// + /// public static async Task loginPc(string account, string passWord) { var pattern = @"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$"; @@ -17,20 +27,57 @@ public class user //gj.sc(account + " " + v); //这里不知道为什么会出现 True 而不是 true 导致识别邮箱失败 var task = await wl.postAsync("/php/user.php?action=loginPc", new string[][] { - new string[]{ "account",account}, - new string[]{ "passWord", passWord }, - new string[]{ "isEmail", v.ToString().ToLower() } + new[]{ "account",account}, + new[]{ "passWord", passWord }, + new[]{ "isEmail", v.ToString().ToLower() } }); return task; } + + /// + /// 获取信息 + /// + /// + /// public static async Task SpaceInfo(string account) { - var pattern = @"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$"; - var v = Regex.IsMatch(account, pattern); var task = await wl.postAsync("/php/user.php?action=getSpaceInfo", new string[][] { - new string[]{ "account",account} + new[]{ "account",account} }); return task; } + + + /// + /// 注册 + /// + /// + /// + /// + /// + /// + public static async Task register(string account,string userName,string passWord,string email) + { + var task = await wl.postAsync("/php/user.php?action=register", new string[][] + { + new []{ "account",account}, + new []{ "userName", userName }, + new []{ "passWord", passWord }, + new []{ "email", email }, + new []{ "appID",gj.GetUUID()} + }); + return task; + } + + public static async Task enableAccount(string account, string key) + { + var task = await wl.postAsync("/php/user.php?action=enableAccount", new string[][] + { + new []{ "account",account}, + new []{ "key", key } + }); + return task; + } + } diff --git a/RustTools/README.md b/RustTools/README.md index 794c2ca..5f7171f 100644 --- a/RustTools/README.md +++ b/RustTools/README.md @@ -1,8 +1,11 @@  ## 开始使用 -如果你的电脑是win10+可以使用Visual Studio或Visual Studio Code 来运行此源码。 + Windows10系统版本以上 + Visual Studio Code + Visual Studio + JetBrains Rider ## 发布和安装 -在VS 2022上面运行此源码后选择证书签名,打包后.msix文件点击运行,如果提示证书问题请双击.cer文件
+在Visual Studio上面运行此源码后选择证书签名,打包后.msix文件点击运行,如果提示证书问题请双击.cer文件
点击安装证书,储存位置选择本地计算机 选择自定义储存为 受信任的根证书颁发机构 下一步保存即可 ## 注意事项 @@ -27,32 +30,16 @@ WinUI还是比较冷门的一个技术,代码和例子都不多 关于编译器 其实开发电脑版是作者对于铁锈的热爱开发的,请大家多多支持,开发不易。 ## 反馈 + 我们目前没有写反馈的接口和功能 你可以加群 点击链接加入群聊【铁锈助手】:https://qm.qq.com/q/dUfOK04pj2 在此反馈 ## 特别鸣谢 (参与项目开发) - -
- - + - -

薄荷

-
- + height: 66px;" alt="薄荷"/> + ## 开源协议 虽然没什么用但还是要写一写 diff --git a/RustTools/Themes/LoginPage.xaml b/RustTools/Themes/LoginPage.xaml index 648c6dd..a2e4ee4 100644 --- a/RustTools/Themes/LoginPage.xaml +++ b/RustTools/Themes/LoginPage.xaml @@ -91,7 +91,7 @@