Commit fbb57b83 authored by van.chen's avatar van.chen

617的bug修改

parent b251c0b2
...@@ -52,8 +52,8 @@ ...@@ -52,8 +52,8 @@
<span class="vo v-back"></span> <span class="vo v-back"></span>
</ng-template> </ng-template>
<ng-template #s1> <ng-template #s1>
<v-switch [value]="value[0]" [disabled]="beiLoading || value[0] || value[1]" (click)="toggleNb(0)" [loading]="nanLoading"></v-switch> <v-switch [value]="value[0]" [disabled]="beiLoading || value[1]" (click)="toggleNb(0)" [loading]="nanLoading"></v-switch>
</ng-template> </ng-template>
<ng-template #s2> <ng-template #s2>
<v-switch [value]="value[1]" [disabled]="nanLoading || value[0] || value[1]" (click)="toggleNb(1)" [loading]="beiLoading"></v-switch> <v-switch [value]="value[1]" [disabled]="nanLoading || value[0]" (click)="toggleNb(1)" [loading]="beiLoading"></v-switch>
</ng-template> </ng-template>
...@@ -69,6 +69,8 @@ export class EastPage implements OnInit { ...@@ -69,6 +69,8 @@ export class EastPage implements OnInit {
this.beiClicked = true; this.beiClicked = true;
this.beiLoading = true; this.beiLoading = true;
} }
} else if (this.value[index]) {
this.confirm(this.nb[index]);
} }
} }
...@@ -85,9 +87,9 @@ export class EastPage implements OnInit { ...@@ -85,9 +87,9 @@ export class EastPage implements OnInit {
this.getData(1); this.getData(1);
this.api.presentMsgToast(data.message); this.api.presentMsgToast(data.message);
} else { } else {
a.loading = false;
this.api.presentMsgToast(data.message); this.api.presentMsgToast(data.message);
} }
a.loading = false;
this.load.offLoad(); this.load.offLoad();
}]); }]);
} }
...@@ -113,12 +115,9 @@ export class EastPage implements OnInit { ...@@ -113,12 +115,9 @@ export class EastPage implements OnInit {
this.getData(1); this.getData(1);
this.api.presentMsgToast(data.message); this.api.presentMsgToast(data.message);
} else { } else {
this.nanClicked = false;
this.beiClicked = false;
this.nanLoading = false;
this.beiLoading = false;
this.api.presentMsgToast(data.message); this.api.presentMsgToast(data.message);
} }
this.cancel();
this.load.offLoad(); this.load.offLoad();
}]); }]);
} }
......
...@@ -112,7 +112,11 @@ export class HomePage implements OnInit, OnDestroy { ...@@ -112,7 +112,11 @@ export class HomePage implements OnInit, OnDestroy {
} }
toIndex() { toIndex() {
this.tf.transfer({url: '/index'}); if (this.ifFocus) {
this.ifFocus = false;
} else {
this.tf.transfer({url: '/index'});
}
} }
pullToRefresh(event) { pullToRefresh(event) {
......
...@@ -15,10 +15,6 @@ export class OtherPage implements OnInit { ...@@ -15,10 +15,6 @@ export class OtherPage implements OnInit {
temp = 0; temp = 0;
proc = 0; proc = 0;
duration = 23; duration = 23;
nanClicked = false;
beiClicked = false;
nanLoading = false;
beiLoading = false;
_inv; _inv;
color; color;
devices = []; devices = [];
...@@ -50,10 +46,6 @@ export class OtherPage implements OnInit { ...@@ -50,10 +46,6 @@ export class OtherPage implements OnInit {
// ionic的生命周期函数 // ionic的生命周期函数
ionViewWillEnter() { ionViewWillEnter() {
this.nanClicked = false;
this.beiClicked = false;
this.nanLoading = false;
this.beiLoading = false;
this.getData(1); this.getData(1);
} }
...@@ -81,13 +73,6 @@ export class OtherPage implements OnInit { ...@@ -81,13 +73,6 @@ export class OtherPage implements OnInit {
}]); }]);
} }
cancel() {
this.nanClicked = false;
this.beiClicked = false;
this.nanLoading = false;
this.beiLoading = false;
}
onLeftClick() { onLeftClick() {
this.tf.transfer({url: '/home'}); this.tf.transfer({url: '/home'});
} }
......
<div class="full-page"> <div class="full-page">
<div class="topIcon" (click)="toIndex()">
<i class="vo v-back"></i>
</div>
<div class="topSearch">
<SearchBar [placeholder]="'点击此处进行搜索'" (onCancel)="toggleFocus(false);"
[setFocus]="false" (onFocus)="toggleFocus(true)" (onBlur)="toggleFocus(false)"
(onClear)="toggleFocus(false);">></SearchBar>
</div>
<i class="vo v-kaifa"></i> <i class="vo v-kaifa"></i>
<div class="row-text"> <div class="row-text">
该页面开发中... 该页面开发中...
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
height: 100%; height: 100%;
text-align: center; text-align: center;
padding: 30% 0; padding: 30% 0;
position: relative;
} }
i.vo.v-kaifa { i.vo.v-kaifa {
font-size: 200px; font-size: 200px;
...@@ -13,3 +14,27 @@ i.vo.v-kaifa { ...@@ -13,3 +14,27 @@ i.vo.v-kaifa {
font-size: 20px; font-size: 20px;
line-height: 40px; line-height: 40px;
} }
.topIcon {
display: inline-block;
background-color: #efeff4;
height: 44px;
line-height: 44px;
width: 25px;
text-align: center;
padding-left: 5px;
color: #28c9bd;
position: absolute;
top: 0;
left: 0;
}
.topSearch {
display: inline-block;
width: calc(100% - 30px);
vertical-align: top;
position: absolute;
top: 0;
left: 30px;
}
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import {Transfer} from '../service/transfer';
@Component({ @Component({
selector: 'v-row-peng', selector: 'v-row-peng',
...@@ -7,8 +8,21 @@ import { Component, OnInit } from '@angular/core'; ...@@ -7,8 +8,21 @@ import { Component, OnInit } from '@angular/core';
}) })
export class RowPage implements OnInit { export class RowPage implements OnInit {
constructor() { } ifFocus = false;
constructor(private tf: Transfer) { }
ngOnInit() {} ngOnInit() {}
toIndex() {
if (this.ifFocus) {
this.ifFocus = false;
} else {
this.tf.transfer({url: '/index'});
}
}
toggleFocus(e) {
this.ifFocus = e;
}
} }
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