Esempio n. 1
0
        private void ck_phone(HttpContext context)
        {
            string phone = AppRequest.GetQueryString("phone", true);//电话号码

            if (!Regexlib.IsValidMobile(phone))
            {
                context.Response.Write(JsonHelper.ObjectToJSON(new { succeess = false, msg = "电话号码格式不正确" }));
                return;
            }
            try
            {
                if (LimitPhoneHelper.IsContains(phone))
                {
                    context.Response.Write(JsonHelper.ObjectToJSON(new { succeess = false, msg = "注册失败,网络错误" }));
                    return;
                }
                //string ckStatus = Utils.HttpGetUtf("http://monitor.qianniusoft.com/api/userBlacklist/ckUserBlackList?UserPhone=" + phone);
                //Dictionary<string, object> dicCK = JsonHelper.DataRowFromJSON(ckStatus);
                //if (dicCK.Count > 0)
                //{
                //    bool succuss = (bool)dicCK["succeess"];
                //    string msg = dicCK["msg"].ToString();
                //    if (!succuss)
                //    {
                //        context.Response.Write(JsonHelper.ObjectToJSON(new { succeess = false, msg = msg }));
                //        return;
                //    }
                //}
                //else
                //{
                //    context.Response.Write(JsonHelper.ObjectToJSON(new { succeess = false, msg = "注册失败,网络错误" }));
                //    return;
                //}
            }
            catch (Exception ex)
            {
            }
            context.Response.Write(JsonHelper.ObjectToJSON(new { succeess = true, msg = "该号码可以注册" }));
            return;
        }