<?php /* Smarty version Smarty-3.1.8, created on 2015-11-26 11:23:53
         compiled from "D:\wwwroot\o2o\htdocs\themes\default\xiche\ucenter\car\index.html" */ ?>
<?php /*%%SmartyHeaderCode:221105650295ac86bf8-80008598%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '840ccaa15f504d0f7f4b24cc905410a54871e7cd' => 
    array (
      0 => 'D:\\wwwroot\\o2o\\htdocs\\themes\\default\\xiche\\ucenter\\car\\index.html',
      1 => 1448508231,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '221105650295ac86bf8-80008598',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.8',
  'unifunc' => 'content_5650295ad3e5a7_83856585',
  'variables' => 
  array (
    'gid' => 0,
    'res' => 0,
    'v' => 0,
    'addr_id' => 0,
    'pager' => 0,
    'brand' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5650295ad3e5a7_83856585')) {function content_5650295ad3e5a7_83856585($_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){?><a href="<?php echo smarty_function_link(array('ctl'=>'xiche/ucenter/car/add','gid'=>$_smarty_tpl->tpl_vars['gid']->value),$_smarty_tpl);?>
">添加</a><?php }else{ ?><a href="<?php echo smarty_function_link(array('ctl'=>'xiche/ucenter/car/add'),$_smarty_tpl);?>
">添加</a><?php }?>
    </i>
</header>
<section class="page_center_box">
	<div class="youhui_no">
		<div class="iconBg">
			<i class="ico10"></i>
		</div>
        <h2>添加车辆信息，方便师傅快速找到</h2>
 	</div>
	<div class="carInfor_box">
    	<div class="carInfor mt10">
            <P class="graycl">设置您的车辆，方便洗车师傅快速找到</P>
        </div>
        
        <?php  $_smarty_tpl->tpl_vars['v'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['v']->_loop = false;
 $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['res']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['v']->key => $_smarty_tpl->tpl_vars['v']->value){
$_smarty_tpl->tpl_vars['v']->_loop = true;
 $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['v']->key;
?>
    	<div class="carInfor mt10 check_list" 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,'car_id'=>$_smarty_tpl->tpl_vars['v']->value['car_id'],'addr_id'=>$_smarty_tpl->tpl_vars['addr_id']->value),$_smarty_tpl);?>
"><?php }?>
            <div class="img"><img src="<?php echo $_smarty_tpl->tpl_vars['pager']->value['img'];?>
/<?php echo $_smarty_tpl->tpl_vars['v']->value['photo'];?>
" width="100%" height="100%"></div>
            <p><?php echo $_smarty_tpl->tpl_vars['v']->value['paizhao_sf'];?>
<?php echo $_smarty_tpl->tpl_vars['v']->value['paizhao_hao'];?>
</p>
            <P class="graycl"><?php echo $_smarty_tpl->tpl_vars['brand']->value[$_smarty_tpl->tpl_vars['v']->value['brand_id']]['title'];?>
  <?php echo $_smarty_tpl->tpl_vars['v']->value['color'];?>
</P>
            <?php if ($_smarty_tpl->tpl_vars['gid']->value){?></a><?php }?>
            <span style='color:#ff0000;position:absolute;right:0.1rem;font-size:0.14rem;top:0;' class='close' rel='<?php echo $_smarty_tpl->tpl_vars['v']->value['car_id'];?>
'>x</span>
        </div>
        <?php } ?>
    </div>
</section>
        
    
    <script>

    require(["zepto", "underscore", "frozen"], function($, _, fz) {
        
	$('.check_list').mouseover(function(){
            $(this).css('background','#e0efe5');
        })
        $('.check_list').mouseout(function(){
            $(this).css('background','#eaeaea');
        })
        
        $('#list3').addClass('on');
        
        $('.close').click(function(){
            var car_id = $(this).attr('rel');
            
            var link = "<?php echo smarty_function_link(array('ctl'=>'xiche/ucenter/car/del_car'),$_smarty_tpl);?>
";

 
            $.post(link,{car_id:car_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 }} ?>