You've already forked guangan
点赞城市
This commit is contained in:
80
plugs/think-plugs-cms/src/view/thumb/index.html
Normal file
80
plugs/think-plugs-cms/src/view/thumb/index.html
Normal file
@ -0,0 +1,80 @@
|
||||
{extend name="table"}
|
||||
|
||||
{block name="button"}
|
||||
<!--{if auth("add")}-->
|
||||
<button type="button" class="layui-btn layui-btn-sm layui-btn-primary" data-modal='{:url("add")}' data-title="添加点赞城市">添加</button>
|
||||
<!--{/if}-->
|
||||
{/block}
|
||||
|
||||
{block name="content"}
|
||||
<div class="layui-tab">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col">
|
||||
<div class="article_list think-bg-white">
|
||||
{include file='article/index_search'}
|
||||
<table class="layui-hide" data-url="{$request->url()}" data-target-search="form.form-search" id="Table" lay-filter="Table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/html" id="toolbar">
|
||||
<!--{if auth("edit")}-->
|
||||
<a data-modal="{:url('edit')}?id={{ d.id }}" data-height="80%" data-width="80%" class="layui-btn layui-btn-xs layui-btn-normal" title="修改">修改</a>
|
||||
<!--{/if}-->
|
||||
<!--{if auth("status")}-->
|
||||
{{# if(d.status == 0){ }}
|
||||
<a class="layui-btn layui-btn-xs layui-btn-normal" data-title="启用该点赞城市" data-modal='{:url("status")}?id={{ d.id }}&status=1'>启 用</a>
|
||||
{{# } else { }}
|
||||
<a class="layui-btn layui-btn-xs layui-btn-primary" data-title="隐藏该点赞城市" data-modal='{:url("status")}?id={{ d.id }}&status=0'>隐 藏</a>
|
||||
{{# } }}
|
||||
<!--{/if}-->
|
||||
<!--{if auth("remove")}-->
|
||||
<a data-confirm="确定要永久删除此点赞城市吗?" data-action="{:url('remove')}" data-value="id#{{ d.id }}" data-csrf="{:systoken('remove')}" class="layui-btn layui-btn-xs layui-btn-danger" title="删除">删除</a>
|
||||
<!--{/if}-->
|
||||
</script>
|
||||
{/block}
|
||||
|
||||
{block name='style'}
|
||||
<style>
|
||||
</style>
|
||||
{/block}
|
||||
|
||||
{block name='script'}
|
||||
<script>
|
||||
$(function () {
|
||||
$('#Table').layTable({
|
||||
height: 'full-250',
|
||||
toolbar: true,
|
||||
sort: {field: 'create_at', type: 'asc'},
|
||||
title: '点赞城市列表',
|
||||
cols: [[
|
||||
{type: 'numbers'},
|
||||
{field: 'thumb', title: '缩略图', width: 140, templet:function(item){
|
||||
if (item.thumb) {
|
||||
return '<img data-tips-image src="'+item.thumb+'" alt="image" style="width: 120px;height: 60px;">';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}},
|
||||
{field:'title', title:'标题'},
|
||||
{field:'status', title:'状态', width:80, templet:function(item){
|
||||
if(item.status == 0){
|
||||
return '<span style="color:red;">待发布</span>';
|
||||
}else if(item.status == 1){
|
||||
return '<span style="color:green;">已发布</span>';
|
||||
}
|
||||
}},
|
||||
{field:'view_count', title:'浏览数', width:100, sort: true},
|
||||
{field:'like_count', title:'点赞数', width:100, sort: true},
|
||||
{fixed: 'right', title:'操作', toolbar: '#toolbar', width:180}
|
||||
]],
|
||||
page: true
|
||||
})
|
||||
layui.use(['table'], function(){
|
||||
var table = layui.table,
|
||||
layer = layui.layer;
|
||||
|
||||
})
|
||||
})
|
||||
</script>
|
||||
{/block}
|
Reference in New Issue
Block a user