基本信息
源码名称:cs第三方使用微信授权登录
源码大小:0.07M
文件格式:.rar
开发语言:C#
更新时间:2020-08-12
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):78630559

本次赞助数额为: 5 元 
   源码介绍

cs第三方使用微信授权登录,实现第三方调用。

        public void checkLoginState()
        {
            //Thread th = new Thread(() =>
            //{
                while (!true)  //isLoginSucess
                {
                    TimeSpan ts = DateTime.Now - new DateTime(1970, 1, 1, 0, 0, 0, 0);
                    //MessageBox.Show(sendLoginConfirm("https://login.weixin.qq.com/cgi-bin/mmwebwx-bin/login?" "tip=0&uuid=" UUID "&_=" Convert.ToInt64(ts.TotalSeconds).ToString()));
                    String LoginStateMessage = sendLoginConfirm(@"https://login.weixin.qq.com/cgi-bin/mmwebwx-bin/login?loginicon=true&uuid=" UUID @"&tip=0&_=" Convert.ToInt64(ts.TotalSeconds).ToString());
                    String LoginStateCode = LoginStateMessage.Substring(LoginStateMessage.IndexOf("=") 1, LoginStateMessage.IndexOf(";") - LoginStateMessage.IndexOf("=") - 1);
                    MessageBox.Show(LoginStateMessage);
                    if (LoginStateCode == "201")
                    {
                        //扫码后 没确认登录
                        richTextBox1.AppendText("已扫码,等待确认.");
                        String bHeadImgBase64 = LoginStateMessage.Substring(LoginStateMessage.IndexOf("\'") 1, LoginStateMessage.LastIndexOf("\'") - LoginStateMessage.IndexOf("\'") - 1);
                        String aHeadImgBase64 = bHeadImgBase64.Split(',')[1];
                        byte[] arr = Convert.FromBase64String(aHeadImgBase64);
                        MemoryStream ms = new MemoryStream(arr);
                        Bitmap bmp = new Bitmap(ms);
                        this.pictureBox1.BackgroundImage = bmp;
                    }
                    else if (LoginStateCode == "200")
                    {
                        //扫码后 已经确认登录
                        richTextBox1.AppendText( "已登录.");
                        MessageBox.Show(LoginStateMessage);

                    }
                    else
                    {
                        flushQRCode();
                    }
                    Thread.Sleep(1000);
                }
            //});
            //th.Start();
        }