Commit c9ae7410 authored by frank's avatar frank 🏀

解决tabs里的页面按键不触发的问题

parent b6d31174
......@@ -48,6 +48,7 @@ const routes: Routes = [
{path: '', redirectTo: 'fan',pathMatch:'prefix'},
]
},
// { path: 'env-detail', loadChildren: './envCtrl/env-detail/env-detail.module#EnvDetailPageModule' },
{path: 'env-alarmDetail', component: EnvAlarmDetailPage},
{ path: 'env-alarm-detail', loadChildren: './envCtrl/env-alarm-detail/env-alarm-detail.module#EnvAlarmDetailPageModule' },
{path: 'tabs', loadChildren: './envCtrl/tabs/tabs.module#TabsPageModule'},
......
......@@ -73,11 +73,12 @@ import {EnvAlarmDetailPage} from './envCtrl/env-alarm-detail/env-alarm-detail.pa
OtherPage,
SearchPage,
MinePage,
EnvDetailPage,
EnvFanPage,
EnvShowerPage,
EnvLightPage,
EnvWaterchannelPage,
EnvDetailPage,
// EnvAnalPage,
// EnvAlarmPage,
EnvAlarmDetailPage,
......
......@@ -17,22 +17,13 @@ const routes: Routes = [
{
path: '',
component: EnvDetailPage,
// {
// path: 'tab-2-shower',
// component: EnvShowerPage
// },
// {
// path: 'tab-2-light',
// component: EnvLightPage
// },
// {
// path: 'tab-2-channel',
// component: EnvWaterchannelPage
// },
// {
// path:'',
// component: EnvFanPage
// }
// children: [
// {path:'fan', component: EnvFanPage},
// {path:'shower', component: EnvShowerPage},
// {path:'light', component: EnvLightPage},
// {path:'waterchannel', component: EnvWaterchannelPage},
// {path: '', redirectTo: 'fan',pathMatch:'prefix'},
// ]
}
];
......
......@@ -27,6 +27,7 @@
<!--</ion-buttons>-->
<ion-title mode="ios" style="text-align: center;">详情页</ion-title>
</ion-toolbar>
<ion-router-outlet></ion-router-outlet>
<ion-tabs>
<!-- Tab bar -->
<ion-tab-bar slot="top">
......@@ -50,5 +51,5 @@
<!--</ion-tab-button>-->
</ion-tab-bar>
</ion-tabs>
<ion-router-outlet name="details"></ion-router-outlet>
</ion-content>
......@@ -26,6 +26,7 @@
<ion-item *ngFor="let a of allBtns" lines="full" insert="false" >
<!--<v-switch [value]="a.value" (click)="toggle(a)" [loading]="a.loading"></v-switch>-->
<ion-label>一键控制{{a.l}}</ion-label>
<ion-button>朱旻大帅哥</ion-button>
<v-switch [value]="a.v" (click)="allCheck(a)" [loading]="a.d"></v-switch>
</ion-item>
<div>
......
......@@ -15,11 +15,11 @@ export class TabsPage implements OnInit {
}
ngOnInit() {
this.router.events.subscribe(e => {
if (e instanceof ActivationStart && e.snapshot.outlet === 'tabs')
console.log('DDEDEDEEEEEEEEEDDDDDDDDDDDDDDDDD');
this.outlet.deactivate();
});
// this.router.events.subscribe(e => {
// if (e instanceof ActivationStart && e.snapshot.outlet === 'tabs')
// console.log('DDEDEDEEEEEEEEEDDDDDDDDDDDDDDDDD');
// this.outlet.deactivate();
// });
}
......
......@@ -75,15 +75,6 @@ export class OtherPage implements OnInit {
this.commTmr = window.setInterval(() => {
console.log(this.comm.remain);
if (this.comm.remain > 0) {
this.comm.remain = this.comm.remain - 1;
}
if ( this.comm.remain === 0 ) {
this.comm.isLoading = false;
} else {
this.comm.isLoading = true;
}
}, 1000) ;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment