Commit 3e4331f6 by 王榕

修改bug

parent 631fbcbe
...@@ -58,11 +58,11 @@ Page({ ...@@ -58,11 +58,11 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function(options) { onLoad: function(options) {
// this.getCarDetail() this.getCarDetail()
// clearInterval(timer) clearInterval(timer)
// setInterval(() => { setInterval(() => {
// this.getCarDetail() this.getCarDetail()
// }, 4000) }, 4000)
}, },
drawProgressbg: function() { drawProgressbg: function() {
...@@ -177,7 +177,6 @@ Page({ ...@@ -177,7 +177,6 @@ Page({
}, },
// 轮询设置 // 轮询设置
setUI2(data) { setUI2(data) {
console.log(data)
let { let {
gprsImei, gprsImei,
bmsVer, bmsVer,
...@@ -197,6 +196,12 @@ Page({ ...@@ -197,6 +196,12 @@ Page({
} else { } else {
bmsState = '关锁' bmsState = '关锁'
} }
if (!cellVolt){
cellVolt='[]'
}
if (!bmsTempetrue){
bmsTempetrue='[]'
}
cellVolt = JSON.parse(cellVolt) cellVolt = JSON.parse(cellVolt)
bmsTempetrue = JSON.parse(bmsTempetrue) bmsTempetrue = JSON.parse(bmsTempetrue)
if (cellVolt && cellVolt.length) { if (cellVolt && cellVolt.length) {
......
...@@ -118,6 +118,7 @@ ...@@ -118,6 +118,7 @@
.info-body .vos-item{ .info-body .vos-item{
flex: 1; flex: 1;
display: flex; display: flex;
align-items: center;
} }
.vos-item text:nth-of-type(1){ .vos-item text:nth-of-type(1){
padding: 3px 6px; padding: 3px 6px;
......
...@@ -537,6 +537,9 @@ Page({ ...@@ -537,6 +537,9 @@ Page({
restDay, restDay,
updateTime updateTime
} = data } = data
if (!gpsLocate){
gpsLocate='0,0'
}
gpsLocate = (gpsLocate).split(',') gpsLocate = (gpsLocate).split(',')
if (gpsLocate && gpsLocate.length){ if (gpsLocate && gpsLocate.length){
this.setMap(gpsLocate[0], gpsLocate[1]) this.setMap(gpsLocate[0], gpsLocate[1])
......
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