schangxiang@126.com
2025-04-04 be379ab0bf3acc85c135ceba5e6a0ce99c7bd58d
优化 修复检测bug
已添加1个文件
已修改2个文件
18 ■■■■ 文件已修改
Api/AuthorizeFile/licwms/DevLicense_LA23042_20250403114713.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Api/Dto/ValidateLicenseInput.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Api/Util/AuthorizeHelper.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Api/AuthorizeFile/licwms/DevLicense_LA23042_20250403114713.json
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,4 @@
{
  "LicenseData": "WZ7UY415L8zvhzlSMT7xcaKyNrYGDsazZWngC\u002BOpPoO6W1hscH5qdO6jwh38DT0ALHmTQAno9A4vz2/8LlPEzD4RpXOMPiwUL7CJdfhnaPKYntx57wSbiRCxrFJ9yTsOWx73l3IrLdxLuBvCEhOhlcOWCX8bsPXUYaPraKP1twI=",
  "Signature": "tMf\u002BVuxwKPwDzAE8n\u002B5ETkflqiyMjdguVHeqQNp\u002Bpts="
}
Api/Dto/ValidateLicenseInput.cs
@@ -3,8 +3,13 @@
    public class ValidateLicenseInput
    {
        /// <summary>
        /// é¢„警天数配置
        /// é¢„警天数配置(选填)
        /// </summary>
        public int? WaringDays { get; set; }
        /// <summary>
        /// æŽˆæƒæ–‡ä»¶å¤¹å(选填)
        /// </summary>
        public string? LicenseFolerName { get; set; }
    }
}
Api/Util/AuthorizeHelper.cs
@@ -17,11 +17,16 @@
        {
            try
            {
                var licenseFolerName = input.LicenseFolerName;
                if (string.IsNullOrEmpty(licenseFolerName))
                {
                    licenseFolerName = "lic";
                }
                //1、获取mac地址
                var macAddresses = EnDecode.GetAllMacAddresses();
                //2、找到 æŽˆæƒæ–‡ä»¶
                string baseDir = AppDomain.CurrentDomain.BaseDirectory;
                DirectoryInfo theFolder = new DirectoryInfo(baseDir + @"\\AuthorizeFile\\lic");
                DirectoryInfo theFolder = new DirectoryInfo(baseDir + @"\\AuthorizeFile\\" + licenseFolerName);
                //遍历文件,读取第一个文件
                var files = theFolder.GetFiles();
                if (files.Length == 0)