From 15cf2eeaa23866abccc1ad72df6d636572dc420d Mon Sep 17 00:00:00 2001 From: 沈斌 <bluelazysb@hotmail.com> Date: Wed, 20 Dec 2017 11:15:25 +0800 Subject: [PATCH] updates --- src/app/routes/users/installer/edit/edit.component.ts | 12 +++++------- 1 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/app/routes/users/installer/edit/edit.component.ts b/src/app/routes/users/installer/edit/edit.component.ts index 09ed0b9..5cdca64 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', @@ -12,23 +12,21 @@ export class UserInstallerEditComponent implements OnInit { user: any; - gender: string[] = [ '���', '���' ]; constructor( private modalHelper: ModalHelper, private subject: NzModalSubject, public msgSrv: NzMessageService, - public http: _HttpClient) { } + public http: HttpClient) { } ngOnInit() { if (this.user.id > 0) { - this.http.get('./assets/pois.json').subscribe(res => this.user = res.data[0]); + this.http.get(environment.SERVER_BASH_URL + '/user/operate_user/' + this.user.id).subscribe((res: any) => this.user = res.data ); } } 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