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 @@ - \ No newline at end of file + + \ No newline at end of file diff --git a/pages/bluetooth/index.wxss b/pages/bluetooth/index.wxss index 790236a..67c444e 100644 --- a/pages/bluetooth/index.wxss +++ b/pages/bluetooth/index.wxss @@ -404,3 +404,14 @@ height: 54px; pointer-events: none; } + +.nav { + position: fixed; + height: 110px; + left: 10px; + right: 10px; + bottom: 116px; + background: #ffffff; + z-index: 12 !important; + border-radius: 18px 18px 0 0; +}