Hidistro.UI.Common.Controls/VMemberTemplatedWebControl.cs
(开头部分) 12KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
namespace Hidistro.UI.Common.Controls
{
using Hidistro.Core;
using Hidistro.Core.Entities;
using Hidistro.Entities.Members;
using Hidistro.SaleSystem.Vshop;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Data;
using System.IO;
using System.Net;
using System.Text;
using System.Web;
using System.Web.UI;
[PersistChildren(false), ParseChildren(true)]
public abstract class VMemberTemplatedWebControl : VshopTemplatedWebControl
{
protected VMemberTemplatedWebControl()
{
string userAgent = this.Page.Request.UserAgent;
MemberInfo currentMember = MemberProcessor.GetCurrentMember();
if ((currentMember != null) && (currentMember.Status == Convert.ToInt32(UserStatus.DEL)))
{
this.Page.Response.Redirect(Globals.ApplicationPath + "/logout.aspx");
}
SiteSettings masterSettings = SettingsManager.GetMasterSettings(true);
if (((currentMember == null) || (this.Page.Session["userid"] == null)) || (this.Page.Session["userid"].ToString() != currentMember.UserId.ToString()))
{
if (userAgent.ToLower().Contains("micromessenger"))
{
if (!masterSettings.IsValidationService)
{
this.Page.Response.Redirect(Globals.ApplicationPath + "/UserLogin.aspx?returnUrl=" + Globals.UrlEncode(HttpContext.Current.Request.Url.ToString()));
}
else
{
string msg = this.Page.Request.QueryString["code"];
this.WriteError(msg, "code值");
if (string.IsNullOrEmpty(msg))
{
if (!string.IsNullOrEmpty(this.Page.Request.QueryString["state"]))
{
this.Page.Response.Redirect(Globals.ApplicationPath + "/Default.aspx");
}
else
{
string str6 = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" + masterSettings.WeixinAppId + "&redirect_uri=" + Globals.UrlEncode(HttpContext.Current.Request.Url.ToString()) + "&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect";
this.WriteError(str6, "用户授权的路径");
this.Page.Response.Redirect(str6);
}
}
else
{
string responseResult = this.GetResponseResult("https://api.weixin.qq.com/sns/oauth2/access_token?appid=" + masterSettings.WeixinAppId + "&secret=" + masterSettings.WeixinAppSecret + "&code=" + msg + "&grant_type=authorization_code");
if (!responseResult.Contains("access_token"))
{
this.Page.Response.Redirect(Globals.ApplicationPath + "/Default.aspx");
}
后面还有 166 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
