From c93ce3ae7d39079eb8a2b13bea747e5c4636242d Mon Sep 17 00:00:00 2001
From: 沈斌 <bluelazysb@hotmail.com>
Date: Tue, 19 Dec 2017 23:04:42 +0800
Subject: [PATCH] updates

---
 src/app/routes/users/installer/edit/edit.component.ts |   17 ++++++++---------
 1 files changed, 8 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..f9a4bd2 100644
--- a/src/app/routes/users/installer/edit/edit.component.ts
+++ b/src/app/routes/users/installer/edit/edit.component.ts
@@ -1,8 +1,7 @@
 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';
 
 @Component({
   selector: 'app-edit',
@@ -11,24 +10,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('http://localhost:8001/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('http://localhost:8001/user/operate_user/save', this.user).subscribe(() => {
       this.subject.next('true');
       this.close();
     });

--
Gitblit v1.8.0