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
8a34da97
Commit
8a34da97
authored
Jun 17, 2019
by
van.chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物理返回键
parent
7bd8f707
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
44 additions
and
63 deletions
+44
-63
package.json
package.json
+1
-1
app.component.ts
src/app/app.component.ts
+5
-5
east.page.html
src/app/east/east.page.html
+1
-1
east.page.ts
src/app/east/east.page.ts
+2
-2
home.page.html
src/app/home/home.page.html
+26
-32
other.page.html
src/app/other/other.page.html
+1
-0
transfer.ts
src/app/service/transfer.ts
+8
-22
No files found.
package.json
View file @
8a34da97
src/app/app.component.ts
View file @
8a34da97
import
{
Component
,
AfterViewInit
,
OnDestroy
}
from
'@angular/core'
;
import
{
Component
,
AfterViewInit
,
OnDestroy
}
from
'@angular/core'
;
import
{
NavController
,
Platform
}
from
'@ionic/angular'
;
import
{
Platform
}
from
'@ionic/angular'
;
import
{
SplashScreen
}
from
'@ionic-native/splash-screen/ngx'
;
import
{
SplashScreen
}
from
'@ionic-native/splash-screen/ngx'
;
import
{
StatusBar
}
from
'@ionic-native/status-bar/ngx'
;
import
{
StatusBar
}
from
'@ionic-native/status-bar/ngx'
;
import
{
Router
,
NavigationEnd
}
from
'@angular/router'
;
import
{
Router
,
NavigationEnd
}
from
'@angular/router'
;
...
@@ -102,7 +101,8 @@ export class AppComponent implements AfterViewInit, OnDestroy {
...
@@ -102,7 +101,8 @@ export class AppComponent implements AfterViewInit, OnDestroy {
private
appMinimize
:
AppMinimize
,
private
appMinimize
:
AppMinimize
,
private
router
:
Router
,
private
router
:
Router
,
private
mqtt
:
Mqtt
,
private
mqtt
:
Mqtt
,
public
load
:
Load
public
load
:
Load
,
private
nav
:
NavController
)
{
)
{
this
.
initializeApp
();
this
.
initializeApp
();
}
}
...
@@ -163,13 +163,13 @@ export class AppComponent implements AfterViewInit, OnDestroy {
...
@@ -163,13 +163,13 @@ export class AppComponent implements AfterViewInit, OnDestroy {
}
else
{
}
else
{
this
.
backBtnPressed
=
true
;
this
.
backBtnPressed
=
true
;
setTimeout
(()
=>
this
.
backBtnPressed
=
false
,
2000
);
setTimeout
(()
=>
this
.
backBtnPressed
=
false
,
2000
);
return
;
}
}
}
else
{
}
else
{
this
.
backBtnPressed
=
true
;
this
.
backBtnPressed
=
true
;
setTimeout
(()
=>
this
.
backBtnPressed
=
false
,
2000
);
setTimeout
(()
=>
this
.
backBtnPressed
=
false
,
2000
);
return
;
}
}
this
.
nav
.
back
();
return
;
});
});
}
}
}
}
src/app/east/east.page.html
View file @
8a34da97
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
[(
ngModel
)]="
state
.
refreshState
"
[(
ngModel
)]="
state
.
refreshState
"
[
endReachedRefresh
]="
state
.
endReachedRefresh
"
[
endReachedRefresh
]="
state
.
endReachedRefresh
"
(
onRefresh
)="
pullToRefresh
($
event
)"
(
onRefresh
)="
pullToRefresh
($
event
)"
style=
"height: calc(100% - 45px)"
style=
"
min-
height: calc(100% - 45px)"
>
>
<div
class=
"topPart"
>
<div
class=
"topPart"
>
<ListItem
multipleLine
*
ngIf=
"this.yewei"
>
<ListItem
multipleLine
*
ngIf=
"this.yewei"
>
...
...
src/app/east/east.page.ts
View file @
8a34da97
...
@@ -104,8 +104,8 @@ export class EastPage implements OnInit {
...
@@ -104,8 +104,8 @@ export class EastPage implements OnInit {
fieldDeviceNo
:
a
.
fieldDeviceNo
,
fieldDeviceNo
:
a
.
fieldDeviceNo
,
op
:
a
.
value
?
0
:
1
,
op
:
a
.
value
?
0
:
1
,
duration
:
this
.
duration
,
duration
:
this
.
duration
,
startTime
:
new
Date
().
getTime
(
),
startTime
:
parseInt
((
new
Date
().
getTime
()
/
1000
).
toString
(),
10
),
ts
:
new
Date
().
getTime
(
)
ts
:
parseInt
((
new
Date
().
getTime
()
/
1000
).
toString
(),
10
)
};
};
this
.
load
.
toLoad
(
'指令已发送, 等待处理结果'
,
true
);
this
.
load
.
toLoad
(
'指令已发送, 等待处理结果'
,
true
);
this
.
api
.
control
.
controlSwitch
([
req
,
(
data
)
=>
{
this
.
api
.
control
.
controlSwitch
([
req
,
(
data
)
=>
{
...
...
src/app/home/home.page.html
View file @
8a34da97
...
@@ -21,11 +21,6 @@
...
@@ -21,11 +21,6 @@
<v-alarm-bar></v-alarm-bar>
<v-alarm-bar></v-alarm-bar>
<div
class=
"seePart"
>
<div
class=
"seePart"
>
<v-sub-title
title=
"监测信息"
></v-sub-title>
<v-sub-title
title=
"监测信息"
></v-sub-title>
<PullToRefresh
[
direction
]="
state
.
direction
"
[(
ngModel
)]="
state
.
refreshState
"
[
endReachedRefresh
]="
state
.
endReachedRefresh
"
(
onRefresh
)="
pullToRefresh
($
event
)"
>
<div
style=
"background-color: #efeff4"
>
<div
style=
"background-color: #efeff4"
>
<div
class=
"out"
*
ngIf=
"items.length === 0 && !isError"
>
<div
class=
"out"
*
ngIf=
"items.length === 0 && !isError"
>
<i
class=
"vo v-none"
></i>
<i
class=
"vo v-none"
></i>
...
@@ -57,7 +52,6 @@
...
@@ -57,7 +52,6 @@
</div>
</div>
</div>
</div>
</div>
</div>
</PullToRefresh>
</div>
</div>
</div>
</div>
</div>
</div>
src/app/other/other.page.html
View file @
8a34da97
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
[(
ngModel
)]="
state
.
refreshState
"
[(
ngModel
)]="
state
.
refreshState
"
[
endReachedRefresh
]="
state
.
endReachedRefresh
"
[
endReachedRefresh
]="
state
.
endReachedRefresh
"
(
onRefresh
)="
pullToRefresh
($
event
)"
(
onRefresh
)="
pullToRefresh
($
event
)"
style=
"min-height: calc(100% - 45px)"
>
>
<div
class=
"topPart"
>
<div
class=
"topPart"
>
<ListItem
multipleLine
*
ngIf=
"this.yewei"
>
<ListItem
multipleLine
*
ngIf=
"this.yewei"
>
...
...
src/app/service/transfer.ts
View file @
8a34da97
import
{
Router
}
from
'@angular/router'
;
import
{
Router
}
from
'@angular/router'
;
import
{
Injectable
}
from
'@angular/core'
;
import
{
Injectable
}
from
'@angular/core'
;
import
{
NavController
}
from
'@ionic/angular'
;
import
{
NavController
}
from
'@ionic/angular'
;
@
Injectable
()
@
Injectable
()
export
class
Transfer
{
export
class
Transfer
{
constructor
(
private
router
:
Router
,
private
nc
:
NavController
)
{}
constructor
(
private
router
:
Router
,
private
nc
:
NavController
)
{
}
transfer
(
req
)
{
transfer
(
req
)
{
// 此处为ionic4路由跳转的时候不清空之前的页面组件造成的页面短暂交叠
if
(
!
req
.
query
)
{
// ionic4在发生路由跳转的时候是先进行新组件的加载再进行旧组件的隐藏
req
.
query
=
''
;
// 我没有找到相关的api以及解决办法,如果后面的人找到了的话麻烦将这个麻烦的方法给解决掉
}
// if (document.getElementsByTagName('v' + req.url.replace(/\//, '-')).length > 0) {
// const historys = JSON.parse(window.sessionStorage.getItem('router.history')) || [];
// const y = <HTMLBodyElement>document.getElementsByTagName('v' + req.url.replace(/\//, '-'))[0];
// y.style.visibility = 'visible';
// }
// req.query = req.query ? req.query : {};
// req.query.refresh = + new Date();
// this.router.navigate([req.url], {queryParams: req.query, fragment: req.hash});
// if (document.getElementsByTagName('v' + window.location.pathname.replace(/\//, '-')).length > 0) {
// const x = <HTMLBodyElement>document.getElementsByTagName('v' + window.location.pathname.replace(/\//, '-'))[0];
// x.style.visibility = 'hidden';
// setTimeout(() => {
// // 此处是防止移动端自己的back button跳转导致页面空白
// x.style.visibility = 'visible';
// }, 1000);
// }
if
(
!
req
.
query
)
{
req
.
query
=
''
;
}
this
.
nc
.
navigateRoot
(
req
.
url
+
req
.
query
);
this
.
nc
.
navigateRoot
(
req
.
url
+
req
.
query
);
}
}
}
}
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