示例#1
0
        // 获取手机号码,并填入网页中
        private string EnterPhone()
        {
            string phoneNum = "";

            for (int i = 0; i < 5; i++)
            {
                phoneNum = SmsApi.GetPhone("2");
                if (string.IsNullOrEmpty(phoneNum) || phoneNum == "未获取到号码")
                {
                    LogManager.WriteLog("未获取到号码,等待5秒钟");
                    Thread.Sleep(5000);
                }
                else
                {
                    break;
                }
            }
            new Thread(() => {
                string js2run =
                    "document.getElementById('J_PhoneInput').value = '{0}';".With(phoneNum) +
                    "document.getElementsByClassName('btn-b tsl')[1].click();";
                CefFrameHelper.ExcuteJs(_mfForm.MainCefFrame, js2run);
                LogManager.WriteLog("{0} is fill ".With(phoneNum));
            }).Start();
            Thread.Sleep(2000);
            Application.DoEvents();
            TB_TB_TELNUM.Text = phoneNum;
            return(phoneNum);
        }
示例#2
0
        public void BT_ZFB_REG_TB_REG_SJ_Click(object sender, EventArgs e)
        {
            //1.login
            SmsConfigHelper.GetConfigOfSms();
            if (!SmsApi.logined)
            {
                LogManager.WriteLog("登录失败");
                return;
            }
            //2.
            TB_ZFB_REG_TB_ShouJi.Text = SmsApi.GetPhone("2");

            string js2run =
                "document.getElementById('J_PhoneInput').value = '{0}';".With(TB_ZFB_REG_TB_ShouJi.Text.Trim()) +
                "document.getElementsByClassName('btn-b')[0].click();";

            CefFrameHelper.ExcuteJs(_mfForm.MainCefFrame, js2run);

            Application.DoEvents();
            new Thread(() => {
                Thread.Sleep(2000);
                BT_ZFB_REG_TB_SMS_ENTERVCODE_Click(sender, e);
            }).Start();
            //    BT_ZFB_REG_TB_SMS_ENTERVCODE_Click(sender, e);
        }
示例#3
0
文件: JikeSms.cs 项目: cnucky/huan
 public string GetPhone(SmsServer smstype)
 {
     return(SmsApi.GetPhone(ConvertServerId2(smstype)));
 }
示例#4
0
文件: JikeSms.cs 项目: cnucky/huan
 public void TestGetPhone()
 {
     GetConfigOfSms();
     Console.WriteLine(SmsApi.GetPhone(ConvertServerId2(SmsServer.zfb_reg_vcode)));
     ;
 }