重构界面ui

This commit is contained in:
小海
2020-04-06 20:48:40 +08:00
parent f2791ee150
commit 3ea8f63abc
601 changed files with 95141 additions and 90135 deletions

View File

@@ -0,0 +1,12 @@
export class Comment {
id?: number;
authorName?: string;
authorAvatarImgUrl?: string;
content: string;
articleID: number;
date?: string;
responseId: string;
pid: number;
comment: boolean;
respComment: Comment[];
}

View File

@@ -0,0 +1,27 @@
import {environment} from '../../environments/environment';
export class EditorConfig {
public width = '100%';
public height = '400';
public path = 'assets/editor/lib/';
public codeFold: true;
public searchReplace = true;
public toolbar = true;
public placeholder = '欢迎来到小海的创作中心';
public emoji = true;
public taskList = true;
public tex = true;
public readOnly = false;
public tocm = true;
public watch = true;
public previewCodeHighlight = true;
public saveHTMLToTextarea = true;
public markdown = '';
public flowChart = true;
public syncScrolling = true;
public sequenceDiagram = true;
public imageUpload = true;
public imageFormats = ['jpg', 'jpeg', 'gif', 'png', 'bmp', 'webp'];
public imageUploadURL = environment.host + '/imgUpload';
}

View File

@@ -0,0 +1,5 @@
import {RequestObj} from './Request';
export interface ErrDispatch {
errHandler(code: number, msg: string, request?: RequestObj): void;
}

View File

@@ -1,11 +0,0 @@
export class LeaveMsg {
id: number;
type: number;
authorName: string;
authorAvatarImgUrl: string;
content: string;
date: string;
pid: number;
responseId: string;
child: LeaveMsg[];
}

View File

@@ -0,0 +1,5 @@
export class Link {
id?: number;
name: string;
url: string;
}

View File

@@ -0,0 +1,12 @@
import {HttpHeaders} from '@angular/common/http';
export class RequestObj {
path: string;
method: 'GET' | 'POST' | 'PUT' | 'DELETE';
data?: {};
contentType?: 'application/json' | 'application/x-www-form-urlencoded';
queryParam?: {};
header?: HttpHeaders | {
[header: string]: string | string[];
};
}

View File

@@ -0,0 +1,11 @@
export class Response<T> {
code: number;
msg: string;
result: T;
date: number;
constructor(t: T) {
this.code = 0;
this.result = t;
}
}

View File

@@ -1,19 +1,19 @@
export class Article {
id: number;
title: string;
summary: string;
mdContent?: string;
original?: boolean;
url?: string;
publishDateFormat?: string;
updateDateFormat?: string;
category?: string;
tags?: string[];
authorName?: string;
preArticleId?: number;
nextArticleId?: number;
preArticleTitle?: string;
nextArticleTitle?: string;
readingNumber?: number;
open?: string;
id: number;
title: string;
summary: string;
mdContent?: string;
original?: boolean;
url?: string;
publishDateFormat?: string;
updateDateFormat?: string;
category?: string;
tags?: string[];
authorName?: string;
preArticleId?: number;
nextArticleId?: number;
preArticleTitle?: string;
nextArticleTitle?: string;
readingNumber?: number;
open?: string;
}

View File

@@ -1,14 +1,14 @@
export class ArticleReq {
category: string;
id?: number;
mdContent: string;
open: boolean;
tags: string;
title: string;
type: boolean;
url?: string;
category: string;
id?: number;
mdContent: string;
open: boolean;
tags: string;
title: string;
type: boolean;
url?: string;
constructor() {
this.type = true;
}
constructor() {
this.type = true;
}
}

View File

@@ -1,6 +1,5 @@
export class Category {
id: number;
name: string;
articles: string;
size?: number;
id: number;
name: string;
articles?: number[];
}

View File

@@ -1,18 +1,18 @@
export class CommentReq {
articleID: number;
comment: boolean;
content: string;
id: number;
pid: number;
responseId: string;
id?: number;
comment: boolean;
content: string;
pid: number;
articleID: number;
responseId: string;
constructor(comment: boolean) {
this.comment = comment;
this.responseId = '';
if (!comment) {
this.articleID = -1;
constructor(comment: boolean) {
this.comment = comment;
this.responseId = '';
if (!comment) {
this.articleID = -1;
}
this.pid = -1;
this.id = null;
}
this.pid = -1;
this.id = null;
}
}
}

View File

@@ -1,7 +0,0 @@
export class Count {
visitorCount: number = 0;
leaveMsgCount: number = 0;
tagCount: number = 0;
articleCount: number = 0;
commentCount: number = 0;
}

View File

@@ -1,6 +0,0 @@
export class Data {
code: number;
msg: string;
result: any;
date: number;
}

View File

@@ -1,30 +0,0 @@
import {environment} from '../../environments/environment';
export class EditorConfig {
public width = '100%';
public height = '400';
public path = 'assets/editor.md/lib/';
public codeFold: true;
public searchReplace = true;
public toolbar = true;
public placeholder = '欢迎来到小海的创作中心';
public emoji = true;
public taskList = true;
public tex = true;
public readOnly = false;
public tocm = true;
public watch = true;
public previewCodeHighlight = true;
public saveHTMLToTextarea = true;
public markdown = '';
public flowChart = true;
public syncScrolling = true;
public sequenceDiagram = true;
public imageUpload = true;
public imageFormats = ['jpg', 'jpeg', 'gif', 'png', 'bmp', 'webp'];
public imageUploadURL = environment.host + '/imgUpload';
constructor() {
}
}

View File

@@ -1,5 +1,11 @@
export class LoginReq {
email: string;
password: string;
isRememberMe: boolean = false;
}
email: string;
isRememberMe: boolean;
password: string;
constructor(email: string, isRememberMe: boolean, password: string) {
this.email = email;
this.isRememberMe = isRememberMe;
this.password = password;
}
}

View File

@@ -1,20 +0,0 @@
export class Page<T> {
total: number;
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;
}

View File

@@ -0,0 +1,20 @@
export class PageList<T> {
total: number;
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;
}

View File

@@ -1,6 +1,5 @@
export class Tag {
id?: number;
name: string;
articles?: string;
size: number;
id: number;
name: string;
articles?: number[];
}

View File

@@ -1,5 +0,0 @@
export class UpdateInfo {
id: number;
info: string;
time: string;
}

View File

@@ -1,9 +1,10 @@
export class User {
id: number;
email: string;
displayName: string;
emailStatus: boolean;
avatarImgUrl: string;
desc: string;
role: string;
id: number;
email: string;
displayName: string;
emailStatus: boolean;
avatarImgUrl: string;
desc: string;
role: string;
token?: string;
}