protected void Page_Load(object sender, EventArgs e) { Response.ContentType = "text/plain"; string code = WEBRequest.GetQueryString("code"); string requestUrl = WEBRequest.GetQueryString("url"); WeiXinApi jssdk = new WeiXinApi(); jssdk.InitApi(); jssdk.WXCode = code; jssdk.RequestURL = requestUrl; System.Collections.Hashtable hs = jssdk.getSignPackage(); WeiXinSignInfo signInfo = new WeiXinSignInfo(); signInfo.appid = hs["appId"].ToString(); signInfo.nonceStr = hs["nonceStr"].ToString(); signInfo.timeStamp = hs["timestamp"].ToInt(0); signInfo.signature = hs["signature"].ToString(); string callBackFunc = WEBRequest.GetQueryString("callback"); if (callBackFunc.IsNotEmpty()) { string jsonStr = callBackFunc + "(" + JsonHelper.ToJson(signInfo) + ");"; Response.Write(jsonStr); } else { string jsonStr = JsonHelper.ToJson(signInfo); Response.Write(jsonStr); } Response.End(); }
protected void Page_Load(object sender, EventArgs e) { strAction = WEBRequest.GetQueryString("action"); if (strAction == "") { if (!IsPostBack) { Guid?userId = WebUserAuth.UserId; if (userId != Guid.Empty) { TuanDai.PortalSystem.BLL.UserBLL userbll = new PortalSystem.BLL.UserBLL(); TuanDai.PortalSystem.Model.UserBasicInfoInfo userInfo = userbll.GetUserBasicInfoModelById(userId.Value); if (userInfo != null) { NickName = userInfo.NickName; } GetData(userId); } } } else if (strAction == "GetFinanceDraw") { GetFinanceDraw(); } }
protected void Page_Load(object sender, EventArgs e) { string action = WEBRequest.GetQueryString("action"); if (action == "") { code = WEBRequest.GetQueryString("code"); ExtendKey = WEBRequest.GetQueryString("ExtendKey"); if (!IsPostBack) { this.InitPageData(); //前台不允许图像为空 if (GodHeadImage.IsEmpty()) { GodHeadImage = "images/imgdone.jpg"; } if (GodShowName.ToText().IsEmpty()) { GodShowName = "团贷网"; } } } else if (action == "DoMakeWealthGod") { DoMakeWealthGod(); } else if (action == "GetGodSendRedPacket") { GetGodSendRedPacket(); } }
//protected string theBackUrl = TuanDai.WXApiWeb.GlobalUtils.IsWeiXinBrowser ? "/WeiXinIndex.aspx" : "/Index.aspx"; protected void Page_Load(object sender, EventArgs e) { Response.Redirect("//m.tuandai.com/pages/downOpenApp.aspx", true); return; //if (GoBackUrl.ToText() != "") // theBackUrl = GoBackUrl; string appActivityToken = Tool.WEBRequest.GetString("t"); if (appActivityToken.IsNotEmpty()) { pageType = "18"; } else { pageType = WEBRequest.GetQueryString("type"); } if (!IsPostBack) { this.IsShowRightBar = GlobalUtils.IsWeiXinBrowser ? false : true; ProjectBLL bll = new ProjectBLL(); //if (bll.WXGetCanInvestProjectCount() == 0) //{ // Response.Redirect("/pages/invest/invest_list_empty.aspx"); // return; //} //从App跳转过来这里不用加载数据 if (pageType.IsEmpty()) { GetProjectList(bll); } } }
protected void Page_Load(object sender, EventArgs e) { IsWeNewHand = WEBRequest.GetString("isWeNewHand", "0") == "1"; IsWeFQB = WEBRequest.GetString("isWeFQB", "0") == "1"; if (IsWeFQB || IsWeNewHand) { Guid? productId = Tool.SafeConvert.ToGuid(WEBRequest.GetQueryString("productid")); WeProductBLL bll = new WeProductBLL(); //model = bll.GetWeProductInfo(productId.Value); if (GlobalUtils.IsRedis && GlobalUtils.IsWePlanRedis) { string err = string.Empty; var weRedisInfo = TuanDai.RedisApi.Client.WePlanRedis.GetWePlanRedisByProductIdJson(productId.Value, out err, TdConfig.ApplicationName); if (weRedisInfo != null) { model = JsonConvert.DeserializeObject <WeProductDetailInfo>(weRedisInfo); } if (model == null || !string.IsNullOrEmpty(err)) { model = new WeProductBLL().GetWeProductInfo(productId.Value); } } else { model = new WeProductBLL().GetWeProductInfo(productId.Value); } if (model == null) { model = new WeProductDetailInfo(); } } }
protected bool IsAct1248 = false; //是否1218后显示 protected void Page_Load(object sender, EventArgs e) { StatusTab = WEBRequest.GetQueryString("tab"); if (StatusTab == "") { StatusTab = "Inprogress"; } TypeTab = WEBRequest.GetQueryString("typeTab"); if (TypeTab == "") { TypeTab = "WePlan"; } OrderTab = WEBRequest.GetQueryString("orderTab"); if (OrderTab == "") { OrderTab = "1"; } WebSettingBLL webSettingBll = new WebSettingBLL(); curSellSet = webSettingBll.GetWebSettingInfo("B11558CB-3C6B-4DAD-9D2F-D6D2DE13CCF7"); if (DateTime.Now >= DateTime.Parse(curSellSet.Param1Value) && DateTime.Now <= DateTime.Parse("2016-12-25 23:59:59")) { IsAct1248 = true; } }
protected void Page_Load(object sender, EventArgs e) { CurrTab = WEBRequest.GetQueryString("tab"); if (CurrTab == "") { CurrTab = "Inprogress"; } }
protected void Page_Load(object sender, EventArgs e) { strAction = WEBRequest.GetQueryString("action"); if (strAction.ToLower() == "register") { submitData(); } }
protected void Page_Load(object sender, EventArgs e) { CurTabName = WEBRequest.GetQueryString("tab"); if (string.IsNullOrEmpty(CurTabName)) { CurTabName = "Traning"; } }
protected void Page_Load(object sender, EventArgs e) { this.returnUrl = WEBRequest.GetQueryString("ReturnUrl"); LoginType = CookieHelper.GetCookie("WXLoginType"); code = WEBRequest.GetQueryString("code"); //微信登录时从cookie中没法取到 if (LoginType.ToText().IsEmpty()) { LoginType = WEBRequest.GetQueryString("state"); CookieHelper.WriteCookie("WXLoginType", LoginType); } if (returnUrl.ToText().IsEmpty()) { returnUrl = "/Member/my_account.aspx"; } if (code.ToText() == "") { //授权失败时返回到登录框 Response.Redirect("/user/Login.aspx?ReturnUrl=" + returnUrl); return; } //判断当前第三方帐号是否有绑定过,若有绑定过直接登录。 ThirdLoginSDK shareSdk = new ThirdLoginSDK(); shareSdk.InitSDK(ThirdLoginSDK.GetLoginType(LoginType.ToString())); //根据code获取第三方用户信息 ThirdLoginSDK.ThirdUserInfo mUserInfo = shareSdk.GetUserSampleInfo(code); if (LoginType.ToInt(0) == (int)ThirdLoginSDK.ThirdLoginType.QQ) { CookieHelper.WriteCookie("OpenId", Tool.Cryptography.TripleDESEncrypt(mUserInfo.UId)); } else if (LoginType.ToInt(0) == (int)ThirdLoginSDK.ThirdLoginType.Sina) { CookieHelper.WriteCookie("weiboUserId", mUserInfo.UId); } else if (LoginType.ToInt(0) == (int)ThirdLoginSDK.ThirdLoginType.WeiXin) { CookieHelper.WriteCookie("weixinUserId", mUserInfo.UId); } CookieHelper.WriteCookie("ThirdLoginUserInfo", JsonHelper.ToJson(mUserInfo)); UserBLL userbll = new UserBLL(); SqlParameter[] paramData = new SqlParameter[] { new SqlParameter("@ThirdPartyId", mUserInfo.UId) }; UserBasicInfoInfo model = userbll.WXGetUserBasicInfo("ThirdPartyId=@ThirdPartyId", paramData); if (model != null) { //先前已绑定过,就直接登录 WXRegister.UserLogin(model); Response.Redirect(this.returnUrl); return; } }
protected void Page_Load(object sender, EventArgs e) { CurTabName = WEBRequest.GetQueryString("tab"); curPageUrl = BasePage.GetEncodeBackURL("/Member/Repayment/my_debt_transferlist.aspx"); if (CurTabName == "") { CurTabName = "CanTran"; } }
protected void Page_Load(object sender, EventArgs e) { pageType = WEBRequest.GetQueryString("pageType"); if (!IsPostBack) { //Response.Redirect(GlobalUtils.WebURL+"/Member/Cgt/OpenCgt.aspx?pageType="+pageType); InitFormData(); } }
protected void Page_Load(object sender, EventArgs e) { weOrderId = WEBRequest.GetGuid("weorderid"); tab = WEBRequest.GetQueryString("tab"); if (!IsPostBack) { SetModel = new WebSettingBLL().GetWebSettingInfo("5E08DFE3-6CED-4E71-8CF9-2A2E3BAC9036"); LoadData(); } }
protected void Page_Load(object sender, EventArgs e) { extendKey = WEBRequest.GetQueryString("extendKey"); //t = WEBRequest.GetQueryString("t"); //Response.Redirect(GlobalUtils.WebURL + "/pages/app/find/DailyCommission.aspx?t=" + t + "&extendkey=" + extendKey); if (!IsPostBack) { // this.IsShowRightBar = GlobalUtils.IsWeiXinBrowser ? false : true; this.GetData(); } }
protected void Page_Load(object sender, EventArgs e) { string code = WEBRequest.GetQueryString("code"); if (!IsPostBack) { ThirdLoginSDK sdkApi = new ThirdLoginSDK(); sdkApi.InitSDK(ThirdLoginSDK.ThirdLoginType.WeiXin); string SelfOpenId = sdkApi.GetCookieOpenId(code); } }
protected void Page_Load(object sender, EventArgs e) { this.returnUrl = WEBRequest.GetQueryString("ReturnUrl"); LoginType = CookieHelper.GetCookie("WXLoginType").ToInt(0); code = WEBRequest.GetQueryString("code"); if (this.returnUrl.IsEmpty()) { this.returnUrl = "/Member/my_account.aspx"; } }
protected void Page_Load(object sender, EventArgs e) { string ExtendKey = WEBRequest.GetQueryString("ExtendKey"); string requestURL = "https://open.weixin.qq.com/connect/oauth2/authorize?appid={0}&redirect_uri={1}&response_type=code&scope=snsapi_base&state=123#wechat_redirect"; string callBackURL = GlobalUtils.WebURL + "/Activity/GodWealth/WealthPage.aspx?ExtendKey=" + ExtendKey; requestURL = string.Format(requestURL, GlobalUtils.AppId, callBackURL); Response.Redirect(requestURL); }
protected void Page_Load(object sender, EventArgs e) { SubscribeId = WEBRequest.GetGuid("SubscribeId", ""); projectTitle = WEBRequest.GetQueryString("Title"); projectId = WEBRequest.GetGuid("projectid", ""); CurrTab = WEBRequest.GetQueryString("tab"); if (!IsPostBack) { subscribeInfo = WXGetSubscribeInfo(SubscribeId); Status = WXConverter.GetSubscribeStatusString(99, subscribeInfo.Status, subscribeInfo.IsBorrow); BindList(); } }
protected void UpdateHelpTopStepNum() { int reqId = WEBRequest.GetQueryInt("id", 0); string feedback = WEBRequest.GetQueryString("feedtype"); WXHelpService.UpdateHelpTopStepNum(reqId, feedback); var jsonObj = new { result = "1", msg = "" }; var jsonString = TuanDai.WXSystem.Core.JsonHelper.ToJson(jsonObj); this.Context.Response.Write(jsonString); this.Context.Response.End(); }
protected void Page_Load(object sender, EventArgs e) { string action = WEBRequest.GetQueryString("action"); if (action == "getebpaycheck") { GetEBPayCheck(); } else if (action == "confirmpay") { ConfirmPay(); } }
protected void Page_Load(object sender, EventArgs e) { IsInWeiXin = GlobalUtils.IsWeiXinBrowser ? 1 : 0; try { string postString = string.Empty; string action = Tool.WEBRequest.GetQueryString("action").ToLower(); string strValidatePass = Tool.WEBRequest.GetQueryString("validatePass"); if (strValidatePass == "tuandaiisgood") { string openId = WEBRequest.GetQueryString("openid"); if (openId.IsEmpty()) { openId = GlobalUtils.OpenId; } string weburl = GlobalUtils.MTuanDaiURL; if (action == "newhand") { List <WeiXinApi.PicTextArticleItemInfo> newsList = new List <WeiXinApi.PicTextArticleItemInfo>(); newsList.Add(new WeiXinApi.PicTextArticleItemInfo { title = "新手福利-518红包,体验金等好礼", description = "新手福利-518红包,体验金等好礼", picurl = weburl + "/imgs/push/banner_newhand.png?v=20160831003", url = "https://mvip.tdw.cn/pages/invest/invest_newHand.aspx" }); newsList.Add(new WeiXinApi.PicTextArticleItemInfo { title = "平台的安全保障", description = "平台的安全保障", picurl = weburl + "/imgs/push/icon_safety.png?v=20160831003", url = "http://info.tdw.cn/wap/help/second-question.html?cid=20" }); newsList.Add(new WeiXinApi.PicTextArticleItemInfo { title = "如何投资", description = "如何投资", picurl = weburl + "/imgs/push/icon_invest.png?v=20160831003", url = "http://info.tdw.cn/wap/help/second-question.html?cid=15" }); newsList.Add(new WeiXinApi.PicTextArticleItemInfo { title = "关于提现和管理费", description = "关于提现和管理费", picurl = weburl + "/imgs/push/icon_withdraw.png?v=20160831003", url = "http://info.tdw.cn/wap/help/second-question.html?cid=16" }); WeiXinApi.SendPicTextMessageToUser(openId, newsList); } else if (action == "hotrecommend") { List <WeiXinApi.PicTextArticleItemInfo> newsList = new List <WeiXinApi.PicTextArticleItemInfo>(); newsList.Add(new WeiXinApi.PicTextArticleItemInfo { title = "智能投标-We计划", description = "智能投标-We计划", picurl = weburl + "/imgs/push/banner_we.png?v=20160831003", url = weburl + "/pages/invest/WE/WE_list.aspx" }); newsList.Add(new WeiXinApi.PicTextArticleItemInfo { title = "邀请有礼", description = "邀请有礼", picurl = weburl + "/imgs/push/icon_gift.png?v=20160831003", url = "https://hd.tdw.cn/weixin/Invite/InviteIndex.aspx" }); WeiXinApi.SendPicTextMessageToUser(openId, newsList); } } } catch (Exception ex) { SysLogHelper.WriteErrorLog("微信关注推送图文消息失败", "错误详细信息:" + ex.Message + "|" + ex.StackTrace); } }
protected void Page_Load(object sender, EventArgs e) { TransterId = WEBRequest.GetGuid("subid"); CurTabName = WEBRequest.GetQueryString("tab"); if (TransterId == Guid.Empty) { Response.Redirect("/Member/my_account.aspx"); return; } if (!IsPostBack) { LoadData(); } }
protected void Page_Load(object sender, EventArgs e) { weOrderId = SafeConvert.ToGuid(WEBRequest.GetQueryString("OrderId")); Guid userid = WebUserAuth.UserId.Value; if (userid == null || userid == Guid.Empty) { Response.Redirect("/user/login.aspx?ReturnUrl=" + Request.Url.AbsolutePath); return; } WeOrderBLL webll = new WeOrderBLL(); model = webll.GetWeOrderInfoById(weOrderId.Value); }
protected void Page_Load(object sender, EventArgs e) { SubscribeId = WEBRequest.GetGuid("SubscribeId", ""); ProjectId = WEBRequest.GetGuid("ProjectId", ""); tab = WEBRequest.GetQueryString("tab"); if (!IsPostBack) { projectInfo = projectBll.GetProjectDetailInfo(ProjectId); if (projectInfo.Type == 18) { //私募宝 ProjectSMBLL projectSmbll = new ProjectSMBLL(); projectSmb = projectSmbll.GetProjectSMModel(projectInfo.Id); simubaoCurve = projectBll.GetSimubaoCurve(UserId, SubscribeId); } subscribeInfo = projectBll.WXGetSubscribeInfo(SubscribeId); TenderMode = WXConverter.GetTenderModeString(subscribeInfo.TenderMode); if (projectInfo.Type == 23) { ProjectXMBBLL xmbbll = new ProjectXMBBLL(); if (subscribeInfo.Status.Value.ToString().IsIn("3", "4")) { xmbReturn = xmbbll.GetXMBReturnDetail(subscribeInfo.SubscribeId); xmbDSInterest = xmbReturn.ReturnAmount - xmbReturn.Amount; xmbHoldDay = xmbReturn.HoldDay; xmbDeadRate = xmbReturn.InterestRate; } else { Tuple <int, decimal, decimal, string> tupleObj = BusinessDll.Invest.GetXMBProjectFloatRate(ProjectId, subscribeInfo.AddDate.Value, subscribeInfo.Amount ?? 0); xmbHoldDay = tupleObj.Item1; xmbDeadRate = tupleObj.Item2; xmbDSInterest = tupleObj.Item3; } rateRangeList = xmbbll.GetXMBRateContrastInfo(ProjectId); } Status = WXConverter.GetSubscribeStatusString(projectInfo.Type, subscribeInfo.Status, subscribeInfo.IsBorrow); BindList(); //当为分期宝时 if (projectInfo != null && (projectInfo.Type ?? 0) == 15) { FQUserApplyInfo = projectBll.WXGetFQUserApplyInfo(ProjectId.ToString()); } } }
protected void Page_Load(object sender, EventArgs e) { this.returnUrl = WEBRequest.GetQueryString("ReturnUrl"); LoginType = ThirdLoginSDK.GetLoginType(CookieHelper.GetCookie("WXLoginType")); code = WEBRequest.GetQueryString("code"); if (this.returnUrl.IsEmpty()) { this.returnUrl = "/Member/my_account.aspx"; } ThirdLoginSDK shareSdk = new ThirdLoginSDK(); UserBLL userbll = new UserBLL(); //初始化SDK shareSdk.InitSDK(LoginType); //根据code获取第三方用户信息 ThirdLoginSDK.ThirdUserInfo mUserInfo = shareSdk.GetCacheUserInfo(); string strUId = shareSdk.GetCacheUId(); SqlParameter[] paramData = new SqlParameter[] { new SqlParameter("@ThirdPartyId", strUId) }; UserBasicInfoInfo model = userbll.WXGetUserBasicInfo("ThirdPartyId=@ThirdPartyId", paramData); if (model != null) { //当已存在时直接登录,并跳转 WXRegister.UserLogin(model); Response.Redirect(this.returnUrl); return; } else { //用第三登录信息注册一新帐号 Guid userid = Guid.NewGuid(); var userbasicEntity = WXRegister.AddUserInfo(userid, "tuandai_weixin", "", "", "", mUserInfo.NickName, mUserInfo.HeadImg, mUserInfo.UId, (int)LoginType); if (userbasicEntity != null) { model = userbll.GetUserBasicInfoModelById(userid); WXRegister.UserLogin(model); Response.Redirect(this.returnUrl); return; } } Response.Redirect("/user/Login.aspx?ReturnUrl=" + this.returnUrl); }
protected void Page_Load(object sender, EventArgs e) { NewsId = WEBRequest.GetQueryInt("id", 0); string action = WEBRequest.GetQueryString("action"); if (action == "feedback") { UpdateHelpTopStepNum(); } else { if (!IsPostBack) { BinderData(); } } }
protected void Page_Load(object sender, EventArgs e) { PrizeId = WEBRequest.GetQueryString("id"); if (PrizeId.ToText().IsEmpty()) { Model = null; return; } if (!IsPostBack) { if (!GetPrizeDetail()) { Model = null; return; } } }
protected void Page_Load(object sender, EventArgs e) { IsBindCard = WEBRequest.GetQueryString("isbind"); OrderId = WEBRequest.GetQueryString("OrderId"); RequestId = WEBRequest.GetQueryString("RequestId"); Amount = WEBRequest.GetQueryString("amount"); Guid userId = WebUserAuth.UserId.Value; if (userId != null) { model = new UserBLL().GetUserBasicInfoModelById(userId); } else { Response.Redirect("/user/Login.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { string code = WEBRequest.GetQueryString("code"); if (!IsPostBack) { if (WebUserAuth.IsAuthenticated) { AwardMyPrize(code); //领奖完毕后,跳转到我的团宝箱 Response.Redirect("/Member/UserPrize/Index.aspx"); } else { Response.Redirect("/Activity/ThreeYearCeleb/AuthIndex.aspx"); } } }
protected void Page_Load(object sender, EventArgs e) { code = WEBRequest.GetQueryString("code"); if (!IsPostBack) { if (code.IsEmpty()) { HttpContext.Current.Response.Redirect(GlobalUtils.WebURL + "/Activity/20150901Vote/AuthIndex.aspx", true); return; } ThirdLoginSDK sdkApi = new ThirdLoginSDK(); sdkApi.InitSDK(ThirdLoginSDK.ThirdLoginType.WeiXin); HostOpenId = sdkApi.GetCookieOpenId(code); GetHadVoterCount(); } }