b6f27d26cd62356a9dce531b0b7d1ce2.php 16.3 KB
<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:54:"./application/admin/view2/template\templatesearch.html";i:1564567380;s:44:"./application/admin/view2/public\layout.html";i:1538102570;}*/ ?>
<!Doctype html>
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <title>手店商城管理系统</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <!-- Apple devices fullscreen -->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <!-- Apple devices fullscreen -->
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <link href="__WEBPUBLIC__/static/css/main.css?v=__CSSVERSION__" rel="stylesheet" type="text/css">
    <link href="__PUBLIC__/static/css/page.css" rel="stylesheet" type="text/css">
    <link href="__PUBLIC__/static/font/css/font-awesome.min.css" rel="stylesheet" />
    <!--[if IE 7]>
    <link rel="stylesheet" href="__PUBLIC__/static/font/css/font-awesome-ie7.min.css">
    <![endif]-->
    <link href="__PUBLIC__/static/js/jquery-ui/jquery-ui.min.css" rel="stylesheet" type="text/css"/>
    <link href="__PUBLIC__/static/js/perfect-scrollbar.min.css" rel="stylesheet" type="text/css"/>
    <!--新增  20170405-->
    <link href="__PUBLIC__/static/font/font-awesome/css/font-awesome.min.css" rel="stylesheet" />

    <!--[if IE 7]>
    <link rel="stylesheet" href="__PUBLIC__/static/font/font-awesome/css/font-awesome-ie7.min.css">
    <![endif]-->
    <!--<link href="__PUBLIC__/static/css/base_add.css" rel="stylesheet" type="text/css">
    <link href="__PUBLIC__/static/css/seller_center_add.css" rel="stylesheet" type="text/css">-->
    <!--新增  end-->

    <script type="text/javascript" src="__PUBLIC__/static/js/jquery.js"></script>
    <script type="text/javascript" src="__PUBLIC__/static/js/jquery-ui/jquery-ui.min.js?v=__CSSVERSION__"></script>
    <script type="text/javascript" src="__PUBLIC__/static/js/layer/layer.js"></script><!-- 弹窗js 参考文档 http://layer.layui.com/-->
    <script type="text/javascript" src="__PUBLIC__/static/js/admin.js"></script>
    <script type="text/javascript" src="__PUBLIC__/static/js/flexigrid.js"></script>
    <script type="text/javascript" src="__PUBLIC__/static/js/jquery.validation.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/static/js/common.js?v=__CSSVERSION__"></script>
    <script type="text/javascript" src="__PUBLIC__/static/js/perfect-scrollbar.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/static/js/jquery.mousewheel.js"></script>
    <script src="__PUBLIC__/js/myFormValidate.js"></script>
    <script src="__PUBLIC__/js/myAjax2.js?v=__CSSVERSION__"></script>
    <script src="__PUBLIC__/js/global.js?v=__CSSVERSION__"></script>
    <script type="text/javascript">
    function delfunc(obj){
    	layer.confirm('确认删除?', {
    		  btn: ['确定','取消'] //按钮
    		}, function(){
    		    // 确定
   				$.ajax({
   					type : 'post',
   					url : $(obj).attr('data-url'),
   					data : {act:'del',del_id:$(obj).attr('data-id')},
   					dataType : 'json',
   					success : function(data){
   						if(data==1){
   							layer.msg('操作成功', {icon: 1});
   							$(obj).parent().parent().parent().remove();
   						}else{
   							layer.msg(data, {icon: 2,time: 2000});
   						}
//   						layer.closeAll();
   					}
   				})
    		}, function(index){
    			layer.close(index);
    			return false;// 取消
    		}
    	);
    }
    
    function selectAll(name,obj){
    	$('input[name*='+name+']').prop('checked', $(obj).checked);
    }   
    
    function get_help(obj){
        layer.open({
            type: 2,
            title: '帮助手册',
            shadeClose: true,
            shade: 0.3,
            area: ['70%', '80%'],
            content: $(obj).attr('data-url'), 
        });
    }
    
    function delAll(obj,name){
    	var a = [];
    	$('input[name*='+name+']').each(function(i,o){
    		if($(o).is(':checked')){
    			a.push($(o).val());
    		}
    	})
    	if(a.length == 0){
    		layer.alert('请选择删除项', {icon: 2});
    		return;
    	}
    	layer.confirm('确认删除?', {btn: ['确定','取消'] }, function(){
    			$.ajax({
    				type : 'get',
    				url : $(obj).attr('data-url'),
    				data : {act:'del',del_id:a},
    				dataType : 'json',
    				success : function(data){
    					if(data == 1){
    						layer.msg('操作成功', {icon: 1});
    						$('input[name*='+name+']').each(function(i,o){
    							if($(o).is(':checked')){
    								$(o).parent().parent().remove();
    							}
    						})
    					}else{
    						layer.msg(data, {icon: 2,time: 2000});
    					}
    					layer.closeAll();
    				}
    			})
    		}, function(index){
    			layer.close(index);
    			return false;// 取消
    		}
    	);	
    }

    function decoding(obj) {
        $(obj).each(function () {
            var url=$(this).attr('href');
            $(this).attr('href',decodeURIComponent(url).replace('+',' ').replace('+',' '));
        });
    }


</script>
    <!--上传图片的样式 新增  20170422-->
    <style type="text/css">
        html, body { overflow: visible;}
        /*新增 透明背景*/
        .laydate_body .laydate_tab{background: rgba(0, 0, 0, 0) none repeat scroll 0 0 !important;}
        .ncsc-goods-default-pic{display: inherit;}
        .ncsc-goods-default-pic .goodspic-uplaod .upload-thumb{ line-height: 20px;margin-right: 6px; display: inline-block;height: 180px;width: 180px;background-color: #fff;border: 1px solid #f5f5f5; overflow: hidden;text-align: center;vertical-align: middle;}
        .ncsc-goods-default-pic .goodspic-uplaod .upload-thumb img{width: 160px;height: 160px;border: medium none;vertical-align: middle;}
        .hint{clear: both;color: #bbb;font-size: 12px;line-height: 16px;margin-top: 10px;}
        .ncsc-goods-default-pic .goodspic-uplaod .handle{ height: 30px;margin: 10px 0;}
        .ncsc-upload-btn{ display: inline-block;height: 30px;margin: 5px 5px 0 0;vertical-align: top;width: 80px;}
        .ncsc-upload-btn a{display: block;position: relative;z-index: 1;}
        .ncsc-upload-btn a:hover p{background-color: #E6E6E6;border-color: #CFCFCF #CFCFCF #B3B3B3;color: #333333;}
        .ncsc-upload-btn p{-moz-border-bottom-colors: none;
            -moz-border-left-colors: none;
            -moz-border-right-colors: none;
            -moz-border-top-colors: none;
            background-color: #f5f5f5;
            border-color: #dcdcdc #dcdcdc #b3b3b3;
            border-image: none;
            border-style: solid;
            border-width: 1px;
            color: #666;
            font-size: 12px;
            height: 20px;
            left: 0;
            line-height: 20px;
            padding: 4px 0;
            position: absolute;
            text-align: center;
            top: 0;
            width: 78px;
            z-index: 1;}
        .ncsc-upload-btn p i{margin-right: 4px;vertical-align: middle;}
    </style>
</head>
<style>
    .te_le .dataTables_paginate{float: left;}
    .bot{float: right;padding: 15px 0;}
    .vdisib{display: inline-block;*display: inline;*zoom: 1;vertical-align: middle;}

    .hDivBox li{ float: left;width: 163px; margin-left: 10px; margin-top: 10px; }
    .imgli{ height: 273px; overflow: hidden;cursor: pointer;
          position: relative;}
    .imgmb{width: 100%; height: 30px; line-height: 30px;background: rgba(0, 0, 0, 0.5);
           color: #fff; text-align: center;float: left; bottom: 0; left: 0;
           overflow: hidden;position: absolute;}
    .imgmb1{width: 100%; height: 30px; line-height: 30px;text-align: center;background:#f8f8f8;
        overflow: hidden;cursor: pointer;}
    .immediate{
        background-color: #44bb00;
        border-radius: 8px;
        padding: 3px 10px;

    }
    .widget-feature-template-filter{ float: left; margin-left:10px; line-height: 30px;}
    .widget-feature-template-filter li{ display: inline-block}
    .widget-feature-template-filter li+li:before {
        content: '-';
        display: inline-block;
        color: #999;
        margin: 0 5px;
    }
    .widget-feature-template-filter a:hover, a:focus {
        color: #07d;
        text-decoration: none;
    }
    .widget-feature-template-filter a {
        color: #38f;
        text-decoration: none;
    }
   .widget-feature-template-filter li.active a {
        color: #333;
    }

    .laybox1{position: fixed;  z-index: 100; width: 200px;height: 230px; background: #fff;
        left:50%; top:50% ;margin-left: -100px; margin-top: -115px;
        border-shadow:0 0 15px #333; -moz-box-shadow:0 0 15px #333; -webkit-box-shadow:0 0 15px #333}

</style>
<body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default; -moz-user-select: inherit;">
<div class="page" style="padding: 0px 1% 0 1%;">
    <!-- 操作说明 -->
    <div class="flexigrid">
        <div class="mDiv">

            <ul class="widget-feature-template-filter" id="clicktypeid">
                <li <?php if($gettypeid == 0): ?> class="active"<?php endif; ?> data-type="0">
                    <a href="javascript:;" class="js-filter" >所有模板</a>
                </li>
                <?php if(is_array($typelist) || $typelist instanceof \think\Collection): if( count($typelist)==0 ) : echo "" ;else: foreach($typelist as $k=>$v): ?>
                    <li  <?php if($v['id'] == $gettypeid): ?> class="active"<?php endif; ?> data-type="<?php echo $v['id']; ?>">
                        <a href="javascript:;" class="js-filter" ><?php echo $v['typename']; ?></a>
                    </li>
                <?php endforeach; endif; else: echo "" ;endif; ?>

            </ul>
            <form class="navbar-form form-inline" id="search-form2" action="<?php echo U('template/templatesearch'); ?>" method="get">
                <input type="hidden" value="<?php echo (isset($gettypeid) && ($gettypeid !== '')?$gettypeid:0); ?>" id="type_id" name="type_id">
                <div class="sDiv">

                    <div class="sDiv2" style="margin-right: 10px;border:none;">
                        收费类型:
                        <select name="type">
                            <option value="">全部</option>

                            <option value="1"   <?php if($type == 1): ?>selected<?php endif; ?>>免费</option>
                            <option value="2"  <?php if($type == 2): ?>selected<?php endif; ?>>收费</option>
                        </select>
                    </div>

                    <div class="sDiv2">
                        <input size="30" name="keywords" value="<?php echo $keywords; ?>"class="qsbox" placeholder="模板名称" type="text">
                        <input class="btn" style="height: 27px" value="搜索" type="submit">
                    </div>
                </div>
            </form>
        </div>
        <!--数据-->
        <div class="hDiv">
                <ul class="hDivBox">

                    <?php if(empty($mList) || ($mList instanceof \think\Collection && $mList->isEmpty())): ?>


                                <div class="warning-option" style="background-color:white; line-height: 40px; text-align: center"><i class="icon-warning-sign"></i><span>暂无符合条件的数据记录</span>
                                </div>

                        <?php else: if(is_array($mList) || $mList instanceof \think\Collection): if( count($mList)==0 ) : echo "" ;else: foreach($mList as $key=>$v): if($v['isshow'] == 1): if($v['type'] == 2 && $v['money'] > 0): ?>
                            <li>
                                <div  class="imgli">
                                <img src="<?php echo getimg($v['img'],NOIMG); ?>" style="width: 100%">
                                <p class="imgmb">
                                    <span class="disib" style="width:calc(50% - 10px);margin:-3px 3px 0;vertical-align: middle; text-align: left;">
<em style="font-size: 18px;"><?php echo $v['money']; ?></em>
                                    </span>
                                    <span class="disib" style="width:calc(50% - 10px);text-align: right;margin: 3px;vertical-align: middle;">
                                        <img onclick="show_pay(<?php echo $v['id']; ?>,<?php echo $v['money']; ?>,<?php echo $v['days']; ?>,'WEIXIN')" style="margin-right: 5px;" src="__PUBLIC__/static/images/zdywx.png" alt="">
                                        <img onclick="show_pay(<?php echo $v['id']; ?>,<?php echo $v['money']; ?>,<?php echo $v['days']; ?>,'ALIPAY')" src="__PUBLIC__/static/images/zdyzfb.png" alt="">
                                    </span>
                                </p>
                                </div>
                                <p class="imgmb1" b_href="/index.php/mobile/template/s_manatemplate/sn/<?php echo $v['template_sn']; ?>/stoid/<?php echo getAdmStoId(); ?>"  onclick="showi(this)"><?php echo $v['page_title']; ?> (点击预览)</p>
                            </li>
                            <?php else: ?>
                            <li >
                                <div class="imgli" onclick="choose(<?php echo $v['id']; ?>)">
                                    <img src="<?php echo getimg($v['img'],NOIMG); ?>" style="width: 100%" >
                                    <p class="imgmb">
                                        <span class="immediate">立即使用</span>
                                    </p>
                                </div>

                                <?php if($v['type'] == 2 or $v['type'] == 1): ?>
                                    <p class="imgmb1" b_href="/index.php/mobile/template/s_manatemplate/sn/<?php echo $v['template_sn']; ?>" onclick="showi(this)" ><?php echo $v['page_title']; ?> (点击预览)</p>
                                    <?php else: ?>
                                    <p class="imgmb1"><?php echo $v['page_title']; ?></p>
                                <?php endif; ?>
                            </li>
                        <?php endif; endif; endforeach; endif; else: echo "" ;endif; endif; ?>
                </ul>
        </div>
        <div class="clear"></div>
        <!--分页位置-->
        <div class="te_le" style="float: right">
            <?php echo $page; ?>
        </div>
        <?php if($totalnum > $pagenum): ?>
        <div style="float:right; line-height: 30px; padding-top: 15px; font-size: 14px;"><?php echo $pager->totalRows; ?>条,每页<?php echo $pagenum; ?>&nbsp;&nbsp;</div>
        <?php endif; ?>

        <div style="height:40px;"></div>
    </div>
</div>

<!--模板的预览界面-->
<div class="laybox1 dn" onclick="closelaybox()">
    <dl style="text-align: center;color: #333;">
        <dt style="font-size: 16px;height: 30px; background: #f3f3f3;
        border-bottom: 1px solid #eee; line-height: 30px; cursor: pointer  "><span style="float: right;">×&nbsp;&nbsp;</span></dt>
        <dt style="font-size: 16px;margin-top: 10px">请用微信扫一扫预览</dt>
        <dd style="margin-top: 20px">
            <div class="ware_ewm1" style="margin: 0 35px">
                <div id="ewm_box11" class="ewm1">
                    <img id="ewm_box_img11" style="width: 100%; height: 100%" src="" alt=""/>
                </div>
            </div>
        </dd>
        <dt style="heihgt:10px">&nbsp;</dt>
    </dl>
</div>


<script>
    /*--选择--*/
    function choose(id){
        javascript:window.parent.call_back(id);
    }

    // 点击刷新数据
    $('.fa-refresh').click(function(){
        location.href = location.href;
    });



    $('#clicktypeid').find('li').each(function(){
        $(this).click(function(){
            $("#type_id").val($(this).attr('data-type'));
            location.href="/index.php/admin/template/templatesearch/type_id/"+$("#type_id").val();
        })

    })

    function show_pay(mid,money,days,type) {
        parent.show_pay(mid,money,days,type);
    }


    function showi(ob) {
        var html="<?php echo curHostURL(); ?>"+$(ob).attr('b_href');
        var url="/index.php?m=home&c=index&a=qr_code&data="+encodeURIComponent(html);
        $("#ewm_box_img11").attr('src',url);
        $('.laybox1').fadeIn(3);
    }

    function closelaybox() {
        $('.laybox1').fadeOut(3);
        $("#ewm_box_img11").attr('src','');
    }


</script>
</body>
</html>