Example #1
0
        /// <summary>
        /// 判断是不是公司内部网络,公司网络信息在数据库中
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public static bool IsInternalNetwork(this PinhuaContext context)
        {
            var ip1 = context.WeixinClockOptions.FirstOrDefault().Ip;
            var ip2 = context.ClientIp();

            return(ip1.Equals(ip2));
        }