<?
//$duoduo->get_table_desc("article");
 $cates=app("type")->cids(0,1);
 //$data['switch']['tj']=array("openvalue"=>2,"default"=>"close");
 //include(ADMINROOT.'/template/public/'.$act.'.tpl.php'); //公共模板

$row=$duoduo->select(MOD,"*","id=".$_GET['id']);
?>
<br>
<div class="layui-form layuimini-main">

      <blockquote class="layui-elem-quote layui-text">
            设置为推荐，并设置图片大小为750px*400，则会显示到首页的广告图中.只针对站内资讯类别
          
     </blockquote>  

        <div class="layui-form-item" id="app">
            <label class="layui-form-label required">标题</label>
            <div class="layui-input-block">
                <input type="text" name="title" lay-verify="required" lay-reqtext="" placeholder="请输入名称" value="<?=$row['title']?>" class="layui-input">
              
            </div>
        </div>
       <div class="layui-form-item">
		     <label class="layui-form-label">分类</label>
		     <div class="layui-input-block">
		          <?=select3($cates,$row['cid'],"cid")?>
		    </div>
       </div>

   
        <?
         $title="图片";
         $field="img";
         $name="img";
         $fvalue=$row['img'];
         $desc="尺寸750*400";
        include(ADMINROOT.'/template/tpl/inputimg.tpl.php'); //
       ?>
      
 
    
     
         <div class="layui-form-item">
            <label class="layui-form-label required">推荐</label>
            <div class="layui-input-block">
               <?=html_radio1(array(1=>"不推荐",2=>"推荐"),$row['tj']?$row['tj']:1,"tj")?>
            </div>
         </div>


          <div class="layui-form-item">
            <label class="layui-form-label required">小程序跳转类型</label>
            <div class="layui-input-block">
               <?=html_radio1(array(1=>"普通",2=>"导航"),$row['xcx_type']?$row['xcx_type']:1,"xcx_type")?>
            </div>
         </div>

          <div class="layui-form-item">
            <label class="layui-form-label required">小程序跳转URL</label>
            <div class="layui-input-block">
                <input type="text" name="xcx_url"  lay-reqtext="" placeholder="" value="<?=$row['xcx_url']?>" class="layui-input">
              
              
            </div>
        </div>
 
     <!--  <div class="layui-form-item layui-form-text">
		    <label class="layui-form-label">描述</label>
		    <div class="layui-input-block">
		      <textarea placeholder="" class="layui-textarea"  name="desc"><?=$row["desc"]?></textarea>
		    </div>
      </div> -->


      

      
        <div class="layui-form-item">
            <label class="layui-form-label required">排序</label>
            <div class="layui-input-block">
                <input type="text" name="sort" lay-verify="required|number" lay-reqtext="" placeholder="" value="<?=$row['sort']?$row['sort']:0?>" class="layui-input">
              
            </div>
         </div>
            

        <?  

         $field="content";
         $title="内容";
         $fvalue=$row['content'];
         include(ADMINROOT.'/template/tpl/kindeditor.tpl.php'); ?>

         <div class="layui-form-item">
            <div class="layui-input-block">
           
                <input type="hidden" value="<?=$row['id']?>" name="id">
                <button class="layui-btn layui-btn-normal jian_save" lay-submit lay-filter="saveBtn" >确认保存</button>
            </div>
        </div>
   


</div>
<script>
    layui.use(['form', 'table','miniAdmin','layedit'], function () {
        var form = layui.form,
            layer = layui.layer,
            miniAdmin = layui.miniAdmin,
            layedit = layui.layedit;
            table = layui.table,
            $ = layui.jquery;   
        /**
         * 初始化表单，要加上，不然刷新部分组件可能会不加载
         */
        form.render();
         form.on('select(node_id)', function(data){
               $('#nodevalue').val(data.value);
         })






    });


</script>



