You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
1.8 KiB
70 lines
1.8 KiB
import { Component, OnInit,Output,EventEmitter } from '@angular/core'; |
|
import { HttpClient } from '@angular/common/http' |
|
import { Router,ActivatedRoute } from '@angular/router' |
|
import { MatDialog } from '@angular/material/dialog'; |
|
import {ChangepasswordComponent} from '../ui/changepassword/changepassword.component' |
|
import {ChangeuserdataComponent} from '../ui/changeuserdata/changeuserdata.component' |
|
import {LoginComponent} from '../ui/login/login.component' |
|
import {CacheTokenService} from '../http-interceptors/cache-token.service'//引入服务 |
|
import {IsLoginService} from '../is-login.service'//引入服务 |
|
|
|
|
|
|
|
@Component({ |
|
selector: 'app-tabbar', |
|
templateUrl: './tabbar.component.html', |
|
styleUrls: ['./tabbar.component.scss'] |
|
}) |
|
export class TabbarComponent implements OnInit { |
|
|
|
theme: boolean = true; |
|
@Output() |
|
toggle = new EventEmitter<void>(); |
|
@Output() |
|
toggleDarkTheme = new EventEmitter<boolean>(); |
|
@Output() |
|
defaulttheme = new EventEmitter<boolean>(); |
|
@Output() |
|
redtheme = new EventEmitter<boolean>(); |
|
|
|
constructor(private http:HttpClient,private router:Router,private route:ActivatedRoute,public token:CacheTokenService,public dialog: MatDialog,public isLogin:IsLoginService) { } |
|
|
|
ngOnInit() { |
|
|
|
} |
|
|
|
|
|
|
|
//登录系统 |
|
login () { |
|
let dialogRef = this.dialog.open(LoginComponent); |
|
dialogRef.afterClosed().subscribe( data=>{ |
|
console.log(data) |
|
} ); |
|
} |
|
|
|
|
|
|
|
//退出系统 |
|
signOut () { |
|
let out = confirm("您确定要退出吗") |
|
if(out) { |
|
|
|
} |
|
} |
|
|
|
//修改用户资料 |
|
changeUserData () { |
|
let dialogRef = this.dialog.open(ChangeuserdataComponent); |
|
dialogRef.afterClosed().subscribe(); |
|
} |
|
|
|
//修改密码 |
|
changPassword() { |
|
let dialogRef = this.dialog.open(ChangepasswordComponent); |
|
dialogRef.afterClosed().subscribe(); |
|
} |
|
|
|
|
|
|
|
}
|
|
|