<%@ Page Language="C#" AutoEventWireup="true" debug="true" Inherits="WinLibClass.Form.Auction.ShopDetail" CodePage="65001" GameType="1" PageFileFlag="Shop" PageFileTitle="商品详细信息" DataBindingType="1" PageFlagId="1601"  %>
<%//1601:不限时段；1602:限时段%>
<%@ Register TagPrefix="Site" TagName="Menu" Src="~/WUC/Common/Site_Menu.ascx" %>
<%@ Register TagPrefix="Site" TagName="UserPicNote" Src="~/WUC/Common/Site_UserPicNote.ascx" %>
<%@ Register TagPrefix="Site" TagName="Game1" Src="~/WUC/Common/Site_Game1.ascx" %>

<%@ Register TagPrefix="Site" TagName="Side_UserPicNote" Src="~/WUC/Common/Site_Side_UserPicNote.ascx" %>
<%@ Register TagPrefix="Site" TagName="Side_Future" Src="~/WUC/Common/Site_Side_Future.ascx" %>


<%@ Register TagPrefix="Site" TagName="Detail_Pic" Src="~/WUC/Wuc_Detail_Pic.ascx" %>
<%@ Register TagPrefix="WUC" TagName="UserPicNote" Src="~/WUC/Wuc_UserPicNote.ascx" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<Site:Menu id="menu_headtitle" runat="server" Flag="HeadTitle" CurrentPageTitle = "商品详细信息" />
<Site:Menu id="menu_headjs" runat="server" Flag="HeadJs"  />

<link href="/css/common.css" type="text/css" rel="stylesheet" />
<link href="/css/common_2.css" type="text/css" rel="stylesheet" />
<link href="/css/common_3.css" type="text/css" rel="stylesheet" />
<link href="/css/detail.css" type="text/css" rel="stylesheet" />

</head>
<body>
<!--start 头部-->
<Site:Menu id="menu_topmenu" runat="server" Flag="TopMenu"  CurrentPageFlag="Shop2" />
<!--start 通用(上) -->

<div class="clear"></div>
<!--start 主体内容-->
<div class="Grid-Base W980 Center MGT10 PD10 PDL0 PDB0 " id="MyMainBox" >
<!--start left cont-->
	<div class="W770 FL" >
		<div id="CententTitleBox" class="PageTitBox MGT10 MGL10 LH25 F15 FWB C-602F01">
			积分商城商品【 <%=ProductInfo.ProductName%> 】 详细信息
		</div>
		<!-- 产品图片，主信息，C-602F01左右 -->
		<div id="ContentDetailBox1" class="LH25 MGT10 MGL10">
			<div class="W320 FL">

<Site:Detail_Pic ID="Wuc_Detail_Pic_1" runat="server" />			
			
			
			</div>
			<div class="TextInfoBox FL">
				<DIV class="H36 FS16">
				<%=ProductInfo.ProductName%>
				</DIV>
				<div class="Box PD10 ">
					<div class="info-1 FL W200 ">
						<ul >
						<li>市场价格 : <span class="Money">&yen;<%=string.Format("{0:F}",ProductInfo.MarketValue/100f)%></span></li>
						<li>积分兑换 : <span class="Money" ><%=ProductInfo.UserPoints %></span> 

						</li>
						<li>您的积分 : <span class="Money" ><%=uInfo.UserPoints-uInfo.UsedUserPoints%></span></li>
						</ul>
					</DIV>
					<div class="info-btn FL W214 TextCenter" >
					<div class="H46 TextCenter FS16" id="">

					</DIV>
					<% 
					if(ProductInfo.IsUserPoints==1 && ProductInfo.UserPoints>0)
					{
					%>	
					<a id="btn_<%=ProductInfo.ID%>" href="javascript:;" onclick="UserPointsExchangeSubmit();return false;"><img src="/images/huangou.png" /></a>
					<%
					}else{					
					%><font class="FWB FS16 red">不允许兑换</font>
					<%
					}
					%>
					
					</div>
					<div class="clear"></div>
					<div class="line-2"></div>
					<DIV class="info-msg LH25 MGT10 ">
					<div class="Hide">
					保价购买：&yen;<%=string.Format("{0:F}",ProductInfo.SafetyValue/100f)%>
<%
if(ProductInfo.IsSafetyValue==0)
Response.Write("<img src=\"/images/fill.png\" alt=\"补差价\" title=\"允许保价/补差价购买\" />\r\n");
%></div>
&nbsp;


					</DIV>
					<div class="clear"></div>
				</div>
				<DIV class="Box PD10 MGT10 LH20 BG-F7F7F7">
1、第一步选择参与,特别提示,一旦用户选择换购,则不论后续是否换购成功,均需扣除积分,且积分不因任何原因退回。第二步登录指定商品页面,进行积分换购。所有操作须使用同一9拍网账户,且两个步骤须全部完成。<BR />
2、参加换购即刻扣除积分<BR />
3、用户以作弊及违规方式参与活动的,本公司有权取消其参与资格。 <BR />
4、本活动所有成功换购的礼品将在成功换购之日起15天内发货（具体发货情况请咨询各商家）。<BR /> 
5、9拍网对本次活动保留法律允许范围内的解释权。<BR />
				
				</DIV>
			
			</div>
		<div class="clear"></div>
		</div>
		<div class="clear"></div>
		<!-- 详细内容 -->
		<div id="ContentDetailBox" class="Info-Detial Box BDL0 BDB0 MGT10 W766 " >
		<DIV CLASS="PageTitBox LH25 F15 FWB C-602F01 MGT10 MGB10">
				产品详细
		</DIV>
		<DIV  class="MGT10 BDT1 BDTSOLID BDTC-DDDDDD "  >
			<DIV class="MG10 MGB0 LH35 PDB10">			
			<%=ProductInfo.Details%>
	
			</DIV>
		</DIV>
		
	
		
		</div>
		
		

		<div id="ContentDetailBoxPic" class="Info-Detial Box BDL0 BDB0 W766 " >
		<!--
		<DIV CLASS="PageTitBox LH25 F15 FWB C-602F01 MGT10 MGB10">
				<DIV class="FL">网友晒图</DIV><DIV class="FR MGR10 FS14 FWN"><a href="/Auction/UserShowPic.aspx" class="n_icon n_icon_23 shine_go">返回赢家晒图列表页</a></DIV>
				<div class="clear"></div>
		</DIV>
		<DIV  class="MGT10 BDT1 BDTSOLID BDTC-DDDDDD "  >
			<DIV class="MG10 MGB0 LH35">			


...

			</DIV>
		</DIV>		

		<div class="clear"></div>		-->
		</div>	
		
			
		
		<div class="clear"></div>
	</div>

<script type="text/javascript">

function UserPointsExchangeSubmit()
{
	var Uid = GetUid();//<%=(CurrentUserId)%>;
	if(Uid>0 && CheckIsLogin())
	{
		if(confirm("是否确定兑换?")==false)
		return ;
	
	var queryString = {
		"ProductId":<%=ProductInfo.ID%>,
		"UserId":Uid,
		"IsChecked":0		
		};
		$.ajax({
				type: "POST",
				//url: "/index.aspx?s=/Auction/UserPointsExchange_Update&IsAdd=40",//UserPointsExchange
				url: "/UserInfo/Points.aspx?IsAdd=40",
				data:queryString,
				cache: false,
				success: function(msg){
						if(msg==1){ 
							var urlParam = "";
							//alert(location.href);
							Alert("恭喜您,您已成功兑换该商品!\r\n\r\n 您可以到用户中心查看您的兑换记录");
							//location.href.replace(location.href);
							location.reload() ;

						}
						else if(msg==-10)
						{
							AlertErr('不好意思,该商品的积分消费额度设置有误,积分兑换取消了.\r\n由于我们的失误给你带来的不便,真心的说声对不起.'
								+ '\r\n如果您有时间,请您在"会员留言"中给我们留言告知我们这一情况,我们将在第一时间更正该问题.\r\n欢迎您换购其他商品^_^');
						}
						else if(msg==-9)
						{
							AlertErr("不好意思,您的积分余额为0,您是不是把积分都消费完了呀,呵呵,你真是我们的铁杆粉丝呀^_^");
						}
						else if(msg==-1)
						{
							AlertErr( "不好意思,您目前的积分不够换取该商品的,您只有等积分够的时候再来换了^_-");
						}
						else{
							msg = "兑换失败,请检查各项输入是否正确或网络连接状态.代码("+ msg +")";

							AlertErr(msg);
						}
				},
				error:function(msg)
				{
					AlertErr("出错啦:" + msg.responseText);
				}
				
		});				
	}
	else
	{	AjaxLoginBox();
		//AlertErr("请登陆");
	}
	
	
}

	
</script>	
	

	
	<!--end left cont-->
	<!--start right cont-->

<!--start right cont-->
<div class="Grid-Base2 PageWidth_Right MGB10">

	<!-- 即将竞拍 -->
<Site:Side_Future id="Side_Future_1" runat="server" intPageSize = "3"   intPageNo ="1"  PageLoadDataType="1" DataBindingType="0" CacheSecond="0" />	
	<!-- 赢家亮宝 -->
<Site:Side_UserPicNote id="Side_UserPicNote_1" runat="server" intPageSize = "3"  intPageNo ="1"  PageLoadDataType="1" DataBindingType="0" CacheSecond="0" />
	
	
	
</div>
	<!--end right cont-->
	<div class="clear"></div>
</div>
<!--end 主体内容结束-->
<div class=" clear"></div>
<!--start 通用(下) -->
<Site:Menu id="menu_foothelper" runat="server" Flag="FootHelper"  />
<div class=" clear"></div>
<Site:Menu id="menu_links" runat="server" Flag="Links"  />
<div class=" clear"></div>
<Site:Menu id="menu_foot" runat="server" Flag="Foot"   />

</body>
</html>
<script>
//详细页专用
function SetContentBoxHeight(){
	var o= jQuery("#MyMainBox");var o1=jQuery("#CententTitleBox");var o2=jQuery("#ContentDetailBox1");
	var o3=jQuery("#ContentDetailBox");var o4=jQuery("#ContentDetailBoxPic");
	var h1=parseInt(o1.height());
	var h2= parseInt(o2.height());
	var h3 = parseInt(o3.height());
	var h= parseInt(o.height()) - h1 - h2 - h3 ;
	o4.height(h);
}SetContentBoxHeight();
</script>
