BookShop.Web/Ajax/Ajax_ConfirmOrder.aspx.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CTL.Common;
namespace BookShop.Web.Ajax
{
public partial class Ajax_ConfirmOrder : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
this.Response.Expires = 0;//清除缓存
string action = Requests.All("action");
string result = "";
switch (action)
{
case "checkuserpoint":
{
int point = Utils.StrToInt(Requests.All("point"));
Model.User userInfo = BookShopUtils.GetUserInfoByCookie();
if (userInfo != null)
{
decimal totalprice = new BookShop.ShoppingCart(userInfo).TotalPrice;
if (userInfo.Point < point || point % 100 != 0)
{
result = "[{\"retid\":\"-1\",\"totalprice\":\"" + Utils.GetPriceByRound(2, totalprice) + "\",\"save\":\"0.00\"}]";
}
else
{
totalprice = Utils.GetPriceByRound(2, new BookShop.ShoppingCart(userInfo).TotalPrice - point / 100);
decimal savePrice = Utils.GetPriceByRound(2, point / 100);
result = "[{\"retid\":\"1\",\"totalprice\":\"" + totalprice + "\",\"save\":\"" + savePrice + "\"}]";
}
}
}
break;
}
Response.Write(result);
Response.End();
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。