feat:新增地图模块,用于查找附近设备场地

This commit is contained in:
2025-08-18 14:52:39 +08:00
parent c5b8026fba
commit 38eb05fefd
122 changed files with 8317 additions and 1768 deletions
+2 -2
View File
@@ -295,14 +295,14 @@ const _sfc_main = {
a: common_vendor.t(deviceStatus.text),
b: common_vendor.n(deviceStatus.class),
c: common_vendor.t(deviceId.value),
d: common_assets._imports_0$3,
d: common_assets._imports_0$4,
e: common_vendor.t(deviceLocation.value),
f: common_vendor.t(deviceFeeConfig.value.maxHourPrice),
g: common_vendor.t(deviceInfo.value.depositAmount),
h: common_vendor.t(hasActiveOrder.value ? "归还设备" : "免押租借"),
i: hasActiveOrder.value ? 1 : "",
j: common_vendor.o(($event) => handleRent("wx-score-pay")),
k: common_assets._imports_0$2,
k: common_assets._imports_0$3,
l: showPhoneAuthPopup.value
}, showPhoneAuthPopup.value ? {
m: common_vendor.o(() => {
+132 -64
View File
@@ -4,9 +4,16 @@ const common_assets = require("../../common/assets.js");
const util_index = require("../../util/index.js");
const config_url = require("../../config/url.js");
const config_user = require("../../config/user.js");
const utils_amap = require("../../utils/amap.js");
const utils_mapUtils = require("../../utils/mapUtils.js");
if (!Array) {
const _easycom_uv_notice_bar2 = common_vendor.resolveComponent("uv-notice-bar");
const _easycom_uv_icon2 = common_vendor.resolveComponent("uv-icon");
(_easycom_uv_notice_bar2 + _easycom_uv_icon2)();
}
const _easycom_uv_notice_bar = () => "../../node-modules/@climblee/uv-ui/components/uv-notice-bar/uv-notice-bar.js";
const _easycom_uv_icon = () => "../../node-modules/@climblee/uv-ui/components/uv-icon/uv-icon.js";
if (!Math) {
MapComponent();
(_easycom_uv_notice_bar + MapComponent + _easycom_uv_icon)();
}
const MapComponent = () => "../../components/MapComponent.js";
const _sfc_main = {
@@ -21,6 +28,32 @@ const _sfc_main = {
const showPhoneAuthPopup = common_vendor.ref(false);
const isLocationInitialized = common_vendor.ref(false);
const showLocationPopup = common_vendor.ref(false);
const guideSteps = common_vendor.ref([
{
title: "扫码使用",
desc: "找到附近设备,扫描设备上的二维码即可开始租借"
},
{
title: "免押金支付",
desc: "无需支付押金,使用支付分免押即可完成租借"
},
{
title: "开始使用",
desc: "设备自动解锁,风扇弹出后取出即可开始使用"
},
{
title: "归还设备",
desc: "使用完毕后,按照设备规格要求将风扇还入即可结束订单"
}
]);
const noticeText = common_vendor.ref("消费规则:每小时5元,不足1小时按1小时计费,最高24小时封顶,请爱护设备,使用后请及时归还");
const formatDistance = (distanceInMeters) => {
if (distanceInMeters < 1e3) {
return `${Math.round(distanceInMeters)}m`;
} else {
return `${(distanceInMeters / 1e3).toFixed(1)}km`;
}
};
const mapRef = common_vendor.ref(null);
common_vendor.computed(() => {
if (userLocation.value && userLocation.value.address) {
@@ -36,51 +69,63 @@ const _sfc_main = {
const init = async () => {
isLoading.value = true;
try {
await getUserLocation();
if (true) {
utils_mapUtils.testDistanceCalculation();
}
await getUserLocationAndAddress();
await loadPositions();
} catch (error) {
common_vendor.index.__f__("error", "at pages/index/index.vue:177", "初始化失败:", error);
common_vendor.index.__f__("error", "at pages/index/index.vue:241", "初始化失败:", error);
await loadPositions();
} finally {
isLoading.value = false;
}
};
const getUserLocation = async () => {
const getUserLocationAndAddress = async () => {
try {
const location = await new Promise((resolve, reject) => {
common_vendor.index.getLocation({
type: "gcj02",
success: resolve,
fail: reject
});
});
const location = await utils_mapUtils.getUserLocation();
userLocation.value = {
longitude: location.longitude,
latitude: location.latitude
};
try {
common_vendor.index.setStorageSync("userLocation", {
longitude: location.longitude,
latitude: location.latitude
});
} catch (e) {
common_vendor.index.__f__("warn", "at pages/index/index.vue:267", "缓存基础定位信息失败:", e);
}
if (!isLocationInitialized.value) {
isLocationInitialized.value = true;
}
try {
const addressResult = await utils_amap.AmapUtil.regeocode(location.longitude, location.latitude);
const addressResult = await utils_mapUtils.getRegeo(location.longitude, location.latitude);
if (addressResult.success) {
const addressInfo = addressResult.data;
userLocation.value.address = addressInfo.formatted_address;
userLocation.value.city = addressInfo.addressComponent.city;
userLocation.value.district = addressInfo.addressComponent.district;
try {
common_vendor.index.setStorageSync("userLocation", {
longitude: userLocation.value.longitude,
latitude: userLocation.value.latitude,
address: userLocation.value.address,
city: userLocation.value.city,
district: userLocation.value.district
});
} catch (e) {
common_vendor.index.__f__("warn", "at pages/index/index.vue:294", "缓存带地址的定位信息失败:", e);
}
}
} catch (error) {
}
setTimeout(async () => {
await loadPositions();
common_vendor.index.hideLoading();
common_vendor.index.showToast({
title: "定位成功",
icon: "success"
});
}, 800);
} catch (error) {
common_vendor.index.__f__("error", "at pages/index/index.vue:231", "获取位置失败:", error);
common_vendor.index.__f__("error", "at pages/index/index.vue:309", "获取位置失败:", error);
common_vendor.index.showToast({
title: "获取位置失败,显示默认地图",
icon: "none"
@@ -93,11 +138,15 @@ const _sfc_main = {
await util_index.wxLogin();
}
const res = await common_vendor.index.request({
url: `${config_url.URL}/device/position/list`,
url: `${config_url.URL}/device/position/app/list`,
method: "GET",
header: {
"Authorization": "Bearer " + common_vendor.index.getStorageSync("token"),
"Clientid": common_vendor.index.getStorageSync("client_id")
},
data: {
latitude: userLocation.value.latitude,
longitude: userLocation.value.longitude
}
});
if (res.statusCode === 200 && res.data.code === 200) {
@@ -105,13 +154,13 @@ const _sfc_main = {
calculateDistances();
filteredPositions.value = [...positionList.value];
} else {
common_vendor.index.__f__("error", "at pages/index/index.vue:259", "获取场地列表失败:", res.data.msg);
common_vendor.index.__f__("error", "at pages/index/index.vue:341", "获取场地列表失败:", res.data.msg);
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/index/index.vue:262", "获取场地列表异常:", error);
common_vendor.index.__f__("error", "at pages/index/index.vue:344", "获取场地列表异常:", error);
}
};
const calculateDistances = (centerPoint = null) => {
const calculateDistances = async (centerPoint = null) => {
var _a;
const center = centerPoint || userLocation.value || ((_a = mapRef.value) == null ? void 0 : _a.mapCenter);
if (!center || typeof center.longitude === "undefined" || typeof center.latitude === "undefined") {
@@ -120,21 +169,23 @@ const _sfc_main = {
positionList.value.forEach((item) => {
if (item.longitude && item.latitude) {
try {
const distance = utils_amap.AmapUtil.calculateDistance(
const distanceInMeters = utils_mapUtils.calculateDistanceSync(
center.latitude,
center.longitude,
parseFloat(item.latitude),
parseFloat(item.longitude)
);
item.distance = distance.toFixed(1);
item.distance = formatDistance(distanceInMeters);
item.distanceInMeters = distanceInMeters;
} catch (error) {
common_vendor.index.__f__("error", "at pages/index/index.vue:286", "计算距离异常:", error, item);
item.distance = "999.0";
common_vendor.index.__f__("error", "at pages/index/index.vue:372", "计算距离异常:", error, item);
item.distance = "999.0km";
item.distanceInMeters = 999e3;
}
}
});
positionList.value.sort((a, b) => {
return (parseFloat(a.distance) || 999) - (parseFloat(b.distance) || 999);
return (a.distanceInMeters || 999e3) - (b.distanceInMeters || 999e3);
});
};
const loadPositionsByCenter = async (center) => {
@@ -153,21 +204,23 @@ const _sfc_main = {
if (res.statusCode === 200 && res.data.code === 200) {
positionList.value = res.data.rows || [];
calculateDistances(center);
const maxDistance = 10;
const maxDistanceInMeters = 1e4;
filteredPositions.value = positionList.value.filter((item) => {
return !item.distance || parseFloat(item.distance) <= maxDistance;
return !item.distanceInMeters || item.distanceInMeters <= maxDistanceInMeters;
});
} else {
common_vendor.index.__f__("error", "at pages/index/index.vue:326", "根据地图中心加载场地失败:", res.data.msg);
common_vendor.index.__f__("error", "at pages/index/index.vue:413", "根据地图中心加载场地失败:", res.data.msg);
positionList.value = [];
filteredPositions.value = [];
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/index/index.vue:331", "根据地图中心加载场地异常:", error);
common_vendor.index.__f__("error", "at pages/index/index.vue:418", "根据地图中心加载场地异常:", error);
}
};
const handleRelocate = async () => {
common_vendor.index.showLoading({ title: "定位中..." });
common_vendor.index.showLoading({
title: "定位中..."
});
common_vendor.index.reLaunch({
url: "/pages/index/index"
});
@@ -206,9 +259,6 @@ const _sfc_main = {
address: position.location
});
};
const toggleSheet = () => {
isExpanded.value = !isExpanded.value;
};
const handleScan = async () => {
try {
const scanResult = await new Promise((resolve, reject) => {
@@ -287,14 +337,14 @@ const _sfc_main = {
});
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/index/index.vue:492", "获取设备信息异常:", error);
common_vendor.index.__f__("error", "at pages/index/index.vue:581", "获取设备信息异常:", error);
common_vendor.index.navigateTo({
url: `/pages/device/detail?deviceNo=${deviceNo}`
});
}
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/index/index.vue:499", "扫码处理失败:", error);
common_vendor.index.__f__("error", "at pages/index/index.vue:588", "扫码处理失败:", error);
common_vendor.index.showToast({
title: "扫码失败",
icon: "none"
@@ -314,37 +364,56 @@ const _sfc_main = {
};
return (_ctx, _cache) => {
return common_vendor.e({
a: !isLoading.value && userLocation.value
a: common_assets._imports_0$1,
b: common_vendor.p({
text: noticeText.value,
mode: "link",
speed: 50,
["show-icon"]: true,
color: "#2196F3",
["bg-color"]: "#E3F2FD",
icon: "volume"
}),
c: !isLoading.value && userLocation.value
}, !isLoading.value && userLocation.value ? {
b: common_vendor.sr(mapRef, "1cf27b2a-0", {
d: common_vendor.sr(mapRef, "1cf27b2a-1", {
"k": "mapRef"
}),
c: common_vendor.o(handleRelocate),
d: common_vendor.o(handleScan),
e: common_vendor.o(showLocationList),
f: common_vendor.o(selectPosition),
g: common_vendor.o(onMapCenterChange),
h: common_vendor.p({
e: common_vendor.o(handleRelocate),
f: common_vendor.o(handleScan),
g: common_vendor.o(showLocationList),
h: common_vendor.o(selectPosition),
i: common_vendor.o(onMapCenterChange),
j: common_vendor.p({
userLocation: userLocation.value,
positionList: positionList.value,
filteredPositions: filteredPositions.value,
searchKeyword: searchKeyword.value
})
} : {}, {
i: isLoading.value || !userLocation.value
k: common_vendor.f(guideSteps.value, (step, index, i0) => {
return {
a: common_vendor.t(index + 1),
b: common_vendor.t(step.title),
c: common_vendor.t(step.desc),
d: index
};
}),
l: isLoading.value || !userLocation.value
}, isLoading.value || !userLocation.value ? {} : {}, {
j: showLocationPopup.value
m: showLocationPopup.value
}, showLocationPopup.value ? common_vendor.e({
k: common_vendor.o(hideLocationList),
l: common_vendor.o(toggleSheet),
m: common_vendor.t(filteredPositions.value.length),
n: common_assets._imports_0,
o: common_vendor.o(hideLocationList),
p: common_vendor.f(filteredPositions.value, (item, index, i0) => {
n: common_vendor.o(hideLocationList),
o: common_vendor.t(filteredPositions.value.length),
p: common_vendor.p({
name: "close"
}),
q: common_vendor.o(hideLocationList),
r: common_vendor.f(filteredPositions.value, (item, index, i0) => {
return common_vendor.e({
a: common_vendor.t(item.name),
b: common_vendor.t(item.describe),
c: common_vendor.t(item.location),
b: common_vendor.t(item.status === "online" ? "可租借/归还" : "不可租借/归还"),
c: common_vendor.n(item.status),
d: item.workTime && item.workTime !== "0"
}, item.workTime && item.workTime !== "0" ? {
e: common_vendor.t(item.workTime)
@@ -360,20 +429,19 @@ const _sfc_main = {
l: common_vendor.o(($event) => selectPositionFromPopup(item), item.positionId)
});
}),
q: common_assets._imports_0,
r: filteredPositions.value.length === 0 && !isLoading.value
s: filteredPositions.value.length === 0 && !isLoading.value
}, filteredPositions.value.length === 0 && !isLoading.value ? {
s: common_assets._imports_0
t: common_assets._imports_0
} : {}, {
t: isExpanded.value ? 1 : ""
v: isExpanded.value ? 1 : ""
}) : {}, {
v: isLoading.value
w: isLoading.value
}, isLoading.value ? {} : {}, {
w: showPhoneAuthPopup.value
x: showPhoneAuthPopup.value
}, showPhoneAuthPopup.value ? {
x: common_vendor.o(($event) => showPhoneAuthPopup.value = false),
y: common_vendor.o(onGetPhoneNumber),
z: common_vendor.o(($event) => showPhoneAuthPopup.value = false)
y: common_vendor.o(($event) => showPhoneAuthPopup.value = false),
z: common_vendor.o(onGetPhoneNumber),
A: common_vendor.o(($event) => showPhoneAuthPopup.value = false)
} : {});
};
}
+2
View File
@@ -1,6 +1,8 @@
{
"navigationBarTitleText": "附近场地",
"usingComponents": {
"uv-notice-bar": "../../node-modules/@climblee/uv-ui/components/uv-notice-bar/uv-notice-bar",
"uv-icon": "../../node-modules/@climblee/uv-ui/components/uv-icon/uv-icon",
"map-component": "../../components/MapComponent"
}
}
+1 -1
View File
@@ -1 +1 @@
<view class="container data-v-1cf27b2a"><map-component wx:if="{{a}}" class="r data-v-1cf27b2a" u-r="mapRef" bindrelocate="{{c}}" bindscan="{{d}}" bindshowList="{{e}}" bindmarkerTap="{{f}}" bindmapCenterChange="{{g}}" u-i="1cf27b2a-0" bind:__l="__l" u-p="{{h}}"/><view wx:if="{{i}}" class="map-loading-placeholder data-v-1cf27b2a"><view class="loading-content data-v-1cf27b2a"><view class="loading-spinner data-v-1cf27b2a"></view><text class="data-v-1cf27b2a">正在获取位置信息...</text></view></view><view wx:if="{{j}}" class="location-popup data-v-1cf27b2a"><view class="popup-mask data-v-1cf27b2a" bindtap="{{k}}"></view><view class="{{['location-sheet', 'data-v-1cf27b2a', t && 'expanded']}}"><view class="sheet-handle data-v-1cf27b2a" bindtap="{{l}}"><view class="handle-bar data-v-1cf27b2a"></view></view><view class="sheet-header data-v-1cf27b2a"><text class="sheet-title data-v-1cf27b2a">附近场地 ({{m}})</text><view class="close-btn data-v-1cf27b2a" bindtap="{{o}}"><image class="close-icon data-v-1cf27b2a" src="{{n}}" mode="aspectFit"/></view></view><scroll-view class="sheet-content data-v-1cf27b2a" scroll-y="true"><view wx:for="{{p}}" wx:for-item="item" wx:key="k" class="position-item data-v-1cf27b2a" bindtap="{{item.l}}"><view class="position-info data-v-1cf27b2a"><view class="position-name data-v-1cf27b2a">{{item.a}}</view><view class="position-desc data-v-1cf27b2a">{{item.b}}</view><view class="position-location data-v-1cf27b2a"><image class="location-icon-small data-v-1cf27b2a" src="{{q}}" mode="aspectFit"/><text class="data-v-1cf27b2a">{{item.c}}</text></view><view wx:if="{{item.d}}" class="position-time data-v-1cf27b2a"><text class="data-v-1cf27b2a">营业时间:{{item.e}}</text></view></view><view class="position-actions data-v-1cf27b2a"><view wx:if="{{item.f}}" class="distance-info data-v-1cf27b2a"><text class="data-v-1cf27b2a">{{item.g}}km</text></view><view class="{{['status-tag', 'data-v-1cf27b2a', item.i]}}"><text class="data-v-1cf27b2a">{{item.h}}</text></view><view class="nav-btn data-v-1cf27b2a" catchtap="{{item.j}}"><text class="data-v-1cf27b2a">导航</text></view></view></view><view wx:if="{{r}}" class="empty-state data-v-1cf27b2a"><image class="empty-icon data-v-1cf27b2a" src="{{s}}" mode="aspectFit"/><text class="empty-text data-v-1cf27b2a">暂无附近场地</text></view></scroll-view></view></view><view wx:if="{{v}}" class="loading-overlay data-v-1cf27b2a"><view class="loading-content data-v-1cf27b2a"><view class="loading-spinner data-v-1cf27b2a"></view><text class="data-v-1cf27b2a">正在获取场地信息...</text></view></view><view wx:if="{{w}}" class="phone-auth-popup data-v-1cf27b2a"><view class="popup-mask data-v-1cf27b2a" catchtap="{{x}}"></view><view class="popup-content data-v-1cf27b2a"><view class="popup-header data-v-1cf27b2a"><text class="popup-title data-v-1cf27b2a">授权获取手机号</text></view><view class="popup-body data-v-1cf27b2a"><view class="auth-desc data-v-1cf27b2a"><text class="data-v-1cf27b2a">为了提供更好的服务和紧急联系,需要授权获取您的手机号</text></view><button class="auth-btn data-v-1cf27b2a" open-type="getPhoneNumber" bindgetphonenumber="{{y}}"><text class="data-v-1cf27b2a">一键获取手机号</text></button><view class="auth-cancel data-v-1cf27b2a" bindtap="{{z}}"><text class="data-v-1cf27b2a">暂不授权</text></view></view></view></view></view>
<view class="container data-v-1cf27b2a"><view class="header-section data-v-1cf27b2a"><view class="logo-container data-v-1cf27b2a"><image class="logo-image data-v-1cf27b2a" src="{{a}}" mode="aspectFit"/><text class="app-name data-v-1cf27b2a">共享风扇</text></view><uv-notice-bar wx:if="{{b}}" class="data-v-1cf27b2a" u-i="1cf27b2a-0" bind:__l="__l" u-p="{{b}}"></uv-notice-bar></view><map-component wx:if="{{c}}" class="r data-v-1cf27b2a" u-r="mapRef" bindrelocate="{{e}}" bindscan="{{f}}" bindshowList="{{g}}" bindmarkerTap="{{h}}" bindmapCenterChange="{{i}}" u-i="1cf27b2a-1" bind:__l="__l" u-p="{{j}}"/><view class="steps-guide data-v-1cf27b2a"><view class="guide-header data-v-1cf27b2a"><text class="guide-title data-v-1cf27b2a">使用指南</text></view><view class="steps-container data-v-1cf27b2a"><view wx:for="{{k}}" wx:for-item="step" wx:key="d" class="step-item data-v-1cf27b2a"><view class="step-number data-v-1cf27b2a">{{step.a}}</view><view class="step-content data-v-1cf27b2a"><text class="step-title data-v-1cf27b2a">{{step.b}}</text><text class="step-desc data-v-1cf27b2a">{{step.c}}</text></view></view></view></view><view wx:if="{{l}}" class="map-loading-placeholder data-v-1cf27b2a"><view class="loading-content data-v-1cf27b2a"><view class="loading-spinner data-v-1cf27b2a"></view><text class="data-v-1cf27b2a">正在获取位置信息...</text></view></view><view wx:if="{{m}}" class="location-popup data-v-1cf27b2a"><view class="popup-mask data-v-1cf27b2a" bindtap="{{n}}"></view><view class="{{['location-sheet', 'data-v-1cf27b2a', v && 'expanded']}}"><view class="sheet-header data-v-1cf27b2a"><text class="sheet-title data-v-1cf27b2a">附近设备场地 ({{o}})</text><view class="close-btn data-v-1cf27b2a" bindtap="{{q}}"><uv-icon wx:if="{{p}}" class="data-v-1cf27b2a" u-i="1cf27b2a-2" bind:__l="__l" u-p="{{p}}"></uv-icon></view></view><scroll-view class="sheet-content data-v-1cf27b2a" scroll-y="true"><view wx:for="{{r}}" wx:for-item="item" wx:key="k" class="position-item data-v-1cf27b2a" bindtap="{{item.l}}"><view class="position-info data-v-1cf27b2a"><view class="position-name data-v-1cf27b2a">{{item.a}}</view><view class="{{['status-tag', 'data-v-1cf27b2a', item.c]}}"><text class="data-v-1cf27b2a">{{item.b}}</text></view><view wx:if="{{item.d}}" class="position-time data-v-1cf27b2a"><text class="data-v-1cf27b2a">营业时间:{{item.e}}</text></view></view><view class="position-actions data-v-1cf27b2a"><view wx:if="{{item.f}}" class="distance-info data-v-1cf27b2a"><text class="data-v-1cf27b2a">{{item.g}}</text></view><view class="{{['status-tag', 'data-v-1cf27b2a', item.i]}}"><text class="data-v-1cf27b2a">{{item.h}}</text></view><view class="nav-btn data-v-1cf27b2a" catchtap="{{item.j}}"><text class="data-v-1cf27b2a">导航</text></view></view></view><view wx:if="{{s}}" class="empty-state data-v-1cf27b2a"><image class="empty-icon data-v-1cf27b2a" src="{{t}}" mode="aspectFit"/><text class="empty-text data-v-1cf27b2a">附近5公里内暂无设备</text></view></scroll-view></view></view><view wx:if="{{w}}" class="loading-overlay data-v-1cf27b2a"><view class="loading-content data-v-1cf27b2a"><view class="loading-spinner data-v-1cf27b2a"></view><text class="data-v-1cf27b2a">正在获取场地信息...</text></view></view><view wx:if="{{x}}" class="phone-auth-popup data-v-1cf27b2a"><view class="popup-mask data-v-1cf27b2a" catchtap="{{y}}"></view><view class="popup-content data-v-1cf27b2a"><view class="popup-header data-v-1cf27b2a"><text class="popup-title data-v-1cf27b2a">授权获取手机号</text></view><view class="popup-body data-v-1cf27b2a"><view class="auth-desc data-v-1cf27b2a"><text class="data-v-1cf27b2a">为了提供更好的服务和紧急联系,需要授权获取您的手机号</text></view><button class="auth-btn data-v-1cf27b2a" open-type="getPhoneNumber" bindgetphonenumber="{{z}}"><text class="data-v-1cf27b2a">一键获取手机号</text></button><view class="auth-cancel data-v-1cf27b2a" bindtap="{{A}}"><text class="data-v-1cf27b2a">暂不授权</text></view></view></view></view></view>
+133 -3
View File
@@ -29,6 +29,39 @@
background-color: #f6f7fb;
display: flex;
flex-direction: column;
padding-top: 20rpx;
}
/* 顶部Logo和通知栏 */
.header-section.data-v-1cf27b2a {
width: 92%;
margin: 0 auto 20rpx;
}
.logo-container.data-v-1cf27b2a {
display: flex;
align-items: center;
}
.logo-container .logo-image.data-v-1cf27b2a {
width: 80rpx;
height: 80rpx;
margin-right: 8rpx;
}
.logo-container .app-name.data-v-1cf27b2a {
font-size: 36rpx;
font-weight: 600;
color: #333;
}
/* 地图标题 */
.map-title.data-v-1cf27b2a {
width: 92%;
margin: 0 auto 10rpx;
padding: 10rpx 0;
}
.map-title text.data-v-1cf27b2a {
font-size: 32rpx;
font-weight: 600;
color: #333;
}
/* 顶部搜索栏 */
@@ -120,7 +153,7 @@
border-radius: 4rpx;
}
.location-popup .location-sheet .sheet-header.data-v-1cf27b2a {
padding: 0 30rpx 20rpx;
padding: 20rpx 30rpx;
border-bottom: 1px solid #f0f0f0;
display: flex;
justify-content: space-between;
@@ -150,9 +183,9 @@
height: 24rpx;
}
.location-popup .location-sheet .sheet-content.data-v-1cf27b2a {
flex: 1;
padding: 20rpx 0;
overflow: hidden;
height: 60vh;
/* 固定高度以保证小程序端 scroll-view 正常滚动 */
}
@keyframes slideUp-1cf27b2a {
from {
@@ -251,6 +284,25 @@ to {
font-size: 28rpx;
color: #999;
}
.status-tag.data-v-1cf27b2a {
padding: 8rpx 16rpx;
border-radius: 20rpx;
font-size: 22rpx;
width: -webkit-fit-content;
width: fit-content;
}
.status-tag.online.data-v-1cf27b2a {
background: #e8f5e8;
color: #4caf50;
}
.status-tag.offline.data-v-1cf27b2a {
background: #ffeaea;
color: #f44336;
}
.status-tag.wait.data-v-1cf27b2a {
background: #ffeaea;
color: #f44336;
}
/* 加载状态 */
.loading-overlay.data-v-1cf27b2a {
@@ -395,4 +447,82 @@ to {
.phone-auth-popup .popup-content .popup-body .auth-cancel text.data-v-1cf27b2a {
font-size: 28rpx;
color: #999;
}
/* 操作步骤指引 */
.steps-guide.data-v-1cf27b2a {
align-items: center;
align-content: center;
background-color: rgba(255, 255, 255, 0.95);
border-radius: 20rpx;
padding: 0;
box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.12);
z-index: 10;
-webkit-backdrop-filter: blur(15rpx);
backdrop-filter: blur(15rpx);
border: 1rpx solid rgba(255, 255, 255, 0.9);
overflow: hidden;
width: 92%;
margin: 0 auto 20rpx;
}
.guide-header.data-v-1cf27b2a {
padding: 20rpx 24rpx;
background: linear-gradient(135deg, #2196F3, #1976D2);
border-bottom: 1rpx solid rgba(255, 255, 255, 0.2);
}
.guide-header .guide-title.data-v-1cf27b2a {
font-size: 32rpx;
font-weight: 600;
color: #ffffff;
text-align: center;
display: block;
}
.steps-container.data-v-1cf27b2a {
display: flex;
flex-direction: column;
gap: 16rpx;
padding: 24rpx;
background-color: rgba(255, 255, 255, 0.9);
}
.step-item.data-v-1cf27b2a {
display: flex;
align-items: flex-start;
width: 100%;
padding: 16rpx 0;
border-bottom: 1rpx solid rgba(0, 0, 0, 0.05);
}
.step-item.data-v-1cf27b2a:last-child {
border-bottom: none;
}
.step-item .step-number.data-v-1cf27b2a {
width: 40rpx;
height: 40rpx;
background: linear-gradient(135deg, #2196F3, #1976D2);
color: #ffffff;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 24rpx;
font-weight: bold;
margin-right: 20rpx;
flex-shrink: 0;
box-shadow: 0 4rpx 12rpx rgba(33, 150, 243, 0.4);
}
.step-item .step-content.data-v-1cf27b2a {
flex: 1;
padding-top: 4rpx;
}
.step-item .step-content .step-title.data-v-1cf27b2a {
font-size: 30rpx;
font-weight: 600;
color: #333;
margin-bottom: 8rpx;
display: block;
}
.step-item .step-content .step-desc.data-v-1cf27b2a {
font-size: 26rpx;
color: #666;
display: block;
line-height: 1.5;
}
+1 -1
View File
@@ -78,7 +78,7 @@ const _sfc_main = {
}, userInfo.value.avatar ? {
b: userInfo.value.avatar
} : {
c: common_assets._imports_0$1
c: common_assets._imports_0$2
}, {
d: userInfo.value.isAdmin
}, userInfo.value.isAdmin ? {} : {}, {
+1 -1
View File
@@ -90,7 +90,7 @@ const _sfc_main = {
c: common_vendor.t(orderInfo.value.deviceNo || "-"),
d: orderInfo.value.payWay === "wx_score_pay"
}, orderInfo.value.payWay === "wx_score_pay" ? {
e: common_assets._imports_0$2
e: common_assets._imports_0$3
} : {}, {
f: common_vendor.t(orderInfo.value.startTime || "-"),
g: orderInfo.value.endTime
+1 -1
View File
@@ -242,7 +242,7 @@ const _sfc_main = {
d: common_vendor.t(order.deviceId),
e: order.payWay == "wx_score_pay"
}, order.payWay == "wx_score_pay" ? {
f: common_assets._imports_0$2
f: common_assets._imports_0$3
} : {}, {
g: common_vendor.t(order.startTime),
h: common_vendor.t(order.endTime || "-"),
+1 -1
View File
@@ -357,7 +357,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
c: common_vendor.t($data.deviceId),
d: $data.orderInfo.payWay == "wx_score_pay"
}, $data.orderInfo.payWay == "wx_score_pay" ? {
e: common_assets._imports_0$2
e: common_assets._imports_0$3
} : {}, {
f: common_vendor.t($data.orderInfo.startTime),
g: common_vendor.t($data.orderInfo.usedTime),