mirror of
https://github.com/eyebluecn/tank-front
synced 2024-04-21 12:31:55 +00:00
change matter share preview and download
This commit is contained in:
@@ -610,7 +610,7 @@ export default class Matter extends BaseEntity {
|
||||
shareCode: string,
|
||||
shareRootUuid: string
|
||||
): string {
|
||||
return `${EnvUtil.currentHost()}/api/alien/download/${this.uuid}/${
|
||||
return `${EnvUtil.currentHost()}/api/share/matter/download/${this.uuid}/${
|
||||
this.name
|
||||
}?shareUuid=${shareUuid}&shareCode=${shareCode}&shareRootUuid=${shareRootUuid}`;
|
||||
}
|
||||
@@ -620,7 +620,7 @@ export default class Matter extends BaseEntity {
|
||||
shareCode: string,
|
||||
shareRootUuid: string
|
||||
): string {
|
||||
return `${EnvUtil.currentHost()}/api/alien/preview/${this.uuid}/${
|
||||
return `${EnvUtil.currentHost()}/api/share/matter/preview/${this.uuid}/${
|
||||
this.name
|
||||
}?shareUuid=${shareUuid}&shareCode=${shareCode}&shareRootUuid=${shareRootUuid}`;
|
||||
}
|
||||
|
||||
@@ -44,6 +44,10 @@ export default class User extends BaseEntity {
|
||||
this.assignEntity('space', Space);
|
||||
}
|
||||
|
||||
hasLogin(): boolean {
|
||||
return this.role !== UserRole.GUEST;
|
||||
}
|
||||
|
||||
getTAG(): string {
|
||||
return 'user';
|
||||
}
|
||||
|
||||
@@ -55,12 +55,15 @@ export default class Detail extends TankComponent<IProps, IState> {
|
||||
|
||||
componentDidMount(): void {
|
||||
this.share.uuid = this.props.match.params.uuid;
|
||||
//如果query中有rootUuid那么就更新.
|
||||
this.share.rootUuid =
|
||||
BrowserUtil.getQueryByName('shareRootUuid') || this.share.rootUuid;
|
||||
this.pager.urlPage = Share.URL_MATTER_PAGE;
|
||||
this.pager.enableHistory();
|
||||
this.refresh();
|
||||
|
||||
if (this.user.hasLogin()) {
|
||||
//如果query中有rootUuid那么就更新.
|
||||
this.share.rootUuid =
|
||||
BrowserUtil.getQueryByName('shareRootUuid') || this.share.rootUuid;
|
||||
this.pager.enableHistory();
|
||||
this.pager.urlPage = Share.URL_MATTER_PAGE;
|
||||
this.refresh();
|
||||
}
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps: Readonly<IProps>, nextContext: any) {
|
||||
@@ -82,7 +85,7 @@ export default class Detail extends TankComponent<IProps, IState> {
|
||||
this.pager.data = this.share.matters;
|
||||
}
|
||||
|
||||
//刷新面包屑
|
||||
//刷新面包屑,面包屑依赖于这个接口
|
||||
this.refreshBreadcrumbs();
|
||||
|
||||
this.needShareCode = false;
|
||||
|
||||
Reference in New Issue
Block a user