/// <summary> /// localhost门店登录、ip门店登录 /// </summary> public LoginDnsModel ipLocalhostStore(string localhost, string ip1, string ip2, string ip3, string ip4, string Cid, string Sid) { LoginDnsModel csid = new LoginDnsModel(); csid.Cid = Cid; csid.Sid = Sid; //localhost门店登录 if (!localhost.IsNullOrEmpty()) { if (localhost.ToLower().Contains("localhost")) { csid.Message = "localhost"; } else { csid.Message = "发生错误"; } } //ip门店登录 else if (!ip1.IsNullOrEmpty() && !ip2.IsNullOrEmpty() && !ip3.IsNullOrEmpty() && !ip4.IsNullOrEmpty()) { csid.Message = "ip"; } //禁止访问(比如:erp.qcterp.com/store3-1) else if (!ip1.IsNullOrEmpty() && !ip2.IsNullOrEmpty() && !ip3.IsNullOrEmpty() && ip4.IsNullOrEmpty()) { csid.Message = "禁止访问"; } else { csid.Message = "发生错误"; } return(csid); }
/// <summary> /// 获取商户号和门店ID(域名) /// </summary> /// <param name="cidSid"></param> /// <returns></returns> public LoginDnsModel GetCidSid(string s_cid, string s_sid) { //测试 bool aa = IsNumeric("0"); bool bb = IsNumeric("1"); LoginDnsModel csid = new LoginDnsModel(); string Cid = s_cid; string Sid = s_sid; //格式错误 if (string.IsNullOrEmpty(Cid) || string.IsNullOrEmpty(Sid)) { csid.Message = "格式错误"; return(csid); } else { //Cid或者Sid没有大于0 if (!IsNumeric(Cid) || !IsNumeric(Sid)) { csid.Message = "域名的store后面必须是数字"; return(csid); } else { csid.Message = "success"; csid.Cid = Cid; csid.Sid = Sid; return(csid); } } }