parent
389092410c
commit
fa409a0f88
@ -0,0 +1,55 @@ |
|||||||
|
<!--设置高度,添加bootstrap样式类d-flex align-items-center 使表单垂直居中,justify-content-center水平居中--> |
||||||
|
<div [style]="height" class="d-flex align-items-center justify-content-center"> |
||||||
|
<form [formGroup]="registerForm" class="col-6"> |
||||||
|
|
||||||
|
<!-- 管理员名--> |
||||||
|
<div class="input-group mb-3 mx-auto col-7"> |
||||||
|
<div class="input-group-prepend"> |
||||||
|
<span class="input-group-text">{{ 'login.manager_name' | translate }}</span> |
||||||
|
</div> |
||||||
|
<input type="text" class="form-control text-center" [placeholder]="('tip.input' | translate)+('login.manager_name' | translate)" formControlName="managerName"> |
||||||
|
</div> |
||||||
|
|
||||||
|
<!-- 管理员密码--> |
||||||
|
<div class="input-group mb-3 mx-auto col-7"> |
||||||
|
<div class="input-group-prepend"> |
||||||
|
<span class="input-group-text">{{ 'login.password' | translate }}</span> |
||||||
|
</div> |
||||||
|
<input type="password" class="form-control text-center" [placeholder]="('tip.input' | translate)+('login.password' | translate)" formControlName="password"> |
||||||
|
</div> |
||||||
|
|
||||||
|
|
||||||
|
<!-- 管理员确认密码--> |
||||||
|
<div class="input-group mb-3 mx-auto col-7"> |
||||||
|
<div class="input-group-prepend"> |
||||||
|
<span class="input-group-text">{{ 'register.confirm_pwd' | translate }}</span> |
||||||
|
</div> |
||||||
|
<input type="password" class="form-control text-center" [placeholder]="('tip.input' | translate)+('register.confirm_pwd' | translate)" formControlName="confirmPassword"> |
||||||
|
</div> |
||||||
|
|
||||||
|
<!-- 手机号--> |
||||||
|
<div class="input-group mb-3 mx-auto col-7"> |
||||||
|
<div class="input-group-prepend"> |
||||||
|
<span class="input-group-text">{{ 'register.mobie' | translate }}</span> |
||||||
|
</div> |
||||||
|
<input type="number" class="form-control text-center" [placeholder]="('tip.input' | translate)+('register.mobie' | translate)" formControlName="mobie"> |
||||||
|
</div> |
||||||
|
|
||||||
|
<!-- 邮箱--> |
||||||
|
<div class="input-group mb-3 mx-auto col-7"> |
||||||
|
<div class="input-group-prepend"> |
||||||
|
<span class="input-group-text">{{ 'register.email' | translate }}</span> |
||||||
|
</div> |
||||||
|
<input type="text" class="form-control text-center" [placeholder]="('tip.input' | translate)+('register.email' | translate)" formControlName="email"> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="col-7 mx-auto text-center"> |
||||||
|
<!-- 注册按钮--> |
||||||
|
<button type="button" (click)="register()" class="btn btn-primary btn-lg">{{ 'button.register' | translate }}</button> |
||||||
|
<!-- 返回登陆按钮--> |
||||||
|
<button type="button" [routerLink]="['/login']" |
||||||
|
class="btn btn-primary btn-lg ml-3">{{ 'button.backLogin' | translate }}</button> |
||||||
|
</div> |
||||||
|
|
||||||
|
</form> |
||||||
|
</div> |
@ -0,0 +1,25 @@ |
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; |
||||||
|
|
||||||
|
import { RegisterComponent } from './register.component'; |
||||||
|
|
||||||
|
describe('RegisterComponent', () => { |
||||||
|
let component: RegisterComponent; |
||||||
|
let fixture: ComponentFixture<RegisterComponent>; |
||||||
|
|
||||||
|
beforeEach(async(() => { |
||||||
|
TestBed.configureTestingModule({ |
||||||
|
declarations: [ RegisterComponent ] |
||||||
|
}) |
||||||
|
.compileComponents(); |
||||||
|
})); |
||||||
|
|
||||||
|
beforeEach(() => { |
||||||
|
fixture = TestBed.createComponent(RegisterComponent); |
||||||
|
component = fixture.componentInstance; |
||||||
|
fixture.detectChanges(); |
||||||
|
}); |
||||||
|
|
||||||
|
it('should create', () => { |
||||||
|
expect(component).toBeTruthy(); |
||||||
|
}); |
||||||
|
}); |
@ -0,0 +1,30 @@ |
|||||||
|
import { Component, OnInit } from '@angular/core'; |
||||||
|
import {FormBuilder} from '@angular/forms'; |
||||||
|
import {Height} from '../../height'; |
||||||
|
@Component({ |
||||||
|
selector: 'app-register', |
||||||
|
templateUrl: './register.component.html', |
||||||
|
styleUrls: ['./register.component.scss'] |
||||||
|
}) |
||||||
|
// 注册模块
|
||||||
|
export class RegisterComponent extends Height implements OnInit { |
||||||
|
// 注册表单
|
||||||
|
registerForm = this.fb.group({ |
||||||
|
managerName: [], |
||||||
|
password: [], |
||||||
|
confirmPassword: [], |
||||||
|
mobie: [], |
||||||
|
email: [] |
||||||
|
}); |
||||||
|
|
||||||
|
constructor(private fb: FormBuilder) { |
||||||
|
super(); |
||||||
|
} |
||||||
|
|
||||||
|
ngOnInit(): void { |
||||||
|
} |
||||||
|
|
||||||
|
register() { |
||||||
|
alert('确认注册'); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,39 @@ |
|||||||
|
<!--设置高度,添加bootstrap样式类d-flex align-items-center 使表单垂直居中,justify-content-center水平居中--> |
||||||
|
<div [style]="height" class="d-flex align-items-center justify-content-center"> |
||||||
|
<form [formGroup]="resetForm" class="col-6"> |
||||||
|
<!-- 管理员名--> |
||||||
|
<div class="input-group mb-3 mx-auto col-7"> |
||||||
|
<div class="input-group-prepend"> |
||||||
|
<span class="input-group-text">{{ 'login.manager_name' | translate }}</span> |
||||||
|
</div> |
||||||
|
<input type="text" class="form-control text-center" [placeholder]="('tip.input' | translate)+('login.manager_name' | translate)" formControlName="managerName"> |
||||||
|
</div> |
||||||
|
|
||||||
|
<!-- 邮箱--> |
||||||
|
<div class="input-group mb-3 mx-auto col-7"> |
||||||
|
<div class="input-group-prepend"> |
||||||
|
<span class="input-group-text">{{ 'register.email' | translate }}</span> |
||||||
|
</div> |
||||||
|
<input type="text" class="form-control text-center" [placeholder]="('tip.input' | translate)+('register.email' | translate)" formControlName="email"> |
||||||
|
<div class="input-group-append"> |
||||||
|
<button class="btn btn-outline-secondary" type="button" (click)="sendCode()">{{ 'button.send_code' | translate }}</button> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<!-- 验证码--> |
||||||
|
<div class="input-group mb-3 mx-auto col-7"> |
||||||
|
<div class="input-group-prepend"> |
||||||
|
<span class="input-group-text">{{ 'reset_pwd.code' | translate }}</span> |
||||||
|
</div> |
||||||
|
<input type="text" class="form-control text-center" [placeholder]="('tip.input' | translate)+('reset_pwd.code' | translate)" formControlName="verificationCode"> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="col-7 mx-auto text-center"> |
||||||
|
<!-- 重置密码按钮 --> |
||||||
|
<button type="button" (click)="resetPwd()" class="btn btn-primary btn-lg">{{ 'button.reset_pwd' | translate }}</button> |
||||||
|
<!-- 返回登陆按钮--> |
||||||
|
<button type="button" [routerLink]="['/login']" |
||||||
|
class="btn btn-primary btn-lg ml-3">{{ 'button.backLogin' | translate }}</button> |
||||||
|
</div> |
||||||
|
</form> |
||||||
|
</div> |
@ -0,0 +1,25 @@ |
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; |
||||||
|
|
||||||
|
import { ResetpwdComponent } from './resetpwd.component'; |
||||||
|
|
||||||
|
describe('ResetpwdComponent', () => { |
||||||
|
let component: ResetpwdComponent; |
||||||
|
let fixture: ComponentFixture<ResetpwdComponent>; |
||||||
|
|
||||||
|
beforeEach(async(() => { |
||||||
|
TestBed.configureTestingModule({ |
||||||
|
declarations: [ ResetpwdComponent ] |
||||||
|
}) |
||||||
|
.compileComponents(); |
||||||
|
})); |
||||||
|
|
||||||
|
beforeEach(() => { |
||||||
|
fixture = TestBed.createComponent(ResetpwdComponent); |
||||||
|
component = fixture.componentInstance; |
||||||
|
fixture.detectChanges(); |
||||||
|
}); |
||||||
|
|
||||||
|
it('should create', () => { |
||||||
|
expect(component).toBeTruthy(); |
||||||
|
}); |
||||||
|
}); |
@ -0,0 +1,35 @@ |
|||||||
|
import { Component, OnInit } from '@angular/core'; |
||||||
|
import { FormBuilder } from '@angular/forms'; |
||||||
|
import {Height} from '../../height'; |
||||||
|
|
||||||
|
@Component({ |
||||||
|
selector: 'app-resetpwd', |
||||||
|
templateUrl: './resetpwd.component.html', |
||||||
|
styleUrls: ['./resetpwd.component.scss'] |
||||||
|
}) |
||||||
|
// 重置密码模块
|
||||||
|
export class ResetpwdComponent extends Height implements OnInit { |
||||||
|
|
||||||
|
// 重置密码表单
|
||||||
|
resetForm = this.fb.group({ |
||||||
|
managerName: [], |
||||||
|
email: [], |
||||||
|
verificationCode: [] |
||||||
|
}); |
||||||
|
|
||||||
|
constructor(private fb: FormBuilder) { |
||||||
|
super(); |
||||||
|
} |
||||||
|
|
||||||
|
ngOnInit(): void { |
||||||
|
} |
||||||
|
|
||||||
|
sendCode(){ |
||||||
|
alert('发送验证码'); |
||||||
|
} |
||||||
|
|
||||||
|
resetPwd(){ |
||||||
|
alert('重置密码'); |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,12 @@ |
|||||||
|
<div class="notice bg-light col-5 mx-auto"> |
||||||
|
<h1 class="text-center mb-3 mt-3">{{ 'forum.notice' | translate }}</h1> |
||||||
|
<div class="notice-content border-success mt-3 mb-3 position-relative"> |
||||||
|
<h2 class="text-center mb-3 mt-3">公告标题</h2> |
||||||
|
<div class="notice-body overflow-auto"> |
||||||
|
公告内容公告内容公告内容公告内容公告内容公告内容公告内容公告内容公告内容公告内容公告内容公告内容公告内容公告内容公告内容公告内容公告内容公告内容公告内容公告内容公告内容公告内容公告内容公告内容公告内容公告内容 |
||||||
|
</div> |
||||||
|
<div class="notice-footer border border-info text-right align-text-bottom"> |
||||||
|
<span>编辑管理员</span><span>编辑时间:2020-01-01</span> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
@ -0,0 +1,19 @@ |
|||||||
|
.notice{ |
||||||
|
height: 300px; |
||||||
|
} |
||||||
|
.notice-content{ |
||||||
|
height: 200px; |
||||||
|
border-style: solid; |
||||||
|
border-width: 3px; |
||||||
|
} |
||||||
|
.notice-body{ |
||||||
|
max-height: 100px; |
||||||
|
} |
||||||
|
|
||||||
|
.notice-footer{ |
||||||
|
position:absolute; |
||||||
|
top: 145px; |
||||||
|
bottom: 0; |
||||||
|
width: 100%; |
||||||
|
|
||||||
|
} |
@ -0,0 +1,25 @@ |
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; |
||||||
|
|
||||||
|
import { ForumComponent } from './forum.component'; |
||||||
|
|
||||||
|
describe('ForumComponent', () => { |
||||||
|
let component: ForumComponent; |
||||||
|
let fixture: ComponentFixture<ForumComponent>; |
||||||
|
|
||||||
|
beforeEach(async(() => { |
||||||
|
TestBed.configureTestingModule({ |
||||||
|
declarations: [ ForumComponent ] |
||||||
|
}) |
||||||
|
.compileComponents(); |
||||||
|
})); |
||||||
|
|
||||||
|
beforeEach(() => { |
||||||
|
fixture = TestBed.createComponent(ForumComponent); |
||||||
|
component = fixture.componentInstance; |
||||||
|
fixture.detectChanges(); |
||||||
|
}); |
||||||
|
|
||||||
|
it('should create', () => { |
||||||
|
expect(component).toBeTruthy(); |
||||||
|
}); |
||||||
|
}); |
@ -0,0 +1,15 @@ |
|||||||
|
import { Component, OnInit } from '@angular/core'; |
||||||
|
|
||||||
|
@Component({ |
||||||
|
selector: 'app-forum', |
||||||
|
templateUrl: './forum.component.html', |
||||||
|
styleUrls: ['./forum.component.scss'] |
||||||
|
}) |
||||||
|
export class ForumComponent implements OnInit { |
||||||
|
|
||||||
|
constructor() { } |
||||||
|
|
||||||
|
ngOnInit(): void { |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,4 @@ |
|||||||
|
export class Height { |
||||||
|
// 页面高度=屏幕的高度/2
|
||||||
|
height = 'height:' + screen.height / 2 + 'px'; |
||||||
|
} |
Loading…
Reference in new issue