Commit 23c37574 authored by van.chen's avatar van.chen

首屏加载

parent d39138b6
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<widget id="online.hubeidiyi" version="1.2.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <widget id="online.hubeidiyi" version="2.3.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>牧场云</name> <name>牧场云</name>
<description>牧场物业管理系统</description> <description>牧场物业管理系统</description>
<author email="van_chen@foxmail.com" href="http://hubeidiyi.online/">Van.chen</author> <author email="van_chen@foxmail.com" href="http://hubeidiyi.online/">Van.chen</author>
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
<preference name="SplashShowOnlyFirstTime" value="false" /> <preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="SplashScreen" value="screen" /> <preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="3000" /> <preference name="SplashScreenDelay" value="3000" />
<preference name="AutoHideSplashScreen" value="false" />
<platform name="android"> <platform name="android">
<allow-intent href="market:*" /> <allow-intent href="market:*" />
<icon density="ldpi" src="resources/android/icon/icon.png" /> <icon density="ldpi" src="resources/android/icon/icon.png" />
......
...@@ -89,9 +89,14 @@ export class EastPage implements OnInit { ...@@ -89,9 +89,14 @@ export class EastPage implements OnInit {
} }
confirm(a) { confirm(a) {
const req = { const req = a.value ? {
fieldDeviceNo: a.fieldDeviceNo, fieldDeviceNo: a.fieldDeviceNo,
op: a.value ? 0 : 1, op: 0,
startTime: parseInt((new Date().getTime() / 1000).toString(), 10),
ts: parseInt((new Date().getTime() / 1000).toString(), 10)
} : {
fieldDeviceNo: a.fieldDeviceNo,
op: 1,
duration: this.duration, duration: this.duration,
startTime: parseInt((new Date().getTime() / 1000).toString(), 10), startTime: parseInt((new Date().getTime() / 1000).toString(), 10),
ts: parseInt((new Date().getTime() / 1000).toString(), 10) ts: parseInt((new Date().getTime() / 1000).toString(), 10)
...@@ -126,8 +131,8 @@ export class EastPage implements OnInit { ...@@ -126,8 +131,8 @@ export class EastPage implements OnInit {
this.api.app.getLiquidLevelData([{fieldRegionNo: this.fieldRegionNo}, (data) => { this.api.app.getLiquidLevelData([{fieldRegionNo: this.fieldRegionNo}, (data) => {
if (typeof (data.liquidLevel) === 'number') { if (typeof (data.liquidLevel) === 'number') {
this.yewei = Number(data.liquidLevel); this.yewei = Number(data.liquidLevel) < 0 ? 0 : Number(data.liquidLevel);
this.proc = (Number(data.liquidLevel) / (Number(data.liquidLevelMax) * 1.5)) > 1 this.proc = Number(data.liquidLevel) < 0 ? 0 : (Number(data.liquidLevel) / (Number(data.liquidLevelMax) * 1.5)) > 1
? 100 : (Number(data.liquidLevel) / (Number(data.liquidLevelMax) * 1.5)) * 100; ? 100 : (Number(data.liquidLevel) / (Number(data.liquidLevelMax) * 1.5)) * 100;
this.color = Number(data.liquidLevel) > Number(data.liquidLevelMax) || this.color = Number(data.liquidLevel) > Number(data.liquidLevelMax) ||
Number(data.liquidLevel) < Number(data.liquidLevelMin) ? 'red' : ''; Number(data.liquidLevel) < Number(data.liquidLevelMin) ? 'red' : '';
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<div Button class="button" (click)="loginOut()" [type]="'primary'" style="letter-spacing: 2px">退出登录</div> <div Button class="button" (click)="loginOut()" [type]="'primary'" style="letter-spacing: 2px">退出登录</div>
</div> </div>
<div style="position: fixed;bottom: 20px;display: inline-block;width: 100%;text-align: center;color: #666666;font-size: 14px;"> <div style="position: fixed;bottom: 20px;display: inline-block;width: 100%;text-align: center;color: #666666;font-size: 14px;">
版本信息: v1.2.0 版本信息: v2.3.0
</div> </div>
</div> </div>
......
...@@ -138,8 +138,9 @@ export class OtherPage implements OnInit { ...@@ -138,8 +138,9 @@ export class OtherPage implements OnInit {
this.api.app.getLiquidLevelData([{fieldRegionNo: this.fieldRegionNo}, (data) => { this.api.app.getLiquidLevelData([{fieldRegionNo: this.fieldRegionNo}, (data) => {
if (typeof (data.liquidLevel) === 'number') { if (typeof (data.liquidLevel) === 'number') {
this.yewei = Number(data.liquidLevel); this.yewei = Number(data.liquidLevel) < 0 ? 0 : Number(data.liquidLevel);
this.proc = (Number(data.liquidLevel) / (Number(data.liquidLevelMax) * 1.5)) * 100; this.proc = Number(data.liquidLevel) < 0 ? 0 : (Number(data.liquidLevel) / (Number(data.liquidLevelMax) * 1.5)) > 1
? 100 : (Number(data.liquidLevel) / (Number(data.liquidLevelMax) * 1.5)) * 100;
this.color = Number(data.liquidLevel) > Number(data.liquidLevelMax) || this.color = Number(data.liquidLevel) > Number(data.liquidLevelMax) ||
Number(data.liquidLevel) < Number(data.liquidLevelMin) ? 'red' : ''; Number(data.liquidLevel) < Number(data.liquidLevelMin) ? 'red' : '';
} }
......
...@@ -4,12 +4,13 @@ ...@@ -4,12 +4,13 @@
export const environment = { export const environment = {
production: false, production: false,
// url: 'http://pasture.witium.com/api', // 对外访问测试网地址 // url: 'http://pasture.witium.com.cn/api', // 对外访问测试网地址
// url: 'http://cloud-test.witium.com:8096', // 测试 // url: 'http://cloud-test.witium.com:8096', // 测试
// url: 'http://172.16.1.53:8097', // cy // url: 'http://172.16.1.53:8097', // cy
url: 'http://172.16.1.52:8096', // zz // url: 'http://172.16.1.52:8096', // zz
// url: 'http://172.16.1.13:8096', // 测试 url: 'http://172.16.1.13:8096', // 测试
mqttUrl: '172.16.1.24' mqttUrl: '172.16.1.24',
// mqttUrl: '120.27.235.39'
}; };
/* /*
......
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