代码:
[RouteArea("TrafficFines")]
public class TrafficFinesController : BaseController
{
.................................
[GET("PayView/{orderID}/{orderTime}/{totalFee}")]
public ActionResult PayView(string orderID, string orderTime, decimal totalFee)
{
PayInfo pm = new PayInfo
{
orderID = Request.get("orderID"),
orderTime = Convert.ToDateTime(Request.get("orderTime")),
totalFee = Request.getDecimal("totalFee"),
openID = base.UUID,
partnerID = BaseConfig.Instance.API_partnerID(),
sign = BaseConfig.Instance.API_sign()
};
return View(pm);
}
..........................
PayInfo pm = new PayInfo
{
orderID = fillOrderResponse.Ordersn,
orderTime = DateTime.Now,
totalFee = fillOrderResponse.Ordercharge * 10 * 10,
openID = base.UUID,
partnerID = BaseConfig.Instance.API_partnerID(),
sign = BaseConfig.Instance.API_sign()
};
return Redirect("/TrafficFines/PayView?orderID=" + fillOrderResponse.Ordersn + "&orderTime=" + DateTime.Now + "&totalFee=" + fillOrderResponse.Ordercharge * 10 * 10);
....
Redirect跳转找不到页面404,
没有分了....
------解决思路----------------------
PayView/{orderID}/{orderTime}/{totalFee} 这个在Url的路径里。
Redirect("/TrafficFines/PayView?orderID=" + ... 这个在Url的Query参数里。