diff --git a/pages/bluetooth/index.js b/pages/bluetooth/index.js
index 5958db1..ee516e9 100644
--- a/pages/bluetooth/index.js
+++ b/pages/bluetooth/index.js
@@ -53,6 +53,7 @@ Page({
bluetoothOpened: false,
mode: "bluetooth",
naviData: null,
+ distance2End: null,
},
/**
* 生命周期函数--监听页面加载
@@ -231,7 +232,7 @@ Page({
this.setState(STATES.inNav);
this.setData({
showTabs: true,
- tab: 1,
+ tab: 0,
});
}, 1000);
},
@@ -405,6 +406,7 @@ Page({
"距离区间终点距离:",
distance2End / 27
);
+ this.setData({ distance2End: Math.ceil(distance2End / 27) });
if (distance / 27 > 10 && this.data.state === STATES.inNav) {
this.reroute();
}
diff --git a/pages/bluetooth/index.wxml b/pages/bluetooth/index.wxml
index a92dbd5..accdde9 100644
--- a/pages/bluetooth/index.wxml
+++ b/pages/bluetooth/index.wxml
@@ -12,4 +12,5 @@