修改路径

This commit is contained in:
小海
2020-05-16 22:18:45 +08:00
parent abc792a561
commit 42177a7721
683 changed files with 92 additions and 18398 deletions

35
src/app/class/Article.ts Normal file
View File

@@ -0,0 +1,35 @@
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;
}
export class ArticleReq {
category: string;
id?: number;
mdContent: string;
open: boolean;
tags: string;
title: string;
type: boolean;
url?: string;
constructor() {
this.type = true;
}
}

33
src/app/class/Comment.ts Normal file
View File

@@ -0,0 +1,33 @@
export class Comment {
id?: number;
authorName?: string;
authorAvatarImgUrl?: string;
content: string;
articleID: number;
articleTitle: string;
date?: string;
responseId: string;
pid: number;
comment: boolean;
respComment: Comment[];
}
export class CommentReq {
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;
}
this.pid = -1;
this.id = null;
}
}

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 = false; // 时序图/序列图
public imageUpload = true;
public imageFormats = ['jpg', 'jpeg', 'gif', 'png', 'bmp', 'webp'];
public imageUploadURL = environment.host + '/imgUpload';
public useAjaxToUploadImg = true
}

View File

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

View File

@@ -0,0 +1,45 @@
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[];
};
}
export class Response<T> {
code: number;
msg: string;
result: T;
date: number;
constructor(t: T) {
this.code = 0;
this.result = t;
}
}
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;
}

6
src/app/class/Link.ts Normal file
View File

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

12
src/app/class/Tag.ts Normal file
View File

@@ -0,0 +1,12 @@
export class Category {
id: number;
name: string;
articles?: number[];
}
export class Tag {
id: number;
name: string;
articles?: number[];
}

View File

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

24
src/app/class/User.ts Normal file
View File

@@ -0,0 +1,24 @@
export class User {
id: number;
email: string;
displayName: string;
emailStatus: boolean;
avatarImgUrl?: string;
desc: string;
role: string;
token?: string;
pwd?: string;
recentlyLandedDate?: string
}
export class LoginReq {
email: string;
isRememberMe: boolean;
password: string;
constructor(email: string, isRememberMe: boolean, password: string) {
this.email = email;
this.isRememberMe = isRememberMe;
this.password = password;
}
}

9
src/app/class/Visitor.ts Normal file
View File

@@ -0,0 +1,9 @@
export class Visitor {
id: number;
ip: string;
date: string;
browserName: string;
browserVersion: string;
osname: string;
location: string;
}