|
|
@@ -1,8 +1,128 @@
|
|
|
<template>
|
|
|
<view class="container">
|
|
|
+ <navigation-bar @ready="handleNavReady"></navigation-bar>
|
|
|
+ <view class="dialog" v-if="styleData.dialog" :style="styleData.dialog">
|
|
|
+ <view class="height-88 flex-align-center bg-fff">
|
|
|
+ <image
|
|
|
+ mode="widthFix"
|
|
|
+ src="/static/images/map-logo.png"
|
|
|
+ style="width: 156rpx"
|
|
|
+ class="ml-24"
|
|
|
+ ></image>
|
|
|
+ <image
|
|
|
+ mode="widthFix"
|
|
|
+ src="/static/images/map-input.png"
|
|
|
+ class="ml-24"
|
|
|
+ style="width: 352rpx"
|
|
|
+ @click="toSearch"
|
|
|
+ ></image>
|
|
|
+ </view>
|
|
|
+ <view
|
|
|
+ class="height-72 flex"
|
|
|
+ style="background-color: #f9f9f9"
|
|
|
+ >
|
|
|
+ <view class="width-half flex-center" @click.stop="checkFilterDistance">
|
|
|
+ <view class="fs-26 color-000-6 mr-8">距离</view>
|
|
|
+ <view
|
|
|
+ class="width-20 height-20 br-round bg-000-08 lh-10 text-center transition"
|
|
|
+ :style="{
|
|
|
+ transform: filterDialog.distanceSelector ? 'rotate(180deg)' : '',
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <uni-icons
|
|
|
+ type="bottom"
|
|
|
+ size="8"
|
|
|
+ color="rgba(0,0,0,0.4)"
|
|
|
+ ></uni-icons>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="width-half flex-center" @click.stop="checkDiscounts">
|
|
|
+ <view
|
|
|
+ class="width-32 height-32 br-round lh-20 text-center"
|
|
|
+ :style="{
|
|
|
+ border: filterDialog.discounts
|
|
|
+ ? '1px solid var(--color-primary)'
|
|
|
+ : '1px solid rgba(0, 0, 0, 0.4)',
|
|
|
+ backgroundColor: filterDialog.discounts
|
|
|
+ ? 'var(--color-primary)'
|
|
|
+ : '#fff',
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <uni-icons
|
|
|
+ type="checkmarkempty"
|
|
|
+ size="10"
|
|
|
+ color="#ffffff"
|
|
|
+ ></uni-icons>
|
|
|
+ </view>
|
|
|
+ <view
|
|
|
+ :class="[
|
|
|
+ 'fs-26',
|
|
|
+ 'ml-8',
|
|
|
+ filterDialog.discounts ? 'color-primary' : 'color-000-6',
|
|
|
+ ]"
|
|
|
+ >支持省钱充电</view
|
|
|
+ >
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view
|
|
|
+ class="dialog_selector"
|
|
|
+ :style="{
|
|
|
+ height: filterDialog.distanceSelector ? '190rpx' : '0rpx',
|
|
|
+ borderTop: `1rpx solid rgba(0, 0, 0, ${
|
|
|
+ filterDialog.distanceSelector ? '0.1' : '0'
|
|
|
+ })`,
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <view class="flex-center flex-wrap pb-14">
|
|
|
+ <view
|
|
|
+ :class="[
|
|
|
+ 'type',
|
|
|
+ 'flex-shrink',
|
|
|
+ 'flex-center',
|
|
|
+ 'mt-20',
|
|
|
+ (index + 1) % 5 === 0 ? 'mr-0' : 'mr-20',
|
|
|
+ `type-${
|
|
|
+ item.value === filterDialog.options.distance ? 'active' : ''
|
|
|
+ }`,
|
|
|
+ ]"
|
|
|
+ v-for="(item, index) in filterDialog.distanceRange"
|
|
|
+ :key="index"
|
|
|
+ @click.stop="changeFilterDistance(index)"
|
|
|
+ style="width: 117rpx"
|
|
|
+ >{{ item.value }}km</view
|
|
|
+ >
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <!-- <view class="dialog_event" v-if="ready && !filterDialog.distanceSelector">
|
|
|
+ // TODO 接入接口
|
|
|
+ <swiper
|
|
|
+ class="swiper"
|
|
|
+ circular
|
|
|
+ :indicator-dots="true"
|
|
|
+ :autoplay="true"
|
|
|
+ :interval="3000"
|
|
|
+ >
|
|
|
+ <swiper-item class="full-percent">
|
|
|
+ <view class="full-percent bg-666"></view>
|
|
|
+ </swiper-item>
|
|
|
+ <swiper-item class="full-percent">
|
|
|
+ <view class="full-percent bg-fff"></view>
|
|
|
+ </swiper-item>
|
|
|
+ </swiper>
|
|
|
+ </view> -->
|
|
|
+ </view>
|
|
|
+ <view
|
|
|
+ v-if="styleData.dialogHeight"
|
|
|
+ :style="{ height: `${styleData.dialogHeight}px` }"
|
|
|
+ ></view>
|
|
|
<map
|
|
|
id="map"
|
|
|
- style="width: 100%; height: 100%; z-index: 1"
|
|
|
+ :style="{
|
|
|
+ width: '100%',
|
|
|
+ height: `calc(100vh - ${styleData.dialogHeight}px - ${styleData.cardHeight}px)`,
|
|
|
+ zIndex: 1,
|
|
|
+ pointerEvents: loading ? 'none' : 'auto',
|
|
|
+ }"
|
|
|
:latitude="mapProps.latitude"
|
|
|
:longitude="mapProps.longitude"
|
|
|
:markers="markers"
|
|
|
@@ -14,118 +134,70 @@
|
|
|
@markertap="tapMarker"
|
|
|
:show-scale="true"
|
|
|
></map>
|
|
|
- <view class="card" v-if="ready">
|
|
|
- <swiper
|
|
|
- class="mt-68"
|
|
|
- :autoplay="false"
|
|
|
- @change="changeMarker"
|
|
|
- :current="markersIndex"
|
|
|
- >
|
|
|
- <block v-if="!empty">
|
|
|
- <swiper-item v-for="(item, index) in station" :key="index">
|
|
|
- <view class="station">
|
|
|
- <charge-station
|
|
|
- :title="item.stationName"
|
|
|
- :address="item.address"
|
|
|
- :price="item.totalFee"
|
|
|
- :fast="item.fastEquipmentInfos"
|
|
|
- :slow="item.slowEquipmentInfos"
|
|
|
- :sId="item.StationID"
|
|
|
- :distance="item.stationLatDistance"
|
|
|
- :latitude="item.location.stationLat"
|
|
|
- :longitude="item.location.stationLng"
|
|
|
- :fromMap="true"
|
|
|
- ></charge-station>
|
|
|
- </view>
|
|
|
- </swiper-item>
|
|
|
- </block>
|
|
|
- <block v-else>
|
|
|
- <swiper-item>
|
|
|
- <view class="station">
|
|
|
- <view class="station-empty flex-column flex-align-center pt-20">
|
|
|
- <image src="/static/images/map-empty.png" mode="widthFix" />
|
|
|
- <view class="fs-22 mt-14" style="color: rgba(0, 0, 0, 0.5)"
|
|
|
- >暂无充电站信息</view
|
|
|
- >
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </swiper-item>
|
|
|
- </block>
|
|
|
- </swiper>
|
|
|
- </view>
|
|
|
- <view class="icon-menu" v-if="menuStyle.menu1" :style="menuStyle.menu1">
|
|
|
- <view class="flex-center mt-40" @click="search" hover-class="hover">
|
|
|
- <image src="/static/images/map-search.png" mode="widthFix" />
|
|
|
- </view>
|
|
|
+ <view class="card" :style="{ height: `${styleData.cardHeight}px` }">
|
|
|
<view
|
|
|
- class="flex-center mt-40"
|
|
|
- @click="toggleDialogVisible"
|
|
|
- hover-class="hover"
|
|
|
+ class="card_location height-64 width-64 bg-fff flex-center"
|
|
|
+ @click="resetLocation"
|
|
|
>
|
|
|
- <image src="/static/images/map-filter.png" mode="widthFix" />
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="icon-menu" v-if="menuStyle.menu2" :style="menuStyle.menu2">
|
|
|
- <view class="flex-center" hover-class="hover" @click="resetLocation">
|
|
|
- <image src="/static/images/map-location.png" mode="widthFix" />
|
|
|
+ <image
|
|
|
+ src="/static/images/map-re-location.png"
|
|
|
+ mode="widthFix"
|
|
|
+ class="width-48"
|
|
|
+ ></image>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view
|
|
|
- class="dialog"
|
|
|
- v-if="filterDialog.visible"
|
|
|
- @click="toggleDialogVisible"
|
|
|
- >
|
|
|
- <view class="filter-dialog" @click.stop="emptyTap">
|
|
|
- <view :style="filterDialog.style"></view>
|
|
|
- <view class="pl-40 pr-40">
|
|
|
- <view class="pt-20 pb-20">
|
|
|
- <text class="fs-30 fw-500">距离</text>
|
|
|
- </view>
|
|
|
- <view class="flex-wrap pb-14">
|
|
|
- <view
|
|
|
- :class="[
|
|
|
- 'type',
|
|
|
- 'flex-shrink',
|
|
|
- 'flex-center',
|
|
|
- 'mt-20',
|
|
|
- (index + 1) % 5 === 0 ? 'mr-0' : 'mr-20',
|
|
|
- `type-${
|
|
|
- item.value === filterDialog.options.distance ? 'active' : ''
|
|
|
- }`,
|
|
|
- ]"
|
|
|
- v-for="(item, index) in filterDialog.range"
|
|
|
- :key="index"
|
|
|
- @click.stop="changeFilterDistance(index)"
|
|
|
- style="width: 117rpx"
|
|
|
- >{{ item.value }}km</view
|
|
|
- >
|
|
|
- </view>
|
|
|
- <view class="fs-30 fw-500 pt-38 pb-20">充电状态</view>
|
|
|
- <view class="flex pb-30">
|
|
|
- <view
|
|
|
- :class="[
|
|
|
- 'type',
|
|
|
- 'flex-center',
|
|
|
- 'mr-20',
|
|
|
- `type-${index === filterDialog.options.status ? 'active' : ''}`,
|
|
|
- ]"
|
|
|
- v-for="(item, index) in filterDialog.status"
|
|
|
- :key="index"
|
|
|
- @click.stop="changeFilterStatus(index)"
|
|
|
- >{{ item.title }}</view
|
|
|
- >
|
|
|
- </view>
|
|
|
- <view class="foot flex-align-center">
|
|
|
- <style-button size="small" @click.stop="resetFilter"
|
|
|
- >重置</style-button
|
|
|
- >
|
|
|
- <view style="width: 30rpx"></view>
|
|
|
- <style-button size="small" type="primary" @click.stop="submitFilter"
|
|
|
- >确定</style-button
|
|
|
- >
|
|
|
- </view>
|
|
|
+ <block v-if="station.length">
|
|
|
+ <!-- 列表 -->
|
|
|
+ <!-- <view class="station" v-for="(item, index) in station" :key="index">
|
|
|
+ <view v-if="index !== 0" class="card_line"></view>
|
|
|
+ <charge-station
|
|
|
+ :title="item.stationName"
|
|
|
+ :address="item.address"
|
|
|
+ :price="item.totalFee"
|
|
|
+ :fast="item.fastEquipmentInfos"
|
|
|
+ :slow="item.slowEquipmentInfos"
|
|
|
+ :sId="item.StationID"
|
|
|
+ :distance="item.stationLatDistance"
|
|
|
+ :latitude="item.location.stationLat"
|
|
|
+ :longitude="item.location.stationLng"
|
|
|
+ :fromMap="true"
|
|
|
+ ></charge-station>
|
|
|
+ </view> -->
|
|
|
+ <!-- 单个 -->
|
|
|
+ <view class="station">
|
|
|
+ <charge-station
|
|
|
+ :title="station[markersIndex].stationName"
|
|
|
+ :address="station[markersIndex].address"
|
|
|
+ :price="station[markersIndex].totalFee"
|
|
|
+ :fast="station[markersIndex].fastEquipmentInfos"
|
|
|
+ :slow="station[markersIndex].slowEquipmentInfos"
|
|
|
+ :sId="station[markersIndex].StationID"
|
|
|
+ :distance="station[markersIndex].stationLatDistance"
|
|
|
+ :latitude="station[markersIndex].location.stationLat"
|
|
|
+ :longitude="station[markersIndex].location.stationLng"
|
|
|
+ :fromMap="true"
|
|
|
+ ></charge-station>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </block>
|
|
|
+ <block v-else>
|
|
|
+ <view class="card_empty flex-column flex-align-center pt-20">
|
|
|
+ <view v-if="loading" class="mt-60 animation-loading"
|
|
|
+ ><uni-icons
|
|
|
+ type="spinner-cycle"
|
|
|
+ size="20"
|
|
|
+ color="rgba(0, 0, 0, 0.5)"
|
|
|
+ ></uni-icons
|
|
|
+ ></view>
|
|
|
+ <image
|
|
|
+ class="image"
|
|
|
+ v-else
|
|
|
+ src="/static/images/map-empty.png"
|
|
|
+ mode="widthFix"
|
|
|
+ />
|
|
|
+ <view class="fs-22 mt-14 color-000-5">{{
|
|
|
+ loading ? "加载中" : "暂无充电站信息"
|
|
|
+ }}</view>
|
|
|
+ </view>
|
|
|
+ </block>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="login-mask" v-if="!token">
|
|
|
@@ -151,27 +223,30 @@ const pointSize = {
|
|
|
androidCurrentX: -20,
|
|
|
};
|
|
|
import { deCode } from "../../utils/code";
|
|
|
+import { rpxToPx } from "../../utils/device";
|
|
|
import { fetchToken, login, onLogin } from "@/api/auth";
|
|
|
import { fetchStations } from "@/api/charge";
|
|
|
import { fetchCollectList } from "@/api/user";
|
|
|
import { fetchLocation } from "@/utils/location";
|
|
|
import { onLoad } from "@dcloudio/uni-app";
|
|
|
import { ref } from "vue";
|
|
|
+
|
|
|
+// TODO 手势拖动
|
|
|
+
|
|
|
const isIOS = ref(false);
|
|
|
const token = ref<string>();
|
|
|
const ready = ref(false);
|
|
|
-const empty = ref(true);
|
|
|
-const mapProps = ref({
|
|
|
- latitude: 23.098994,
|
|
|
- longitude: 113.32252,
|
|
|
- selflatitude: 23.098994,
|
|
|
- selflongitude: 113.32252,
|
|
|
- scale: defaultScale,
|
|
|
+const loading = ref(false);
|
|
|
+const styleData = ref({
|
|
|
+ dialog: "",
|
|
|
+ dialogHeight: 0,
|
|
|
+ cardHeight: 0,
|
|
|
});
|
|
|
+
|
|
|
const filterDialog = ref({
|
|
|
- visible: false,
|
|
|
- style: {},
|
|
|
- range: [
|
|
|
+ discounts: false,
|
|
|
+ distanceSelector: false,
|
|
|
+ distanceRange: [
|
|
|
{
|
|
|
value: 1,
|
|
|
scale: defaultScale + 3,
|
|
|
@@ -229,17 +304,22 @@ const filterDialog = ref({
|
|
|
},
|
|
|
],
|
|
|
});
|
|
|
-const menuStyle = ref({
|
|
|
- menu1: {},
|
|
|
- menu2: {},
|
|
|
-});
|
|
|
+
|
|
|
const stationPage = ref({
|
|
|
page: 1,
|
|
|
pageSize: 6,
|
|
|
hasNext: false,
|
|
|
});
|
|
|
const station = ref<any[]>([]);
|
|
|
-const markersIndex = ref(0);
|
|
|
+
|
|
|
+const mapProps = ref({
|
|
|
+ latitude: 23.098994,
|
|
|
+ longitude: 113.32252,
|
|
|
+ selflatitude: 23.098994,
|
|
|
+ selflongitude: 113.32252,
|
|
|
+ scale: defaultScale,
|
|
|
+});
|
|
|
+const markersIndex = ref(-1);
|
|
|
const markers = ref<any[]>([]);
|
|
|
|
|
|
let isIgnoreChangeLocation = false;
|
|
|
@@ -323,9 +403,9 @@ const refreshStation = (location: any) => {
|
|
|
height: 34,
|
|
|
});
|
|
|
}
|
|
|
- isIgnoreChangeLocation = markers.value.length !== _markers.length
|
|
|
+ isIgnoreChangeLocation = markers.value.length !== _markers.length;
|
|
|
stationPage.value.hasNext = res.length >= stationPage.value.pageSize;
|
|
|
- empty.value = stationPage.value.page === 1 ? res.length <= 0 : false;
|
|
|
+ // empty.value = stationPage.value.page === 1 ? res.length <= 0 : false;
|
|
|
station.value =
|
|
|
stationPage.value.page === 1 ? res : [...station.value, ...res];
|
|
|
markersIndex.value = _markersIndex;
|
|
|
@@ -335,16 +415,16 @@ const refreshStation = (location: any) => {
|
|
|
};
|
|
|
|
|
|
const refresh = () => {
|
|
|
+ if (loading.value) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
console.log("刷新电站");
|
|
|
- uni.showLoading({
|
|
|
- title: "加载中",
|
|
|
- });
|
|
|
+ loading.value = true;
|
|
|
stationPage.value.page = 1;
|
|
|
stationPage.value.hasNext = false;
|
|
|
station.value = [];
|
|
|
markers.value = [];
|
|
|
markersIndex.value = 0;
|
|
|
- filterDialog.value.visible = false;
|
|
|
fetchLocation()
|
|
|
.then((res: any) => {
|
|
|
mapProps.value.latitude = res.latitude;
|
|
|
@@ -355,18 +435,35 @@ const refresh = () => {
|
|
|
return refreshStation(res);
|
|
|
})
|
|
|
.then(() => {
|
|
|
- uni.hideLoading();
|
|
|
+ loading.value = false;
|
|
|
ready.value = true;
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
console.log(err);
|
|
|
- uni.hideLoading();
|
|
|
+ loading.value = false;
|
|
|
uni.showModal({
|
|
|
content: `${err.errMsg},请重试`,
|
|
|
});
|
|
|
});
|
|
|
};
|
|
|
|
|
|
+const handleNavReady = (e: any) => {
|
|
|
+ styleData.value.dialog = `padding-top:${e.detail.statusBarHeight - 6}px;`;
|
|
|
+ styleData.value.dialogHeight =
|
|
|
+ e.detail.statusBarHeight -
|
|
|
+ 6 +
|
|
|
+ rpxToPx(88) +
|
|
|
+ rpxToPx(72) -
|
|
|
+ e.detail.navigationBarHeight;
|
|
|
+ styleData.value.cardHeight = rpxToPx(402);
|
|
|
+};
|
|
|
+
|
|
|
+const toSearch = () => {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: "/pages-charge/search/search",
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
onLoad((query: any) => {
|
|
|
// 只为了打包进tab-bar使用
|
|
|
console.log(fetchToken, login, onLogin);
|
|
|
@@ -375,17 +472,9 @@ onLoad((query: any) => {
|
|
|
console.log("扫普通码", decodeURIComponent(query.q));
|
|
|
getApp<any>().globalData.normalCode = decodeURIComponent(query.q); // 获取到二维码原始链接内容
|
|
|
}
|
|
|
- const menu = uni.getMenuButtonBoundingClientRect();
|
|
|
- const window = uni.getWindowInfo();
|
|
|
const device = uni.getSystemInfoSync();
|
|
|
isIOS.value = device.osName === "ios";
|
|
|
- menuStyle.value.menu1 = `top:${menu.top + menu.height}px;right:${
|
|
|
- window.windowWidth - menu.right
|
|
|
- }px;`;
|
|
|
- menuStyle.value.menu2 = `bottom:420rpx;right:${
|
|
|
- window.windowWidth - menu.right
|
|
|
- }px;margin-bottom: constant(safe-area-inset-bottom);margin-bottom: env(safe-area-inset-bottom);`;
|
|
|
- filterDialog.value.style = `height:${menu.bottom + 6}px;`;
|
|
|
+
|
|
|
setTimeout(() => {
|
|
|
token.value = getApp<any>().globalData.token || "";
|
|
|
if (!token.value) {
|
|
|
@@ -430,33 +519,29 @@ onLoad((query: any) => {
|
|
|
}, 300);
|
|
|
});
|
|
|
|
|
|
-const toggleDialogVisible = () => {
|
|
|
- filterDialog.value.visible = !filterDialog.value.visible;
|
|
|
-};
|
|
|
-const changeFilterDistance = (index: number) => {
|
|
|
- filterDialog.value.options.distance = filterDialog.value.range[index].value;
|
|
|
-};
|
|
|
-const changeFilterStatus = (index: number) => {
|
|
|
- filterDialog.value.options.status = index;
|
|
|
+const checkDiscounts = () => {
|
|
|
+ filterDialog.value.discounts = !filterDialog.value.discounts;
|
|
|
};
|
|
|
-const resetFilter = () => {
|
|
|
- filterDialog.value.options.distance = defaulDistance;
|
|
|
- filterDialog.value.options.status = 0;
|
|
|
- refresh();
|
|
|
+
|
|
|
+const checkFilterDistance = () => {
|
|
|
+ filterDialog.value.distanceSelector = !filterDialog.value.distanceSelector;
|
|
|
};
|
|
|
-const submitFilter = () => {
|
|
|
- const findIndex = filterDialog.value.range.findIndex(
|
|
|
- (item) => item.value === filterDialog.value.options.distance
|
|
|
- );
|
|
|
- if (mapProps.value.scale === filterDialog.value.range[findIndex].scale) {
|
|
|
- filterDialog.value.visible = false;
|
|
|
+
|
|
|
+const changeFilterDistance = (index: number) => {
|
|
|
+ filterDialog.value.options.distance =
|
|
|
+ filterDialog.value.distanceRange[index].value;
|
|
|
+ if (mapProps.value.scale === filterDialog.value.distanceRange[index].scale) {
|
|
|
refresh();
|
|
|
return;
|
|
|
}
|
|
|
- filterDialog.value.visible = false;
|
|
|
- mapProps.value.scale = filterDialog.value.range[findIndex].scale;
|
|
|
+ mapProps.value.scale = filterDialog.value.distanceRange[index].scale;
|
|
|
+ checkFilterDistance();
|
|
|
};
|
|
|
+
|
|
|
const resetLocation = () => {
|
|
|
+ if (loading.value) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
// eslint-disable-next-line promise/catch-or-return
|
|
|
fetchLocation().then((res: any) => {
|
|
|
const mapCtx = uni.createMapContext("map");
|
|
|
@@ -468,6 +553,7 @@ const resetLocation = () => {
|
|
|
mapProps.value.scale = defaultScale;
|
|
|
});
|
|
|
};
|
|
|
+
|
|
|
const mapUpdated = (e: any) => {
|
|
|
// console.log('map updated', isIgnoreChangeLocation)
|
|
|
setTimeout(() => {
|
|
|
@@ -480,7 +566,7 @@ const mapChange = (e: any) => {
|
|
|
}
|
|
|
if (e.type === "end" && markers.value.length) {
|
|
|
console.log("map change end", {
|
|
|
- ...e.detail.centerLocation
|
|
|
+ ...e.detail.centerLocation,
|
|
|
});
|
|
|
const current = e.target.centerLocation;
|
|
|
const { latitude, longitude } = current;
|
|
|
@@ -523,9 +609,6 @@ const _changeMarker = (current: number) => {
|
|
|
});
|
|
|
}
|
|
|
};
|
|
|
-const changeMarker = (e: any) => {
|
|
|
- _changeMarker(e.detail.current);
|
|
|
-};
|
|
|
const tapMarker = (e: any) => {
|
|
|
if (e.detail.markerId === -1) {
|
|
|
return;
|
|
|
@@ -537,19 +620,26 @@ const tapMarker = (e: any) => {
|
|
|
_changeMarker(findIndex);
|
|
|
}
|
|
|
};
|
|
|
-const search = () => {
|
|
|
- uni.navigateTo({
|
|
|
- url: "/pages-charge/search/search",
|
|
|
- });
|
|
|
-};
|
|
|
const loginMask = (e: any) => {
|
|
|
login(e);
|
|
|
};
|
|
|
-const emptyTap = () => {};
|
|
|
+
|
|
|
+// TORM
|
|
|
+// const changeMarker = (e: any) => {
|
|
|
+// _changeMarker(e.detail.current);
|
|
|
+// };
|
|
|
+// const emptyTap = () => {};
|
|
|
+// const changeFilterStatus = (index: number) => {
|
|
|
+// filterDialog.value.options.status = index;
|
|
|
+// };
|
|
|
+// const resetFilter = () => {
|
|
|
+// filterDialog.value.options.distance = defaulDistance;
|
|
|
+// filterDialog.value.options.status = 0;
|
|
|
+// refresh();
|
|
|
+// };
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
-@import "../../styles/dialog.scss";
|
|
|
page {
|
|
|
background-color: #ffffff;
|
|
|
}
|
|
|
@@ -576,31 +666,45 @@ page {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-.icon-menu {
|
|
|
- position: absolute;
|
|
|
- z-index: 9;
|
|
|
+.dialog {
|
|
|
+ position: fixed;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ width: 100%;
|
|
|
+ z-index: 999;
|
|
|
|
|
|
- image {
|
|
|
- width: 60rpx;
|
|
|
+ &_event {
|
|
|
+ margin-top: 20rpx;
|
|
|
+ padding: 0rpx 32rpx;
|
|
|
+ .swiper {
|
|
|
+ height: 176rpx;
|
|
|
+ width: 100%;
|
|
|
+ border-radius: 16rpx;
|
|
|
+ overflow: hidden;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- & > view {
|
|
|
- height: 96rpx;
|
|
|
- width: 96rpx;
|
|
|
- border-radius: 50%;
|
|
|
- background-color: #fff;
|
|
|
- box-shadow: 0px 8rpx 20rpx rgba(0, 0, 0, 0.2);
|
|
|
- }
|
|
|
+ &_selector {
|
|
|
+ background-color: #f9f9f9;
|
|
|
+ transition: all 0.3s;
|
|
|
+ overflow: hidden;
|
|
|
+ .type {
|
|
|
+ width: 160rpx;
|
|
|
+ height: 60rpx;
|
|
|
+ background: var(--color-sec);
|
|
|
+ border-radius: 4rpx;
|
|
|
+ color: #666;
|
|
|
+ font-size: 26rpx;
|
|
|
+ border: 1px solid var(--color-sec);
|
|
|
+ }
|
|
|
|
|
|
- .hover {
|
|
|
- box-shadow: none;
|
|
|
+ .type-active {
|
|
|
+ border: 1px solid var(--color-primary);
|
|
|
+ color: var(--color-primary);
|
|
|
+ }
|
|
|
}
|
|
|
-}
|
|
|
-
|
|
|
-.filter-dialog {
|
|
|
- background-color: #fff;
|
|
|
|
|
|
- .slider {
|
|
|
+ /* .slider {
|
|
|
position: relative;
|
|
|
height: 12rpx;
|
|
|
width: 100%;
|
|
|
@@ -637,61 +741,44 @@ page {
|
|
|
margin: 0;
|
|
|
opacity: 0;
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
- .type {
|
|
|
- width: 160rpx;
|
|
|
- height: 60rpx;
|
|
|
- background: var(--color-sec);
|
|
|
- border-radius: 4rpx;
|
|
|
- color: var(--color-gray);
|
|
|
- font-size: 26rpx;
|
|
|
- border: 1px solid var(--color-sec);
|
|
|
- }
|
|
|
-
|
|
|
- .type-active {
|
|
|
- border: 1px solid var(--color-primary);
|
|
|
- color: var(--color-primary);
|
|
|
- }
|
|
|
-
|
|
|
- .foot {
|
|
|
- height: 120rpx;
|
|
|
- border-top: 1rpx solid var(--color-sec);
|
|
|
- }
|
|
|
+ } */
|
|
|
}
|
|
|
|
|
|
.card {
|
|
|
- position: absolute;
|
|
|
+ position: fixed;
|
|
|
width: 100%;
|
|
|
- height: 450rpx;
|
|
|
+ /* max-height: 622rpx; */
|
|
|
left: 0px;
|
|
|
bottom: 0rpx;
|
|
|
- z-index: 9;
|
|
|
- background: linear-gradient(180deg, rgba(87, 104, 133, 0) 0%, #576885 100%);
|
|
|
- padding-left: 10rpx;
|
|
|
+ z-index: 999;
|
|
|
+ box-shadow: 0px 8rpx 20rpx rgba(0, 0, 0, 0.2);
|
|
|
+ background-color: #fff;
|
|
|
margin-bottom: constant(safe-area-inset-bottom);
|
|
|
margin-bottom: env(safe-area-inset-bottom);
|
|
|
+ border-radius: 16rpx 16rpx 0px 0px;
|
|
|
|
|
|
- swiper,
|
|
|
- swiper-item {
|
|
|
- width: 100%;
|
|
|
- height: 300rpx;
|
|
|
+ &_location {
|
|
|
+ position: absolute;
|
|
|
+ border-radius: 16rpx;
|
|
|
+ box-shadow: 0px 8rpx 20rpx 0px rgba(0, 0, 0, 0.2);
|
|
|
+ right: 20rpx;
|
|
|
+ top: -104rpx;
|
|
|
}
|
|
|
|
|
|
- .station {
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- padding: 0rpx 20rpx;
|
|
|
+ &_line {
|
|
|
+ height: 1rpx;
|
|
|
+ background-color: rgba(0, 0, 0, 0.1);
|
|
|
+ margin-left: 30rpx;
|
|
|
+ margin-right: 30rpx;
|
|
|
}
|
|
|
|
|
|
- .station-empty {
|
|
|
+ &_empty {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
- background-color: #fff;
|
|
|
- border-radius: 20rpx 20rpx 0 0;
|
|
|
- image {
|
|
|
+ .image {
|
|
|
width: 160rpx;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
</style>
|