QiFeng.ZWY.Api/Controllers/ConsumerController.cs
(开头部分) 43KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using log4net;
using QiFeng.LMSD.Api.Models;
using QiFeng.LMSD.Bll;
using QiFeng.LMSD.Model;
using QiFeng.LMSD.Model.EnumModel;
using QiFeng.LMSD.Utility;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Runtime.Serialization.Formatters.Binary;
using System.Text;
using System.Web;
using System.Web.Http;
namespace QiFeng.LMSD.Api.Controllers
{
public class ConsumerController : BaseApiController
{
private readonly ILog logger = LogManager.GetLogger(typeof(ConsumerController));
private readonly ConsumerBll _consumerBll = new ConsumerBll();
#region 登录注册
/// <summary>
/// 用户登录
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[HttpPost]
public Result<string> ConsumerLogin([FromBody]ConsumerLoginModel model)
{
Result<string> result = new Result<string>() { Status = false, Message = "系统错误" };
try
{
var strSign = model.random + model.userName + model.pwd;
if (!model.sign.Equals(EncryptionLibCbc.Encrypt(strSign)))
throw new FormatException("请求参数错误");
var consumerDetails = _consumerBll.ConsumerLogin(model.userName, model.pwd);
if (consumerDetails == null)
{
result.Status = false;
result.Message = "登录失败";
}
else
{
result.Status = true;
result.Message = "登录成功";
result.Data = EncryptionLibCbc.Encrypt(JsonTool.ObjToJsonAllInfo(consumerDetails));
}
}
catch (Exception ex)
{
result.Status = false;
#if DEBUG
后面还有 1041 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。