diff --git a/src/api/doc/type.ts b/src/api/doc/type.ts index 6afc9d9..722a144 100644 --- a/src/api/doc/type.ts +++ b/src/api/doc/type.ts @@ -52,6 +52,14 @@ export interface shareItem{ expireTime?:string; permitList?:string; } +//收藏夹数据结构 +export interface favourItem{ + name:string; + uuid:string; //文件uuid + userUuid:string; //owner uuid + path:string; + permitVal:number; //该值是当前用户permits的解析结果 +} export interface matterTree extends matterInfo { manager?:boolean; diff --git a/src/utils/router/index.ts b/src/utils/router/index.ts index 8c59511..9863310 100644 --- a/src/utils/router/index.ts +++ b/src/utils/router/index.ts @@ -101,6 +101,11 @@ export const staticRouting : RouteRecordRaw[] = [ component: () => import('@/views/doc/agent.vue'), meta: { hidden: true }, }, + // { + // path: '/favourites', + // component: () => import('@/views/doc/favourite.vue'), + // meta: { hidden: true }, + // }, { path: '/spaces/:spaceid', name: 'spaces', diff --git a/src/views/doc/agent.vue b/src/views/doc/agent.vue index 3849d89..787c4f6 100644 --- a/src/views/doc/agent.vue +++ b/src/views/doc/agent.vue @@ -6,7 +6,7 @@ + + + + diff --git a/src/views/doc/index.vue b/src/views/doc/index.vue index ffc4a5f..69fee9c 100644 --- a/src/views/doc/index.vue +++ b/src/views/doc/index.vue @@ -37,8 +37,12 @@ function onSelectSpace(data:matterInfo,recycling?:number){ state:{ space: toRaw(data), //这里一定要用toRaw } - }); + }); }else{ + if(recycling==1) { + router.push({ path: "/favourites",query:{fa:7}}); + return + } if(recycling==3) { router.push({ path: "/mysapce",query:{fa:7,recycling:recycling}}); return @@ -174,7 +178,7 @@ function onSpaceConfig(row:matterInfo){ onMounted(()=>{ if(userStore.userInfoCont == ""){ userStore.getInfo().then(()=>{ - getMySpaces(uid,{roles:Departs.value}).then((resp)=>{ + getMySpaces(btoa("p0"+userStore.userInfoCont.userId),{roles:Departs.value}).then((resp)=>{ resp.data.forEach((item)=>{ let ismanager=false if(item.userUuid==rawUid || item.managers.includes(rawUid)) ismanager=true;