Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
smart
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangqinghua
smart
Commits
76e6f810
Commit
76e6f810
authored
Jun 12, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
signal update
parent
8b4d912c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
0 deletions
+52
-0
signal.component.html
src/main/webapp/app/shared/signal/signal.component.html
+0
-0
signal.component.ts
src/main/webapp/app/shared/signal/signal.component.ts
+52
-0
No files found.
src/main/webapp/app/shared/signal/signal.component.html
0 → 100644
View file @
76e6f810
src/main/webapp/app/shared/signal/signal.component.ts
0 → 100644
View file @
76e6f810
import
{
Component
,
ElementRef
,
OnInit
,
Renderer
}
from
'@angular/core'
;
import
{
LoginService
,
StateStorageService
}
from
'..'
;
import
{
FormBuilder
,
Validators
}
from
'@angular/forms'
;
import
{
Route
,
Router
}
from
'@angular/router'
;
import
{
JhiEventManager
}
from
'ng-jhipster'
;
import
{
NgbActiveModal
}
from
'@ng-bootstrap/ng-bootstrap'
;
import
{
EmitService
}
from
'../event/eventEmitter'
;
import
{
NzNotificationService
}
from
'ng-zorro-antd'
;
import
{
LocalStorageService
}
from
'ngx-webstorage'
;
import
{
OverAllService
}
from
'../../overAll/overAll.service'
;
@
Component
({
selector
:
'smart-signal'
,
templateUrl
:
'./signal.component.html'
,
styles
:
[]
})
//模拟登录
export
class
SignalComponent
implements
OnInit
{
constructor
(
private
fb
:
FormBuilder
,
private
eventManager
:
JhiEventManager
,
private
loginService
:
LoginService
,
private
stateStorageService
:
StateStorageService
,
private
elementRef
:
ElementRef
,
private
renderer
:
Renderer
,
private
router
:
Router
,
public
activeModal
:
NgbActiveModal
,
public
emitService
:
EmitService
,
public
notification
:
NzNotificationService
,
public
$localStorage
:
LocalStorageService
,
public
overAll
:
OverAllService
)
{
}
ngOnInit
()
{
const
data
=
{
loginName
:
'superadmin'
,
password
:
'000000'
,
rememberMe
:
true
,
};
this
.
loginService
.
login
(
data
).
then
((
res
)
=>
{
if
(
res
)
{
this
.
router
.
navigate
([
'app/main/home'
]);
this
.
notification
.
create
(
'success'
,
'登录成功'
,
''
,
{
nzDuration
:
2000
});
this
.
$localStorage
.
store
(
'userInfo'
,
data
);
}
else
{
this
.
notification
.
create
(
'error'
,
'登录失败'
,
'用户名或密码错误'
,
{
nzDuration
:
2000
});
}
}).
catch
(()
=>
{
});
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment