Browse Source

增加缓存清除

master
sj 2 years ago
parent
commit
e257c559f7
  1. 14
      src/api/system/menu.js
  2. 17
      src/layout/components/Navbar.vue

14
src/api/system/menu.js

@ -17,6 +17,20 @@ export function listSimpleMenus() {
})
}
export function delRedis(data) {
return request({
url: '/bxg/api/redis',
method: 'delete',
data: data
})
}
export function del() {
return request({
url: '/bxg/api/del',
method: 'get'
})
}
// 查询菜单详细
export function getMenu(id) {
return request({

17
src/layout/components/Navbar.vue

@ -37,6 +37,9 @@
<el-dropdown-item @click.native="setting = true">
<span>布局设置</span>
</el-dropdown-item>
<el-dropdown-item @click.native="delIndexRedis">
<span>清除缓存</span>
</el-dropdown-item>
<el-dropdown-item divided @click.native="logout">
<span>退出登录</span>
</el-dropdown-item>
@ -56,7 +59,7 @@ import SizeSelect from '@/components/SizeSelect'
import Search from '@/components/HeaderSearch'
import RuoYiGit from '@/components/RuoYi/Git'
import RuoYiDoc from '@/components/RuoYi/Doc'
import {delRedis,del} from "@/api/system/menu";
export default {
components: {
Breadcrumb,
@ -92,6 +95,18 @@ export default {
}
},
methods: {
delIndexRedis(){
let data={
key:"zsw:index_data",
value:""
}
// delRedis(data).then(res=>{
del().then(res=>{
// console.log('res',res)
this.$message.success("清除成功")
}
)
},
toggleSideBar() {
this.$store.dispatch('app/toggleSideBar')
},

Loading…
Cancel
Save