Skip to content

Commit c0b4a9e

Browse files
committed
fix:更新userinfo的id
1 parent 2599cb8 commit c0b4a9e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/plugins/materials/src/composable/useResource.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ const initBlock = async (blockId: string) => {
119119
const initPageOrBlock = async () => {
120120
const { pageId, blockId } = getMetaApi(META_SERVICE.GlobalService).getBaseInfo()
121121
const pagePluginApi = getMetaApi(META_APP.AppManage)
122-
const globalState = getMetaApi(META_SERVICE.GlobalService).getState()
122+
const userInfo = getMetaApi(META_SERVICE.GlobalService).getUserInfo()
123123

124124
if (pageId) {
125125
const data = await pagePluginApi.getPageById(pageId)
@@ -137,7 +137,7 @@ const initPageOrBlock = async () => {
137137
const getPageInfo = () => {
138138
// 页面是否被他人锁定 (被锁定 且 非当前用户锁定)
139139
const isPageOccupierdByOthers = (page) => {
140-
return page.meta?.occupier && page.meta.occupier.id !== globalState.userInfo.id
140+
return page.meta?.occupier && page.meta.occupier.id !== userInfo.id
141141
}
142142
// 首页
143143
const homePage = appSchemaState.pageTree.find((page) => page?.meta?.isHome)

0 commit comments

Comments
 (0)