Beispiel #1
0
 /// <summary>
 /// 初始化登录接口
 /// </summary>
 /// <param name="uName"></param>
 /// <param name="uPass"></param>
 public void InitLogin(string uName, string uPass)
 {
     try
     {
         if (_jdLoginer == null)
         {
             _jdLoginer = new JDLoginer()
             {
                 r = new Random().NextDouble().ToString(),
                 //"6dc04d7e7f9b42aca76c1e2cce37059e15601070"
                 //"c7b303dc911d40729338dd10e4fd2238757832600"
                 eid = "6dc04d7e7f9b42aca76c1e2cce37059e15601070",
                 //WBIVASC7H6QRBITLOKI63TPLQXFMGD7T4A7P3PZLD6VAYCKL4GVQYJ5OHJCYRXIKSWQUYTCDQ4VUA
                 //"211f6cb42bee7b250c6a80b5c75b85ca"
                 //"b8b0d4ab226290696f575c771a2c72bc"
                 fp            = "211f6cb42bee7b250c6a80b5c75b85ca",
                 loginname     = uName,
                 loginpwd      = uPass,
                 cookies       = "",
                 chkRememberMe = ""
             };
         }
         _loginParams.Clear();
         GetLoginUI();
     }
     catch (Exception ex)
     {
         OtCom.XLogErr(ex.Message);
     }
 }
Beispiel #2
0
        /// <summary>
        /// 退出京东
        /// </summary>
        private void Logout()
        {
            //退出登录   https://passport.jd.com/uc/login?ltype=logout
            HttpItem     item   = new HttpItem();
            SFHttpHelper helper = new SFHttpHelper();
            HttpResult   result = new HttpResult();

            item.URL    = "https://passport.jd.com/uc/login?ltype=logout";
            item.Cookie = _jdLoginer.cookies;
            result      = helper.GetHtml(item);
            if (result != null)
            {
            }
            _jdLoginer = null;
            ShowGetMessage("退出京东登录");
        }
Beispiel #3
0
 /// <summary>
 /// 初始化登录接口
 /// </summary>
 /// <param name="uName"></param>
 /// <param name="uPass"></param>
 public void InitLogin()
 {
     try
     {
         if (_jdLoginer == null)
         {
             _jdLoginer = new JDLoginer()
             {
                 r = new Random().NextDouble().ToString(),
                 //loginname = uName,
                 //loginpwd = uPass,
                 cookies       = "",
                 chkRememberMe = ""
             };
         }
         _loginParams.Clear();
         GetLoginUI();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }