xufenglei
2017-12-22 7a2c61df609a199967a3ea04ebada9f1e37379e8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import {NzModalSubject, NzMessageService} from 'ng-zorro-antd';
import {Component, OnInit} from '@angular/core';
import {ModalHelper} from '@delon/theme';
import {HttpClient} from '@angular/common/http';
import {environment} from '../../../../../environments/environment';
import {DateService} from '../../../../core/services/date.service';
 
@Component({
  selector: 'app-account-edit',
  templateUrl: './account-edit.component.html',
  styles: []
})
export class AccountEditComponent implements OnInit {
 
  account: any;
 
  constructor(private modalHelper: ModalHelper,
    private subject: NzModalSubject,
    public dateSrv: DateService,
    public msgSrv: NzMessageService,
    public http: HttpClient) {}
 
  ngOnInit() {
  }
  
  save() {
    this.http.post(environment.SERVER_BASH_URL + '/account/account', this.account).subscribe(() => {
      this.subject.next('true');
      this.close();
    });
  }
 
  close() {
    this.subject.destroy();
  }
 
}