protected void Page_Load(object sender, EventArgs e) { var CategoryList = bll.GetLit <WXMallCategory>(100, 1, string.Format("WebsiteOwner='{0}' And (PreID=0 Or PreID is null) ", bll.WebsiteOwner)); //sbCategory.AppendFormat("<li class=\"current\" data-categoryid=\"\"><a href=\"javascript:\">全部<span class=\"icon\"></span></a></li>"); if (CategoryList.Count > 0) { sbCategory.Append("<div class=\"kindbox\"><ul class=\"kind\">"); sbCategory.AppendFormat("<li data-categoryid=\"\" data-rootcategroy=1 class=\"current\"><a class=\"categorylist\" href=\"javascript:\">全部</a></li>"); foreach (var item in CategoryList) { var SecondCategoryList = bll.GetList <WXMallCategory>(string.Format("PreId={0}", item.AutoID)); if (SecondCategoryList.Count > 0) { sbSecondCategory.AppendFormat("<ul class=\"kind\" id=\"fengleip{0}\">", item.AutoID); foreach (var item1 in SecondCategoryList) { sbSecondCategory.AppendFormat("<li data-categoryid=\"{0}\"><a class=\"categorylist\" >{1}</a></li>", item1.AutoID, item1.CategoryName); } sbSecondCategory.AppendFormat("</ul> "); sbCategory.AppendFormat("<li>"); sbCategory.AppendFormat("<div class=\"categorylist fenleip\" sid=\"fengleip{0}\">{1}", item.AutoID, item.CategoryName); sbCategory.AppendFormat("<em class=\"icon\"></em>"); sbCategory.AppendFormat("</div>"); sbCategory.AppendFormat("</li>"); } else { sbCategory.AppendFormat("<li data-categoryid=\"{0}\" data-rootcategroy=1><a class=\"categorylist\" href=\"javascript:\">{1}</a></li>", item.AutoID, item.CategoryName); } } sbCategory.Append("</ul>"); sbCategory.Append("</div>"); } currWebSiteInfo = bll.GetWebsiteInfoModel(); if (string.IsNullOrEmpty(currWebSiteInfo.MallType)) { currWebSiteInfo.MallType = "0"; } }
protected void Page_Load(object sender, EventArgs e) { var CategoryList = bll.GetLit <WXMallCategory>(100, 1, string.Format("WebsiteOwner='{0}'", bll.WebsiteOwner)); if (CategoryList.Count > 0) { sbCategory.Append("<div class=\"kindbox\"><ul class=\"kind\">"); foreach (var item in CategoryList) { sbCategory.AppendFormat("<li data-categoryid=\"{0}\"><a href=\"javascript:\">{1}<span class=\"icon\"></span></a></li>", item.AutoID, item.CategoryName); } sbCategory.Append("</ul>"); sbCategory.Append("</div>"); } currWebSiteInfo = bll.GetWebsiteInfoModel(); currWebSiteUserInfo = new BLLJIMP.BLLUser("").GetUserInfo(DataLoadTool.GetWebsiteInfoModel().WebsiteOwner); }
protected void Page_Load(object sender, EventArgs e) { //currWebSiteUserInfo = this.userBll.GetUserInfo(userBll.WebsiteOwner); currWebSiteInfo = bllMall.GetWebsiteInfoModelFromDataBase(); if (string.IsNullOrEmpty(currWebSiteInfo.ProductImgRatio1)) { currWebSiteInfo.ProductImgRatio1 = (600).ToString(); } if (string.IsNullOrEmpty(currWebSiteInfo.ProductImgRatio2)) { currWebSiteInfo.ProductImgRatio2 = (600).ToString(); } WXMallIndexUrl = string.Format("http://{0}/customize/comeoncloud/Index.aspx?key=MallHome", Request.Url.Host); if (currWebSiteInfo != null) { if (currWebSiteInfo.MallTemplateId.Equals(1))//外卖 { WXMallIndexUrl = string.Format("http://{0}/App/Cation/wap/mall/IndexV2.aspx", Request.Url.Host); } } toolBars = bllCompanyWebSite.GetToolBarList(int.MaxValue, 1, bllMall.WebsiteOwner, null, null, false) .OrderBy(p => p.KeyType).Select(p => p.KeyType).Distinct().ToList(); slides = bllSlide.GetCurrWebsiteAllTypeList(); scoreConfig = bllScore.GetScoreConfig(); if (scoreConfig == null) { scoreConfig = new BLLJIMP.Model.ScoreConfig(); } CompanyWebsiteConfig = bllWebsite.GetCompanyWebsiteConfig(); StoreSinceTimeJson = CompanyWebsiteConfig.StoreSinceTimeJson; if (string.IsNullOrEmpty(StoreSinceTimeJson)) { StoreSinceTimeJson = "[]"; } HomeDeliveryTimeJson = CompanyWebsiteConfig.HomeDeliveryTimeJson; if (string.IsNullOrEmpty(HomeDeliveryTimeJson)) { HomeDeliveryTimeJson = "[]"; } }
protected void Page_Load(object sender, EventArgs e) { if (bllMall.IsLogin) { userInfo = DataLoadTool.GetCurrUserModel(); } else { Response.Redirect(string.Format("/App/Cation/Wap/Login.aspx?redirecturl={0}", Request.FilePath)); } currWebSiteInfo = bllMall.GetWebsiteInfoModel(); if (currWebSiteInfo.MallTemplateId.Equals(1))//外卖 { WXMallIndexUrl = "Indexv2.aspx"; } websiteInfo = DataLoadTool.GetWebsiteInfoModel(); if (string.IsNullOrEmpty(websiteInfo.MallType)) { websiteInfo.MallType = "0"; } }
public void WriteWebAccessLogs(HttpApplication application) { try { string accessUrl = application.Request.Url.ToString(); string currAbsolutePath = application.Request.Url.AbsolutePath == null ? "" : application.Request.Url.AbsolutePath.ToLower(); string pageExtraName = ZentCloud.Common.IOHelper.GetExtraName(currAbsolutePath); List <string> pageExtraNameFilterList = new List <string>() { "aspx", "chtml" }; //只处理aspx、chtml页面 if (!pageExtraNameFilterList.Contains(pageExtraName)) { return; } ToLog("进入 WriteWebAccessLogs"); BLL bll = new BLL(); //List<WebAccessLogsPath> pathList = bll.GetList<WebAccessLogsPath>(""); //ToLog("判断是否跳过 currUrl:" + accessUrl + " pathList:" + JsonConvert.SerializeObject(pathList)); //if ((pathList.Where(p => p.PagePath.ToLower().Equals(application.Request.FilePath.ToLower())).ToList().Count <= 0) && (!pageExtraName.Equals("chtml"))) // return; //ToLog("没有跳过"); //userid openid string userId = ""; // application.Session["userID"] == null ? "" : application.Session["userID"].ToString(); string wxOpenId = ""; // application.Session["WXCurrOpenerOpenID"] == null ? "" : application.Session["WXCurrOpenerOpenID"].ToString();//WXCurrOpenerOpenID try { userId = application.Session["userID"] == null ? "" : application.Session["userID"].ToString(); } catch { } try { wxOpenId = application.Session["WXCurrOpenerOpenID"] == null ? "" : application.Session["WXCurrOpenerOpenID"].ToString();//WXCurrOpenerOpenID } catch { } ToLog(string.Format("取到的 wxOpenId {0} userid {1} ", wxOpenId, userId)); WebAccessLogsInfo model = new WebAccessLogsInfo() { UserID = userId, WXOpenID = wxOpenId, PageUrl = accessUrl, AccessDate = DateTime.Now, IP = ZentCloud.Common.MySpider.GetClientIP() }; ToLog("正在处理0"); model.IPLocation = ZentCloud.Common.MySpider.GetIPLocation(ZentCloud.Common.MySpider.GetClientIP()); model.EventUserAgent = application.Request.UserAgent; if (application.Request.Browser != null) { model.EventBrowser = application.Request.Browser.Browser; model.EventBrowserID = application.Request.Browser.Id; model.EventBrowserIsBata = application.Request.Browser.Beta.ToString(); model.EventBrowserVersion = application.Request.Browser.Version; model.EventSysPlatform = application.Request.Browser.Platform; if (application.Request.Browser.Win16) { model.EventSysByte = "16"; } else if (application.Request.Browser.Win32) { model.EventSysByte = "32"; } else { model.EventSysByte = "64"; } model.EventIsMobileDevice = application.Request.Browser.IsMobileDevice.ToString(); model.EventMobileDeviceManufacturer = application.Request.Browser.MobileDeviceManufacturer; model.EventMobileDeviceModel = application.Request.Browser.MobileDeviceModel; } ToLog("正在处理1"); string exId = application.Request["ID"]; string exSpreadUserId = application.Request["SpreadU"]; string exShareTimestamp = application.Request["ShareTimestamp"]; string exPreSpreadUserId = application.Request["PreSpreadU"]; string exPreShareTimestamp = application.Request["PreShareTimestamp"]; if (!string.IsNullOrWhiteSpace(exSpreadUserId)) { exSpreadUserId = ZentCloud.Common.Base64Change.DecodeBase64ByUTF8(exSpreadUserId); } if (!string.IsNullOrWhiteSpace(exPreSpreadUserId)) { exPreSpreadUserId = ZentCloud.Common.Base64Change.DecodeBase64ByUTF8(exPreSpreadUserId); } ToLog("正在处理2"); model.Ex_ID = exId; model.Ex_SpreadUserID = exSpreadUserId; model.Ex_ShareTimestamp = exShareTimestamp; model.Ex_PreSpreadUserID = exPreSpreadUserId; model.Ex_PreShareTimestamp = exPreShareTimestamp; ToLog("正在处理3"); ZentCloud.BLLJIMP.Model.WebsiteInfo websiteInfo = new ZentCloud.BLLJIMP.Model.WebsiteInfo(); if (System.Web.HttpContext.Current.Session["WebsiteInfoModel"] != null) { websiteInfo = (ZentCloud.BLLJIMP.Model.WebsiteInfo)System.Web.HttpContext.Current.Session["WebsiteInfoModel"]; } ToLog("正在处理4"); model.WebsiteOwner = websiteInfo.WebsiteOwner; ToLog("正在处理5"); bll.Add(model); ToLog("正在处理6"); //ToLog(string.Format("WriteWebAccessLogs end wxOpenId {0} userid {1} ", wxOpenId, userId)); } catch (Exception ex) { ToLog("WebAccessLogsModule异常:" + ex.Message); } }