schangxiang@126.com
2025-09-16 215cd8f05f4de1da31a611649bc21a26ec829115
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using iWareCommon.Utils;
using iWareDataCore.RBAC.Service;
using iWarePod.Properties;
using iWarePod.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
 
namespace iWarePod.Controllers
{
    public class AuthController : Controller
    {
        //
        // GET: /Auth/
 
        public ActionResult Index()
        {
            return View();
        }
        /// <summary>
        /// 获取客户端
        /// </summary>
        /// <returns>是否运行访问</returns>
        [HttpPost]
        public ActionResult GetAuth()
        {
            string msg;
            var mac = IpHelper.GetMacAddress(System.Web.HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"]);
            LogTextHelper.WriteLine(Resources.LogDir,"登录的IP:{0}",mac);
            return Json(new { Result = MacAuthService.GetInstance().GetAuth(mac, out msg), Message = msg }, JsonRequestBehavior.DenyGet);
        }
 
    }
}