From a3a8c23b196980732a795713a5eb5fe0c7075bf9 Mon Sep 17 00:00:00 2001
From: fengxiang <110431245@qq.com>
Date: Wed, 11 Jul 2018 21:47:13 +0800
Subject: [PATCH] Revert "提交"
---
/dev/null | 36 ------------------------------------
src/app/routes/routes.module.ts | 5 +----
src/app/routes/routes-routing.module.ts | 2 --
package.json | 1 +
src/app/app.module.ts | 4 ++--
src/app/routes/widgets/widgets/widgets.component.ts | 5 -----
6 files changed, 4 insertions(+), 49 deletions(-)
diff --git a/package.json b/package.json
index 07af972..32d42da 100644
--- a/package.json
+++ b/package.json
@@ -21,6 +21,7 @@
"scaffold"
],
"scripts": {
+ "precommit": "npm run lint-staged",
"ng": "ng",
"start": "ng serve -o",
"hmr": "ng serve -c=hmr",
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index 02a157f..e972423 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -8,8 +8,8 @@
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { DelonModule } from './delon.module';
-import { CoreModule } from '@core/core.module';
-import { SharedModule } from '@shared/shared.module';
+import { CoreModule } from './core/core.module';
+import { SharedModule } from './shared/shared.module';
import { AppComponent } from './app.component';
import { RoutesModule } from './routes/routes.module';
import { LayoutModule } from './layout/layout.module';
diff --git a/src/app/routes/home-page/home-page.component.html b/src/app/routes/home-page/home-page.component.html
deleted file mode 100644
index 1e5a9bf..0000000
--- a/src/app/routes/home-page/home-page.component.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<div class="content__title">
- <h1>������������������</h1>
-</div>
-<div nz-row [nzGutter]="24" class="pt-lg">
- <div nz-col nzXs="24" nzSm="12" nzMd="6" class="mb-md">
- <div nz-row nzType="flex" nzAlign="middle" class="bg-primary rounded-md">
- <div nz-col nzSpan="24" class="p-md text-white" style="text-align: center;">
- <div class="h2 mt0">123,456</div>
- <p class="text-nowrap mb0">AQI</p>
- </div>
- </div>
- </div>
- <div nz-col nzXs="24" nzSm="12" nzMd="6" class="mb-md">
- <div nz-row nzType="flex" nzAlign="middle" class="bg-success rounded-md">
- <div nz-col nzSpan="24" class="p-md text-white" style="text-align: center;">
- <div class="h2 mt0">123,456</div>
- <p class="text-nowrap mb0">������</p>
- </div>
- </div>
- </div>
- <div nz-col nzXs="24" nzSm="12" nzMd="6" class="mb-md">
- <div nz-row nzType="flex" nzAlign="middle" class="bg-orange rounded-md">
- <div nz-col nzSpan="24" class="p-md text-white" style="text-align: center;">
- <div class="h2 mt0">123,456</div>
- <p class="text-nowrap mb0">������</p>
- </div>
- </div>
- </div>
- <div nz-col nzXs="24" nzSm="12" nzMd="6" class="mb-md">
- <div nz-row nzType="flex" nzAlign="middle" class="bg-magenta rounded-md">
- <div nz-col nzSpan="24" class="p-md text-white" style="text-align: center;">
- <div class="h2 mt0">123,456</div>
- <p class="text-nowrap mb0">PM2.5</p>
- </div>
- </div>
- </div>
-</div>
diff --git a/src/app/routes/home-page/home-page.component.less b/src/app/routes/home-page/home-page.component.less
deleted file mode 100644
index e69de29..0000000
--- a/src/app/routes/home-page/home-page.component.less
+++ /dev/null
diff --git a/src/app/routes/home-page/home-page.component.ts b/src/app/routes/home-page/home-page.component.ts
deleted file mode 100644
index bd90bcf..0000000
--- a/src/app/routes/home-page/home-page.component.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-import { Component, OnInit } from "@angular/core";
-import { _HttpClient } from "@delon/theme";
-import { zip } from "rxjs";
-
-@Component({
- selector: "app-home-page",
- templateUrl: "./home-page.component.html",
- styleUrls: ["./home-page.component.less"]
-})
-export class HomePageComponent implements OnInit {
- public cardData: {'api'?:number,'temperature'?:number,'windDirection'?: string,'pm2.5'?: number}
- = {};
- constructor(
- private http:_HttpClient,
- ) {
- }
-
- ngOnInit() {
- // zip(
- // this.http.get('http://sapi.7drlb.com/api/mj?cityID=1102&apiKey=condition'),
- // this.http.get('http://sapi.7drlb.com/api/mj?cityID=1102&apiKey=aqi')
-
- // ).subscribe(
- // (value) => {
- // debugger;
- // console.log(value);
- // // console.log(aqiRes);
- // }
- // )
- this.http.get('/user-context').subscribe(
- res => {
- console.log(res);
- }
- );
- }
-}
diff --git a/src/app/routes/routes-routing.module.ts b/src/app/routes/routes-routing.module.ts
index c3b6c3f..b271c92 100644
--- a/src/app/routes/routes-routing.module.ts
+++ b/src/app/routes/routes-routing.module.ts
@@ -20,7 +20,6 @@
import { Exception403Component } from './exception/403.component';
import { Exception404Component } from './exception/404.component';
import { Exception500Component } from './exception/500.component';
-import { HomePageComponent } from './home-page/home-page.component';
const routes: Routes = [
{
@@ -30,7 +29,6 @@
{ path: '', redirectTo: 'dashboard/v1', pathMatch: 'full' },
{ path: 'dashboard', redirectTo: 'dashboard/v1', pathMatch: 'full' },
{ path: 'dashboard/v1', component: DashboardV1Component },
- { path: 'home-page', component: HomePageComponent },
{ path: 'dashboard/analysis', component: DashboardAnalysisComponent },
{ path: 'dashboard/monitor', component: DashboardMonitorComponent },
{ path: 'dashboard/workplace', component: DashboardWorkplaceComponent },
diff --git a/src/app/routes/routes.module.ts b/src/app/routes/routes.module.ts
index 28e5f44..5fe1b20 100644
--- a/src/app/routes/routes.module.ts
+++ b/src/app/routes/routes.module.ts
@@ -17,7 +17,6 @@
import { Exception403Component } from './exception/403.component';
import { Exception404Component } from './exception/404.component';
import { Exception500Component } from './exception/500.component';
-import { HomePageComponent } from './home-page/home-page.component';
const COMPONENTS = [
DashboardV1Component,
@@ -33,9 +32,7 @@
CallbackComponent,
Exception403Component,
Exception404Component,
- Exception500Component,
- // moral pages
- HomePageComponent
+ Exception500Component
];
const COMPONENTS_NOROUNT = [];
diff --git a/src/app/routes/widgets/widgets/widgets.component.ts b/src/app/routes/widgets/widgets/widgets.component.ts
index a520be5..dd98087 100644
--- a/src/app/routes/widgets/widgets/widgets.component.ts
+++ b/src/app/routes/widgets/widgets/widgets.component.ts
@@ -55,11 +55,6 @@
dislike = false;
constructor(public msg: NzMessageService, private http: _HttpClient) {
- this.http.get('/user-context').subscribe(
- res => {
- console.log(res);
- }
- );
this.http.get('/chart/visit').subscribe((res: any[]) => {
this.data = res;
this.smallData = res.slice(0, 6);
--
Gitblit v1.8.0