|
@@ -36,7 +36,21 @@
|
|
|
<view class="w100 gap"></view>
|
|
<view class="w100 gap"></view>
|
|
|
|
|
|
|
|
<!-- 站点清单 start-->
|
|
<!-- 站点清单 start-->
|
|
|
- <view class="w100 content_station">
|
|
|
|
|
|
|
+ <view class="w100 content_station" >
|
|
|
|
|
+ <WashStation v-for="item in state.stationList" :key="item.id" :item="item"></WashStation>
|
|
|
|
|
+ <WashStation v-for="item in state.stationList" :key="item.id" :item="item"></WashStation>
|
|
|
|
|
+ <WashStation v-for="item in state.stationList" :key="item.id" :item="item"></WashStation>
|
|
|
|
|
+ <WashStation v-for="item in state.stationList" :key="item.id" :item="item"></WashStation>
|
|
|
|
|
+ <WashStation v-for="item in state.stationList" :key="item.id" :item="item"></WashStation>
|
|
|
|
|
+ <WashStation v-for="item in state.stationList" :key="item.id" :item="item"></WashStation>
|
|
|
|
|
+ <WashStation v-for="item in state.stationList" :key="item.id" :item="item"></WashStation>
|
|
|
|
|
+ <WashStation v-for="item in state.stationList" :key="item.id" :item="item"></WashStation>
|
|
|
|
|
+ <WashStation v-for="item in state.stationList" :key="item.id" :item="item"></WashStation>
|
|
|
|
|
+ <WashStation v-for="item in state.stationList" :key="item.id" :item="item"></WashStation>
|
|
|
|
|
+ <WashStation v-for="item in state.stationList" :key="item.id" :item="item"></WashStation>
|
|
|
|
|
+ <WashStation v-for="item in state.stationList" :key="item.id" :item="item"></WashStation>
|
|
|
|
|
+ <WashStation v-for="item in state.stationList" :key="item.id" :item="item"></WashStation>
|
|
|
|
|
+ <WashStation v-for="item in state.stationList" :key="item.id" :item="item"></WashStation>
|
|
|
<WashStation v-for="item in state.stationList" :key="item.id" :item="item"></WashStation>
|
|
<WashStation v-for="item in state.stationList" :key="item.id" :item="item"></WashStation>
|
|
|
</view>
|
|
</view>
|
|
|
<!-- 站点清单 end-->
|
|
<!-- 站点清单 end-->
|
|
@@ -44,9 +58,9 @@
|
|
|
<!-- <cover-view class="login_bar">
|
|
<!-- <cover-view class="login_bar">
|
|
|
<login-bar class="w100 text-center"></login-bar>
|
|
<login-bar class="w100 text-center"></login-bar>
|
|
|
</cover-view>-->
|
|
</cover-view>-->
|
|
|
- <cover-view class="login_bar" v-if="!isLogin">
|
|
|
|
|
|
|
+<!-- <cover-view class="login_bar" v-show="!isLogin">-->
|
|
|
<login-bar class="w100 text-center"></login-bar>
|
|
<login-bar class="w100 text-center"></login-bar>
|
|
|
- </cover-view>
|
|
|
|
|
|
|
+<!-- </cover-view>-->
|
|
|
<tab-bar :index="0" ></tab-bar>
|
|
<tab-bar :index="0" ></tab-bar>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
@@ -120,8 +134,15 @@ onShow(() => {
|
|
|
if (userData&&userData.id) {
|
|
if (userData&&userData.id) {
|
|
|
isLogin.value = true;
|
|
isLogin.value = true;
|
|
|
}
|
|
}
|
|
|
- console.log("show index>>>>",isLogin.value)
|
|
|
|
|
|
|
+ console.log("show index>>>>",isLogin.value,state.stationList,state.location)
|
|
|
|
|
+ let locationData = getApp<any>().globalData.location;
|
|
|
|
|
+ if(!locationData||!locationData.longitude){
|
|
|
|
|
+
|
|
|
loadCurrentLocation();
|
|
loadCurrentLocation();
|
|
|
|
|
+ }else{
|
|
|
|
|
+ state.location = locationData;
|
|
|
|
|
+ loadWashStationList();
|
|
|
|
|
+ }
|
|
|
uni.$on('loginEvent', function (data) {
|
|
uni.$on('loginEvent', function (data) {
|
|
|
isLogin.value = data.isLogin;
|
|
isLogin.value = data.isLogin;
|
|
|
})
|
|
})
|
|
@@ -156,10 +177,12 @@ const loadCurrentLocation = () => {
|
|
|
uni.getLocation({
|
|
uni.getLocation({
|
|
|
type: 'gcj02', //返回可以用于uni.openLocation的经纬度
|
|
type: 'gcj02', //返回可以用于uni.openLocation的经纬度
|
|
|
success: res => {
|
|
success: res => {
|
|
|
- state.location = {
|
|
|
|
|
|
|
+ let location = {
|
|
|
latitude: res.latitude,
|
|
latitude: res.latitude,
|
|
|
longitude: res.longitude
|
|
longitude: res.longitude
|
|
|
}
|
|
}
|
|
|
|
|
+ getApp<any>().globalData.location = location;
|
|
|
|
|
+ state.location = location
|
|
|
loadWashStationList();
|
|
loadWashStationList();
|
|
|
console.log("loadCurrentLocation location", res)
|
|
console.log("loadCurrentLocation location", res)
|
|
|
}
|
|
}
|
|
@@ -250,6 +273,9 @@ const handleNavStation = (station: any) => {
|
|
|
margin-bottom: 10rpx;
|
|
margin-bottom: 10rpx;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+.swiper-content{
|
|
|
|
|
+ height: 200rpx;
|
|
|
|
|
+}
|
|
|
.guide-content {
|
|
.guide-content {
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
}
|
|
}
|
|
@@ -258,4 +284,9 @@ const handleNavStation = (station: any) => {
|
|
|
position: fixed;
|
|
position: fixed;
|
|
|
bottom: 20rpx;
|
|
bottom: 20rpx;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+.content_station{
|
|
|
|
|
+ height: calc(100vh - 600rpx );
|
|
|
|
|
+ overflow: scroll;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|