361 lines
20 KiB
Plaintext
361 lines
20 KiB
Plaintext
<%@ Page Title="" Language="C#" MasterPageFile="~/Telesa.Master" AutoEventWireup="true" CodeBehind="Default2.aspx.cs" Inherits="Mtxfw.shop.shop" %>
|
||
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
|
||
<asp:Content ID="Content1" ContentPlaceHolderID="MyHead" runat="server">
|
||
<link href="/css/shop.css" rel="stylesheet" type="text/css" />
|
||
<script type="text/javascript">
|
||
$(function () {
|
||
var sWidth = $("#picfocus").width(); //获取焦点图的宽度(显示面积)
|
||
var len = $("#picfocus ul li").length; //获取焦点图个数
|
||
var index = 0;
|
||
var picTimer;
|
||
|
||
//以下代码添加数字按钮和按钮后的半透明条,还有上一页、下一页两个按钮
|
||
var btn = "<div class='focusBg'></div><div class='focusbtn'>";
|
||
for (var i = 0; i < len; i++) {
|
||
btn += "<span></span>";
|
||
}
|
||
btn += "</div><div class='preNext pre'></div><div class='preNext next'></div>";
|
||
$("#picfocus").append(btn);
|
||
$("#picfocus .focusBg").css("opacity", 0.5);
|
||
|
||
//为小按钮添加鼠标滑入事件,以显示相应的内容
|
||
$("#picfocus .focusbtn span").css("opacity", 0.4).mouseover(function () {
|
||
index = $("#picfocus .focusbtn span").index(this);
|
||
showPics(index);
|
||
}).eq(0).trigger("mouseover");
|
||
|
||
//上一页、下一页按钮透明度处理
|
||
$("#picfocus .preNext").css("opacity", 0.2).hover(function () {
|
||
$(this).stop(true, false).animate({ "opacity": "0.5" }, 300);
|
||
}, function () {
|
||
$(this).stop(true, false).animate({ "opacity": "0.2" }, 300);
|
||
});
|
||
|
||
//上一页按钮
|
||
$("#picfocus .pre").click(function () {
|
||
index -= 1;
|
||
if (index == -1) { index = len - 1; }
|
||
showPics(index);
|
||
});
|
||
|
||
//下一页按钮
|
||
$("#picfocus .next").click(function () {
|
||
index += 1;
|
||
if (index == len) { index = 0; }
|
||
showPics(index);
|
||
});
|
||
|
||
//本例为左右滚动,即所有li元素都是在同一排向左浮动,所以这里需要计算出外围ul元素的宽度
|
||
$("#picfocus ul").css("width", sWidth * (len));
|
||
|
||
//鼠标滑上焦点图时停止自动播放,滑出时开始自动播放
|
||
$("#picfocus").hover(function () {
|
||
clearInterval(picTimer);
|
||
}, function () {
|
||
picTimer = setInterval(function () {
|
||
showPics(index);
|
||
index++;
|
||
if (index == len) { index = 0; }
|
||
}, 4000); //此4000代表自动播放的间隔,单位:毫秒
|
||
}).trigger("mouseleave");
|
||
|
||
//显示图片函数,根据接收的index值显示相应的内容
|
||
function showPics(index) { //普通切换
|
||
var nowLeft = -index * sWidth; //根据index值计算ul元素的left值
|
||
$("#picfocus ul").stop(true, false).animate({ "left": nowLeft }, 300); //通过animate()调整ul元素滚动到计算出的position
|
||
//$("#picfocus .btn span").removeClass("on").eq(index).addClass("on"); //为当前的按钮切换到选中的效果
|
||
$("#picfocus .focusbtn span").stop(true, false).animate({ "opacity": "0.4" }, 300).eq(index).stop(true, false).animate({ "opacity": "1" }, 300); //为当前的按钮切换到选中的效果
|
||
}
|
||
});
|
||
|
||
</script>
|
||
<script type="text/javascript">
|
||
isCategory = 1;
|
||
</script>
|
||
</asp:Content>
|
||
|
||
<asp:Content ID="Content2" ContentPlaceHolderID="MyContent" runat="server">
|
||
|
||
|
||
<div id="picfocus">
|
||
<ul> <!--focus-->
|
||
<li><a href="<%=indexTPLink01 %>" target="_blank"><img src="<%=Mtxfw.Utility.Common.GetCoverPic(indexTP01,"990x423","cut") %>" alt="<%=AdsName01%>" /></a></li>
|
||
<li><a href="<%=indexTPLink02 %>" target="_blank"><img src="<%=Mtxfw.Utility.Common.GetCoverPic(indexTP02,"990x423","cut") %>" alt="<%=AdsName02%>" /></a></li>
|
||
<li><a href="<%=indexTPLink03 %>" target="_blank"><img src="<%=Mtxfw.Utility.Common.GetCoverPic(indexTP03,"990x423","cut") %>" alt="<%=AdsName03%>" /></a></li>
|
||
<!--focusend-->
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
<div class="home-star-goods">
|
||
<div class="xm-plain-box J_starGoodsCarousel">
|
||
<div class="box-hd">
|
||
<h3 class="title">限时抢购</h3>
|
||
<div class="more">
|
||
<div class="xm-recommend-page clearfix">
|
||
<a class="page-btn-prev page-btn-prev-disabled iconfont J_carouselPrev" onmouseout="autoPlay()" href="javascript:btnPrev();"></a><a class="page-btn-next iconfont J_carouselNext" href="javascript:btnNext();" onmouseout="autoPlay()"></a>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="clearfix"></div>
|
||
<div class="box-bd">
|
||
<div class="xm-star-goods-list-wrap J_carouselWrap">
|
||
<div class="xm-star-goods-list clearfix J_carouselList">
|
||
<!--限时抢购-->
|
||
<% System.Data.DataSet Ds_Product = daoProduct.GetCacheList("top 8", "utype='0' And P_qgproduct=1 And P_State=N'已处理' Order By P_ADDATE Desc", "qg_Product");
|
||
System.Data.DataTable Dt_Product = Ds_Product != null && Ds_Product.Tables[0] != null ? Ds_Product.Tables[0] : null;
|
||
foreach (System.Data.DataRow Dr in Dt_Product.Rows)
|
||
{
|
||
%>
|
||
<div class="xm-star-goods-item">
|
||
<div class="item-content">
|
||
<span class="item-thumb">
|
||
<a href="/view-<%=Dr["P_ID"] %>.html"><img src="<%=Mtxfw.Utility.Common.GetCoverPic(Dr["P_images"].ToString(),"220x220","cut") %>" srcset="<%=Mtxfw.Utility.Common.GetCoverPic(Dr["P_images"].ToString(),"440x440","cut") %>" alt="<%=Dr["P_NAME"] %> 2x" /></a>
|
||
</span>
|
||
<span class="item-title"><a href="/view-<%=Dr["P_ID"] %>.html"><%=Dr["P_NAME"] %></a></span>
|
||
<span class="item-desc"><%=Dr["P_NAME2"] %></span>
|
||
</div>
|
||
</div>
|
||
<%} %>
|
||
<!--限时抢购结束-->
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div class="home-new-goods">
|
||
<div class="xm-plain-box">
|
||
<div class="box-hd">
|
||
<h3 class="title">新品上架</h3>
|
||
<div class="more">
|
||
<a class="more-link" href="/search-3.html">更多<i class="iconfont"></i></a>
|
||
</div>
|
||
</div>
|
||
<div class="clearfix"></div>
|
||
<div class="box-bd">
|
||
<div class="row">
|
||
<div class="col col-15">
|
||
<div class="brick-list">
|
||
<!--新品上架-->
|
||
<div class="brick-item brick-item-l">
|
||
<div class="item">
|
||
<div class="item-content">
|
||
<%if (Ds_Product.Tables[0].Rows.Count > 0)
|
||
{ %>
|
||
<a href="/view-<%=Ds_Product.Tables[0].Rows[0]["P_ID"] %>.html">
|
||
<span class="item-thumb">
|
||
<img src="<%=Mtxfw.Utility.Common.GetCoverPic(Ds_Product.Tables[0].Rows[0]["P_images"].ToString(),"620x310","cut") %>" alt="<%=Ds_Product.Tables[0].Rows[0]["P_NAME"] %>" srcset="<%=Mtxfw.Utility.Common.GetCoverPic(Ds_Product.Tables[0].Rows[0]["P_images"].ToString(),"1240x620","cut") %> 2x" />
|
||
</span>
|
||
</a>
|
||
<%} %>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="brick-item brick-item-m">
|
||
<div class="item">
|
||
<div class="item-content">
|
||
<%if (Ds_Product.Tables[0].Rows.Count > 1)
|
||
{ %>
|
||
<span class="item-info">
|
||
<span class="item-title"><a href="/view-<%=Ds_Product.Tables[0].Rows[1]["P_ID"] %>.html"><%=Ds_Product.Tables[0].Rows[1]["P_NAME"] %></a></span>
|
||
<span class="item-price"><%=Convert.ToDouble(Ds_Product.Tables[0].Rows[1]["P_VIP_P"]).ToString()%>元 </span>
|
||
</span>
|
||
<span class="item-thumb">
|
||
<a href="/view-<%=Ds_Product.Tables[0].Rows[1]["P_ID"] %>.html"><img src="<%=Mtxfw.Utility.Common.GetCoverPic(Ds_Product.Tables[0].Rows[1]["P_images"].ToString(),"220x220","cut") %>" alt="<%=Ds_Product.Tables[0].Rows[1]["P_NAME"] %>" srcset="<%=Mtxfw.Utility.Common.GetCoverPic(Ds_Product.Tables[0].Rows[1]["P_images"].ToString(),"440x440","cut") %> 2x" /></a>
|
||
</span>
|
||
<%} %>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="brick-item brick-item-m">
|
||
<div class="brick-item brick-item-s">
|
||
<div class="item">
|
||
<div class="item-content">
|
||
<%if (Ds_Product.Tables[0].Rows.Count > 2)
|
||
{ %>
|
||
<span class="item-info">
|
||
<span class="item-title"><a href="/view-<%=Ds_Product.Tables[0].Rows[2]["P_ID"] %>.html"><%=Ds_Product.Tables[0].Rows[2]["P_NAME"] %></a></span>
|
||
<span class="item-price"><%=Convert.ToDouble(Ds_Product.Tables[0].Rows[2]["P_VIP_P"]).ToString()%>元 </span>
|
||
</span>
|
||
<span class="item-thumb">
|
||
<a href="/view-<%=Ds_Product.Tables[0].Rows[2]["P_ID"] %>.html"><img src="<%=Mtxfw.Utility.Common.GetCoverPic(Ds_Product.Tables[0].Rows[2]["P_images"].ToString(),"135x135","cut") %>" alt="<%=Ds_Product.Tables[0].Rows[2]["P_NAME"] %>" srcset="<%=Mtxfw.Utility.Common.GetCoverPic(Ds_Product.Tables[0].Rows[2]["P_images"].ToString(),"270x270","cut") %> 2x" /></a>
|
||
</span>
|
||
<%} %>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="brick-item brick-item-s">
|
||
<div class="item">
|
||
<div class="item-content">
|
||
<%if (Ds_Product.Tables[0].Rows.Count > 3)
|
||
{ %>
|
||
<span class="item-info">
|
||
<span class="item-title"><a href="/view-<%=Ds_Product.Tables[0].Rows[3]["P_ID"] %>.html"><%=Ds_Product.Tables[0].Rows[3]["P_NAME"] %></a></span>
|
||
<span class="item-price"><%=Convert.ToDouble(Ds_Product.Tables[0].Rows[3]["P_VIP_P"]).ToString()%>元 </span>
|
||
</span>
|
||
<span class="item-thumb">
|
||
<a href="/view-<%=Ds_Product.Tables[0].Rows[3]["P_ID"] %>.html"><img src="<%=Mtxfw.Utility.Common.GetCoverPic(Ds_Product.Tables[0].Rows[3]["P_images"].ToString(),"135x135","cut") %>" alt="<%=Ds_Product.Tables[0].Rows[3]["P_NAME"] %>" srcset="<%=Mtxfw.Utility.Common.GetCoverPic(Ds_Product.Tables[0].Rows[3]["P_images"].ToString(),"270x270","cut") %> 2x" /></a>
|
||
</span>
|
||
<%} %>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<%if (Ds_Product.Tables[0].Rows.Count > 4)
|
||
{
|
||
for(int i=4;i<Ds_Product.Tables[0].Rows.Count;i++)
|
||
{
|
||
%>
|
||
|
||
<div class="brick-item brick-item-m">
|
||
<div class="item">
|
||
<div class="item-content">
|
||
<span class="item-info">
|
||
<span class="item-title"><a href="/view-<%=Ds_Product.Tables[0].Rows[i]["P_ID"] %>.html"><%=Ds_Product.Tables[0].Rows[i]["P_NAME"] %></a></span>
|
||
<span class="item-price"><%=Convert.ToDouble(Ds_Product.Tables[0].Rows[i]["P_VIP_P"]).ToString()%>元 </span>
|
||
</span>
|
||
<span class="item-thumb">
|
||
<a href="/view-<%=Ds_Product.Tables[0].Rows[i]["P_ID"] %>.html"><img src="<%=Mtxfw.Utility.Common.GetCoverPic(Ds_Product.Tables[0].Rows[i]["P_images"].ToString(),"220x220","cut") %>" alt="<%=Ds_Product.Tables[0].Rows[i]["P_NAME"] %>" srcset="<%=Mtxfw.Utility.Common.GetCoverPic(Ds_Product.Tables[0].Rows[i]["P_images"].ToString(),"440x440","cut") %> 2x" /></a>
|
||
</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<%}
|
||
} %>
|
||
|
||
<!--新品上架结束-->
|
||
</div>
|
||
</div>
|
||
<div class="col col-5">
|
||
<div class="channel-section">
|
||
<ul class="channel-list">
|
||
<!--推荐商品-->
|
||
<% Ds_Product = daoProduct.GetCacheList("top 5", "utype='0' And P_COMMENDF = 1 And P_State=N'已处理' Order By P_ADDATE Desc", "TJ_Product");
|
||
|
||
%>
|
||
<%if (Ds_Product.Tables[0].Rows.Count > 0)
|
||
{
|
||
for (int i = 0; i < Ds_Product.Tables[0].Rows.Count; i++)
|
||
{
|
||
if(i==0){%>
|
||
<li>
|
||
<a href="/view-<%=Ds_Product.Tables[0].Rows[i]["P_ID"] %>.html" target="_blank"><span class="item-info"><span class="item-title"><%=Ds_Product.Tables[0].Rows[i]["P_NAME"] %></span><span class="item-price"><%=Convert.ToDouble(Ds_Product.Tables[0].Rows[i]["P_VIP_P"]).ToString()%>元 <del><%=Convert.ToDouble(Ds_Product.Tables[0].Rows[i]["P_Market_P"]).ToString()%>元</del></span><span class="item-desc"><%=Ds_Product.Tables[0].Rows[i]["P_NAME2"] %></span><span class="item-thumb"><img src="<%=Mtxfw.Utility.Common.GetCoverPic(Ds_Product.Tables[0].Rows[i]["P_images"].ToString(),"100x100","cut") %>" srcset="<%=Mtxfw.Utility.Common.GetCoverPic(Ds_Product.Tables[0].Rows[i]["P_images"].ToString(),"200x200","cut") %> 2x" alt="" /></span><span class="item-flag"><span class="icon-flag">推荐商品</span></span></a>
|
||
</li>
|
||
<%}else{ %>
|
||
<li>
|
||
<a href="/view-<%=Ds_Product.Tables[0].Rows[i]["P_ID"] %>.html" target="_blank"><span class="item-info"><span class="item-title"><%=Ds_Product.Tables[0].Rows[i]["P_NAME"] %></span><span class="item-price"><%=Convert.ToDouble(Ds_Product.Tables[0].Rows[i]["P_VIP_P"]).ToString()%>元 <del><%=Convert.ToDouble(Ds_Product.Tables[0].Rows[i]["P_Market_P"]).ToString()%>元</del></span><span class="item-desc"><%=Ds_Product.Tables[0].Rows[i]["P_NAME2"] %></span><span class="item-thumb"><img src="<%=Mtxfw.Utility.Common.GetCoverPic(Ds_Product.Tables[0].Rows[i]["P_images"].ToString(),"100x100","cut") %>" srcset="<%=Mtxfw.Utility.Common.GetCoverPic(Ds_Product.Tables[0].Rows[i]["P_images"].ToString(),"200x200","cut") %> 2x" alt="" /></span></span></a>
|
||
</li>
|
||
<%}
|
||
}} %>
|
||
|
||
<!--推荐商品结束-->
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
<div class="news-section">
|
||
<h3>新闻公告</h3>
|
||
<ul>
|
||
<!--新闻公告-->
|
||
<% System.Data.DataSet Ds_Gong = daoArt.GetCacheList("top 5", "(ParentID=9 or ParentID=11) Order By ID desc", "D_Gong");
|
||
System.Data.DataTable Dt_Gong = Ds_Gong != null && Ds_Gong.Tables[0] != null ? Ds_Gong.Tables[0] : null;
|
||
|
||
foreach (System.Data.DataRow Dr in Dt_Gong.Rows)
|
||
{
|
||
%>
|
||
<li class="first"><a href="/article-<%=Dr["ID"] %>.html"><span class="dot">·</span><%=Dr["Title"]%><i class="iconfont"></i></a></li>
|
||
<%} %>
|
||
<!--新闻公告结束-->
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div class="home-hot-goods">
|
||
<div class="xm-plain-box">
|
||
<div class="box-hd">
|
||
<h3 class="title">防身移动电源</h3>
|
||
<div class="more">
|
||
<a class="more-link" href="/search-class-1.html">更多<i class="iconfont"></i></a>
|
||
</div>
|
||
</div>
|
||
<div class="clearfix"></div>
|
||
<div class="box-bd">
|
||
<div class="row">
|
||
<div class="col col-15">
|
||
<div class="brick-list">
|
||
<!--防身移动电源-->
|
||
<div class="brick-item brick-item-l">
|
||
<div class="item">
|
||
<div class="item-content">
|
||
<%if (Ds_Product.Tables[0].Rows.Count > 0)
|
||
{ %>
|
||
<a href="/view-<%=Ds_Product.Tables[0].Rows[0]["P_ID"] %>.html">
|
||
<span class="item-thumb">
|
||
<img src="<%=Mtxfw.Utility.Common.GetCoverPic(Ds_Product.Tables[0].Rows[0]["P_images"].ToString(),"620x310","cut") %>" alt="<%=Ds_Product.Tables[0].Rows[0]["P_NAME"] %>" srcset="<%=Mtxfw.Utility.Common.GetCoverPic(Ds_Product.Tables[0].Rows[0]["P_images"].ToString(),"1240x620","cut") %> 2x" />
|
||
</span>
|
||
</a>
|
||
<%} %>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<%if (Ds_Product.Tables[0].Rows.Count > 1)
|
||
{
|
||
for (int i = 1; i < Ds_Product.Tables[0].Rows.Count; i++)
|
||
{%>
|
||
<div class="brick-item brick-item-m">
|
||
<div class="item">
|
||
<div class="item-content">
|
||
<span class="item-info">
|
||
<span class="item-title"><a href="/view-<%=Ds_Product.Tables[0].Rows[i]["P_ID"] %>.html"><%=Ds_Product.Tables[0].Rows[i]["P_NAME"] %></a></span>
|
||
<span class="item-price"><%=Convert.ToDouble(Ds_Product.Tables[0].Rows[i]["P_VIP_P"]).ToString()%>元 </span>
|
||
</span>
|
||
<span class="item-thumb">
|
||
<a href="/view-<%=Ds_Product.Tables[0].Rows[1]["P_ID"] %>.html"><img src="<%=Mtxfw.Utility.Common.GetCoverPic(Ds_Product.Tables[0].Rows[i]["P_images"].ToString(),"220x220","cut") %>" alt="<%=Ds_Product.Tables[0].Rows[i]["P_NAME"] %>" srcset="<%=Mtxfw.Utility.Common.GetCoverPic(Ds_Product.Tables[0].Rows[i]["P_images"].ToString(),"440x440","cut") %> 2x" /></a>
|
||
</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<%}
|
||
} %>
|
||
<!--防身移动电源结束-->
|
||
</div>
|
||
</div>
|
||
<div class="col col-5">
|
||
<div class="board-section">
|
||
<h3><span>HOT</span>热销商品排行</h3>
|
||
<ul class="board-list">
|
||
<!--热销商品排行-->
|
||
<% Ds_Product = daoProduct.GetCacheList("top 5", "utype='0' And P_State=N'已处理' Order By P_Orders Desc,P_ADDATE Desc", "kydjy_Product");
|
||
if (Ds_Product.Tables[0].Rows.Count > 1)
|
||
{
|
||
for (int i = 0; i < Ds_Product.Tables[0].Rows.Count; i++)
|
||
{
|
||
%>
|
||
<li <%=(i<3?"class=\"top\"":"") %>>
|
||
<span class="item-info">
|
||
<span class="item-title"><a href="/view-<%=Ds_Product.Tables[0].Rows[i]["P_ID"] %>.html"><%=Ds_Product.Tables[0].Rows[i]["P_NAME"] %></a></span>
|
||
<span class="item-price"><%=Convert.ToDouble(Ds_Product.Tables[0].Rows[i]["P_VIP_P"]).ToString()%>元 </span>
|
||
</span>
|
||
<span class="item-thumb">
|
||
<a href="/view-<%=Ds_Product.Tables[0].Rows[i]["P_ID"] %>.html"><img src="<%=Mtxfw.Utility.Common.GetCoverPic(Ds_Product.Tables[0].Rows[i]["P_images"].ToString(),"70x70","cut") %>" alt="<%=Ds_Product.Tables[0].Rows[i]["P_NAME"] %>" srcset="<%=Mtxfw.Utility.Common.GetCoverPic(Ds_Product.Tables[0].Rows[i]["P_images"].ToString(),"140x140","cut") %> 2x" /></a>
|
||
</span>
|
||
<span class="item-num"><%=(i+1) %></span>
|
||
</li>
|
||
<%}
|
||
} %>
|
||
<!--热销商品排行结束-->
|
||
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
</asp:Content>
|