调整友链申请 #24

Merged
xiaohai2271 merged 4 commits from feature-#23 into master 2020-08-01 21:27:19 +08:00
2 changed files with 21 additions and 4 deletions
Showing only changes of commit a6c3f16ddf - Show all commits

View File

@@ -9,7 +9,7 @@ import {ArticleReq} from '../class/Article';
import {Category, Tag} from '../class/Tag'; import {Category, Tag} from '../class/Tag';
import {Comment} from '../class/Comment'; import {Comment} from '../class/Comment';
import {CommentReq} from '../class/Comment'; import {CommentReq} from '../class/Comment';
import {Link} from '../class/Link'; import {ApplyLinkReq, Link} from '../class/Link';
import {User} from '../class/User'; import {User} from '../class/User';
import {LoginReq} from '../class/User'; import {LoginReq} from '../class/User';
@@ -292,13 +292,20 @@ export class ApiService extends HttpService {
}); });
} }
applyLink(link: Link) { applyLink(link: ApplyLinkReq) {
return super.Service<string>({
path: '/apply',
method: 'POST',
data: link
});
}
reapplyLink(keyStr: string) {
return super.Service<string>({ return super.Service<string>({
path: '/apply', path: '/apply',
method: 'POST', method: 'POST',
queryParam: { queryParam: {
name: link.name, key: keyStr
url: link.url
} }
}); });
} }

View File

@@ -6,3 +6,13 @@ export class Link {
iconPath: string; iconPath: string;
desc: string; desc: string;
} }
export class ApplyLinkReq {
desc: string;
email: string;
iconPath: string;
linkUrl: string;
name: string;
url: string
}