David Thornley 6 年之前
父節點
當前提交
333727e676
共有 2 個文件被更改,包括 4 次插入3 次删除
  1. 1
    0
      zlg/src/pages/home/home.ts
  2. 3
    3
      zlg/src/providers/userProvider.ts

+ 1
- 0
zlg/src/pages/home/home.ts 查看文件

@@ -5,6 +5,7 @@ import SockJS from 'sockjs-client';
5 5
 
6 6
 import { NavController } from 'ionic-angular';
7 7
 
8
+
8 9
 @Component({
9 10
   selector: 'page-home',
10 11
   templateUrl: 'home.html'

+ 3
- 3
zlg/src/providers/userProvider.ts 查看文件

@@ -6,13 +6,13 @@ import {Injectable} from "@angular/core";
6 6
 export class UserService{
7 7
 
8 8
 
9
-  public API = "http://localhost:8080";
10
-  public USER_API = this.API + "/users/posts";
9
+  public API = "https://fast-headland-39537.herokuapp.com";
10
+  public USER_API = this.API + "/posts/id/";
11 11
 
12 12
   constructor(public http: HttpClient) {
13 13
   }
14 14
 
15 15
   getAllPostsByUserId(id: string):Observable<any> {
16
-    return this.http.get(this.USER_API + '/' + id);
16
+    return this.http.get(this.USER_API + id);
17 17
   }
18 18
 }