<?php /* Smarty version Smarty-3.1.8, created on 2015-11-21 16:26:12
         compiled from "D:\wwwroot\o2o\htdocs\themes\default\ucenter\hongbao\exchange.html" */ ?>
<?php /*%%SmartyHeaderCode:2486256502a86bd8615-81180590%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '028d24758d62946dffaa9b21278ba43a7570c833' => 
    array (
      0 => 'D:\\wwwroot\\o2o\\htdocs\\themes\\default\\ucenter\\hongbao\\exchange.html',
      1 => 1448094370,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '2486256502a86bd8615-81180590',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.8',
  'unifunc' => 'content_56502a86c65034_52676907',
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_56502a86c65034_52676907')) {function content_56502a86c65034_52676907($_smarty_tpl) {?><?php if (!is_callable('smarty_function_link')) include 'D:\\wwwroot\\o2o\\htdocs\\system\\plugins/smarty\\function.link.php';
?><!DOCTYPE HTML>
<html>
    <head>
        <?php echo $_smarty_tpl->getSubTemplate ("xiche/block/sheader.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

       
    </head>
    <body>
        
<header>
            <i class="left"><a id="icon_goback" href="<?php echo smarty_function_link(array('ctl'=>'ucenter/index'),$_smarty_tpl);?>
"></a></i>
            <div class="title">兑换红包</div>
            <i class="right"></i>
        </header>
        <section class="page_center_box">
            <form>
                <div class="exchange_bag">
                    <input type="text" name="key" id="key" class="text" placeholder="请输入兑换码">
                </div>
                <div class="exchange_bag_btn">
                    <input type="button" id="ex_add" class="btn" value="兑换">
                </div>
            </form>
        </section>
        <script type="text/javascript">

            require(["zepto", "underscore", "frozen"], function ($, _, fz) {
                $("#ex_add").click(function () {
                    var link = "<?php echo smarty_function_link(array('ctl'=>'ucenter/hongbao/exchange'),$_smarty_tpl);?>
";
                    var key = $("#key").val();
                    if(key == ""){
                         $.tips({content: "兑换码不能为空",stayTime:2000});
                    }
                    $.post(link,{key:key},function(ret){
                        if(ret.error){
                           $.tips({content: ret.message,stayTime:2000});
                        }else{
                            $.tips({content: ret.message,stayTime:2000});
                            setTimeout(function(){
                                 window.location.href='<?php echo smarty_function_link(array('ctl'=>"ucenter/hongbao",'arg'=>"1"),$_smarty_tpl);?>
';
                            },2000)
                        }
                    },'json');
                    
                    
                    
                });
                $('#list3').addClass('on');
            });
        </script>
        
        <?php echo $_smarty_tpl->getSubTemplate ("xiche/block/sfooter.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

    </body>
</html><?php }} ?>