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 | 13 ++++++-------
1 files changed, 6 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..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',
@@ -12,23 +11,23 @@
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('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