数据可视化大屏
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

35 lignes
828B

  1. import { Component, Input, OnInit, inject } from '@angular/core';
  2. import { SocialService } from '@delon/auth';
  3. import { SettingsService } from '@delon/theme';
  4. @Component({
  5. selector: 'app-callback',
  6. template: ``,
  7. providers: [SocialService],
  8. standalone: true
  9. })
  10. export class CallbackComponent implements OnInit {
  11. private readonly socialService = inject(SocialService);
  12. private readonly settingsSrv = inject(SettingsService);
  13. @Input() type = '';
  14. ngOnInit(): void {
  15. this.mockModel();
  16. }
  17. private mockModel(): void {
  18. const info = {
  19. token: '123456789',
  20. name: 'cipchk',
  21. email: `${this.type}@${this.type}.com`,
  22. id: 10000,
  23. time: +new Date()
  24. };
  25. this.settingsSrv.setUser({
  26. ...this.settingsSrv.user,
  27. ...info
  28. });
  29. this.socialService.callback(info);
  30. }
  31. }