From d0120ef2272096cbcaf6e1b2e11edc029a7de511 Mon Sep 17 00:00:00 2001 From: 沈斌 <bluelazysb@hotmail.com> Date: Tue, 19 Dec 2017 23:29:29 +0800 Subject: [PATCH] updates --- src/app/routes/users/installer/edit/edit.component.ts | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/app/routes/users/installer/edit/edit.component.ts b/src/app/routes/users/installer/edit/edit.component.ts index 246fd1f..bfa8e97 100644 --- a/src/app/routes/users/installer/edit/edit.component.ts +++ b/src/app/routes/users/installer/edit/edit.component.ts @@ -1,8 +1,8 @@ import { NzModalSubject, NzMessageService } from 'ng-zorro-antd'; -import { HttpClient } from '@angular/common/http'; import { Component, OnInit } from '@angular/core'; -import { _HttpClient } from '@delon/theme'; import { ModalHelper } from '@delon/theme'; +import { HttpClient } from '@angular/common/http'; +import { environment } from '../../../../../environments/environment'; @Component({ selector: 'app-edit', @@ -11,24 +11,24 @@ }) export class UserInstallerEditComponent implements OnInit { - i: any; - gender: string[] = [ '���', '���' ]; + user: any; constructor( private modalHelper: ModalHelper, private subject: NzModalSubject, public msgSrv: NzMessageService, - public http: _HttpClient) { } + public http: HttpClient) { } ngOnInit() { - if (this.i.id > 0) { - this.http.get('./assets/pois.json').subscribe(res => this.i = res.data[0]); + if (this.user.id > 0) { + this.http.get(environment.SERVER_BASH_URL + '/user/operate_user/' + this.user.id).subscribe((res: any) => { + this.user = res.data[0]; + }); } } save() { - this.http.get('./assets/pois.json').subscribe(() => { - this.msgSrv.success('���������������������������������������������'); + this.http.post(environment.SERVER_BASH_URL + '/user/operate_user/save', this.user).subscribe(() => { this.subject.next('true'); this.close(); }); -- Gitblit v1.8.0