using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Models;
using Common;
using KJH55128_Rec.Business.TJ;
using KJH55128_Rec.ViewModels;
using KJH55128_Rec.Business.WF;
using KJH55128_Rec.Util;
namespace KJH55128_Rec.Controllers
{
///
/// 玩法
///
public class WFController : Controller
{
///
/// 玩法规则
///
///
[Route("wfgz.html")]
//[Route("wfgz/{type}/{code}.html")]
[Route("wfgz/{strparams}.html")]
public ActionResult Index(string strparams)
{
string type = "QGC",code = "ssq";
if (!string.IsNullOrWhiteSpace(strparams)) {
string[] arrs = strparams.Split('-');
if (arrs.Length > 0)
{
type = ValidationTools.CheckStr(arrs[0], "QGC", 20);
code = ValidationTools.CheckStr(arrs[1], "fc3d", 20);
}
}
ViewBag.type = type.ToUpper();
ViewBag.lottery = code;
var lotterytype = EnumHelper.GETEnumTypeByText(code);
string lottery = "";
if (ZSlotterType.TypeOfNameDict.Keys.Contains(lotterytype.ToString()))
{
lottery = ZSlotterType.TypeOfNameDict[lotterytype.ToString()];
}
PalyRuleModel model = WFApiBLL.GetPlayRule(lottery,lotterytype);
return View(model);
}
}
}