EasyShop/api/QQLogin_return.aspx.cs

(开头部分) 5KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MyModels;
using System.Data;
using conn;
using Common;
using ExeSql;
using BLL;
using System.Configuration;
using System.Net;
using System.IO;
using System.Text;
namespace EasyShop.api
{
    public partial class QQLogin_return : System.Web.UI.Page
    {
        // Methods
        public string jsString = string.Empty;
        private void BindData()
        {
            string flag = "0";
            if ((this.Page.Request["code"] != null) && (this.Page.Request["code"] != string.Empty))
            {
                string str2 = this.Page.Request["code"].ToString();
                string str3 = ConfigurationManager.AppSettings.Get("QQappid");
                string str4 = ConfigurationManager.AppSettings.Get("QQkey");
                string str5 = HttpContext.Current.Server.UrlEncode(ConfigurationManager.AppSettings.Get("QQreturnUrl"));
                string str6 = this.QzoneGet(string.Format("https://graph.qq.com/oauth2.0/token?grant_type=authorization_code&client_id={0}&client_secret={1}&code={2}&redirect_uri={3}", new object[] { str3, str4, str2, str5 }));
                if (str6.IndexOf("access_token") != -1)
                {
                    string[] strArray = str6.Split(new char[] { '&' });
                    if (strArray.Length > 0)
                    {
                        string para = this.QzoneGet("https://graph.qq.com/oauth2.0/me?" + strArray[0]);
                        string openid = string.Empty;
                        openid = this.GetForMat(para, out flag);
                        if (flag == "1")
                        {
                            TB_MC_User tmu = new TB_MC_User();
                            int memberid = tmu.CheckIsBindByOpenID(openid);
                            if (memberid == 0)
                            {
                                base.Server.Transfer("/api/QQbind.aspx?openid=" + openid);
                            }
                            else
                            {
                                this.login(memberid);
                                base.Response.Redirect("/PersonCenter/Member_Center.aspx");
                            }
                        }
                    }
                }
            }
            if (flag == "0")
            {
                base.Response.Clear();
后面还有 79 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。