<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="cart.aspx.cs" Inherits="QiZhanBang.Web.card" %>
<%@ Register src="sitefooter.ascx" tagname="sitefooter" tagprefix="uc1" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="Keywords" content="" />
<meta name="Description" content="" />
<title><%= SiteName %> - 商品兑换确认</title>
<link rel="stylesheet" href="images/bootstrap.min.css" />
<link rel="stylesheet" href="images/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="images/swiper.min.css" />
<link rel="stylesheet" href="images/ectouch.css" />
<link rel="stylesheet" href="images/style.css" />
<script type="text/javascript" src="js/jquery.min.js" ></script> 
</head>
<body>
<!-- 头部s -->
<div class="ect-bg">
<header class="ect-header ect-margin-tb ect-margin-lr text-center ect-bg icon-write"> <a href="javascript:history.go(-1)" class="pull-left ect-icon ect-icon1 ect-icon-history"></a> <span>商品兑换</span> <a href="index.aspx" class="pull-right ect-icon ect-icon1 ect-icon-homes icon-write"></a></header>
</div>
<!-- 头部e -->
<form runat="server">
<!-- 购物车列表开始 -->
<p class="flow-price ect-padding-lr ect-padding-tb">您好，你现有<b class="ect-colory"><asp:Literal runat="server" ID="ltlJb" /></b>金币,<b class="ect-colory"><asp:Literal runat="server" ID="ltlJf" /></b>积分</p>
 <section class="ect-pro-list flow-pic ect-border-bottom0">
 <ul>

<li>

<div class="ect-clear-over"> <a href="#"><img src="<%= productInfo.includepicpath %>" title="<%= productInfo.productname %>"></a>
<dl>
<dt>
<h4 class="title"><a href="#"><%= productInfo.productname%></a></h4>
</dt>
<dd class="ect-color999"> 
<p></p>
<p><strong class="ect-colory"><%=productInfo.salecount%><%= (productInfo.productcode == "1" ? "金币" : "积分")%></strong></p>
</dd>
</dl>
</div>
<div class="ect-margin-tb ect-margin-bottom0 ect-clear-over flow-num-del"> 
<div class="input-group pull-left wrap"> <span class="input-group-addon" onClick="change_goods_number('1',<%= productInfo.productid %>)" >-</span>
<input type="hidden" id="back_number<%= productInfo.productid %>" value="1" />
<input type="text" class="form-num form-contro"  name="23" id="goods_number" autocomplete="off" value="1" onFocus="back_goods_number(<%= productInfo.productid %>)"  onblur="change_goods_number('2',<%= productInfo.productid %>)" runat="server" />
<span class="input-group-addon" onClick="change_goods_number('3',<%= productInfo.productid %>)">+</span> </div>
<div class="pull-right flow-del text-center" style="display:none"> <a href="javascript:if (confirm('您确实要把该商品移出购物车吗？')) location.href='/mobile/index.php?m=default&c=flow&a=drop_goods&id=23';" style="padding: 2px 5px;">删除</a> </div>
</div>
</li>

</ul>
</section>
<p class="flow-price ect-padding-lr ect-padding-tb"> 您正在兑换产品，兑换共需：<b class="ect-colory" id="goods_subtotal"><%=productInfo.salecount%></b><%= (productInfo.productcode == "1" ? "金币" : "积分")%></p>
<div class="flow-jiesuan ect-padding-lr ect-padding-tb">
<asp:Button runat="server" ID="btnOrder" CssClass="btn btn-info ect-btn-info ect-colorf ect-bgmmm" Text="确定兑换" onclick="btnOrder_Click" />
</div>

<!-- 购物车列表结束 -->
</form>
<script type="text/javascript" src="js/shopping_flow.js"></script>

<script>
    function back_goods_number(id) {
        var goods_number = document.getElementById('goods_number').value;
        document.getElementById('back_number' + id).value = goods_number;
    }
    function change_goods_number(type, id) {
        var goods_number = document.getElementById('goods_number').value;
        if (type != 2) { back_goods_number(id) }
        if (type == 1) { goods_number--; }
        if (type == 3) { goods_number++; }
        if (goods_number <= 0) { goods_number = 1; }
        if (!/^[0-9]*$/.test(goods_number)) { goods_number = document.getElementById('back_number' + id).value; }
        document.getElementById('goods_number').value = goods_number;
        var jbnum = <%= productInfo.salecount %> ;
        document.getElementById('goods_subtotal').innerHTML = goods_number * jbnum;
    }
    // 处理返回信息并显示
    function change_goods_number_response(result, id) {
        if (result.error == 0) {
            var rec_id = result.rec_id;
            $("#goods_number_" + rec_id).val(result.goods_number);
            document.getElementById('total_number').innerHTML = result.total_number; //更新数量
            document.getElementById('goods_subtotal').innerHTML = result.total_desc; //更新小计
            if (document.getElementById('ECS_CARTINFO')) {
                //更新购物车数量
                document.getElementById('ECS_CARTINFO').innerHTML = result.cart_info;
            }
        } else if (result.message != '') {
            alert(result.message);
            var goods_number = document.getElementById('back_number' + id).value;
            document.getElementById('goods_number' + id).value = goods_number;
        }
    }

    /*点击下拉手风琴效果*/
    $('.collapse').collapse()
    $(".checkout-select a").click(function () {
        if (!$(this).hasClass("select")) {
            $(this).addClass("select");
        } else {
            $(this).removeClass("select");
        }
    });
	
</script>

<!-- 底部菜单s -->            
<uc1:sitefooter ID="sitefooter1" runat="server" />
<!-- 底部菜单e -->
</body>
</html>
