2 次代码提交

作者 SHA1 备注 提交日期
  rjsmall90 22788ec613 login functioning, search and rating still functional, adding post method to ratings 6 年前
  rjsmall90 242af2a95a ratings and login cooperating 6 年前

+ 3
- 4
ionic.config.json 查看文件

@@ -1,8 +1,7 @@
1 1
 {
2 2
   "name": "spitball_frontend",
3
-  "app_id": "",
4
-  "type": "ionic-angular",
5 3
   "integrations": {
6 4
     "cordova": {}
7
-  }
8
-}
5
+  },
6
+  "type": "ionic-angular"
7
+}

+ 643
- 0
package-lock.json 查看文件

@@ -148,6 +148,111 @@
148 148
         "xml2js": "^0.4.19"
149 149
       }
150 150
     },
151
+    "@ionic/cli-framework": {
152
+      "version": "1.0.4",
153
+      "resolved": "https://registry.npmjs.org/@ionic/cli-framework/-/cli-framework-1.0.4.tgz",
154
+      "integrity": "sha512-ehu1WU/OmJGVibkSXzIhalv3CkGhoxHjCNTla+mKmAobGtCXlf2LPxl3SmPkcKrJpYKn7EajrwDEQOFDn0+6Mw==",
155
+      "dev": true,
156
+      "requires": {
157
+        "@types/cross-spawn": "^6.0.0",
158
+        "@types/debug": "0.0.30",
159
+        "@types/inquirer": "0.0.42",
160
+        "@types/klaw": "^2.1.1",
161
+        "@types/lodash": "^4.14.104",
162
+        "@types/make-dir": "^1.0.3",
163
+        "@types/minimist": "^1.2.0",
164
+        "@types/ncp": "^2.0.1",
165
+        "@types/node": "^6.0.101",
166
+        "@types/rimraf": "^2.0.2",
167
+        "@types/string-width": "^2.0.0",
168
+        "@types/strip-ansi": "^3.0.0",
169
+        "@types/untildify": "^3.0.0",
170
+        "@types/wrap-ansi": "^3.0.0",
171
+        "@types/write-file-atomic": "^2.1.1",
172
+        "chalk": "^2.3.0",
173
+        "debug": "^3.1.0",
174
+        "inquirer": "^6.0.0",
175
+        "klaw": "^3.0.0",
176
+        "lodash": "^4.17.5",
177
+        "make-dir": "^1.3.0",
178
+        "minimist": "^1.2.0",
179
+        "ncp": "^2.0.0",
180
+        "rimraf": "^2.6.2",
181
+        "slice-ansi": "^1.0.0",
182
+        "stream-combiner2": "^1.1.1",
183
+        "string-width": "^2.1.1",
184
+        "strip-ansi": "^4.0.0",
185
+        "tree-kill": "1.2.0",
186
+        "tslib": "^1.9.0",
187
+        "untildify": "^3.0.2",
188
+        "wrap-ansi": "^3.0.1",
189
+        "write-file-atomic": "^2.3.0"
190
+      },
191
+      "dependencies": {
192
+        "ansi-regex": {
193
+          "version": "3.0.0",
194
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
195
+          "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
196
+          "dev": true
197
+        },
198
+        "debug": {
199
+          "version": "3.1.0",
200
+          "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
201
+          "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
202
+          "dev": true,
203
+          "requires": {
204
+            "ms": "2.0.0"
205
+          }
206
+        },
207
+        "is-fullwidth-code-point": {
208
+          "version": "2.0.0",
209
+          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
210
+          "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
211
+          "dev": true
212
+        },
213
+        "string-width": {
214
+          "version": "2.1.1",
215
+          "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
216
+          "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
217
+          "dev": true,
218
+          "requires": {
219
+            "is-fullwidth-code-point": "^2.0.0",
220
+            "strip-ansi": "^4.0.0"
221
+          }
222
+        },
223
+        "strip-ansi": {
224
+          "version": "4.0.0",
225
+          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
226
+          "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
227
+          "dev": true,
228
+          "requires": {
229
+            "ansi-regex": "^3.0.0"
230
+          }
231
+        },
232
+        "wrap-ansi": {
233
+          "version": "3.0.1",
234
+          "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-3.0.1.tgz",
235
+          "integrity": "sha1-KIoE2H7aXChuBg3+jxNc6NAH+Lo=",
236
+          "dev": true,
237
+          "requires": {
238
+            "string-width": "^2.1.1",
239
+            "strip-ansi": "^4.0.0"
240
+          }
241
+        }
242
+      }
243
+    },
244
+    "@ionic/lab": {
245
+      "version": "1.0.5",
246
+      "resolved": "https://registry.npmjs.org/@ionic/lab/-/lab-1.0.5.tgz",
247
+      "integrity": "sha512-OfddwiHBjs+whTgHfADtXw/wTuoUKaAmhkQgNHdMMtsRNKTpdc9JeTnK/JUvxkYpKpx8KcHieDRF3QU84e+xvQ==",
248
+      "dev": true,
249
+      "requires": {
250
+        "@ionic/cli-framework": "1.0.4",
251
+        "chalk": "^2.3.0",
252
+        "express": "^4.16.2",
253
+        "tslib": "^1.9.0"
254
+      }
255
+    },
151 256
     "@ionic/storage": {
152 257
       "version": "2.1.3",
153 258
       "resolved": "https://registry.npmjs.org/@ionic/storage/-/storage-2.1.3.tgz",
@@ -158,11 +263,282 @@
158 263
         "localforage-cordovasqlitedriver": "~1.5.0"
159 264
       }
160 265
     },
266
+    "@types/cross-spawn": {
267
+      "version": "6.0.0",
268
+      "resolved": "https://registry.npmjs.org/@types/cross-spawn/-/cross-spawn-6.0.0.tgz",
269
+      "integrity": "sha512-evp2ZGsFw9YKprDbg8ySgC9NA15g3YgiI8ANkGmKKvvi0P2aDGYLPxQIC5qfeKNUOe3TjABVGuah6omPRpIYhg==",
270
+      "dev": true,
271
+      "requires": {
272
+        "@types/node": "*"
273
+      }
274
+    },
275
+    "@types/debug": {
276
+      "version": "0.0.30",
277
+      "resolved": "https://registry.npmjs.org/@types/debug/-/debug-0.0.30.tgz",
278
+      "integrity": "sha512-orGL5LXERPYsLov6CWs3Fh6203+dXzJkR7OnddIr2514Hsecwc8xRpzCapshBbKFImCsvS/mk6+FWiN5LyZJAQ==",
279
+      "dev": true
280
+    },
281
+    "@types/events": {
282
+      "version": "1.2.0",
283
+      "resolved": "https://registry.npmjs.org/@types/events/-/events-1.2.0.tgz",
284
+      "integrity": "sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA==",
285
+      "dev": true
286
+    },
287
+    "@types/glob": {
288
+      "version": "5.0.35",
289
+      "resolved": "https://registry.npmjs.org/@types/glob/-/glob-5.0.35.tgz",
290
+      "integrity": "sha512-wc+VveszMLyMWFvXLkloixT4n0harUIVZjnpzztaZ0nKLuul7Z32iMt2fUFGAaZ4y1XWjFRMtCI5ewvyh4aIeg==",
291
+      "dev": true,
292
+      "requires": {
293
+        "@types/events": "*",
294
+        "@types/minimatch": "*",
295
+        "@types/node": "*"
296
+      }
297
+    },
298
+    "@types/inquirer": {
299
+      "version": "0.0.42",
300
+      "resolved": "https://registry.npmjs.org/@types/inquirer/-/inquirer-0.0.42.tgz",
301
+      "integrity": "sha512-flMaNWU2g9NrtZ4bIV+7SEY2W7OdWNNhmJ0rE1lWVxGrkp3TfFGMcFCxRIBmGWigI8e6n+2HqLjizTTfgcpHLg==",
302
+      "dev": true,
303
+      "requires": {
304
+        "@types/rx": "*",
305
+        "@types/through": "*"
306
+      }
307
+    },
308
+    "@types/klaw": {
309
+      "version": "2.1.1",
310
+      "resolved": "https://registry.npmjs.org/@types/klaw/-/klaw-2.1.1.tgz",
311
+      "integrity": "sha512-awiTDstwQfX6026T7oC01AoP7knJoM5IT1tgx9STIM4hQzNQlkW8keTxNC+/xxpMgP657ebHMTqrsQ4qtfSJKg==",
312
+      "dev": true,
313
+      "requires": {
314
+        "@types/node": "*"
315
+      }
316
+    },
161 317
     "@types/localforage": {
162 318
       "version": "0.0.30",
163 319
       "resolved": "https://registry.npmjs.org/@types/localforage/-/localforage-0.0.30.tgz",
164 320
       "integrity": "sha1-PWCmv23aOOP4pGlhFZg3nx9klQk="
165 321
     },
322
+    "@types/lodash": {
323
+      "version": "4.14.116",
324
+      "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.116.tgz",
325
+      "integrity": "sha512-lRnAtKnxMXcYYXqOiotTmJd74uawNWuPnsnPrrO7HiFuE3npE2iQhfABatbYDyxTNqZNuXzcKGhw37R7RjBFLg==",
326
+      "dev": true
327
+    },
328
+    "@types/make-dir": {
329
+      "version": "1.0.3",
330
+      "resolved": "https://registry.npmjs.org/@types/make-dir/-/make-dir-1.0.3.tgz",
331
+      "integrity": "sha512-bFRvlvUdPwxj47K2yVh7OBL8Mu8h//5k/hQJkz0iAZAlxhnIDydFezGA96zehtnRfrZDuIyPd+RC2kmBGtcs0w==",
332
+      "dev": true,
333
+      "requires": {
334
+        "@types/node": "*"
335
+      }
336
+    },
337
+    "@types/minimatch": {
338
+      "version": "3.0.3",
339
+      "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz",
340
+      "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==",
341
+      "dev": true
342
+    },
343
+    "@types/minimist": {
344
+      "version": "1.2.0",
345
+      "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.0.tgz",
346
+      "integrity": "sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY=",
347
+      "dev": true
348
+    },
349
+    "@types/ncp": {
350
+      "version": "2.0.1",
351
+      "resolved": "https://registry.npmjs.org/@types/ncp/-/ncp-2.0.1.tgz",
352
+      "integrity": "sha512-TeiJ7uvv/92ugSqZ0v9l0eNXzutlki0aK+R1K5bfA5SYUil46ITlxLW4iNTCf55P4L5weCmaOdtxGeGWvudwPg==",
353
+      "dev": true,
354
+      "requires": {
355
+        "@types/node": "*"
356
+      }
357
+    },
358
+    "@types/node": {
359
+      "version": "6.0.116",
360
+      "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.116.tgz",
361
+      "integrity": "sha512-vToa8YEeulfyYg1gSOeHjvvIRqrokng62VMSj2hoZrwZNcYrp2h3AWo6KeBVuymIklQUaY5zgVJvVsC4KiiLkQ==",
362
+      "dev": true
363
+    },
364
+    "@types/rimraf": {
365
+      "version": "2.0.2",
366
+      "resolved": "https://registry.npmjs.org/@types/rimraf/-/rimraf-2.0.2.tgz",
367
+      "integrity": "sha512-Hm/bnWq0TCy7jmjeN5bKYij9vw5GrDFWME4IuxV08278NtU/VdGbzsBohcCUJ7+QMqmUq5hpRKB39HeQWJjztQ==",
368
+      "dev": true,
369
+      "requires": {
370
+        "@types/glob": "*",
371
+        "@types/node": "*"
372
+      }
373
+    },
374
+    "@types/rx": {
375
+      "version": "4.1.1",
376
+      "resolved": "https://registry.npmjs.org/@types/rx/-/rx-4.1.1.tgz",
377
+      "integrity": "sha1-WY/JSla67ZdfGUV04PVy/Y5iekg=",
378
+      "dev": true,
379
+      "requires": {
380
+        "@types/rx-core": "*",
381
+        "@types/rx-core-binding": "*",
382
+        "@types/rx-lite": "*",
383
+        "@types/rx-lite-aggregates": "*",
384
+        "@types/rx-lite-async": "*",
385
+        "@types/rx-lite-backpressure": "*",
386
+        "@types/rx-lite-coincidence": "*",
387
+        "@types/rx-lite-experimental": "*",
388
+        "@types/rx-lite-joinpatterns": "*",
389
+        "@types/rx-lite-testing": "*",
390
+        "@types/rx-lite-time": "*",
391
+        "@types/rx-lite-virtualtime": "*"
392
+      }
393
+    },
394
+    "@types/rx-core": {
395
+      "version": "4.0.3",
396
+      "resolved": "https://registry.npmjs.org/@types/rx-core/-/rx-core-4.0.3.tgz",
397
+      "integrity": "sha1-CzNUsSOM7b4rdPYybxOdvHpZHWA=",
398
+      "dev": true
399
+    },
400
+    "@types/rx-core-binding": {
401
+      "version": "4.0.4",
402
+      "resolved": "https://registry.npmjs.org/@types/rx-core-binding/-/rx-core-binding-4.0.4.tgz",
403
+      "integrity": "sha512-5pkfxnC4w810LqBPUwP5bg7SFR/USwhMSaAeZQQbEHeBp57pjKXRlXmqpMrLJB4y1oglR/c2502853uN0I+DAQ==",
404
+      "dev": true,
405
+      "requires": {
406
+        "@types/rx-core": "*"
407
+      }
408
+    },
409
+    "@types/rx-lite": {
410
+      "version": "4.0.5",
411
+      "resolved": "https://registry.npmjs.org/@types/rx-lite/-/rx-lite-4.0.5.tgz",
412
+      "integrity": "sha512-KZk5XTR1dm/kNgBx8iVpjno6fRYtAUQWBOmj+O8j724+nk097sz4fOoHJNpCkOJUtHUurZlJC7QvSFCZHbkC+w==",
413
+      "dev": true,
414
+      "requires": {
415
+        "@types/rx-core": "*",
416
+        "@types/rx-core-binding": "*"
417
+      }
418
+    },
419
+    "@types/rx-lite-aggregates": {
420
+      "version": "4.0.3",
421
+      "resolved": "https://registry.npmjs.org/@types/rx-lite-aggregates/-/rx-lite-aggregates-4.0.3.tgz",
422
+      "integrity": "sha512-MAGDAHy8cRatm94FDduhJF+iNS5//jrZ/PIfm+QYw9OCeDgbymFHChM8YVIvN2zArwsRftKgE33QfRWvQk4DPg==",
423
+      "dev": true,
424
+      "requires": {
425
+        "@types/rx-lite": "*"
426
+      }
427
+    },
428
+    "@types/rx-lite-async": {
429
+      "version": "4.0.2",
430
+      "resolved": "https://registry.npmjs.org/@types/rx-lite-async/-/rx-lite-async-4.0.2.tgz",
431
+      "integrity": "sha512-vTEv5o8l6702ZwfAM5aOeVDfUwBSDOs+ARoGmWAKQ6LOInQ8J4/zjM7ov12fuTpktUKdMQjkeCp07Vd73mPkxw==",
432
+      "dev": true,
433
+      "requires": {
434
+        "@types/rx-lite": "*"
435
+      }
436
+    },
437
+    "@types/rx-lite-backpressure": {
438
+      "version": "4.0.3",
439
+      "resolved": "https://registry.npmjs.org/@types/rx-lite-backpressure/-/rx-lite-backpressure-4.0.3.tgz",
440
+      "integrity": "sha512-Y6aIeQCtNban5XSAF4B8dffhIKu6aAy/TXFlScHzSxh6ivfQBQw6UjxyEJxIOt3IT49YkS+siuayM2H/Q0cmgA==",
441
+      "dev": true,
442
+      "requires": {
443
+        "@types/rx-lite": "*"
444
+      }
445
+    },
446
+    "@types/rx-lite-coincidence": {
447
+      "version": "4.0.3",
448
+      "resolved": "https://registry.npmjs.org/@types/rx-lite-coincidence/-/rx-lite-coincidence-4.0.3.tgz",
449
+      "integrity": "sha512-1VNJqzE9gALUyMGypDXZZXzR0Tt7LC9DdAZQ3Ou/Q0MubNU35agVUNXKGHKpNTba+fr8GdIdkC26bRDqtCQBeQ==",
450
+      "dev": true,
451
+      "requires": {
452
+        "@types/rx-lite": "*"
453
+      }
454
+    },
455
+    "@types/rx-lite-experimental": {
456
+      "version": "4.0.1",
457
+      "resolved": "https://registry.npmjs.org/@types/rx-lite-experimental/-/rx-lite-experimental-4.0.1.tgz",
458
+      "integrity": "sha1-xTL1y98/LBXaFt7Ykw0bKYQCPL0=",
459
+      "dev": true,
460
+      "requires": {
461
+        "@types/rx-lite": "*"
462
+      }
463
+    },
464
+    "@types/rx-lite-joinpatterns": {
465
+      "version": "4.0.1",
466
+      "resolved": "https://registry.npmjs.org/@types/rx-lite-joinpatterns/-/rx-lite-joinpatterns-4.0.1.tgz",
467
+      "integrity": "sha1-9w/jcFGKhDLykVjMkv+1a05K/D4=",
468
+      "dev": true,
469
+      "requires": {
470
+        "@types/rx-lite": "*"
471
+      }
472
+    },
473
+    "@types/rx-lite-testing": {
474
+      "version": "4.0.1",
475
+      "resolved": "https://registry.npmjs.org/@types/rx-lite-testing/-/rx-lite-testing-4.0.1.tgz",
476
+      "integrity": "sha1-IbGdEfTf1v/vWp0WSOnIh5v+Iek=",
477
+      "dev": true,
478
+      "requires": {
479
+        "@types/rx-lite-virtualtime": "*"
480
+      }
481
+    },
482
+    "@types/rx-lite-time": {
483
+      "version": "4.0.3",
484
+      "resolved": "https://registry.npmjs.org/@types/rx-lite-time/-/rx-lite-time-4.0.3.tgz",
485
+      "integrity": "sha512-ukO5sPKDRwCGWRZRqPlaAU0SKVxmWwSjiOrLhoQDoWxZWg6vyB9XLEZViKOzIO6LnTIQBlk4UylYV0rnhJLxQw==",
486
+      "dev": true,
487
+      "requires": {
488
+        "@types/rx-lite": "*"
489
+      }
490
+    },
491
+    "@types/rx-lite-virtualtime": {
492
+      "version": "4.0.3",
493
+      "resolved": "https://registry.npmjs.org/@types/rx-lite-virtualtime/-/rx-lite-virtualtime-4.0.3.tgz",
494
+      "integrity": "sha512-3uC6sGmjpOKatZSVHI2xB1+dedgml669ZRvqxy+WqmGJDVusOdyxcKfyzjW0P3/GrCiN4nmRkLVMhPwHCc5QLg==",
495
+      "dev": true,
496
+      "requires": {
497
+        "@types/rx-lite": "*"
498
+      }
499
+    },
500
+    "@types/string-width": {
501
+      "version": "2.0.0",
502
+      "resolved": "https://registry.npmjs.org/@types/string-width/-/string-width-2.0.0.tgz",
503
+      "integrity": "sha512-dA5z2WlP7uurAiveIWTDRgfr1U58Qdmo6doDeAyJlYFQ3vnUOW7BqJ+tl+M8FaLcflhrVvwIfzxJJvlz6anx4A==",
504
+      "dev": true
505
+    },
506
+    "@types/strip-ansi": {
507
+      "version": "3.0.0",
508
+      "resolved": "https://registry.npmjs.org/@types/strip-ansi/-/strip-ansi-3.0.0.tgz",
509
+      "integrity": "sha1-m2PUU6a1SqhJGCIHcRoIvo7qSK4=",
510
+      "dev": true
511
+    },
512
+    "@types/through": {
513
+      "version": "0.0.29",
514
+      "resolved": "https://registry.npmjs.org/@types/through/-/through-0.0.29.tgz",
515
+      "integrity": "sha512-9a7C5VHh+1BKblaYiq+7Tfc+EOmjMdZaD1MYtkQjSoxgB69tBjW98ry6SKsi4zEIWztLOMRuL87A3bdT/Fc/4w==",
516
+      "dev": true,
517
+      "requires": {
518
+        "@types/node": "*"
519
+      }
520
+    },
521
+    "@types/untildify": {
522
+      "version": "3.0.0",
523
+      "resolved": "https://registry.npmjs.org/@types/untildify/-/untildify-3.0.0.tgz",
524
+      "integrity": "sha512-FTktI3Y1h+gP9GTjTvXBP5v8xpH4RU6uS9POoBcGy4XkS2Np6LNtnP1eiNNth4S7P+qw2c/rugkwBasSHFzJEg==",
525
+      "dev": true
526
+    },
527
+    "@types/wrap-ansi": {
528
+      "version": "3.0.0",
529
+      "resolved": "https://registry.npmjs.org/@types/wrap-ansi/-/wrap-ansi-3.0.0.tgz",
530
+      "integrity": "sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==",
531
+      "dev": true
532
+    },
533
+    "@types/write-file-atomic": {
534
+      "version": "2.1.1",
535
+      "resolved": "https://registry.npmjs.org/@types/write-file-atomic/-/write-file-atomic-2.1.1.tgz",
536
+      "integrity": "sha512-mROQhTxpJsOm/S0eOxDHUy5WJ0yS8fmqsq/s+u5OuAh1TxBFSqVBTkLjbyxDPcKh7DeJXk0OYrCkxXlkf8zu1g==",
537
+      "dev": true,
538
+      "requires": {
539
+        "@types/node": "*"
540
+      }
541
+    },
166 542
     "abbrev": {
167 543
       "version": "1.1.1",
168 544
       "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
@@ -249,6 +625,12 @@
249 625
         "css-star-rating": "1.1.3"
250 626
       }
251 627
     },
628
+    "ansi-escapes": {
629
+      "version": "3.1.0",
630
+      "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz",
631
+      "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==",
632
+      "dev": true
633
+    },
252 634
     "ansi-regex": {
253 635
       "version": "2.1.1",
254 636
       "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
@@ -915,6 +1297,12 @@
915 1297
         "supports-color": "^5.3.0"
916 1298
       }
917 1299
     },
1300
+    "chardet": {
1301
+      "version": "0.5.0",
1302
+      "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.5.0.tgz",
1303
+      "integrity": "sha512-9ZTaoBaePSCFvNlNGrsyI8ZVACP2svUtq0DkM7t4K2ClAa96sqOIRjAzDTc8zXzFt1cZR46rRzLTiHFSJ+Qw0g==",
1304
+      "dev": true
1305
+    },
918 1306
     "chokidar": {
919 1307
       "version": "1.7.0",
920 1308
       "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz",
@@ -987,6 +1375,21 @@
987 1375
         }
988 1376
       }
989 1377
     },
1378
+    "cli-cursor": {
1379
+      "version": "2.1.0",
1380
+      "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz",
1381
+      "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=",
1382
+      "dev": true,
1383
+      "requires": {
1384
+        "restore-cursor": "^2.0.0"
1385
+      }
1386
+    },
1387
+    "cli-width": {
1388
+      "version": "2.2.0",
1389
+      "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz",
1390
+      "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=",
1391
+      "dev": true
1392
+    },
990 1393
     "cliui": {
991 1394
       "version": "3.2.0",
992 1395
       "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz",
@@ -1400,6 +1803,15 @@
1400 1803
       "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==",
1401 1804
       "dev": true
1402 1805
     },
1806
+    "duplexer2": {
1807
+      "version": "0.1.4",
1808
+      "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz",
1809
+      "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=",
1810
+      "dev": true,
1811
+      "requires": {
1812
+        "readable-stream": "^2.0.2"
1813
+      }
1814
+    },
1403 1815
     "ecc-jsbn": {
1404 1816
       "version": "0.1.1",
1405 1817
       "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz",
@@ -1773,6 +2185,28 @@
1773 2185
         }
1774 2186
       }
1775 2187
     },
2188
+    "external-editor": {
2189
+      "version": "3.0.0",
2190
+      "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.0.tgz",
2191
+      "integrity": "sha512-mpkfj0FEdxrIhOC04zk85X7StNtr0yXnG7zCb+8ikO8OJi2jsHh5YGoknNTyXgsbHOf1WOOcVU3kPFWT2WgCkQ==",
2192
+      "dev": true,
2193
+      "requires": {
2194
+        "chardet": "^0.5.0",
2195
+        "iconv-lite": "^0.4.22",
2196
+        "tmp": "^0.0.33"
2197
+      },
2198
+      "dependencies": {
2199
+        "iconv-lite": {
2200
+          "version": "0.4.23",
2201
+          "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz",
2202
+          "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==",
2203
+          "dev": true,
2204
+          "requires": {
2205
+            "safer-buffer": ">= 2.1.2 < 3"
2206
+          }
2207
+        }
2208
+      }
2209
+    },
1776 2210
     "extglob": {
1777 2211
       "version": "0.3.2",
1778 2212
       "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz",
@@ -1826,6 +2260,15 @@
1826 2260
         "websocket-driver": ">=0.5.1"
1827 2261
       }
1828 2262
     },
2263
+    "figures": {
2264
+      "version": "2.0.0",
2265
+      "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz",
2266
+      "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=",
2267
+      "dev": true,
2268
+      "requires": {
2269
+        "escape-string-regexp": "^1.0.5"
2270
+      }
2271
+    },
1829 2272
     "filename-regex": {
1830 2273
       "version": "2.0.1",
1831 2274
       "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz",
@@ -2770,6 +3213,12 @@
2770 3213
       "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",
2771 3214
       "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps="
2772 3215
     },
3216
+    "imurmurhash": {
3217
+      "version": "0.1.4",
3218
+      "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
3219
+      "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=",
3220
+      "dev": true
3221
+    },
2773 3222
     "in-publish": {
2774 3223
       "version": "2.0.0",
2775 3224
       "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.0.tgz",
@@ -2815,6 +3264,69 @@
2815 3264
         "through2": "^0.6.5"
2816 3265
       }
2817 3266
     },
3267
+    "inquirer": {
3268
+      "version": "6.1.0",
3269
+      "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.1.0.tgz",
3270
+      "integrity": "sha512-f9K2MMx/G/AVmJSaZg2a+GVLRRmTdlGLbwxsibNd6yNTxXujqxPypjCnxnC0y4+Wb/rNY5KyKuq06AO5jrE+7w==",
3271
+      "dev": true,
3272
+      "requires": {
3273
+        "ansi-escapes": "^3.0.0",
3274
+        "chalk": "^2.0.0",
3275
+        "cli-cursor": "^2.1.0",
3276
+        "cli-width": "^2.0.0",
3277
+        "external-editor": "^3.0.0",
3278
+        "figures": "^2.0.0",
3279
+        "lodash": "^4.3.0",
3280
+        "mute-stream": "0.0.7",
3281
+        "run-async": "^2.2.0",
3282
+        "rxjs": "^6.1.0",
3283
+        "string-width": "^2.1.0",
3284
+        "strip-ansi": "^4.0.0",
3285
+        "through": "^2.3.6"
3286
+      },
3287
+      "dependencies": {
3288
+        "ansi-regex": {
3289
+          "version": "3.0.0",
3290
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
3291
+          "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
3292
+          "dev": true
3293
+        },
3294
+        "is-fullwidth-code-point": {
3295
+          "version": "2.0.0",
3296
+          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
3297
+          "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
3298
+          "dev": true
3299
+        },
3300
+        "rxjs": {
3301
+          "version": "6.2.2",
3302
+          "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.2.2.tgz",
3303
+          "integrity": "sha512-0MI8+mkKAXZUF9vMrEoPnaoHkfzBPP4IGwUYRJhIRJF6/w3uByO1e91bEHn8zd43RdkTMKiooYKmwz7RH6zfOQ==",
3304
+          "dev": true,
3305
+          "requires": {
3306
+            "tslib": "^1.9.0"
3307
+          }
3308
+        },
3309
+        "string-width": {
3310
+          "version": "2.1.1",
3311
+          "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
3312
+          "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
3313
+          "dev": true,
3314
+          "requires": {
3315
+            "is-fullwidth-code-point": "^2.0.0",
3316
+            "strip-ansi": "^4.0.0"
3317
+          }
3318
+        },
3319
+        "strip-ansi": {
3320
+          "version": "4.0.0",
3321
+          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
3322
+          "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
3323
+          "dev": true,
3324
+          "requires": {
3325
+            "ansi-regex": "^3.0.0"
3326
+          }
3327
+        }
3328
+      }
3329
+    },
2818 3330
     "interpret": {
2819 3331
       "version": "1.1.0",
2820 3332
       "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz",
@@ -3031,6 +3543,12 @@
3031 3543
       "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz",
3032 3544
       "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU="
3033 3545
     },
3546
+    "is-promise": {
3547
+      "version": "2.1.0",
3548
+      "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz",
3549
+      "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=",
3550
+      "dev": true
3551
+    },
3034 3552
     "is-property": {
3035 3553
       "version": "1.0.2",
3036 3554
       "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
@@ -3216,6 +3734,15 @@
3216 3734
         "is-buffer": "^1.1.5"
3217 3735
       }
3218 3736
     },
3737
+    "klaw": {
3738
+      "version": "3.0.0",
3739
+      "resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz",
3740
+      "integrity": "sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==",
3741
+      "dev": true,
3742
+      "requires": {
3743
+        "graceful-fs": "^4.1.9"
3744
+      }
3745
+    },
3219 3746
     "lazy-cache": {
3220 3747
       "version": "1.0.4",
3221 3748
       "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz",
@@ -3384,6 +3911,23 @@
3384 3911
         "vlq": "^0.2.2"
3385 3912
       }
3386 3913
     },
3914
+    "make-dir": {
3915
+      "version": "1.3.0",
3916
+      "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz",
3917
+      "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==",
3918
+      "dev": true,
3919
+      "requires": {
3920
+        "pify": "^3.0.0"
3921
+      },
3922
+      "dependencies": {
3923
+        "pify": {
3924
+          "version": "3.0.0",
3925
+          "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
3926
+          "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
3927
+          "dev": true
3928
+        }
3929
+      }
3930
+    },
3387 3931
     "map-cache": {
3388 3932
       "version": "0.2.2",
3389 3933
       "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",
@@ -3599,6 +4143,12 @@
3599 4143
       "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
3600 4144
       "dev": true
3601 4145
     },
4146
+    "mute-stream": {
4147
+      "version": "0.0.7",
4148
+      "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz",
4149
+      "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=",
4150
+      "dev": true
4151
+    },
3602 4152
     "nan": {
3603 4153
       "version": "2.10.0",
3604 4154
       "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz",
@@ -3643,6 +4193,12 @@
3643 4193
         }
3644 4194
       }
3645 4195
     },
4196
+    "ncp": {
4197
+      "version": "2.0.0",
4198
+      "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz",
4199
+      "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=",
4200
+      "dev": true
4201
+    },
3646 4202
     "negotiator": {
3647 4203
       "version": "0.6.1",
3648 4204
       "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz",
@@ -3952,6 +4508,15 @@
3952 4508
         "wrappy": "1"
3953 4509
       }
3954 4510
     },
4511
+    "onetime": {
4512
+      "version": "2.0.1",
4513
+      "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz",
4514
+      "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=",
4515
+      "dev": true,
4516
+      "requires": {
4517
+        "mimic-fn": "^1.0.0"
4518
+      }
4519
+    },
3955 4520
     "os-browserify": {
3956 4521
       "version": "0.3.0",
3957 4522
       "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz",
@@ -4561,6 +5126,16 @@
4561 5126
       "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=",
4562 5127
       "dev": true
4563 5128
     },
5129
+    "restore-cursor": {
5130
+      "version": "2.0.0",
5131
+      "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz",
5132
+      "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=",
5133
+      "dev": true,
5134
+      "requires": {
5135
+        "onetime": "^2.0.0",
5136
+        "signal-exit": "^3.0.2"
5137
+      }
5138
+    },
4564 5139
     "ret": {
4565 5140
       "version": "0.1.15",
4566 5141
       "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz",
@@ -4644,6 +5219,15 @@
4644 5219
         "micromatch": "^2.3.11"
4645 5220
       }
4646 5221
     },
5222
+    "run-async": {
5223
+      "version": "2.3.0",
5224
+      "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz",
5225
+      "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=",
5226
+      "dev": true,
5227
+      "requires": {
5228
+        "is-promise": "^2.1.0"
5229
+      }
5230
+    },
4647 5231
     "rxjs": {
4648 5232
       "version": "5.5.11",
4649 5233
       "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.11.tgz",
@@ -4838,6 +5422,23 @@
4838 5422
       "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
4839 5423
       "dev": true
4840 5424
     },
5425
+    "slice-ansi": {
5426
+      "version": "1.0.0",
5427
+      "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz",
5428
+      "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==",
5429
+      "dev": true,
5430
+      "requires": {
5431
+        "is-fullwidth-code-point": "^2.0.0"
5432
+      },
5433
+      "dependencies": {
5434
+        "is-fullwidth-code-point": {
5435
+          "version": "2.0.0",
5436
+          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
5437
+          "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
5438
+          "dev": true
5439
+        }
5440
+      }
5441
+    },
4841 5442
     "snapdragon": {
4842 5443
       "version": "0.8.2",
4843 5444
       "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz",
@@ -5118,6 +5719,16 @@
5118 5719
         "readable-stream": "^2.0.2"
5119 5720
       }
5120 5721
     },
5722
+    "stream-combiner2": {
5723
+      "version": "1.1.1",
5724
+      "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz",
5725
+      "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=",
5726
+      "dev": true,
5727
+      "requires": {
5728
+        "duplexer2": "~0.1.0",
5729
+        "readable-stream": "^2.0.2"
5730
+      }
5731
+    },
5121 5732
     "stream-http": {
5122 5733
       "version": "2.8.3",
5123 5734
       "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz",
@@ -5306,6 +5917,15 @@
5306 5917
         }
5307 5918
       }
5308 5919
     },
5920
+    "tmp": {
5921
+      "version": "0.0.33",
5922
+      "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
5923
+      "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==",
5924
+      "dev": true,
5925
+      "requires": {
5926
+        "os-tmpdir": "~1.0.2"
5927
+      }
5928
+    },
5309 5929
     "to-arraybuffer": {
5310 5930
       "version": "1.0.1",
5311 5931
       "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz",
@@ -5363,6 +5983,12 @@
5363 5983
         "punycode": "^1.4.1"
5364 5984
       }
5365 5985
     },
5986
+    "tree-kill": {
5987
+      "version": "1.2.0",
5988
+      "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.0.tgz",
5989
+      "integrity": "sha512-DlX6dR0lOIRDFxI0mjL9IYg6OTncLm/Zt+JiBhE5OlFcAR8yc9S7FFXU9so0oda47frdM/JFsk7UjNt9vscKcg==",
5990
+      "dev": true
5991
+    },
5366 5992
     "trim-newlines": {
5367 5993
       "version": "1.0.0",
5368 5994
       "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz",
@@ -5685,6 +6311,12 @@
5685 6311
         }
5686 6312
       }
5687 6313
     },
6314
+    "untildify": {
6315
+      "version": "3.0.3",
6316
+      "resolved": "https://registry.npmjs.org/untildify/-/untildify-3.0.3.tgz",
6317
+      "integrity": "sha512-iSk/J8efr8uPT/Z4eSUywnqyrQU7DSdMfdqK4iWEaUVVmcP5JcnpRqmVMwcwcnmI1ATFNgC5V90u09tBynNFKA==",
6318
+      "dev": true
6319
+    },
5688 6320
     "upath": {
5689 6321
       "version": "1.1.0",
5690 6322
       "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz",
@@ -6438,6 +7070,17 @@
6438 7070
       "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
6439 7071
       "dev": true
6440 7072
     },
7073
+    "write-file-atomic": {
7074
+      "version": "2.3.0",
7075
+      "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz",
7076
+      "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==",
7077
+      "dev": true,
7078
+      "requires": {
7079
+        "graceful-fs": "^4.1.11",
7080
+        "imurmurhash": "^0.1.4",
7081
+        "signal-exit": "^3.0.2"
7082
+      }
7083
+    },
6441 7084
     "ws": {
6442 7085
       "version": "3.3.2",
6443 7086
       "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.2.tgz",

+ 1
- 0
package.json 查看文件

@@ -34,6 +34,7 @@
34 34
   },
35 35
   "devDependencies": {
36 36
     "@ionic/app-scripts": "3.1.11",
37
+    "@ionic/lab": "1.0.5",
37 38
     "typescript": "~2.6.2"
38 39
   },
39 40
   "description": "An Ionic project"

+ 1
- 1
src/app/app.component.ts 查看文件

@@ -19,7 +19,7 @@ import { LoginPage } from '../pages/login/login';
19 19
 export class MyApp {
20 20
   @ViewChild(Nav) nav: Nav;
21 21
 
22
-  rootPage: any = HomePage;
22
+  rootPage: any = LoginPage;
23 23
 
24 24
   pages: Array<{title: string, component: any}>;
25 25
 

+ 9
- 3
src/app/app.module.ts 查看文件

@@ -2,6 +2,7 @@ import { BrowserModule } from '@angular/platform-browser';
2 2
 import { ErrorHandler, NgModule } from '@angular/core';
3 3
 import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
4 4
 import { HttpClientModule } from '@angular/common/http';
5
+import { HttpModule } from '@angular/http';
5 6
 import { Ionic2RatingModule } from 'ionic2-rating';
6 7
 
7 8
 
@@ -19,42 +20,47 @@ import { StatusBar } from '@ionic-native/status-bar';
19 20
 import { SplashScreen } from '@ionic-native/splash-screen';
20 21
 import { ConnectionProvider } from '../providers/connection/connection';
21 22
 import { DistrictProvider } from '../providers/connection/district';
23
+import { UserLoginProvider } from '../providers/connection/userLogin';
24
+
22 25
 
23 26
 @NgModule({
24 27
   declarations: [
25 28
     MyApp,
29
+    LoginPage,
26 30
     HomePage,
27 31
     ListPage,
28 32
     NewProfilePage,
29 33
     TeacherRegistrationPage,
30 34
     SearchPage,
31 35
     SchoolPage,
32
-    LoginPage,
36
+    
33 37
   ],
34 38
   imports: [
35 39
     BrowserModule,
36 40
     IonicModule.forRoot(MyApp),
37 41
     HttpClientModule, 
38
-    Ionic2RatingModule
42
+    Ionic2RatingModule,
43
+    HttpModule
39 44
 
40 45
 
41 46
   ],
42 47
   bootstrap: [IonicApp],
43 48
   entryComponents: [
44 49
     MyApp,
50
+    LoginPage, 
45 51
     HomePage,
46 52
     ListPage, 
47 53
     NewProfilePage,
48 54
     TeacherRegistrationPage,
49 55
     SearchPage,
50 56
     SchoolPage,
51
-    LoginPage, 
52 57
   ],
53 58
   providers: [
54 59
     StatusBar,
55 60
     SplashScreen,
56 61
     ConnectionProvider,
57 62
     DistrictProvider, 
63
+    UserLoginProvider,
58 64
     {provide: ErrorHandler, useClass: IonicErrorHandler}
59 65
     
60 66
   ]

+ 6
- 1
src/app/component/user.ts 查看文件

@@ -2,8 +2,13 @@ export class User {
2 2
 
3 3
     firstName: string;
4 4
     lastName: string;
5
-    displayName: string; 
5
+    username: string; 
6 6
     email: string;
7 7
     password: string; 
8 8
     verifyPassword: string;
9
+
10
+        constructor(public Name?: string) {
11
+            this.firstName = this.Name; 
12
+
13
+    }
9 14
 }

+ 4
- 3
src/pages/home/home.html 查看文件

@@ -12,10 +12,11 @@
12 12
   <ion-list id="userProfile-list11">
13 13
     <ion-item color="none" id="userProfile-list-item8">
14 14
       <ion-avatar item-left>
15
-        <img src="assets/img/NnIfntyRAmnnxOvENgtU_me.jpeg" />
15
+        <img src="" />
16 16
       </ion-avatar>
17
-      <h2>
18
-        Parent or Student
17
+      <h2 style="color:#000000;text-align:center;">
18
+        Welcome!
19
+        <!-- {{user.Name}} -->
19 20
       </h2>
20 21
     </ion-item>
21 22
   </ion-list>

+ 5
- 3
src/pages/home/home.ts 查看文件

@@ -1,8 +1,8 @@
1 1
 import { Component } from '@angular/core';
2
-import { NavController } from 'ionic-angular';
2
+import { NavController, NavParams} from 'ionic-angular';
3 3
 
4 4
 //import { ConnectionProvider } from '../../providers/connection/connection;
5
-//import { User } from './../../app/users/user';
5
+// import { User } from './../../app/component/user';
6 6
 
7 7
 @Component({
8 8
   selector: 'page-home',
@@ -10,8 +10,10 @@ import { NavController } from 'ionic-angular';
10 10
 })
11 11
 export class HomePage {
12 12
 
13
-  constructor(public navCtrl: NavController) {
13
+  public user; 
14 14
 
15
+  constructor(public navCtrl: NavController, public navParams: NavParams) {
16
+      this.user = this.navParams.get("user");
15 17
   }
16 18
 
17 19
 

+ 20
- 14
src/pages/login/login.html 查看文件

@@ -8,27 +8,33 @@
8 8
     </ion-title>
9 9
   </ion-navbar>
10 10
 </ion-header>
11
+
11 12
 <ion-content padding style="background:url(assets/imgs/final_spitball.jpg) no-repeat center;background-size:cover;" id="page7">
12
-  <form id="login-form1">
13
+  
14
+  <form [formGroup]="formgroup" (ngSubmit)="sendLoginInfo(formgroup.value)">
15
+    
13 16
     <ion-list id="login-list1">
14 17
       <ion-item id="login-input1">
15
-        <ion-label>
16
-          Email or Display Name
17
-        </ion-label>
18
-        <ion-input type="email" placeholder=""></ion-input>
18
+        <ion-input type="email" placeholder="Email or Display Name" formControlName="username"></ion-input>
19 19
       </ion-item>
20
-      <ion-item id="login-input2">
21
-        <ion-label>
22
-          Password
23
-        </ion-label>
24
-        <ion-input type="password" placeholder=""></ion-input>
20
+      <ion-item text-center *ngIf="username.hasError('required') && username.touched">
21
+        <p> *Please enter your e-mail or display name</p>
22
+      </ion-item>
23
+
24
+      <ion-item text-center>
25
+        <ion-input type="password" placeholder="Password" formControlName="password"></ion-input>
26
+      </ion-item>
27
+      <ion-item text-center *ngIf="password.hasError('required') && password.touched">
28
+        <p> *Please enter your password</p>
25 29
       </ion-item>
26 30
     </ion-list>
31
+   
32
+<button id="login-button1" type="submit" ion-button color="calm" full large on-click="goToUserProfile()">Log in</button>
33
+
27 34
     <div class="spacer" style="height:20px;" id="login-spacer1"></div>
28
-    <button id="login-button1" ion-button color="calm" block on-click="goToUserProfile()">
29
-      Log in
30
-    </button>
35
+ 
31 36
   </form>
37
+
32 38
   <button id="login-button11" ion-button color="positive" small icon-left>
33 39
     <ion-icon name="linkedin"></ion-icon>
34 40
     LinkedIn Login
@@ -40,7 +46,7 @@
40 46
     <ion-icon name="googleplus"></ion-icon>
41 47
     Google + Login
42 48
   </button>
43
-  <button id="login-button2" ion-button color="assertive" full small on-click="goToNewProfile()">
49
+  <button id="login-button2" ion-button color="assertive" full small on-click="goToUserRegistration()">
44 50
     Create A New Profile!
45 51
   </button>
46 52
   <button id="login-button5" ion-button color="balanced" full small on-click="goToTeacherRegistration()">

+ 52
- 5
src/pages/login/login.ts 查看文件

@@ -1,6 +1,14 @@
1 1
 import { Component } from '@angular/core';
2 2
 import { NavController } from 'ionic-angular';
3 3
 
4
+import { FormGroup, FormBuilder, Validators, AbstractControl } from '@angular/forms';
5
+import { UserLoginProvider } from './../../providers/connection/userLogin';
6
+
7
+import { HomePage } from './../../pages/home/home';
8
+import { NewProfilePage } from './../../pages/registerUser/registerUser';
9
+import { TeacherRegistrationPage } from './../../pages/registerTeacher/registerTeacher';
10
+
11
+
4 12
 
5 13
 @Component({
6 14
   selector: 'page-login',
@@ -8,11 +16,50 @@ import { NavController } from 'ionic-angular';
8 16
 })
9 17
 export class LoginPage {
10 18
 
11
-  constructor(public navCtrl: NavController) {
19
+  formgroup: FormGroup;
20
+
21
+  username: AbstractControl;
22
+  password: AbstractControl;
23
+
24
+  constructor(public navCtrl: NavController,  private formbuilder: FormBuilder, private userLogin: UserLoginProvider) {
25
+  
26
+    this.formgroup=this.formbuilder.group(
27
+      
28
+      {
29
+      username : ['', Validators.required],
30
+      password : ['', Validators.required]
31
+      });
32
+
33
+    this.username=this.formgroup.controls['username'];
34
+    this.password=this.formgroup.controls['password'];
35
+  
36
+  }
37
+
38
+  sendLoginInfo(loginForm){
39
+        this.userLogin.login(loginForm.username, loginForm.password, result =>{
40
+        if(result.status == 200){
41
+        console.log("Success!");
42
+        this.userLogin.setToken(result.headers.get("authorization"));
43
+        console.log(this.userLogin.getToken());
44
+        this.navCtrl.setRoot(HomePage);
45
+
46
+
47
+      } else {
48
+        console.log("invalid login attempt");
49
+      }
50
+    });
51
+  }
52
+
53
+  goToUserProfile() {
54
+    this.navCtrl.push(HomePage); 
55
+  }
56
+
57
+  goToTeacherRegistration(){
58
+    this.navCtrl.push(TeacherRegistrationPage); 
59
+  }
60
+
61
+  goToUserRegistration(){
62
+    this.navCtrl.push(NewProfilePage); 
12 63
   }
13
-//   goToNewProfile(params){
14
-//     if (!params) params = {};
15
-//     this.navCtrl.push(NewProfilePage);
16
-//   }
17 64
   
18 65
 }

+ 2
- 2
src/pages/registerUser/registerUser.html 查看文件

@@ -45,9 +45,9 @@
45 45
         </ion-item>
46 46
         <ion-item id="newProfile-input6">
47 47
           <ion-label>
48
-            Display Name
48
+            Username
49 49
           </ion-label>
50
-          <ion-input type="text" placeholder="optional" [(ngModel)]="user.displayName" name="displayName" required minlength="5" maxlength="8"></ion-input>
50
+          <ion-input type="text" placeholder="optional" [(ngModel)]="user.username" name="username" required minlength="5" maxlength="8"></ion-input>
51 51
         </ion-item>
52 52
         <div class="spacer" style="width:299.531px;height:12.9688px;" id="newProfile-spacer5"></div>
53 53
         <div id="newProfile-markdown17" class="show-list-numbers-and-dots">

+ 5
- 4
src/pages/registerUser/registerUser.ts 查看文件

@@ -1,6 +1,9 @@
1 1
 import { Component } from '@angular/core';
2 2
 import { NavController } from 'ionic-angular';
3
+
3 4
 import { User } from './../../app/component/user';
5
+import { HomePage } from './../../pages/home/home';
6
+
4 7
 import { ConnectionProvider } from './../../providers/connection/connection';
5 8
 
6 9
 @Component({
@@ -18,12 +21,10 @@ user: User = new User();
18 21
     this.conn.post('user_profile/register_user', this.user).subscribe(
19 22
       data => console.log(data)
20 23
     );
21
-  }
24
+    this.navCtrl.push(HomePage);
22 25
 
26
+  }
23 27
 
24
-  // goToUserProfile(params){
25
-  //   if (!params) params = {};
26
-  //   this.navCtrl.push(Home);
27 28
   // }goToUpdateProfile(params){
28 29
   //   if (!params) params = {};
29 30
   //   this.navCtrl.push(Home);

+ 1
- 0
src/pages/schools/schools.html 查看文件

@@ -20,6 +20,7 @@
20 20
         School Aggregate Score
21 21
       </h2>
22 22
   </ion-item>
23
+  
23 24
      <rating id="stars"
24 25
         readOnly="false"
25 26
         max="5"

+ 7
- 10
src/pages/schools/schools.ts 查看文件

@@ -2,7 +2,7 @@ import { Component } from '@angular/core';
2 2
 import { NavController, NavParams } from 'ionic-angular';
3 3
 import { ConnectionProvider } from './../../providers/connection/connection';
4 4
 
5
-import { Rating } from './../../app/component/rating';
5
+//import { Rating } from './../../app/component/rating';
6 6
 import { Review } from './../../app/component/review';
7 7
 
8 8
 
@@ -19,7 +19,6 @@ export class SchoolPage {
19 19
     public gMap;
20 20
 
21 21
     review: Review = new Review();
22
-    // review: string;
23 22
     // rate: Rating = new Rating();
24 23
 
25 24
     // @ViewChild('mapsId') mapElement: ElementRef;
@@ -28,6 +27,12 @@ export class SchoolPage {
28 27
   constructor(public navCtrl: NavController, public navParams: NavParams, public conn: ConnectionProvider) {
29 28
       this.school = this.navParams.get("school");
30 29
   }
30
+  postReview(){
31
+    console.log(this.review);
32
+    this.conn.post('reviews/post', this.review).subscribe(
33
+      data => console.log(data)
34
+    );
35
+  }
31 36
 
32 37
   // postRating(rate: number){
33 38
   //   this.conn.post('ratings/rate', this.rate).subscribe(
@@ -35,14 +40,6 @@ export class SchoolPage {
35 40
   //   );
36 41
   // }
37 42
 
38
-   postReview(){
39
-     console.log("post reviw");
40
-     console.log(this.review);
41
-    this.conn.post('reviews/post', this.review).subscribe(
42
-      data => console.log(data)
43
-    );
44
-  }
45
-
46 43
   // ionViewDidLoad () {
47 44
   //   this.loadMap();
48 45
   // }

+ 10
- 2
src/providers/connection/connection.ts 查看文件

@@ -16,12 +16,20 @@ public apiUrl = 'http://localhost:8080/';
16 16
     console.log('Hello ConnectionProvider Provider');
17 17
   }
18 18
 
19
+  setAPI(apiUrl: string){
20
+    this.apiUrl = apiUrl;
21
+  }
22
+
23
+  getAPI(){
24
+    return this.apiUrl;
25
+  }
26
+
19 27
 post(partialPath: string, data: any) {
20
-  return this.http.post(this.apiUrl + partialPath, data);
28
+  return this.http.post(this.getAPI() + partialPath, data);
21 29
 }
22 30
 
23 31
 get(partialPath: string, data: any) {
24
-  return this.http.get(this.apiUrl + partialPath, data);
32
+  return this.http.get(this.getAPI() + partialPath, data);
25 33
 }
26 34
 
27 35
 

+ 47
- 0
src/providers/connection/userLogin.ts 查看文件

@@ -0,0 +1,47 @@
1
+import { HttpClient } from '@angular/common/http';
2
+import { Injectable } from '@angular/core';
3
+import { Http, Headers, RequestOptions } from '@angular/http';
4
+import { ConnectionProvider } from '../connection/connection';
5
+
6
+/*
7
+  Generated class for the UserProvider provider.
8
+
9
+  See https://angular.io/guide/dependency-injection for more info on providers
10
+  and Angular DI.
11
+*/
12
+@Injectable()
13
+export class UserLoginProvider {
14
+
15
+  constructor( public http: Http, public conn: ConnectionProvider) {
16
+    console.log('Hello UserProvider Provider');
17
+  }
18
+
19
+
20
+  private token: string;
21
+
22
+  getToken(){return this.token}
23
+
24
+  setToken(token: string){this.token = token}
25
+  
26
+  login(username, password, callback){
27
+   
28
+    var url: string = this.conn.getAPI() + "/login";
29
+ 
30
+    var header = new Headers({
31
+      'content-type': 'application/json',
32
+    })
33
+ 
34
+    let options = new RequestOptions({headers: header})
35
+ 
36
+    var body = {
37
+      "username": username,
38
+      "password": password
39
+    };
40
+ 
41
+    this.http.post(url, body, options).subscribe( result => {
42
+      callback(result);
43
+      //console.log(result.headers.get("authorization"));
44
+    })
45
+  }
46
+
47
+}