mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-08 02:52:49 +08:00
页面适配手机,新增皮肤切换功能
This commit is contained in:
@@ -31,8 +31,9 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="main-container">
|
||||
|
||||
<div>
|
||||
|
||||
<div style="overflow: auto;">
|
||||
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -44,7 +45,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{volist name='list' id='vo'}
|
||||
|
||||
|
||||
<tr class="item" data-id="{$vo.id}" data-is-log="{$vo->getData('is_log')}">
|
||||
<td>{$vo.id}</td>
|
||||
<td>
|
||||
@@ -53,27 +54,29 @@
|
||||
</td>
|
||||
<td>
|
||||
<span>{$vo.app}/{$vo.controller}/{$vo.action}</span>
|
||||
<div class="layui-btn layui-btn-sm set-url" data-url="{$vo.app}/{$vo.controller}/{$vo.action}">设置</div>
|
||||
<div class="layui-btn layui-btn-sm set-url"
|
||||
data-url="{$vo.app}/{$vo.controller}/{$vo.action}">设置</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="layui-btn-container">
|
||||
<div class="layui-btn layui-btn-sm is-log" >{$vo.is_log}</div>
|
||||
<div class="layui-btn layui-btn-sm is-log">{$vo.is_log}</div>
|
||||
<div class="layui-btn layui-btn-sm delete">删除</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
{if condition="count($list) eq 0" }
|
||||
<tr>
|
||||
<td colspan="3">暂无数据</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if condition="count($list) eq 0" }
|
||||
<tr>
|
||||
<td colspan="3">暂无数据</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</tbody>
|
||||
</table>
|
||||
<div>
|
||||
{$list->render()|raw}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -82,75 +85,75 @@
|
||||
{include file="common/_footer"}
|
||||
|
||||
<script>
|
||||
|
||||
layui.use(['layer'],function(){
|
||||
$('.set-name').click(function(){
|
||||
|
||||
layui.use(['layer'], function () {
|
||||
$('.set-name').click(function () {
|
||||
var item = this;
|
||||
layer.prompt({
|
||||
value:$(item).data('name')
|
||||
},function(value,index){
|
||||
$.post('{:url("AdminPermission/update")}',{
|
||||
id:$(item).parents('tr').data('id'),
|
||||
name:value
|
||||
},function(result){
|
||||
value: $(item).data('name')
|
||||
}, function (value, index) {
|
||||
$.post('{:url("AdminPermission/update")}', {
|
||||
id: $(item).parents('tr').data('id'),
|
||||
name: value
|
||||
}, function (result) {
|
||||
layer.close(index)
|
||||
$(item).siblings('span').text(value)
|
||||
})
|
||||
})
|
||||
})
|
||||
$('.set-url').click(function(){
|
||||
$('.set-url').click(function () {
|
||||
var item = this;
|
||||
layer.prompt({
|
||||
value:$(item).data('url')
|
||||
},function(value,index){
|
||||
$.post('{:url("AdminPermission/update")}',{
|
||||
id:$(item).parents('tr').data('id'),
|
||||
url:value
|
||||
},function(result){
|
||||
value: $(item).data('url')
|
||||
}, function (value, index) {
|
||||
$.post('{:url("AdminPermission/update")}', {
|
||||
id: $(item).parents('tr').data('id'),
|
||||
url: value
|
||||
}, function (result) {
|
||||
layer.close(index)
|
||||
$(item).siblings('span').text(value)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
$('.delete').click(function(){
|
||||
$('.delete').click(function () {
|
||||
var item = this;
|
||||
layer.confirm('确定要删除吗?',function(){
|
||||
$.get('{:url("AdminPermission/delete")}',{
|
||||
id:$(item).parents('tr').data('id')
|
||||
},function(result){
|
||||
if(result.code == 0){
|
||||
layer.confirm('确定要删除吗?', function () {
|
||||
$.get('{:url("AdminPermission/delete")}', {
|
||||
id: $(item).parents('tr').data('id')
|
||||
}, function (result) {
|
||||
if (result.code == 0) {
|
||||
layer.msg('删除成功');
|
||||
$(item).parents('tr').remove();
|
||||
}else{
|
||||
} else {
|
||||
layer.msg(result.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
$('.is-log').click(function(){
|
||||
$('.is-log').click(function () {
|
||||
var item = this;
|
||||
var isLog = $(item).parents('tr').data('is-log')
|
||||
if(isLog == 0){
|
||||
if (isLog == 0) {
|
||||
isLog = 1
|
||||
}else{
|
||||
} else {
|
||||
isLog = 0
|
||||
}
|
||||
$.post('{:url("AdminPermission/update")}',{
|
||||
id:$(item).parents('tr').data('id'),
|
||||
is_log:isLog
|
||||
},function(){
|
||||
if(isLog == 1){
|
||||
$.post('{:url("AdminPermission/update")}', {
|
||||
id: $(item).parents('tr').data('id'),
|
||||
is_log: isLog
|
||||
}, function () {
|
||||
if (isLog == 1) {
|
||||
$(item).text('记录')
|
||||
}else{
|
||||
} else {
|
||||
$(item).text('不记录')
|
||||
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user