fix: 权限配置页 GET 请求加 _t 防浏览器缓存 + 保存后自动刷新 UI
This commit is contained in:
@ -4,7 +4,8 @@ import request from '@/utils/request'
|
||||
export function getAllPermissionTree() {
|
||||
return request({
|
||||
url: '/v1/permissions/tree',
|
||||
method: 'get'
|
||||
method: 'get',
|
||||
params: { _t: Date.now() }
|
||||
})
|
||||
}
|
||||
|
||||
@ -12,7 +13,9 @@ export function getAllPermissionTree() {
|
||||
export function getRolePermissions(roleCode: string) {
|
||||
return request({
|
||||
url: '/v1/permissions/role/' + roleCode,
|
||||
method: 'get'
|
||||
method: 'get',
|
||||
// 加时间戳防浏览器缓存,确保权限修改后立即反映
|
||||
params: { _t: Date.now() }
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user