优化去除缓存按钮操作
This commit is contained in:
parent
4c2c5125db
commit
4d17c16f92
@ -14,7 +14,7 @@
|
|||||||
<a href="javascript:;" gg-event="shrink" title="侧边伸缩"><i class="layui-icon layui-icon-shrink-right"></i></a>
|
<a href="javascript:;" gg-event="shrink" title="侧边伸缩"><i class="layui-icon layui-icon-shrink-right"></i></a>
|
||||||
</span>
|
</span>
|
||||||
<span class="gg-head-item gg-head-cache">
|
<span class="gg-head-item gg-head-cache">
|
||||||
<a href="javascript:;" gg-event="cache" title="清空缓存"><i class="layui-icon layui-icon-fonts-clear"></i></a>
|
<a href="javascript:;" gg-event="cache" data-href="/admin/api/cache_clear" title="清空缓存"><i class="layui-icon layui-icon-fonts-clear"></i></a>
|
||||||
</span>
|
</span>
|
||||||
<span class="gg-head-item gg-head-home">
|
<span class="gg-head-item gg-head-home">
|
||||||
<a href="/" target="_blank" title="前台首页"><i class="layui-icon layui-icon-website"></i></a>
|
<a href="/" target="_blank" title="前台首页"><i class="layui-icon layui-icon-website"></i></a>
|
||||||
|
@ -53,8 +53,8 @@
|
|||||||
html {background-color: #F6F8FA; color: #162a48}
|
html {background-color: #F6F8FA; color: #162a48}
|
||||||
html,body{height:100%;}
|
html,body{height:100%;}
|
||||||
body.right-open{overflow:hidden;}
|
body.right-open{overflow:hidden;}
|
||||||
a.tab-a,a.open-a,a.open-link,a.right-a{color:#1E9FFF; cursor:pointer;}
|
a.tab-a,a.open-a,a.link-a,a.right-a{color:#1E9FFF; cursor:pointer;}
|
||||||
a.tab-a:hover,a:hover,a.open-a:hover,a.open-link:hover,a.right-a:hover{color:#1E9FFF; opacity:0.8}
|
a.tab-a:hover,a:hover,a.open-a:hover,a.link-a:hover,a.right-a:hover{color:#1E9FFF; opacity:0.8}
|
||||||
.left{float:left;}
|
.left{float:left;}
|
||||||
.right{float:right;}
|
.right{float:right;}
|
||||||
.h1,h1{font-size:24px; font-weight: 600;}
|
.h1,h1{font-size:24px; font-weight: 600;}
|
||||||
|
@ -195,7 +195,8 @@ layui.define(['element'], function (exports) {
|
|||||||
|
|
||||||
//左上角清除缓存
|
//左上角清除缓存
|
||||||
$('#GouguApp').on('click', '[gg-event="cache"]', function (e) {
|
$('#GouguApp').on('click', '[gg-event="cache"]', function (e) {
|
||||||
var that = $(this);
|
let that = $(this);
|
||||||
|
let url = $(this).data('href');
|
||||||
if (that.attr('class') === 'clearThis') {
|
if (that.attr('class') === 'clearThis') {
|
||||||
layer.tips('正在努力清理中...', this);
|
layer.tips('正在努力清理中...', this);
|
||||||
return false;
|
return false;
|
||||||
@ -203,7 +204,7 @@ layui.define(['element'], function (exports) {
|
|||||||
layer.tips('正在清理系统缓存...', this);
|
layer.tips('正在清理系统缓存...', this);
|
||||||
that.attr('class', 'clearThis');
|
that.attr('class', 'clearThis');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "/admin/api/cache_clear",
|
url: url,
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
|
@ -3,7 +3,7 @@ layui.define([], function (exports) {
|
|||||||
var tool = {
|
var tool = {
|
||||||
loading: false,
|
loading: false,
|
||||||
side: function (url, width) {
|
side: function (url, width) {
|
||||||
var sideWidth = window.innerWidth > 1280 ? '1200px' : '960px';
|
var sideWidth = window.innerWidth > 1280 ? '1200px' : '996px';
|
||||||
if (width && width > 0) {
|
if (width && width > 0) {
|
||||||
sideWidth = width + 'px';
|
sideWidth = width + 'px';
|
||||||
}
|
}
|
||||||
@ -30,7 +30,7 @@ layui.define([], function (exports) {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
$(window).resize(function () {
|
$(window).resize(function () {
|
||||||
width = window.innerWidth > 1280 ? '1200' : '960';
|
width = window.innerWidth > 1280 ? '1200' : '996';
|
||||||
$('.layui-anim-rl').width(width);
|
$('.layui-anim-rl').width(width);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -227,7 +227,14 @@ layui.define([], function (exports) {
|
|||||||
$('body').on('click', '.right-a', function () {
|
$('body').on('click', '.right-a', function () {
|
||||||
let url = $(this).data('href');
|
let url = $(this).data('href');
|
||||||
if (url && url !== '') {
|
if (url && url !== '') {
|
||||||
tool.right(url);
|
tool.side(url);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
$('body').on('click', '.link-a', function () {
|
||||||
|
let url = $(this).data('href');
|
||||||
|
if (url && url !== '') {
|
||||||
|
window.location.href=url;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user