调整用户头像展示问题,title遗漏
This commit is contained in:
@@ -17,7 +17,10 @@
|
|||||||
<button nz-button nzType="primary" (click)="registration()">注册</button>
|
<button nz-button nzType="primary" (click)="registration()">注册</button>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="userInfo" id="info">
|
<div *ngIf="userInfo" id="info">
|
||||||
<img [src]="userInfo.avatarImgUrl" alt="avatar" id="avatar">
|
<!-- <img [src]="userInfo.avatarImgUrl" alt="avatar" id="avatar">-->
|
||||||
|
<nz-avatar [nzSrc]="userInfo.avatarImgUrl" *ngIf="userInfo.avatarImgUrl===noAvatarUrl"></nz-avatar>
|
||||||
|
<nz-avatar [nzText]="userInfo.displayName" style="background: #f56a00"
|
||||||
|
*ngIf="userInfo.avatarImgUrl!==noAvatarUrl"></nz-avatar>
|
||||||
<button nz-button nzType="link" class="info-name"
|
<button nz-button nzType="link" class="info-name"
|
||||||
nz-dropdown [nzDropdownMenu]="menu" nzPlacement="bottomRight" nzTrigger="click">
|
nz-dropdown [nzDropdownMenu]="menu" nzPlacement="bottomRight" nzTrigger="click">
|
||||||
{{userInfo.displayName}}<i nz-icon nzType="caret-down" nzTheme="outline"></i>
|
{{userInfo.displayName}}<i nz-icon nzType="caret-down" nzTheme="outline"></i>
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ export class HeaderComponent implements OnInit {
|
|||||||
@Output() registrationEvent = new EventEmitter();
|
@Output() registrationEvent = new EventEmitter();
|
||||||
size: 'large' | 'default';
|
size: 'large' | 'default';
|
||||||
currentPath: string;
|
currentPath: string;
|
||||||
|
noAvatarUrl = 'https://cdn.celess.cn/'
|
||||||
|
|
||||||
public pageList: {
|
public pageList: {
|
||||||
path: string;
|
path: string;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import {ApiService} from '../../../api/api.service';
|
|||||||
import {PageList} from '../../../class/HttpReqAndResp';
|
import {PageList} from '../../../class/HttpReqAndResp';
|
||||||
import {Comment, CommentReq} from '../../../class/Comment';
|
import {Comment, CommentReq} from '../../../class/Comment';
|
||||||
import {GlobalUserService} from '../../../services/global-user.service';
|
import {GlobalUserService} from '../../../services/global-user.service';
|
||||||
|
import {Title} from '@angular/platform-browser';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-admin-comment',
|
selector: 'app-admin-comment',
|
||||||
@@ -12,7 +13,9 @@ import {GlobalUserService} from '../../../services/global-user.service';
|
|||||||
})
|
})
|
||||||
export class AdminCommentComponent implements OnInit {
|
export class AdminCommentComponent implements OnInit {
|
||||||
|
|
||||||
constructor(private apiService: ApiService, private messageService: NzMessageService, private userService: GlobalUserService) {
|
constructor(private apiService: ApiService, private messageService: NzMessageService, private userService: GlobalUserService,
|
||||||
|
private title: Title) {
|
||||||
|
this.title.setTitle('小海博客 | 评论管理')
|
||||||
this.userService.watchUserInfo({
|
this.userService.watchUserInfo({
|
||||||
next: data => {
|
next: data => {
|
||||||
if (data.result) {
|
if (data.result) {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import {HttpClient} from '@angular/common/http';
|
|||||||
import {ApiService} from '../../../api/api.service';
|
import {ApiService} from '../../../api/api.service';
|
||||||
import {GlobalUserService} from '../../../services/global-user.service';
|
import {GlobalUserService} from '../../../services/global-user.service';
|
||||||
import {User} from '../../../class/User';
|
import {User} from '../../../class/User';
|
||||||
|
import {Title} from '@angular/platform-browser';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-admin-dashboard',
|
selector: 'app-admin-dashboard',
|
||||||
@@ -10,7 +11,9 @@ import {User} from '../../../class/User';
|
|||||||
styleUrls: ['./admin-dashboard.component.less']
|
styleUrls: ['./admin-dashboard.component.less']
|
||||||
})
|
})
|
||||||
export class AdminDashboardComponent implements OnInit {
|
export class AdminDashboardComponent implements OnInit {
|
||||||
constructor(private apiService: ApiService, private userService: GlobalUserService, private http: HttpClient) {
|
constructor(private apiService: ApiService, private userService: GlobalUserService, private http: HttpClient,
|
||||||
|
private title: Title) {
|
||||||
|
this.title.setTitle('小海博客 | 后台管理');
|
||||||
this.getUserInfo();
|
this.getUserInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import {ApiService} from '../../../api/api.service';
|
|||||||
import {NzMessageService} from 'ng-zorro-antd';
|
import {NzMessageService} from 'ng-zorro-antd';
|
||||||
import {FormControl, FormGroup, Validators} from '@angular/forms';
|
import {FormControl, FormGroup, Validators} from '@angular/forms';
|
||||||
import {Observable} from 'rxjs';
|
import {Observable} from 'rxjs';
|
||||||
|
import {Title} from '@angular/platform-browser';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-admin-link',
|
selector: 'app-admin-link',
|
||||||
@@ -13,7 +14,8 @@ import {Observable} from 'rxjs';
|
|||||||
})
|
})
|
||||||
export class AdminLinkComponent implements OnInit {
|
export class AdminLinkComponent implements OnInit {
|
||||||
|
|
||||||
constructor(private apiService: ApiService, private messageService: NzMessageService) {
|
constructor(private apiService: ApiService, private messageService: NzMessageService, private title: Title) {
|
||||||
|
this.title.setTitle('小海博客 | 友链管理');
|
||||||
this.formGroup = new FormGroup({
|
this.formGroup = new FormGroup({
|
||||||
id: new FormControl(null),
|
id: new FormControl(null),
|
||||||
name: new FormControl(null, [Validators.required]),
|
name: new FormControl(null, [Validators.required]),
|
||||||
|
|||||||
Reference in New Issue
Block a user