CmsWeb/shop/dzp/dzpAct.ashx
(开头部分) 13KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<%@ WebHandler Language="C#" Class="dzpAct" %>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Cms.Common;
public class dzpAct : IHttpHandler {
Cms.BLL.wx_dzpActionInfo actbll = new Cms.BLL.wx_dzpActionInfo();
Cms.BLL.wx_dzpAwardUser ubll = new Cms.BLL.wx_dzpAwardUser();
Cms.BLL.wx_dzpUsersTemp utbll = new Cms.BLL.wx_dzpUsersTemp();
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/json";
string _action = MyCommFun.QueryString("myact");
int aid = MyCommFun.RequestInt("aid");
string openid = MyCommFun.RequestOpenid(); //得到微信用户的openid
if (_action == "choujiang")
{
Dictionary<string, string> jsonDict = new Dictionary<string, string>();
try
{
//抽奖
Cms.Model.wx_dzpActionInfo dzpAction = new Cms.Model.wx_dzpActionInfo();
Cms.BLL.wx_dzpAwardItem itemBll = new Cms.BLL.wx_dzpAwardItem();
#region 判断
int wid = MyCommFun.RequestInt("wid");
if (aid == 0 || wid == 0 || openid.Trim() == "")
{
jsonDict.Add("error", "sys");
jsonDict.Add("content", "参数错误!");
context.Response.Write(MyCommFun.getJsonStr(jsonDict));
return;
}
dzpAction = actbll.GetModel(aid);
if (dzpAction == null)
{
jsonDict.Add("error", "sys");
jsonDict.Add("content", "参数错误!");
context.Response.Write(MyCommFun.getJsonStr(jsonDict));
return;
}
if (dzpAction.endDate <= DateTime.Now)
{ //说明活动已经结束
//非活动期间
jsonDict.Add("error", "end");
jsonDict.Add("content", "活动已结束");
context.Response.Write(MyCommFun.getJsonStr(jsonDict));
return;
}
else if (dzpAction.beginDate > DateTime.Now)
{
后面还有 315 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
