diff --git a/src/api/system/menu.js b/src/api/system/menu.js
index b378b01..7c03a77 100644
--- a/src/api/system/menu.js
+++ b/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({
diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue
index 92e1279..75114df 100644
--- a/src/layout/components/Navbar.vue
+++ b/src/layout/components/Navbar.vue
@@ -37,6 +37,9 @@
布局设置
+
+ 清除缓存
+
退出登录
@@ -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')
},