Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
muChangApp
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
WitCloud
muChangApp
Commits
bbeb70e7
Commit
bbeb70e7
authored
Jun 21, 2019
by
van.chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
我的页面加个顶部
parent
d5796a0b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
33 deletions
+47
-33
east.page.html
src/app/east/east.page.html
+1
-1
home.page.html
src/app/home/home.page.html
+2
-2
mine.page.html
src/app/mine/mine.page.html
+10
-0
mine.page.scss
src/app/mine/mine.page.scss
+1
-1
mine.page.ts
src/app/mine/mine.page.ts
+33
-29
No files found.
src/app/east/east.page.html
View file @
bbeb70e7
...
...
@@ -43,7 +43,7 @@
<div
class=
"bottomPart"
>
<ListItem
multipleLine
*
ngFor=
"let a of devices;let i = index"
>
{{a.fieldDeviceName}}
<v-switch
[
value
]="
a
.
value
"
(
click
)="
toggle
(
a
)"
[
loading
]="
a
.
loading
"
></v-switch>
<v-switch
[
value
]="
a
.
value
"
[
disabled
]="
true
"
(
click
)="
toggle
(
a
)"
[
loading
]="
a
.
loading
"
></v-switch>
</ListItem>
</div>
</PullToRefresh>
...
...
src/app/home/home.page.html
View file @
bbeb70e7
...
...
@@ -40,8 +40,8 @@
<img
[
src
]="'../../
assets
/
img
/'
+
item
.
img
"
>
</div>
<div
class=
"rightCon"
>
<div
class=
"block1"
>
池体液位:
{{item.yewei}} m
</div>
<div
class=
"block2"
>
液体温度:
{{item.temp}} ℃
</div>
<div
class=
"block1"
*
ngIf=
"item.yewei || item.yewei === 0"
>
池体液位:
{{item.yewei}} m
</div>
<div
class=
"block2"
*
ngIf=
"item.temp || item.temp === 0"
>
液体温度:
{{item.temp}} ℃
</div>
<div
class=
"block2"
>
运行状态:
{{item.state ? '工作中' : '离线'}}
</div>
</div>
</div>
...
...
src/app/mine/mine.page.html
View file @
bbeb70e7
<div
class=
"mainContent"
>
<Navbar
[
leftContent
]="
icon
"
(
onLeftClick
)="
onLeftClick
()"
style=
"background-color: #28c9bd"
>
个人中心
</Navbar>
<div
class=
"topBar"
>
<div
class=
"top"
>
<div
class=
"imgPart"
>
...
...
@@ -28,3 +34,7 @@
<div
Button
class=
"button"
(
click
)="
loginOut
()"
[
type
]="'
primary
'"
style=
"letter-spacing: 2px"
>
退出登录
</div>
</div>
</div>
<ng-template
#
icon
>
<span
class=
"vo v-back"
></span>
</ng-template>
src/app/mine/mine.page.scss
View file @
bbeb70e7
...
...
@@ -5,7 +5,7 @@
}
.topBar
{
height
:
25%
;
padding-top
:
15
%
;
padding-top
:
8
%
;
background-color
:
rgba
(
40
,
201
,
189
,
0
.6
);
.top
{
...
...
src/app/mine/mine.page.ts
View file @
bbeb70e7
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Api
}
from
'../service/api'
;
import
{
Transfer
}
from
'../service/transfer'
;
@
Component
({
selector
:
'v-mine'
,
templateUrl
:
'./mine.page.html'
,
styleUrls
:
[
'./mine.page.scss'
],
selector
:
'v-mine'
,
templateUrl
:
'./mine.page.html'
,
styleUrls
:
[
'./mine.page.scss'
],
})
export
class
MinePage
implements
OnInit
{
user
:
any
=
{};
user
:
any
=
{};
constructor
(
private
api
:
Api
,
private
tf
:
Transfer
)
{
}
constructor
(
private
api
:
Api
,
private
tf
:
Transfer
)
{
}
ngOnInit
()
{
this
.
getSelfInfo
();
}
ngOnInit
()
{
this
.
getSelfInfo
();
}
getSelfInfo
()
{
this
.
api
.
user
.
getSelfInfo
([
''
,
(
data
)
=>
{
if
(
data
)
{
this
.
user
=
data
;
}
else
{
this
.
api
.
presentMsgToast
(
data
&&
data
.
message
?
data
.
message
:
'登录失败'
);
}
}]);
}
getSelfInfo
()
{
this
.
api
.
user
.
getSelfInfo
([
''
,
(
data
)
=>
{
if
(
data
)
{
this
.
user
=
data
;
}
else
{
this
.
api
.
presentMsgToast
(
data
&&
data
.
message
?
data
.
message
:
'登录失败'
);
}
}]);
}
loginOut
()
{
this
.
api
.
login
.
logout
([
''
,
(
data
)
=>
{
if
(
data
)
{
window
.
localStorage
.
removeItem
(
'token'
);
this
.
tf
.
transfer
({
url
:
'/login'
});
}
else
{
this
.
api
.
presentMsgToast
(
data
&&
data
.
message
?
data
.
message
:
'登录失败'
);
}
}]);
}
loginOut
()
{
this
.
api
.
login
.
logout
([
''
,
(
data
)
=>
{
if
(
data
)
{
window
.
localStorage
.
removeItem
(
'token'
);
this
.
tf
.
transfer
({
url
:
'/login'
});
}
else
{
this
.
api
.
presentMsgToast
(
data
&&
data
.
message
?
data
.
message
:
'登录失败'
);
}
}]);
}
onLeftClick
()
{
this
.
tf
.
transfer
({
url
:
'/home'
});
}
}
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