@{
ViewBag.Title = "Index";
Layout = "~/Views/Shared/_Layout.cshtml";
}
@using BookShopSys.Plus.HandlStr
@model PageList<BookShopSys.Plus.Models.Book>
<div id="content">
<div id="magic"><img src="~/Content/Images/a_b_02.jpg" alt="幻灯图片" width="480" height="200" /></div>
<div id="a_b_02">
<a href="#">电子词典专柜上线</a>
<a href="#">Lucy陪你说真人口语英语对译软件</a>
<a href="#" class="red">哇~这东西真便宜,大家快来抢啊!</a>
</div>
<!--comment books start-->
<div id="comment_book">
<ul>
@foreach (var item in Model)
{
<li title="@item.Title">
<a href="@Url.Action("Detail","BookShop",new { ticket=ViewBag.ticket,id=item.Id})">
<img src="~/Content/Images/BookCovers/@(item.ISBN).jpg" width="100" height="100" />
</a>
<a href="#">@BookShopSys.Plus.HandlStr.Common.SubStr(item.Title)</a>
</li>
}
</ul>
</div>
<!--comment books end-->
<div style="text-align:center">
<ul class="pagination">
@if (Model != null && Model.Count > 0)
{
@Html.Pager(Model)
}
</ul>
</div>
</div>
@section scripts{
<script type="text/javascript">
function ShowKeyState() {
var key = $(".order_key").val();
$.ajax({
url: "http://localhost:30889/api/Order",
type: "Get",
data: { key: key },
success: function (obj) {
if (obj != null) {
alert(obj);
if (obj == "请先登录") {
location.href="@Url.Action("Login","BookShop")";
}
}
}
})
}
</script>
}