DTcms.Web.UI/DTcms.Web.UI.Page/shopping.cs
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using DTcms.BLL;
using DTcms.Common;
using DTcms.Model;
using System;
using System.Collections.Generic;
using System.Web;
namespace DTcms.Web.UI.Page
{
public class shopping : BasePage
{
protected string goodsJsonValue = string.Empty;
protected DTcms.Model.users userModel;
protected List<cart_items> goodsList = new List<cart_items>();
protected cart_total goodsTotal = new cart_total();
protected DTcms.Model.orderconfig orderConfig = new DTcms.BLL.orderconfig().loadConfig();
protected override void ShowPage()
{
this.goodsJsonValue = Utils.GetCookie("dt_cookie_shopping_buy");
base.Init += new EventHandler(this.shopping_Init);
}
protected void shopping_Init(object sender, EventArgs e)
{
int group_id = 0;
this.userModel = base.GetUserInfo();
if (this.userModel == null)
{
if (this.orderConfig.anonymous == 0)
{
HttpContext.Current.Response.Redirect(base.linkurl("login", new object[0]));
}
}
else
{
group_id = this.userModel.group_id;
}
if (string.IsNullOrEmpty(this.goodsJsonValue))
{
HttpContext.Current.Response.Redirect(base.linkurl("error", new object[]
{
"?msg=" + Utils.UrlEncode("对不起,无法获取您要购买的商品!")
}));
}
else
{
try
{
List<cart_keys> ls = JsonHelper.JSONToObject<List<cart_keys>>(this.goodsJsonValue);
this.goodsList = ShopCart.ToList(ls, group_id);
this.goodsTotal = ShopCart.GetTotal(this.goodsList);
}
catch
{
HttpContext.Current.Response.Redirect(base.linkurl("error", new object[]
后面还有 8 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。