BLL/Views/Users/FindPassWord.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BLL.Views.Users
{
public class FindPassWord : UAP.Razor.Page
{
public string find(string mobile, string pass, string code)
{
try
{
string primary_code = UAP.Session.Get("$findcode");
if (!primary_code.Equals(code)) return ("验证码不正确");
DataBase.Update("ec_users", "mobile='" + mobile + "'", new { pass = pass.Replace("'", "") });
return BLL.User.Login(mobile, pass);
}
catch (Exception ex)
{
return ex.Message;
}
}
/// <summary>
/// 短信验证码
/// </summary>
/// <param name="mobile"></param>
/// <returns></returns>
public string Send(string mobile)
{
try
{
string code = "1234";
#region 正式
//code = new Random().Next(1111, 9999).ToString();
//JSON ret = UAP.JSON.Decode(BLL.Msg.Send(mobile, "{no:\"" + code + "\"}", "戴跃雄", "SMS_88185005"));
//if (!ret.tryT<bool>("success", false)) throw new Exception(ret.String("message"));
#endregion
UAP.Session.Set("$findcode", code);
return "ok";
}
catch (Exception ex)
{
return ex.Message;
}
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。