接口调整,对接后端部分的v2版本
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
import {Tag} from './Tag';
|
||||
import {User} from './User';
|
||||
|
||||
export class Article {
|
||||
id: number;
|
||||
title: string;
|
||||
@@ -5,16 +8,16 @@ export class Article {
|
||||
mdContent?: string;
|
||||
original?: boolean;
|
||||
url?: string;
|
||||
publishDateFormat?: string;
|
||||
publishDateFormat: string;
|
||||
updateDateFormat?: string;
|
||||
category?: string;
|
||||
tags?: string[];
|
||||
authorName?: string;
|
||||
preArticleId?: number;
|
||||
nextArticleId?: number;
|
||||
preArticleTitle?: string;
|
||||
nextArticleTitle?: string;
|
||||
readingNumber?: number;
|
||||
tags?: Tag[];
|
||||
author: User;
|
||||
preArticle?: Article;
|
||||
nextArticle?: Article;
|
||||
readingNumber: number;
|
||||
likeCount: number;
|
||||
dislikeCount: number;
|
||||
open?: string;
|
||||
}
|
||||
|
||||
@@ -24,7 +27,7 @@ export class ArticleReq {
|
||||
id?: number;
|
||||
mdContent: string;
|
||||
open: boolean;
|
||||
tags: string;
|
||||
tags: string[];
|
||||
title: string;
|
||||
type: boolean;
|
||||
url?: string;
|
||||
|
||||
@@ -1,33 +1,26 @@
|
||||
import {User} from './User';
|
||||
|
||||
export class Comment {
|
||||
id?: number;
|
||||
authorName?: string;
|
||||
authorAvatarImgUrl?: string;
|
||||
fromUser: User;
|
||||
toUser?: User;
|
||||
content: string;
|
||||
articleID: number;
|
||||
articleTitle: string;
|
||||
pagePath: string;
|
||||
date?: string;
|
||||
responseId: string;
|
||||
pid: number;
|
||||
comment: boolean;
|
||||
respComment: Comment[];
|
||||
status: number;
|
||||
}
|
||||
|
||||
|
||||
export class CommentReq {
|
||||
id?: number;
|
||||
comment: boolean;
|
||||
content: string;
|
||||
pid: number;
|
||||
articleID: number;
|
||||
responseId: string;
|
||||
pid: number = -1;
|
||||
toUserId: number;
|
||||
pagePath: string;
|
||||
|
||||
constructor(comment: boolean) {
|
||||
this.comment = comment;
|
||||
this.responseId = '';
|
||||
if (!comment) {
|
||||
this.articleID = -1;
|
||||
}
|
||||
this.pid = -1;
|
||||
this.id = null;
|
||||
constructor(pagePath: string) {
|
||||
this.pagePath = pagePath;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@ export class Response<T> {
|
||||
code: number;
|
||||
msg: string;
|
||||
result: T;
|
||||
date: number;
|
||||
|
||||
constructor(t: T) {
|
||||
this.code = 0;
|
||||
@@ -28,18 +27,4 @@ export class PageList<T> {
|
||||
list: T[];
|
||||
pageNum: number;
|
||||
pageSize: number;
|
||||
size: number;
|
||||
startRow: number;
|
||||
endRow: number;
|
||||
pages: number;
|
||||
prePage: number;
|
||||
nextPage: number;
|
||||
isFirstPage: boolean;
|
||||
isLastPage: boolean;
|
||||
hasPreviousPage: boolean;
|
||||
hasNextPage: boolean;
|
||||
navigatePages: number;
|
||||
navigatepageNums: number[];
|
||||
navigateFirstPage: number;
|
||||
navigateLastPage: number;
|
||||
}
|
||||
|
||||
@@ -3,4 +3,6 @@ export class Link {
|
||||
name: string;
|
||||
url: string;
|
||||
open?: boolean;
|
||||
iconPath: string;
|
||||
desc: string;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
import {Article} from './Article';
|
||||
|
||||
export class Category {
|
||||
id: number;
|
||||
name: string;
|
||||
articles?: number[];
|
||||
articles?: Article[];
|
||||
}
|
||||
|
||||
|
||||
export class Tag {
|
||||
id: number;
|
||||
name: string;
|
||||
articles?: number[];
|
||||
articles?: Article[];
|
||||
}
|
||||
|
||||
@@ -2,10 +2,10 @@ export class User {
|
||||
id: number;
|
||||
email: string;
|
||||
displayName: string;
|
||||
emailStatus: boolean;
|
||||
avatarImgUrl?: string;
|
||||
emailStatus?: boolean;
|
||||
avatarImgUrl: string;
|
||||
desc: string;
|
||||
role: string;
|
||||
role?: string;
|
||||
token?: string;
|
||||
pwd?: string;
|
||||
recentlyLandedDate?: string
|
||||
|
||||
Reference in New Issue
Block a user