|
@@ -1,4 +1,4 @@
|
|
|
-import { tenderStore } from '@/store/mobx'
|
|
|
+import { tenderStore, userStore } from '@/store/mobx'
|
|
|
import { observer } from 'mobx-react'
|
|
|
import React, { useEffect } from 'react'
|
|
|
interface Authorization {
|
|
@@ -23,7 +23,7 @@ const Authorization: React.FC<Authorization> = ({ type, auth, children }) => {
|
|
|
// 获取mobx存储的权限
|
|
|
const permission = tenderStore.permission[type]
|
|
|
|
|
|
- if (permission[auth] === authPass) {
|
|
|
+ if (permission[auth] === authPass || !!userStore.userInfo.isAdmin) {
|
|
|
return <>{children}</>
|
|
|
}
|
|
|
return null
|