mirror of
https://gitee.com/ssssssss-team/magic-boot.git
synced 2026-05-15 00:00:02 +08:00
演示模式,后台权限code控制
This commit is contained in:
@@ -9,7 +9,6 @@ const { errorLog: needErrorLog } = settings
|
||||
|
||||
function checkNeed() {
|
||||
const env = process.env.NODE_ENV
|
||||
console.log(needErrorLog)
|
||||
if (isString(needErrorLog)) {
|
||||
return env === needErrorLog
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ const hasPermission = {
|
||||
bind(el, binding, vnode) {
|
||||
if (binding.value) {
|
||||
const permissionList = Vue.prototype.$authorities
|
||||
if (permissionList && permissionList.length && !permissionList.includes(binding.value)) {
|
||||
if (permissionList && permissionList.length && !permissionList.includes(binding.value) && process.env.NODE_ENV != 'preview') {
|
||||
el.style.display = 'none'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,6 +85,9 @@ service.interceptors.response.use(
|
||||
if(currentMessage){
|
||||
currentMessage.close()
|
||||
}
|
||||
if(res.code == 403 && process.env.NODE_ENV == 'preview'){
|
||||
res.message = '演示模式,不允许操作!'
|
||||
}
|
||||
currentMessage = Message({
|
||||
message: res.message || 'Error',
|
||||
type: 'error',
|
||||
|
||||
@@ -62,6 +62,7 @@ treeTable.deleteEmptyChildren = (children) => {
|
||||
}
|
||||
|
||||
treeTable.recursionSearch = (fields, data, text, html) => {
|
||||
html = html != undefined ? html : true
|
||||
var searchData = []
|
||||
for(var i in data){
|
||||
var treeNode = data[i]
|
||||
|
||||
Reference in New Issue
Block a user