<?php /* Smarty version Smarty-3.1.8, created on 2015-11-26 11:04:47
         compiled from "D:\wwwroot\o2o\htdocs\themes\default\xiche\ucenter\addr\index.html" */ ?>
<?php /*%%SmartyHeaderCode:1248565028e8e59ae1-93548007%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '3ec844b2b908a943933896e22eeb735b6b631e43' => 
    array (
      0 => 'D:\\wwwroot\\o2o\\htdocs\\themes\\default\\xiche\\ucenter\\addr\\index.html',
      1 => 1448507083,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '1248565028e8e59ae1-93548007',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.8',
  'unifunc' => 'content_565028e8f11492_03365612',
  'variables' => 
  array (
    'gid' => 0,
    'car_id' => 0,
    'addrs' => 0,
    'a' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_565028e8f11492_03365612')) {function content_565028e8f11492_03365612($_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">
        <?php if ($_smarty_tpl->tpl_vars['gid']->value){?>
                <?php if ($_smarty_tpl->tpl_vars['car_id']->value){?>
                    <a href="<?php echo smarty_function_link(array('ctl'=>'xiche/ucenter/addr/add','gid'=>$_smarty_tpl->tpl_vars['gid']->value,'car_id'=>$_smarty_tpl->tpl_vars['car_id']->value),$_smarty_tpl);?>
">添加</a>
                    <?php }else{ ?>
                    <a href="<?php echo smarty_function_link(array('ctl'=>'xiche/ucenter/addr/add','gid'=>$_smarty_tpl->tpl_vars['gid']->value),$_smarty_tpl);?>
">添加</a>
                <?php }?>
            <?php }else{ ?>
            <a href="<?php echo smarty_function_link(array('ctl'=>'xiche/ucenter/addr/add'),$_smarty_tpl);?>
">添加</a>
        <?php }?>
    </i>
</header>
<section id="index" class="page_center_box">
	<div class="youhui_no">
		<div class="iconBg">
			<i class="ico1"></i>
		</div>
		<h2>添加常用地址，轻松享用一键上门洗车</h2>
 	</div>
	<div class="tf_addchose login_addchose">
		<ul>
			<?php  $_smarty_tpl->tpl_vars['a'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['a']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['addrs']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['a']->key => $_smarty_tpl->tpl_vars['a']->value){
$_smarty_tpl->tpl_vars['a']->_loop = true;
?>
			<li style='position:relative;'>
                            <?php if ($_smarty_tpl->tpl_vars['gid']->value){?><a href="<?php echo smarty_function_link(array('ctl'=>'xiche/order/goods','gid'=>$_smarty_tpl->tpl_vars['gid']->value,'addr_id'=>$_smarty_tpl->tpl_vars['a']->value['addr_id'],'car_id'=>$_smarty_tpl->tpl_vars['car_id']->value),$_smarty_tpl);?>
"><?php }?>
                            <span class="graycl"><?php echo $_smarty_tpl->tpl_vars['a']->value['addr'];?>
</span>(<?php echo $_smarty_tpl->tpl_vars['a']->value['remark'];?>
)
                            <?php if ($_smarty_tpl->tpl_vars['gid']->value){?></a><?php }?>
                            <span style='color:#ff0000;position:absolute;right:0.1rem;font-size:0.14rem;' rel='<?php echo $_smarty_tpl->tpl_vars['a']->value['addr_id'];?>
' class='close'>x</span>
			</li>
                        <?php } ?>
		</ul>
	</div>
</section>
<script type="text/javascript">
    require(["zepto", "underscore", "frozen"], function($, _, fz) {
	$('.login_addchose ul li').mouseover(function(){
            $(this).addClass('ever');
        })
        $('.login_addchose ul li').mouseout(function(){
            $(this).removeClass('ever');
        })
        $('#list3').addClass('on');
        $('.close').click(function(){
            var addr_id = $(this).attr('rel');
            
            var link = "<?php echo smarty_function_link(array('ctl'=>'xiche/ucenter/addr/del_addr'),$_smarty_tpl);?>
";

 
            $.post(link,{addr_id:addr_id}, function (ret) {
 
                if(ret.error == 101){
                    warning('您还没有登录？登录后即可操作！',"<?php echo smarty_function_link(array('ctl'=>'xiche/passport:login'),$_smarty_tpl);?>
");
                }else if (ret.error) {
                    $.tips({content: ret.message, stayTime: 2000});
                } else {
                    $.tips({content: ret.message, stayTime: 2000});
                    setTimeout(function () {
                        location.reload(true);
                    }, 1000)
                }
            }, 'json');
            
        })
    });
</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 }} ?>