Example #1
0
        protected void reg_send_submit_Click1(object sender, System.EventArgs e)
        {
            string mobile = this.cell_txt.Value;

            //验证码
            Session["code1"] = DateTime.Now.Millisecond.ToString();
            //验证码时间
            Session["codetime1"] = DateTime.Now.ToString();

            CCPRestSDK api = new CCPRestSDK();

            bool isInit = api.init("app.cloopen.com", "8883");
            api.setAccount("8a48b5514f73ea32014f848582a61f2d", "42d2934251534741ab39067f67645812");
            api.setAppId("8a48b5514f73ea32014f84882bd81f2f");

            string[] data = { Session["code1"].ToString(), "5" };

            if (isInit)
            {
                api.SendTemplateSMS(mobile, "34439", data);

            }

            Response.Redirect("updatePassB.aspx?mobile=" + mobile);
        }
Example #2
0
        protected void reg_send_submit_Click(object sender, EventArgs e)
        {
            string mobile = this.cell_txt.Value;

              resp res = new resp();

              res = Util.GetResp("http://120.27.45.83:8085/api/User/ValidatePhone", "Phone=" + mobile);

              if (res.code == 1000)
              {

                  //验证码
                  Session["code"] = DateTime.Now.Millisecond.ToString();
                  //验证码时间
                  Session["codetime"] = DateTime.Now.ToString();

                  CCPRestSDK api = new CCPRestSDK();

                  bool isInit = api.init("app.cloopen.com", "8883");
                  api.setAccount("8a48b5514f73ea32014f848582a61f2d", "42d2934251534741ab39067f67645812");
                  api.setAppId("8a48b5514f73ea32014f84882bd81f2f");

                  string[] data = { Session["code"].ToString(), "5" };

                  if (isInit)
                  {
                      api.SendTemplateSMS(mobile, "34439", data);

                  }

                  Response.Redirect("registB.aspx?mobile=" + mobile );

              }
              else
              {

                  Response.Write("<script>alert('您的手机号已被注册过!')</script>");
              }
        }
Example #3
0
        protected void repeatBt_Click(object sender, EventArgs e)
        {
            Session.Remove("code1");

            Session.Remove("codetime1");
            //验证码
            Session["code1"] = DateTime.Now.Millisecond.ToString();
            //验证码时间
            Session["codetime1"] = DateTime.Now.ToString();

            CCPRestSDK api = new CCPRestSDK();

            bool isInit = api.init("app.cloopen.com", "8883");
            api.setAccount("8a48b5514f73ea32014f848582a61f2d", "42d2934251534741ab39067f67645812");
            api.setAppId("8a48b5514f73ea32014f84882bd81f2f");

            string[] data = { Session["code1"].ToString(), "5" };

            if (isInit)
            {
                api.SendTemplateSMS(Request.QueryString["mobile"].ToString(), "34439", data);

            }
        }