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
89abd21c
Commit
89abd21c
authored
Aug 21, 2019
by
frank
🏀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复了环控首页路由卡死的bug
parent
d8e5e5b4
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
11 deletions
+34
-11
app-routing.module.ts
src/app/app-routing.module.ts
+1
-1
env-home.page.html
src/app/envCtrl/env-home/env-home.page.html
+4
-4
env-home.page.scss
src/app/envCtrl/env-home/env-home.page.scss
+4
-0
env-home.page.ts
src/app/envCtrl/env-home/env-home.page.ts
+23
-3
tabs.module.ts
src/app/envCtrl/tabs/tabs.module.ts
+1
-2
tabs.page.html
src/app/envCtrl/tabs/tabs.page.html
+1
-1
No files found.
src/app/app-routing.module.ts
View file @
89abd21c
...
@@ -25,7 +25,7 @@ import {EnvHomePage} from './envCtrl/env-home/env-home.page';
...
@@ -25,7 +25,7 @@ import {EnvHomePage} from './envCtrl/env-home/env-home.page';
const
routes
:
Routes
=
[
const
routes
:
Routes
=
[
{
{
path
:
''
,
path
:
''
,
canActivateChild
:
[
Auth
],
//
canActivateChild: [Auth],
children
:
[
children
:
[
{
path
:
''
,
redirectTo
:
'index'
,
pathMatch
:
'full'
},
{
path
:
''
,
redirectTo
:
'index'
,
pathMatch
:
'full'
},
{
path
:
'home'
,
component
:
HomePage
},
{
path
:
'home'
,
component
:
HomePage
},
...
...
src/app/envCtrl/env-home/env-home.page.html
View file @
89abd21c
...
@@ -9,13 +9,13 @@
...
@@ -9,13 +9,13 @@
<!--(onClear)="searchText ='';toggleFocus(false);"></SearchBar>-->
<!--(onClear)="searchText ='';toggleFocus(false);"></SearchBar>-->
<!--</div>-->
<!--</div>-->
<ion-toolbar>
<ion-toolbar>
<ion-button
[
routerLink
]="['/
index
']"
slot=
"start"
size =
"small"
color=
"light
"
>
Home
</ion-button>
<ion-button
slot=
"start"
size =
"small"
color=
"light"
(
click
)="
goTo
()
"
>
Home
</ion-button>
<ion-searchbar></ion-searchbar>
<ion-searchbar></ion-searchbar>
</ion-toolbar>
</ion-toolbar>
<ion-slides
style=
"width: 100%;height: 125px;"
mode=
"ios
"
<ion-slides
mode=
"ios"
style=
"width: 100%;height: 125px;
"
[
options
]="
lunbo
"
#
slide
(
ionSlideTouchEnd
)="
slideDidChange
()"
>
[
options
]="
lunbo
"
(
ionSlideTouchEnd
)="
slideDidChange
()"
>
<ion-slide
class=
"slideCon"
*
ngFor=
"let one of imgs"
>
<ion-slide
class=
"slideCon"
*
ngFor=
"let one of imgs"
>
<div
class=
"inBox"
>
<div>
<img
[
src
]="'../../../
assets
/
lunbo
/'
+
one
"
>
<img
[
src
]="'../../../
assets
/
lunbo
/'
+
one
"
>
</div>
</div>
</ion-slide>
</ion-slide>
...
...
src/app/envCtrl/env-home/env-home.page.scss
View file @
89abd21c
...
@@ -4,6 +4,10 @@
...
@@ -4,6 +4,10 @@
width
:
32%
;
width
:
32%
;
}
}
.slideCon
{
background-color
:
lavender
;
}
.item
{
.item
{
margin-bottom
:
10px
;
margin-bottom
:
10px
;
padding
:
0px
3px
0px
;
padding
:
0px
3px
0px
;
...
...
src/app/envCtrl/env-home/env-home.page.ts
View file @
89abd21c
...
@@ -25,7 +25,8 @@ export class EnvHomePage implements OnInit {
...
@@ -25,7 +25,8 @@ export class EnvHomePage implements OnInit {
},
},
loop
:
true
,
loop
:
true
,
spaceBetween
:
0
,
spaceBetween
:
0
,
zoom
:
false
zoom
:
false
,
height
:
150
,
};
};
farmMsg
=
{
farmMsg
=
{
...
@@ -149,7 +150,7 @@ export class EnvHomePage implements OnInit {
...
@@ -149,7 +150,7 @@ export class EnvHomePage implements OnInit {
@
ViewChild
(
'slide'
)
slide
;
@
ViewChild
(
'slide'
)
slide
;
ngOnInit
()
{
ngOnInit
()
{
this
.
ionViewWillEnter
();
//
this.ionViewWillEnter();
}
}
// ionic的生命周期函数
// ionic的生命周期函数
...
@@ -194,11 +195,30 @@ export class EnvHomePage implements OnInit {
...
@@ -194,11 +195,30 @@ export class EnvHomePage implements OnInit {
}
}
slideDidChange
()
{
slideDidChange
()
{
//this.slide.startAutoplay();
// this.slide.startAutoplay();
this
.
lunbo
=
{
speed
:
1000
,
allowTouchMove
:
true
,
effect
:
'flip'
,
autoplay
:
{
delay
:
2000
,
},
loop
:
true
,
spaceBetween
:
0
,
zoom
:
false
,
height
:
150
,
};
}
}
toggleFocus
(
a
){
toggleFocus
(
a
){
}
}
goTo
(){
console
.
log
(
'+goTo'
);
const
query
=
'/index'
;
this
.
nav
.
navigateRoot
(
query
);
console
.
log
(
'-goTo'
);
}
}
}
src/app/envCtrl/tabs/tabs.module.ts
View file @
89abd21c
...
@@ -44,8 +44,7 @@ const routes: Routes = [
...
@@ -44,8 +44,7 @@ const routes: Routes = [
},
},
{
{
path
:
''
,
path
:
''
,
redirectTo
:
'/tabs/tab-home'
,
redirectTo
:
'tab-home'
,
pathMatch
:
'full'
},
},
]
]
},
},
...
...
src/app/envCtrl/tabs/tabs.page.html
View file @
89abd21c
<ion-tabs>
<ion-tabs>
<ion-tab-bar
slot=
"bottom"
>
<ion-tab-bar
slot=
"bottom"
>
<ion-tab-button
tab=
"tab-home"
>
<ion-tab-button
tab=
"tab-home"
selected=
"true"
>
<ion-label>
首页
</ion-label>
<ion-label>
首页
</ion-label>
<ion-icon
name=
"home"
></ion-icon>
<ion-icon
name=
"home"
></ion-icon>
</ion-tab-button>
</ion-tab-button>
...
...
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