Skip to content

Commit

Permalink
perf(帐户模块): 移动账号模块,登录组件,注册组件,注册成功页面到特性模块下
Browse files Browse the repository at this point in the history
  • Loading branch information
jiayisheji committed Nov 30, 2017
1 parent 065b929 commit f87b10e
Show file tree
Hide file tree
Showing 20 changed files with 49 additions and 31 deletions.
14 changes: 14 additions & 0 deletions src/app/feature/user/login/login.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<p>
login works!
</p>


<div>
<input type="text" name="" id="" placeholder="admin">
</div>
<div>
<input type="password" name="" id="" placeholder="123456">
</div>
<div>
<button (click)="login()">提交</button>
</div>
22 changes: 22 additions & 0 deletions src/app/feature/user/login/login.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Component, OnInit } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Router } from '@angular/router';


@Component({
selector: 'app-login',
templateUrl: './login.component.html',
styleUrls: ['./login.component.scss']
})
export class LoginComponent implements OnInit {

constructor(private _router: Router) { }

ngOnInit() {
}

login() {
localStorage.setItem('currentUser', JSON.stringify({ username: 'admin' }));
this._router.navigate(['/dashboard/analysis']);
}
}
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
:host {
display: block;
background: #f0f2f5;
background-image: url('../../../assets/images/user-bg.svg');
width: 100%;
min-height: 100%;
background-repeat: no-repeat;
background-position: center;
background-size: 100%;
padding: 110px 0 144px 0;
position: relative;
:host {
display: block;
background: #f0f2f5;
background-image: url('../../../assets/images/user-bg.svg');
width: 100%;
min-height: 100%;
background-repeat: no-repeat;
background-position: center;
background-size: 100%;
padding: 110px 0 144px 0;
position: relative;
}
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { SharedModule } from '@app/shared';

import { UserRoutingModule } from './user-routing.module';
import { UserComponent } from './user.component';
Expand All @@ -9,7 +9,7 @@ import { RegisterResultComponent } from './register-result/register-result.compo

@NgModule({
imports: [
CommonModule,
SharedModule,
UserRoutingModule
],
declarations: [UserComponent, LoginComponent, RegisterComponent, RegisterResultComponent]
Expand Down
3 changes: 0 additions & 3 deletions src/app/pages/user/login/login.component.html

This file was deleted.

15 changes: 0 additions & 15 deletions src/app/pages/user/login/login.component.ts

This file was deleted.

0 comments on commit f87b10e

Please sign in to comment.