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

617的bug修改

parent b251c0b2
......@@ -52,8 +52,8 @@
<span class="vo v-back"></span>
</ng-template>
<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 #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>
......@@ -69,6 +69,8 @@ export class EastPage implements OnInit {
this.beiClicked = true;
this.beiLoading = true;
}
} else if (this.value[index]) {
this.confirm(this.nb[index]);
}
}
......@@ -85,9 +87,9 @@ export class EastPage implements OnInit {
this.getData(1);
this.api.presentMsgToast(data.message);
} else {
a.loading = false;
this.api.presentMsgToast(data.message);
}
a.loading = false;
this.load.offLoad();
}]);
}
......@@ -113,12 +115,9 @@ export class EastPage implements OnInit {
this.getData(1);
this.api.presentMsgToast(data.message);
} else {
this.nanClicked = false;
this.beiClicked = false;
this.nanLoading = false;
this.beiLoading = false;
this.api.presentMsgToast(data.message);
}
this.cancel();
this.load.offLoad();
}]);
}
......
......@@ -112,8 +112,12 @@ export class HomePage implements OnInit, OnDestroy {
}
toIndex() {
if (this.ifFocus) {
this.ifFocus = false;
} else {
this.tf.transfer({url: '/index'});
}
}
pullToRefresh(event) {
if (event === 'down') {
......
......@@ -15,10 +15,6 @@ export class OtherPage implements OnInit {
temp = 0;
proc = 0;
duration = 23;
nanClicked = false;
beiClicked = false;
nanLoading = false;
beiLoading = false;
_inv;
color;
devices = [];
......@@ -50,10 +46,6 @@ export class OtherPage implements OnInit {
// ionic的生命周期函数
ionViewWillEnter() {
this.nanClicked = false;
this.beiClicked = false;
this.nanLoading = false;
this.beiLoading = false;
this.getData(1);
}
......@@ -81,13 +73,6 @@ export class OtherPage implements OnInit {
}]);
}
cancel() {
this.nanClicked = false;
this.beiClicked = false;
this.nanLoading = false;
this.beiLoading = false;
}
onLeftClick() {
this.tf.transfer({url: '/home'});
}
......
<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>
<div class="row-text">
该页面开发中...
......
......@@ -3,6 +3,7 @@
height: 100%;
text-align: center;
padding: 30% 0;
position: relative;
}
i.vo.v-kaifa {
font-size: 200px;
......@@ -13,3 +14,27 @@ i.vo.v-kaifa {
font-size: 20px;
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 {Transfer} from '../service/transfer';
@Component({
selector: 'v-row-peng',
......@@ -7,8 +8,21 @@ import { Component, OnInit } from '@angular/core';
})
export class RowPage implements OnInit {
constructor() { }
ifFocus = false;
constructor(private tf: Transfer) { }
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