<?php /*a:4:{s:67:"/www/wwwroot/btn.millet-mirth.com/view/admin/article/cate_edit.html";i:1630291604;s:60:"/www/wwwroot/btn.millet-mirth.com/view/admin/common/top.html";i:1625466448;s:64:"/www/wwwroot/btn.millet-mirth.com/view/admin/common/ueditor.html";i:1646121304;s:63:"/www/wwwroot/btn.millet-mirth.com/view/admin/common/bottom.html";i:1629163316;}*/ ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title><?php echo config('common.CMS_NAME'); ?></title>
<link rel="stylesheet" href="/static/tqcms/css/common.css">
<link rel="stylesheet" href="/static/tqcms/layui/css/layui.css"><!--layui css-->
<link rel="stylesheet" href="/static/tqcms/css/skin.css">
<script src="/static/tqcms/js/jquery.js"></script>
</head>
<body>
<script type="text/javascript" charset="utf-8" src="/static/tqcms/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="/static/tqcms/ueditor/ueditor.all.js"> </script>
<script type="text/javascript" charset="utf-8" src="/static/tqcms/ueditor/lang/zh-cn/zh-cn.js"></script>


<div class="body_top">
	<ul class="title">
        <?php if($info['model_id']!=1): ?>
    	<li><a href="<?php echo url('article',array('id'=>$info['id'],'model_id'=>$info['model_id'])); ?>"><?php echo tq_value($info['model_id'],'name','cate_type'); ?>管理</a></li>
		<?php endif; ?>
    	<li><a href="<?php echo url('cate',array('id'=>$info['id'])); ?>">栏目内容</a></li>
    	<li class="active"><a href="<?php echo url('cate_edit',array('id'=>$info['id'])); ?>">栏目设置</a></li>
    </ul>
</div>

<div class="common_content">
<form action="<?php echo url('/admin/Cate/update'); ?>" class="layui-form" name="TQform" id="TQform" method="post" onsubmit="return TQsubmit();">
<input name="id" type="hidden" value="<?php echo htmlentities($info['id']); ?>" />
<table width="70%" border="0" class="common_table cate_edit_input_300">
  
  <tr>
    <td class="name lmsx" colspan="4">基本信息</td>
  </tr>
  <tr>
    <td class="name">栏目名称</td>
    <td class="td_input"><input type="text" name="catename" value="<?php echo htmlentities($info['catename']); ?>" placeholder="" autocomplete="off" class="layui-input"></td>
    <td class="name">栏目目录</td>
    <td class="td_input"><input type="text" name="cateseo" value="<?php echo htmlentities($info['cateseo']); ?>" placeholder="" autocomplete="off" class="layui-input"></td>
  </tr>
  <tr>
    <td class="name">分页数量</td>
    <td class="td_input"><input type="text" name="catepage" value="<?php echo htmlentities($info['catepage']); ?>" placeholder="<?php if($info['model_id']==1): ?>单页模型无需填写<?php endif; ?>" autocomplete="off" class="layui-input"></td>
    <td class="name">是否显示</td>
    <td class="td_radio">
    <span>
    <input type="radio" name="is_effect" value="1" title="启用" <?php if($info['is_effect']==1): ?>checked<?php endif; ?>>
    <div class="layui-unselect layui-form-radio layui-form-radioed"><i class="layui-anim layui-icon"></i><div>启用</div></div>
    <input type="radio" name="is_effect" value="2" title="停用" <?php if($info['is_effect']==2): ?>checked<?php endif; ?>>
    <div class="layui-unselect layui-form-radio"><i class="layui-anim layui-icon"></i><div>停用</div></div>
    </span>
    </td>
  </tr>
  <tr>
    <td class="name">顶部导航</td>
    <td class="td_radio">
        <span>
        <input type="radio" name="is_top" value="2" title="否" <?php if($info['is_top']==2): ?>checked<?php endif; ?>>
        <div class="layui-unselect layui-form-radio layui-form-radioed"><i class="layui-anim layui-icon"></i><div>否</div></div>
        <input type="radio" name="is_top" value="1" title="是" <?php if($info['is_top']==1): ?>checked<?php endif; ?>>
        <div class="layui-unselect layui-form-radio"><i class="layui-anim layui-icon"></i><div>是</div></div>
        </span>
    </td>
    <td class="name">底部导航</td>
    <td class="td_radio">
        <span>
        <input type="radio" name="is_foot" value="2" title="否" <?php if($info['is_foot']==2): ?>checked<?php endif; ?>>
        <div class="layui-unselect layui-form-radio layui-form-radioed"><i class="layui-anim layui-icon"></i><div>否</div></div>
        <input type="radio" name="is_foot" value="1" title="是" <?php if($info['is_foot']==1): ?>checked<?php endif; ?>>
        <div class="layui-unselect layui-form-radio"><i class="layui-anim layui-icon"></i><div>是</div></div>
        </span>
    </td>
  </tr>
  
  <?php if(TQ('IS_SYSTEM')==1): ?>
  <tr>
    <td class="name">系统栏目</td>
    <td class="td_radio">
        <span>
        <input type="radio" name="is_system" value="2" title="否" <?php if($info['is_system']==2): ?>checked<?php endif; ?>>
        <div class="layui-unselect layui-form-radio layui-form-radioed"><i class="layui-anim layui-icon"></i><div>否</div></div>
        <input type="radio" name="is_system" value="1" title="是" <?php if($info['is_system']==1): ?>checked<?php endif; ?>>
        <div class="layui-unselect layui-form-radio"><i class="layui-anim layui-icon"></i><div>是</div></div>
        </span>
    </td>
    <td class="name">内容排序</td>
    <td class="td_radio">
        <span>
        <input type="radio" name="is_sort" value="desc" title="desc" <?php if($info['is_sort']=='desc'): ?>checked<?php endif; ?>>
        <div class="layui-unselect layui-form-radio layui-form-radioed"><i class="layui-anim layui-icon"></i><div>desc</div></div>
        <input type="radio" name="is_sort" value="asc" title="asc" <?php if($info['is_sort']=='asc'): ?>checked<?php endif; ?>>
        <div class="layui-unselect layui-form-radio"><i class="layui-anim layui-icon"></i><div>asc</div></div>
        </span>
    </td>
  </tr>
  <?php endif; ?>
  <tr>
    <td class="name">所属模型</td>
    <td class="td_select">
        <span class="layui-input-block layui-model_id" lay-filter="layui-model_id">
        <select name="model_id" lay-filter="model_id">
            <?php if(is_array($cate_type_list) || $cate_type_list instanceof \think\Collection || $cate_type_list instanceof \think\Paginator): $i = 0; $__LIST__ = $cate_type_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?>
            <option value="<?php echo htmlentities($v['id']); ?>" data-list="<?php echo htmlentities($v['list']); ?>" data-info="<?php echo htmlentities($v['info']); ?>" <?php if($info['model_id']==$v['id']): ?>selected<?php endif; ?>><?php echo htmlentities($v['name']); ?></option>
            <?php endforeach; endif; else: echo "" ;endif; ?>
        </select>
        </span>
    </td>
    <td class="name">下拉菜单</td>
    <td class="td_radio">
        <span>
        <input type="radio" name="is_down" value="1" title="是" <?php if($info['is_down']==1): ?>checked<?php endif; ?>>
        <input type="radio" name="is_down" value="2" title="否" <?php if($info['is_down']==2): ?>checked<?php endif; ?>>
        </span>
    </td>
  </tr>



  <tr>
    <td class="name lmsx" colspan="4">模板页面</td>
  </tr>
  <tr>
    <td class="name">列表模板</td>
    <td class="td_input"><input type="text" name="view_list" value="<?php echo htmlentities($info['view_list']); ?>" id="view_list" placeholder="" autocomplete="off" class="layui-input"></td>
    <td class="name">详情模板</td>
    <td class="td_input"><input type="text" name="view_info" value="<?php echo htmlentities($info['view_info']); ?>" id="view_info" placeholder="" autocomplete="off" class="layui-input"></td>
  </tr>
  <tr>
    <td class="name">栏目属性</td>
    <td class="td_select">
    	<div class="layui-input-block layui-link">
            <select name="link" lay-filter="link">
                <option value="1" <?php if($info['link']==1): ?>selected<?php endif; ?>>本栏目</option>
                <option value="2" <?php if($info['link']==2): ?>selected<?php endif; if($cate_pid_list=='[]'): ?>disabled<?php endif; ?>>跳转下级</option>
                <option value="3" <?php if($info['link']==3): ?>selected<?php endif; ?>>外链</option>
            </select>
        </div>
    </td>
    <td class="name">跳新窗口</td>
    <td class="td_radio">
        <span>
        <input type="radio" name="is_new" value="2" title="否" <?php if($info['is_new']==2): ?>checked<?php endif; ?>>
        <div class="layui-unselect layui-form-radio layui-form-radioed"><i class="layui-anim layui-icon"></i><div>否</div></div>
        <input type="radio" name="is_new" value="1" title="是" <?php if($info['is_new']==1): ?>checked<?php endif; ?>>
        <div class="layui-unselect layui-form-radio"><i class="layui-anim layui-icon"></i><div>是</div></div>
        </span>
    </td>
  </tr>
  <tr class="link_url" style="display:<?php if($info['link']!=3): ?>none<?php endif; ?>">
    <td class="name">链接地址</td>
    <td class="td_input" colspan="3"><input type="text" name="link_url" value="<?php echo htmlentities($info['link_url']); ?>" autocomplete="off" class="layui-input"></td>
  </tr>

  <tr class="link_rel" style="display:<?php if($info['link']!=2): ?>none<?php endif; ?>">
    <td class="name">选择下级</td>
    <td class="td_select">
        <div class="layui-input-block layui-link">
            <select name="link_rel" lay-filter="link_rel">
                <?php if(is_array($cate_pid_list) || $cate_pid_list instanceof \think\Collection || $cate_pid_list instanceof \think\Paginator): $i = 0; $__LIST__ = $cate_pid_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?>
                <option value="<?php echo htmlentities($v['id']); ?>" <?php if($info['link_rel']==$v['id']): ?>selected<?php endif; ?>><?php echo htmlentities($v['catename']); ?></option>
                <?php endforeach; endif; else: echo "" ;endif; ?>
            </select>
        </div>
    </td>
    <td></td>
    <td></td>
  </tr>
  
  

  <tr>
    <td class="name lmsx" colspan="4">SEO设置</td>
  </tr>
  <tr>
    <td class="name">SEO标　题</td>
    <td class="td_input"><input type="text" name="seo_title" value="<?php echo htmlentities($info['seo_title']); ?>" placeholder="" autocomplete="off" class="layui-input"></td>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td class="name">SEO关键字</td>
    <td class="td_input"><input type="text" name="seo_keywords" value="<?php echo htmlentities($info['seo_keywords']); ?>" placeholder="" autocomplete="off" class="layui-input"></td>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td class="name">SEO描　述</td>
    <td class="td_textarea" colspan="3"><textarea name="seo_description" cols="" rows="" class="layui-textarea"><?php echo htmlentities($info['seo_description']); ?></textarea></td>
  </tr>

 
</table>
</form>

</div>

<div class="common_foot"><input name="" type="submit" onclick="TQsubmit();" class="layui-btn" /></div>
<script src="/static/tqcms/layui/layui.js"></script><!--layui js-->
<script src="/static/tqcms/layui/laytq.js"></script><!--layui js-->
<script src="/static/tqcms/js/common.js"></script>
<script src="/static/tqcms/js/md5.js"></script>
<script src="/static/tqcms/js/url.js"></script>
</body>
</html>
<script>
function TQsubmit(){
	//TQform.submit();
	$.post('/admin/Cate/update',$("#TQform").serialize(),function(data){
		if(data.type==2){
			layer.msg(data['msg'], {icon:2,time:1000});
		}else{
			layer.msg(data['msg'], {icon:1,time:1000});
		}
    });
	return false;
}


layui.use('form', function(){
	var form = layui.form;

	form.on('select(model_id)', function(data){
		var t=$(data.elem).find("option:selected");
		var list=t.attr('data-list');
		var info=t.attr('data-info');
		$('#view_list').val(list);
		$('#view_info').val(info);
	});

	form.on('select(link)', function(data){
		var t=$(data.elem).find("option:selected").val();
		if(t==3){
			$('.link_url').show();
			$('.link_rel').hide();
		}else if(t==2){
			$('.link_rel').show();
			$('.link_url').hide();
		}else{
			$('.link_url').hide();
			$('.link_rel').hide();
		}
	});
	
});

</script>