using Mini.Common; using Mini.Model; using Mini.Model.Entity; using Mini.Model.Enum; using Mini.Services.Bas; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace Mini.Web.WebHelper { public class ManagerPhoneHelper { private static IBasConfigService config = new BasConfigService(new EfAdminRepository(new crmContext())); public static string FormatPhoneUserName(string username) { DateTime now = DateTime.Now; string IsShowPhone = config.GetConfig(BasConfigEnums.IsShowPhone);//获取配置信息 if (IsShowPhone == "0")//不显示手机号码 { return PhoneHelper.FormatPhoneUserName(username); } else if (IsShowPhone == "8")//8位数数字直接屏蔽 { return PhoneHelper.Replace8Number(username); } else { return username; } } public static string GetIsShowPhone() { return config.GetConfig(BasConfigEnums.IsShowPhone);//获取配置信息 } } }