feat:新增地图视图效果,接口待对接

This commit is contained in:
2025-08-08 14:51:45 +08:00
parent 67eb4e5516
commit c5b8026fba
49 changed files with 2811 additions and 884 deletions
+39 -36
View File
@@ -10,7 +10,7 @@ const _sfc_main = {
const deviceId = common_vendor.ref("");
const deviceFeeConfig = common_vendor.ref({});
const deviceLocation = common_vendor.ref("一号教学楼大厅");
const batteryLevel = common_vendor.ref(95);
common_vendor.ref(95);
const hasActiveOrder = common_vendor.ref(false);
const deviceStatus = common_vendor.reactive({
text: "可使用",
@@ -20,29 +20,35 @@ const _sfc_main = {
const phoneNumber = common_vendor.ref("");
const showPhoneAuthPopup = common_vendor.ref(false);
common_vendor.onLoad((options) => {
deviceId.value = options.deviceNo;
if (options.deviceNo != common_vendor.index.getStorageSync("deviceId") || !common_vendor.index.getStorageSync("deviceId")) {
deviceId.value = options.deviceNo;
common_vendor.index.setStorageSync("deviceId", options.deviceNo);
} else {
deviceId.value = common_vendor.index.getStorageSync("deviceId");
}
checkOrderStatus();
common_vendor.index.__f__("log", "at pages/device/detail.vue:200", options.deviceNo);
fetchDeviceInfo();
});
common_vendor.onMounted(() => {
checkUserPhone();
common_vendor.onMounted(async () => {
await checkUserPhone();
});
common_vendor.onShow(async () => {
await fetchDeviceInfo();
});
const checkUserPhone = async () => {
try {
const userInfoRes = await util_index.getUserInfo();
common_vendor.index.__f__("log", "at pages/device/detail.vue:211", userInfoRes.data.phone, "getUserInfoPhone");
common_vendor.index.__f__("log", "at pages/device/detail.vue:220", userInfoRes.data.phone, "getUserInfoPhone");
if (userInfoRes.code == 200 && userInfoRes.data && userInfoRes.data.phone) {
phoneNumber.value = userInfoRes.data.phone;
} else {
showPhoneAuthPopup.value = true;
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/device/detail.vue:220", "获取用户信息失败:", error);
common_vendor.index.__f__("error", "at pages/device/detail.vue:229", "获取用户信息失败:", error);
}
};
const onGetPhoneNumber = (e) => {
common_vendor.index.__f__("log", "at pages/device/detail.vue:226", "getPhoneNumber event:", e.detail);
common_vendor.index.__f__("log", "at pages/device/detail.vue:235", "getPhoneNumber event:", e.detail);
if (e.detail.errMsg && e.detail.errMsg.includes("deny")) {
common_vendor.index.showToast({
title: "需要授权手机号才能使用设备",
@@ -54,13 +60,13 @@ const _sfc_main = {
common_vendor.index.showLoading({
title: "获取中..."
});
common_vendor.index.__f__("log", "at pages/device/detail.vue:243", "获取到的授权code:", e.detail.code);
common_vendor.index.__f__("log", "at pages/device/detail.vue:252", "获取到的授权code:", e.detail.code);
try {
util_index.getUserPhoneNumber(e.detail.code).then((res) => {
common_vendor.index.__f__("log", "at pages/device/detail.vue:249", "获取手机号API响应原始数据:", JSON.stringify(res));
common_vendor.index.__f__("log", "at pages/device/detail.vue:258", "获取手机号API响应原始数据:", JSON.stringify(res));
common_vendor.index.hideLoading();
if (!res) {
common_vendor.index.__f__("error", "at pages/device/detail.vue:254", "API返回数据为空");
common_vendor.index.__f__("error", "at pages/device/detail.vue:263", "API返回数据为空");
common_vendor.index.showModal({
title: "数据异常",
content: "API返回为空",
@@ -68,8 +74,8 @@ const _sfc_main = {
});
return;
}
common_vendor.index.__f__("log", "at pages/device/detail.vue:264", "响应code:", res.code, "响应类型:", typeof res.code);
common_vendor.index.__f__("log", "at pages/device/detail.vue:265", "是否有data:", !!res.data, "是否有phone:", res.data && !!res.data.phone);
common_vendor.index.__f__("log", "at pages/device/detail.vue:273", "响应code:", res.code, "响应类型:", typeof res.code);
common_vendor.index.__f__("log", "at pages/device/detail.vue:274", "是否有data:", !!res.data, "是否有phone:", res.data && !!res.data.phone);
if (res.code == 200 && res.data && res.data.phoneNumber) {
phoneNumber.value = res.data.phoneNumber;
showPhoneAuthPopup.value = false;
@@ -78,7 +84,7 @@ const _sfc_main = {
icon: "success"
});
} else {
common_vendor.index.__f__("warn", "at pages/device/detail.vue:277", "获取手机号响应异常:", res.msg || "未知错误");
common_vendor.index.__f__("warn", "at pages/device/detail.vue:286", "获取手机号响应异常:", res.msg || "未知错误");
common_vendor.index.showModal({
title: "获取手机号异常",
content: `状态码: ${res.code}, 消息: ${res.msg || "无"}`,
@@ -87,7 +93,7 @@ const _sfc_main = {
}
}).catch((err) => {
common_vendor.index.hideLoading();
common_vendor.index.__f__("error", "at pages/device/detail.vue:287", "获取手机号码失败(catch):", err);
common_vendor.index.__f__("error", "at pages/device/detail.vue:296", "获取手机号码失败(catch):", err);
let errMsg = err.message || err.toString();
common_vendor.index.showModal({
title: "获取手机号失败",
@@ -97,7 +103,7 @@ const _sfc_main = {
});
} catch (outerError) {
common_vendor.index.hideLoading();
common_vendor.index.__f__("error", "at pages/device/detail.vue:299", "获取手机号外部错误:", outerError);
common_vendor.index.__f__("error", "at pages/device/detail.vue:308", "获取手机号外部错误:", outerError);
common_vendor.index.showModal({
title: "意外错误",
content: "处理过程发生异常: " + (outerError.message || outerError),
@@ -129,7 +135,7 @@ const _sfc_main = {
deviceStatus.class = "offline";
}
}
common_vendor.index.__f__("log", "at pages/device/detail.vue:337", "feeconfig", deviceInfo.value.feeConfig);
common_vendor.index.__f__("log", "at pages/device/detail.vue:346", "feeconfig", deviceInfo.value.feeConfig);
deviceFeeConfig.value = JSON.parse(deviceInfo.value.feeConfig)[0] || {};
}
};
@@ -210,17 +216,17 @@ const _sfc_main = {
packagePrice: parseFloat(selectedPkg.price)
});
if (updateRes.code !== 200) {
common_vendor.index.__f__("warn", "at pages/device/detail.vue:445", "更新订单套餐信息失败:", updateRes.msg);
common_vendor.index.__f__("warn", "at pages/device/detail.vue:454", "更新订单套餐信息失败:", updateRes.msg);
} else {
common_vendor.index.__f__("log", "at pages/device/detail.vue:448", "订单套餐信息已提前更新");
common_vendor.index.__f__("log", "at pages/device/detail.vue:457", "订单套餐信息已提前更新");
}
} catch (updateError) {
common_vendor.index.__f__("error", "at pages/device/detail.vue:451", "更新订单套餐信息时出错:", updateError);
common_vendor.index.__f__("error", "at pages/device/detail.vue:460", "更新订单套餐信息时出错:", updateError);
}
if (payWay == "wx-pay") {
common_vendor.index.hideLoading();
const res = await config_user.getOrderByOrderNo(order.orderNo);
common_vendor.index.__f__("log", "at pages/device/detail.vue:460", res);
common_vendor.index.__f__("log", "at pages/device/detail.vue:469", res);
const deposit = parseFloat(deviceInfo.value.depositAmount);
const packagePrice = parseFloat(selectedPkg.price);
const totalAmount = (deposit + packagePrice).toFixed(2);
@@ -237,7 +243,7 @@ const _sfc_main = {
const payResult = await util_index.initiateWeChatScorePayment(res);
if (payResult.errCode == "0") {
const res2 = await config_user.getOrderByOrderNoScorePayStatus(order.orderNo);
common_vendor.index.__f__("log", "at pages/device/detail.vue:488", res2.data.orderStatus);
common_vendor.index.__f__("log", "at pages/device/detail.vue:497", res2.data.orderStatus);
if (res2.data.orderStatus == "in_used") {
common_vendor.index.showToast({
title: "设备租借成功",
@@ -291,21 +297,18 @@ const _sfc_main = {
c: common_vendor.t(deviceId.value),
d: common_assets._imports_0$3,
e: common_vendor.t(deviceLocation.value),
f: common_assets._imports_1$2,
g: batteryLevel.value < 20 ? 1 : "",
h: common_vendor.t(batteryLevel.value),
i: common_vendor.t(deviceFeeConfig.value.maxHourPrice),
j: common_vendor.t(deviceInfo.value.depositAmount),
k: common_vendor.t(hasActiveOrder.value ? "归还设备" : "免押租借"),
l: hasActiveOrder.value ? 1 : "",
m: common_vendor.o(($event) => handleRent("wx-score-pay")),
n: common_assets._imports_0$2,
o: showPhoneAuthPopup.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,
l: showPhoneAuthPopup.value
}, showPhoneAuthPopup.value ? {
p: common_vendor.o(() => {
m: common_vendor.o(() => {
}),
q: common_vendor.o(onGetPhoneNumber),
r: common_vendor.o(($event) => showPhoneAuthPopup.value = false)
n: common_vendor.o(onGetPhoneNumber),
o: common_vendor.o(($event) => showPhoneAuthPopup.value = false)
} : {});
};
}
+1 -1
View File
@@ -1 +1 @@
<view class="container data-v-d65de3a7"><view class="device-header data-v-d65de3a7"><view class="{{['device-status-card', 'data-v-d65de3a7', b]}}"><view class="status-indicator data-v-d65de3a7"></view><text class="status-text data-v-d65de3a7">{{a}}</text></view><view class="device-title data-v-d65de3a7"><text class="name data-v-d65de3a7">共享风扇</text><view class="device-meta data-v-d65de3a7"><text class="id-label data-v-d65de3a7">设备号:</text><text class="id-value data-v-d65de3a7">{{c}}</text></view></view></view><view class="card device-info-card data-v-d65de3a7"><view class="card-row data-v-d65de3a7"><view class="card-item data-v-d65de3a7"><view class="item-icon location-icon data-v-d65de3a7"><image class="data-v-d65de3a7" src="{{d}}" mode="aspectFill" style="width:45rpx;height:45rpx"></image></view><view class="item-content data-v-d65de3a7"><text class="item-label data-v-d65de3a7">当前位置</text><text class="item-value data-v-d65de3a7">{{e}}</text></view></view><view class="card-item data-v-d65de3a7"><view class="{{['item-icon', 'battery-icon', 'data-v-d65de3a7', g && 'battery-low']}}"><image class="data-v-d65de3a7" src="{{f}}" mode="aspectFill" style="width:45rpx;height:45rpx"></image></view><view class="item-content data-v-d65de3a7"><text class="item-label data-v-d65de3a7">电池电量</text><text class="item-value data-v-d65de3a7">{{h}}%</text></view></view></view></view><view class="card pricing-card data-v-d65de3a7"><view class="card-header data-v-d65de3a7"><text class="card-title data-v-d65de3a7">计费规则</text></view><view class="pricing-banner data-v-d65de3a7"><view class="pricing-main data-v-d65de3a7"><text class="price data-v-d65de3a7">¥{{i}}</text><text class="unit data-v-d65de3a7">/小时</text></view><text class="cap-price data-v-d65de3a7">封顶 ¥{{j}}</text></view><view class="pricing-rules data-v-d65de3a7"><view class="rule-item data-v-d65de3a7"><view class="rule-dot data-v-d65de3a7"></view><text class="rule-text data-v-d65de3a7">不足60分钟按60分钟计费</text></view><view class="rule-item data-v-d65de3a7"><view class="rule-dot data-v-d65de3a7"></view><text class="rule-text data-v-d65de3a7">持续计费至99元视为买断</text></view></view></view><view class="card notice-card data-v-d65de3a7"><view class="card-header data-v-d65de3a7"><text class="card-title data-v-d65de3a7">使用须知</text></view><view class="notice-items data-v-d65de3a7"><view class="notice-item data-v-d65de3a7"><view class="notice-dot data-v-d65de3a7"></view><text class="notice-text data-v-d65de3a7">请在使用前检查设备是否完好</text></view><view class="notice-item data-v-d65de3a7"><view class="notice-dot data-v-d65de3a7"></view><text class="notice-text data-v-d65de3a7">请在指定区域内使用设备</text></view><view class="notice-item data-v-d65de3a7"><view class="notice-dot data-v-d65de3a7"></view><text class="notice-text data-v-d65de3a7">归还时请确保设备完好,避免损坏</text></view></view></view><view class="footer data-v-d65de3a7"><button class="{{['rent-button', 'data-v-d65de3a7', l && 'return-button']}}" bindtap="{{m}}"><text class="data-v-d65de3a7">{{k}}</text></button><view class="wechat-credit data-v-d65de3a7"><image src="{{n}}" mode="aspectFit" class="wx-icon data-v-d65de3a7"></image><view class="credit-text data-v-d65de3a7"><text class="data-v-d65de3a7">微信支付分</text><text class="credit-divider data-v-d65de3a7">|</text><text class="credit-score data-v-d65de3a7">550分及以上优享</text></view></view></view><view wx:if="{{o}}" class="phone-auth-popup data-v-d65de3a7"><view class="popup-mask data-v-d65de3a7" catchtap="{{p}}"></view><view class="popup-content data-v-d65de3a7"><view class="popup-header data-v-d65de3a7"><text class="popup-title data-v-d65de3a7">授权获取手机号</text></view><view class="popup-body data-v-d65de3a7"><view class="auth-desc data-v-d65de3a7"><text class="data-v-d65de3a7">为了提供更好的服务,需要授权获取您的手机号</text></view><button class="auth-btn data-v-d65de3a7" open-type="getPhoneNumber" bindgetphonenumber="{{q}}"> 一键获取手机号 </button><view class="auth-cancel data-v-d65de3a7" bindtap="{{r}}"><text class="data-v-d65de3a7">暂不授权</text></view></view></view></view></view>
<view class="container data-v-d65de3a7"><view class="device-header data-v-d65de3a7"><view class="{{['device-status-card', 'data-v-d65de3a7', b]}}"><view class="status-indicator data-v-d65de3a7"></view><text class="status-text data-v-d65de3a7">{{a}}</text></view><view class="device-title data-v-d65de3a7"><text class="name data-v-d65de3a7">共享风扇</text><view class="device-meta data-v-d65de3a7"><text class="id-label data-v-d65de3a7">设备号:</text><text class="id-value data-v-d65de3a7">{{c}}</text></view></view></view><view class="card device-info-card data-v-d65de3a7"><view class="card-row data-v-d65de3a7"><view class="card-item data-v-d65de3a7"><view class="item-icon location-icon data-v-d65de3a7"><image class="data-v-d65de3a7" src="{{d}}" mode="aspectFill" style="width:45rpx;height:45rpx"></image></view><view class="item-content data-v-d65de3a7"><text class="item-label data-v-d65de3a7">当前位置</text><text class="item-value data-v-d65de3a7">{{e}}</text></view></view></view></view><view class="card pricing-card data-v-d65de3a7"><view class="card-header data-v-d65de3a7"><text class="card-title data-v-d65de3a7">计费规则</text></view><view class="pricing-banner data-v-d65de3a7"><view class="pricing-main data-v-d65de3a7"><text class="price data-v-d65de3a7">¥{{f}}</text><text class="unit data-v-d65de3a7">/小时</text></view><text class="cap-price data-v-d65de3a7">封顶 ¥{{g}}</text></view><view class="pricing-rules data-v-d65de3a7"><view class="rule-item data-v-d65de3a7"><view class="rule-dot data-v-d65de3a7"></view><text class="rule-text data-v-d65de3a7">不足60分钟按60分钟计费</text></view><view class="rule-item data-v-d65de3a7"><view class="rule-dot data-v-d65de3a7"></view><text class="rule-text data-v-d65de3a7">持续计费至99元视为买断</text></view></view></view><view class="card notice-card data-v-d65de3a7"><view class="card-header data-v-d65de3a7"><text class="card-title data-v-d65de3a7">使用须知</text></view><view class="notice-items data-v-d65de3a7"><view class="notice-item data-v-d65de3a7"><view class="notice-dot data-v-d65de3a7"></view><text class="notice-text data-v-d65de3a7">请在使用前检查设备是否完好</text></view><view class="notice-item data-v-d65de3a7"><view class="notice-dot data-v-d65de3a7"></view><text class="notice-text data-v-d65de3a7">请在指定区域内使用设备</text></view><view class="notice-item data-v-d65de3a7"><view class="notice-dot data-v-d65de3a7"></view><text class="notice-text data-v-d65de3a7">归还时请确保设备完好,避免损坏</text></view></view></view><view class="footer data-v-d65de3a7"><button class="{{['rent-button', 'data-v-d65de3a7', i && 'return-button']}}" bindtap="{{j}}"><text class="data-v-d65de3a7">{{h}}</text></button><view class="wechat-credit data-v-d65de3a7"><image src="{{k}}" mode="aspectFit" class="wx-icon data-v-d65de3a7"></image><view class="credit-text data-v-d65de3a7"><text class="data-v-d65de3a7">微信支付分</text><text class="credit-divider data-v-d65de3a7">|</text><text class="credit-score data-v-d65de3a7">550分及以上优享</text></view></view></view><view wx:if="{{l}}" class="phone-auth-popup data-v-d65de3a7"><view class="popup-mask data-v-d65de3a7" catchtap="{{m}}"></view><view class="popup-content data-v-d65de3a7"><view class="popup-header data-v-d65de3a7"><text class="popup-title data-v-d65de3a7">授权获取手机号</text></view><view class="popup-body data-v-d65de3a7"><view class="auth-desc data-v-d65de3a7"><text class="data-v-d65de3a7">为了提供更好的服务,需要授权获取您的手机号</text></view><button class="auth-btn data-v-d65de3a7" open-type="getPhoneNumber" bindgetphonenumber="{{n}}"> 一键获取手机号 </button><view class="auth-cancel data-v-d65de3a7" bindtap="{{o}}"><text class="data-v-d65de3a7">暂不授权</text></view></view></view></view></view>
+287 -31
View File
@@ -1,12 +1,215 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
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 common_assets = require("../../common/assets.js");
const utils_amap = require("../../utils/amap.js");
if (!Math) {
MapComponent();
}
const MapComponent = () => "../../components/MapComponent.js";
const _sfc_main = {
methods: {
async handleScan() {
__name: "index",
setup(__props) {
const searchKeyword = common_vendor.ref("");
const userLocation = common_vendor.ref(null);
const positionList = common_vendor.ref([]);
const filteredPositions = common_vendor.ref([]);
const isExpanded = common_vendor.ref(false);
const isLoading = common_vendor.ref(false);
const showPhoneAuthPopup = common_vendor.ref(false);
const isLocationInitialized = common_vendor.ref(false);
const showLocationPopup = common_vendor.ref(false);
const mapRef = common_vendor.ref(null);
common_vendor.computed(() => {
if (userLocation.value && userLocation.value.address) {
return `${userLocation.value.district || "当前位置"} - 搜索附近场地`;
}
return "搜索附近场地";
});
common_vendor.onMounted(() => {
init();
});
common_vendor.onUnmounted(() => {
});
const init = async () => {
isLoading.value = true;
try {
await getUserLocation();
await loadPositions();
} catch (error) {
common_vendor.index.__f__("error", "at pages/index/index.vue:177", "初始化失败:", error);
await loadPositions();
} finally {
isLoading.value = false;
}
};
const getUserLocation = async () => {
try {
const location = await new Promise((resolve, reject) => {
common_vendor.index.getLocation({
type: "gcj02",
success: resolve,
fail: reject
});
});
userLocation.value = {
longitude: location.longitude,
latitude: location.latitude
};
if (!isLocationInitialized.value) {
isLocationInitialized.value = true;
}
try {
const addressResult = await utils_amap.AmapUtil.regeocode(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;
}
} 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.showToast({
title: "获取位置失败,显示默认地图",
icon: "none"
});
}
};
const loadPositions = async () => {
try {
if (!common_vendor.index.getStorageSync("token")) {
await util_index.wxLogin();
}
const res = await common_vendor.index.request({
url: `${config_url.URL}/device/position/list`,
method: "GET",
header: {
"Authorization": "Bearer " + common_vendor.index.getStorageSync("token"),
"Clientid": common_vendor.index.getStorageSync("client_id")
}
});
if (res.statusCode === 200 && res.data.code === 200) {
positionList.value = res.data.rows || [];
calculateDistances();
filteredPositions.value = [...positionList.value];
} else {
common_vendor.index.__f__("error", "at pages/index/index.vue:259", "获取场地列表失败:", res.data.msg);
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/index/index.vue:262", "获取场地列表异常:", error);
}
};
const calculateDistances = (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") {
return;
}
positionList.value.forEach((item) => {
if (item.longitude && item.latitude) {
try {
const distance = utils_amap.AmapUtil.calculateDistance(
center.latitude,
center.longitude,
parseFloat(item.latitude),
parseFloat(item.longitude)
);
item.distance = distance.toFixed(1);
} catch (error) {
common_vendor.index.__f__("error", "at pages/index/index.vue:286", "计算距离异常:", error, item);
item.distance = "999.0";
}
}
});
positionList.value.sort((a, b) => {
return (parseFloat(a.distance) || 999) - (parseFloat(b.distance) || 999);
});
};
const loadPositionsByCenter = async (center) => {
try {
if (!common_vendor.index.getStorageSync("token")) {
await util_index.wxLogin();
}
const res = await common_vendor.index.request({
url: `${config_url.URL}/device/position/list`,
method: "GET",
header: {
"Authorization": "Bearer " + common_vendor.index.getStorageSync("token"),
"Clientid": common_vendor.index.getStorageSync("client_id")
}
});
if (res.statusCode === 200 && res.data.code === 200) {
positionList.value = res.data.rows || [];
calculateDistances(center);
const maxDistance = 10;
filteredPositions.value = positionList.value.filter((item) => {
return !item.distance || parseFloat(item.distance) <= maxDistance;
});
} else {
common_vendor.index.__f__("error", "at pages/index/index.vue:326", "根据地图中心加载场地失败:", res.data.msg);
positionList.value = [];
filteredPositions.value = [];
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/index/index.vue:331", "根据地图中心加载场地异常:", error);
}
};
const handleRelocate = async () => {
common_vendor.index.showLoading({ title: "定位中..." });
common_vendor.index.reLaunch({
url: "/pages/index/index"
});
};
const onMapCenterChange = (center) => {
loadPositionsByCenter(center);
};
const selectPosition = (position) => {
common_vendor.index.showActionSheet({
itemList: ["扫码使用", "导航前往"],
success: (res) => {
switch (res.tapIndex) {
case 0:
handleScan();
break;
case 1:
navigateToPosition(position);
break;
}
}
});
};
const selectPositionFromPopup = (position) => {
hideLocationList();
setTimeout(() => {
selectPosition(position);
}, 200);
};
const navigateToPosition = (position) => {
const latitude = parseFloat(position.latitude);
const longitude = parseFloat(position.longitude);
common_vendor.index.openLocation({
latitude,
longitude,
name: position.name,
address: position.location
});
};
const toggleSheet = () => {
isExpanded.value = !isExpanded.value;
};
const handleScan = async () => {
try {
const scanResult = await new Promise((resolve, reject) => {
common_vendor.index.scanCode({
@@ -14,7 +217,6 @@ const _sfc_main = {
fail: reject
});
});
common_vendor.index.__f__("log", "at pages/index/index.vue:152", scanResult.path);
let deviceNo = util_index.getQueryString(scanResult.path, "deviceNo");
if (!deviceNo) {
common_vendor.index.showToast({
@@ -27,7 +229,7 @@ const _sfc_main = {
await util_index.wxLogin();
}
const inUseRes = await common_vendor.index.request({
url: `${config_url.URL || "http://127.0.0.1:8080"}/app/order/inUse`,
url: `${config_url.URL}/app/order/inUse`,
method: "GET",
header: {
"Authorization": "Bearer " + common_vendor.index.getStorageSync("token"),
@@ -39,18 +241,16 @@ const _sfc_main = {
common_vendor.index.reLaunch({
url: `/pages/return/index?orderId=${inUseOrder.orderId}&deviceId=${deviceNo || inUseOrder.deviceNo}`
});
common_vendor.index.__f__("log", "at pages/index/index.vue:187", "已发起页面跳转");
return;
}
const orderRes = await common_vendor.index.request({
url: `${config_url.URL || "http://127.0.0.1:8080"}/app/order/unpaid`,
url: `${config_url.URL}/app/order/unpaid`,
method: "GET",
header: {
"Authorization": "Bearer " + common_vendor.index.getStorageSync("token"),
"Clientid": common_vendor.index.getStorageSync("client_id")
}
});
common_vendor.index.__f__("log", "at pages/index/index.vue:201", "待支付订单检查结果:", JSON.stringify(orderRes));
if (orderRes.statusCode == 200 && orderRes.data.code == 200 && orderRes.data.data) {
const unpaidOrder = orderRes.data.data;
common_vendor.index.navigateTo({
@@ -62,14 +262,12 @@ const _sfc_main = {
if (deviceInfoRes.code == 200 && deviceInfoRes.data && deviceInfoRes.data.device) {
const deviceInfo = deviceInfoRes.data.device;
if (deviceInfo.feeConfig) {
common_vendor.index.__f__("log", "at pages/index/index.vue:219", "获取到设备feeConfig信息:", deviceInfo.feeConfig);
try {
const feeConfig = JSON.parse(deviceInfo.feeConfig);
common_vendor.index.navigateTo({
url: `/pages/device/detail?deviceNo=${deviceNo}&feeConfig=${encodeURIComponent(deviceInfo.feeConfig)}`
});
} catch (e) {
common_vendor.index.__f__("error", "at pages/index/index.vue:230", "解析feeConfig失败:", e);
common_vendor.index.navigateTo({
url: `/pages/device/detail?deviceNo=${deviceNo}`
});
@@ -80,7 +278,6 @@ const _sfc_main = {
});
}
} else {
common_vendor.index.__f__("error", "at pages/index/index.vue:244", "获取设备信息失败:", deviceInfoRes.msg || "未知错误");
common_vendor.index.showToast({
title: "获取设备信息失败",
icon: "none"
@@ -90,38 +287,97 @@ const _sfc_main = {
});
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/index/index.vue:256", "获取设备信息异常:", error);
common_vendor.index.showToast({
title: "获取设备信息失败",
icon: "none"
});
common_vendor.index.__f__("error", "at pages/index/index.vue:492", "获取设备信息异常:", error);
common_vendor.index.navigateTo({
url: `/pages/device/detail?deviceNo=${deviceNo}`
});
}
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/index/index.vue:269", "扫码处理失败:", error);
common_vendor.index.__f__("error", "at pages/index/index.vue:499", "扫码处理失败:", error);
common_vendor.index.showToast({
title: "扫码失败",
icon: "none"
});
}
}
};
const showLocationList = () => {
showLocationPopup.value = true;
};
const hideLocationList = () => {
showLocationPopup.value = false;
};
const onGetPhoneNumber = (e) => {
if (e.detail.errMsg === "getPhoneNumber:ok") {
showPhoneAuthPopup.value = false;
}
};
return (_ctx, _cache) => {
return common_vendor.e({
a: !isLoading.value && userLocation.value
}, !isLoading.value && userLocation.value ? {
b: common_vendor.sr(mapRef, "1cf27b2a-0", {
"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({
userLocation: userLocation.value,
positionList: positionList.value,
filteredPositions: filteredPositions.value,
searchKeyword: searchKeyword.value
})
} : {}, {
i: isLoading.value || !userLocation.value
}, isLoading.value || !userLocation.value ? {} : {}, {
j: 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) => {
return common_vendor.e({
a: common_vendor.t(item.name),
b: common_vendor.t(item.describe),
c: common_vendor.t(item.location),
d: item.workTime && item.workTime !== "0"
}, item.workTime && item.workTime !== "0" ? {
e: common_vendor.t(item.workTime)
} : {}, {
f: item.distance
}, item.distance ? {
g: common_vendor.t(item.distance)
} : {}, {
h: common_vendor.t(item.status === "online" ? "营业中" : "暂停服务"),
i: common_vendor.n(item.status),
j: common_vendor.o(($event) => navigateToPosition(item), item.positionId),
k: item.positionId,
l: common_vendor.o(($event) => selectPositionFromPopup(item), item.positionId)
});
}),
q: common_assets._imports_0,
r: filteredPositions.value.length === 0 && !isLoading.value
}, filteredPositions.value.length === 0 && !isLoading.value ? {
s: common_assets._imports_0
} : {}, {
t: isExpanded.value ? 1 : ""
}) : {}, {
v: isLoading.value
}, isLoading.value ? {} : {}, {
w: 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)
} : {});
};
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_assets._imports_0,
b: common_assets._imports_1,
c: common_vendor.o((...args) => $options.handleScan && $options.handleScan(...args)),
d: _ctx.showPhoneAuthPopup
}, _ctx.showPhoneAuthPopup ? {
e: common_vendor.o(($event) => _ctx.showPhoneAuthPopup = false),
f: common_vendor.o((...args) => _ctx.onGetPhoneNumber && _ctx.onGetPhoneNumber(...args)),
g: common_vendor.o(($event) => _ctx.showPhoneAuthPopup = false)
} : {});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-1cf27b2a"]]);
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-1cf27b2a"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/index/index.js.map
+4 -2
View File
@@ -1,4 +1,6 @@
{
"navigationBarTitleText": "共享风扇",
"usingComponents": {}
"navigationBarTitleText": "附近场地",
"usingComponents": {
"map-component": "../../components/MapComponent"
}
}
+1 -1
View File
@@ -1 +1 @@
<view class="container data-v-1cf27b2a"><view class="header data-v-1cf27b2a"><view class="header-bg data-v-1cf27b2a"><view class="circle-decoration circle-1 data-v-1cf27b2a"></view><view class="circle-decoration circle-2 data-v-1cf27b2a"></view><view class="wave-decoration data-v-1cf27b2a"></view></view><view class="header-content data-v-1cf27b2a"><view class="brand-area data-v-1cf27b2a"><image class="brand-logo data-v-1cf27b2a" src="{{a}}" mode="aspectFit"></image><view class="brand-text data-v-1cf27b2a"><text class="title data-v-1cf27b2a">共享风扇</text><text class="subtitle data-v-1cf27b2a">随时随地,享受清凉</text></view></view><view class="header-info data-v-1cf27b2a"><view class="service-tag data-v-1cf27b2a"><text class="data-v-1cf27b2a">便捷租赁</text><text class="dot data-v-1cf27b2a">·</text><text class="data-v-1cf27b2a">品质保障</text></view></view></view></view><view class="scan-section data-v-1cf27b2a"><view class="scan-card data-v-1cf27b2a"><view class="scan-btn data-v-1cf27b2a" bindtap="{{c}}"><image class="scan-icon data-v-1cf27b2a" src="{{b}}" mode="aspectFit"/><text class="scan-text data-v-1cf27b2a">扫码使用</text></view><view class="scan-desc data-v-1cf27b2a"><text class="data-v-1cf27b2a">扫描设备二维码即可使用或归还</text></view></view></view><view class="price-card data-v-1cf27b2a"><view class="card-header data-v-1cf27b2a"><text class="card-title data-v-1cf27b2a">收费规则</text></view><view class="price-rules data-v-1cf27b2a"><view class="price-item data-v-1cf27b2a"><view class="price-tag data-v-1cf27b2a">5.0<text class="unit data-v-1cf27b2a">元/小时</text></view></view><view class="divider data-v-1cf27b2a"></view><view class="rule-list data-v-1cf27b2a"><view class="rule-item data-v-1cf27b2a"><view class="rule-dot data-v-1cf27b2a"></view><text class="data-v-1cf27b2a">不足1小时按1小时计费</text></view><view class="rule-item data-v-1cf27b2a"><view class="rule-dot data-v-1cf27b2a"></view><text class="data-v-1cf27b2a">封顶99元,计费达99元视为买断</text></view></view></view></view><view class="usage-steps data-v-1cf27b2a"><view class="steps-header data-v-1cf27b2a"><text class="steps-title data-v-1cf27b2a">使用流程</text></view><view class="steps-container data-v-1cf27b2a"><view class="step-item data-v-1cf27b2a"><view class="step-icon data-v-1cf27b2a"><text class="step-number data-v-1cf27b2a">1</text></view><text class="step-text data-v-1cf27b2a">扫码弹出</text></view><view class="step-arrow data-v-1cf27b2a"></view><view class="step-item data-v-1cf27b2a"><view class="step-icon data-v-1cf27b2a"><text class="step-number data-v-1cf27b2a">2</text></view><text class="step-text data-v-1cf27b2a">使用风扇</text></view><view class="step-arrow data-v-1cf27b2a"></view><view class="step-item data-v-1cf27b2a"><view class="step-icon data-v-1cf27b2a"><text class="step-number data-v-1cf27b2a">3</text></view><text class="step-text data-v-1cf27b2a">插入归还</text></view><view class="step-arrow data-v-1cf27b2a"></view><view class="step-item data-v-1cf27b2a"><view class="step-icon data-v-1cf27b2a"><text class="step-number data-v-1cf27b2a">4</text></view><text class="step-text data-v-1cf27b2a">结束订单</text></view></view></view><view wx:if="{{d}}" class="phone-auth-popup data-v-1cf27b2a"><view class="popup-mask data-v-1cf27b2a" catchtap="{{e}}"></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="{{f}}"><text class="data-v-1cf27b2a">一键获取手机号</text></button><view class="auth-cancel data-v-1cf27b2a" bindtap="{{g}}"><text class="data-v-1cf27b2a">暂不授权</text></view></view></view></view></view>
<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>
+329 -286
View File
@@ -24,332 +24,375 @@
/* 透明度 */
/* 文章场景相关 */
.container.data-v-1cf27b2a {
min-height: 100vh;
height: 100%;
width: 100%;
background-color: #f6f7fb;
padding-bottom: 40rpx;
display: flex;
flex-direction: column;
}
/* 顶部区域 */
.header.data-v-1cf27b2a {
height: 300rpx;
background: linear-gradient(135deg, #1E88E5, #29B6F6);
/* 顶部搜索栏 */
.header-search.data-v-1cf27b2a {
padding: 20rpx 30rpx;
background: #ffffff;
border-bottom: 1px solid #f0f0f0;
z-index: 10;
}
.header-search .search-box.data-v-1cf27b2a {
display: flex;
align-items: center;
background: #f8f9fa;
border-radius: 50rpx;
padding: 0 20rpx;
height: 80rpx;
}
.header-search .search-box .search-icon.data-v-1cf27b2a {
width: 32rpx;
height: 32rpx;
margin-right: 16rpx;
}
.header-search .search-box .search-input.data-v-1cf27b2a {
flex: 1;
font-size: 28rpx;
color: #333;
}
.header-search .search-box .location-btn.data-v-1cf27b2a {
width: 60rpx;
height: 60rpx;
display: flex;
align-items: center;
justify-content: center;
background: #2196F3;
border-radius: 50%;
margin-left: 16rpx;
}
.header-search .search-box .location-btn .location-icon.data-v-1cf27b2a {
width: 24rpx;
height: 24rpx;
}
/* 场地列表弹窗 */
.location-popup.data-v-1cf27b2a {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 2000;
display: flex;
align-items: flex-end;
justify-content: center;
}
.location-popup .popup-mask.data-v-1cf27b2a {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
}
.location-popup .location-sheet.data-v-1cf27b2a {
background: #ffffff;
border-radius: 32rpx 32rpx 0 0;
box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.1);
max-height: 70vh;
transition: all 0.3s ease;
z-index: 1;
position: relative;
width: 100%;
display: flex;
flex-direction: column;
animation: slideUp-1cf27b2a 0.3s ease-out;
}
.location-popup .location-sheet.expanded.data-v-1cf27b2a {
max-height: 85vh;
}
.location-popup .location-sheet .sheet-handle.data-v-1cf27b2a {
display: flex;
justify-content: center;
padding: 20rpx 0;
cursor: pointer;
}
.location-popup .location-sheet .sheet-handle .handle-bar.data-v-1cf27b2a {
width: 80rpx;
height: 8rpx;
background: #e0e0e0;
border-radius: 4rpx;
}
.location-popup .location-sheet .sheet-header.data-v-1cf27b2a {
padding: 0 30rpx 20rpx;
border-bottom: 1px solid #f0f0f0;
display: flex;
justify-content: space-between;
align-items: center;
}
.location-popup .location-sheet .sheet-header .sheet-title.data-v-1cf27b2a {
font-size: 32rpx;
font-weight: 600;
color: #333;
}
.location-popup .location-sheet .sheet-header .close-btn.data-v-1cf27b2a {
width: 60rpx;
height: 60rpx;
display: flex;
align-items: center;
justify-content: center;
background: #f0f0f0;
border-radius: 50%;
transition: all 0.2s ease;
}
.location-popup .location-sheet .sheet-header .close-btn.data-v-1cf27b2a:active {
background: #e0e0e0;
transform: scale(0.95);
}
.location-popup .location-sheet .sheet-header .close-btn .close-icon.data-v-1cf27b2a {
width: 24rpx;
height: 24rpx;
}
.location-popup .location-sheet .sheet-content.data-v-1cf27b2a {
flex: 1;
padding: 20rpx 0;
overflow: hidden;
}
.header .header-bg.data-v-1cf27b2a {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 1;
@keyframes slideUp-1cf27b2a {
from {
transform: translateY(100%);
}
.header .header-bg .circle-decoration.data-v-1cf27b2a {
position: absolute;
border-radius: 50%;
background: rgba(255, 255, 255, 0.1);
to {
transform: translateY(0);
}
.header .header-bg .circle-1.data-v-1cf27b2a {
width: 240rpx;
height: 240rpx;
right: -60rpx;
top: -90rpx;
}
.header .header-bg .circle-2.data-v-1cf27b2a {
width: 160rpx;
height: 160rpx;
left: -40rpx;
bottom: 30rpx;
background: rgba(255, 255, 255, 0.08);
}
.header .header-bg .wave-decoration.data-v-1cf27b2a {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 40rpx;
background-size: auto 100%;
opacity: 0.6;
}
.header .header-content.data-v-1cf27b2a {
position: relative;
z-index: 2;
padding: 40rpx 40rpx 0;
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.header .header-content .brand-area.data-v-1cf27b2a {
/* 场地列表项 */
.position-item.data-v-1cf27b2a {
display: flex;
align-items: center;
padding: 24rpx 30rpx;
border-bottom: 1px solid #f8f9fa;
}
.header .header-content .brand-area .brand-logo.data-v-1cf27b2a {
width: 90rpx;
height: 90rpx;
margin-right: 20rpx;
.position-item .position-info.data-v-1cf27b2a {
flex: 1;
}
.header .header-content .brand-area .brand-text.data-v-1cf27b2a {
display: flex;
flex-direction: column;
.position-item .position-info .position-name.data-v-1cf27b2a {
font-size: 32rpx;
font-weight: 500;
color: #333;
margin-bottom: 8rpx;
}
.header .header-content .brand-area .brand-text .title.data-v-1cf27b2a {
font-size: 48rpx;
color: #ffffff;
font-weight: bold;
line-height: 1.2;
text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.1);
.position-item .position-info .position-desc.data-v-1cf27b2a {
font-size: 26rpx;
color: #666;
margin-bottom: 8rpx;
}
.header .header-content .brand-area .brand-text .subtitle.data-v-1cf27b2a {
font-size: 28rpx;
color: rgba(255, 255, 255, 0.9);
}
.header .header-content .header-info.data-v-1cf27b2a {
display: flex;
flex-wrap: wrap;
gap: 20rpx;
margin-bottom: 30rpx;
}
.header .header-content .header-info .service-tag.data-v-1cf27b2a {
.position-item .position-info .position-location.data-v-1cf27b2a {
display: flex;
align-items: center;
background: rgba(255, 255, 255, 0.2);
border-radius: 40rpx;
padding: 10rpx 20rpx;
margin-bottom: 8rpx;
}
.header .header-content .header-info .service-tag text.data-v-1cf27b2a {
.position-item .position-info .position-location .location-icon-small.data-v-1cf27b2a {
width: 24rpx;
height: 24rpx;
margin-right: 8rpx;
}
.position-item .position-info .position-location text.data-v-1cf27b2a {
font-size: 24rpx;
color: #999;
}
.position-item .position-info .position-time.data-v-1cf27b2a {
font-size: 24rpx;
color: #999;
}
.position-item .position-actions.data-v-1cf27b2a {
display: flex;
flex-direction: column;
align-items: flex-end;
gap: 8rpx;
}
.position-item .position-actions .distance-info.data-v-1cf27b2a {
font-size: 24rpx;
color: #2196F3;
font-weight: 500;
}
.position-item .position-actions .status-tag.data-v-1cf27b2a {
padding: 8rpx 16rpx;
border-radius: 20rpx;
font-size: 22rpx;
}
.position-item .position-actions .status-tag.online.data-v-1cf27b2a {
background: #e8f5e8;
color: #4caf50;
}
.position-item .position-actions .status-tag.offline.data-v-1cf27b2a {
background: #ffeaea;
color: #f44336;
}
.position-item .position-actions .nav-btn.data-v-1cf27b2a {
padding: 12rpx 20rpx;
background: #2196F3;
border-radius: 20rpx;
font-size: 24rpx;
color: #ffffff;
}
.header .header-content .header-info .service-tag .dot.data-v-1cf27b2a {
margin: 0 8rpx;
font-weight: bold;
}
/* 扫码区域 */
.scan-section.data-v-1cf27b2a {
padding: 0 30rpx;
}
.scan-section .scan-card.data-v-1cf27b2a {
background: #ffffff;
border-radius: 16rpx;
box-shadow: 0 10rpx 30rpx rgba(0, 0, 0, 0.05);
padding: 36rpx 0;
display: flex;
flex-direction: column;
align-items: center;
}
.scan-section .scan-card .scan-btn.data-v-1cf27b2a {
width: 220rpx;
height: 220rpx;
background: linear-gradient(135deg, #00B0FF, #0091EA);
border-radius: 50%;
/* 空状态 */
.empty-state.data-v-1cf27b2a {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 80rpx 0;
}
.empty-state .empty-icon.data-v-1cf27b2a {
width: 120rpx;
height: 120rpx;
margin-bottom: 24rpx;
box-shadow: 0 10rpx 20rpx rgba(0, 176, 255, 0.2);
position: relative;
transition: all 0.2s ease;
opacity: 0.5;
}
.scan-section .scan-card .scan-btn.data-v-1cf27b2a:active {
transform: scale(0.96);
}
.scan-section .scan-card .scan-btn .scan-icon.data-v-1cf27b2a {
width: 80rpx;
height: 80rpx;
margin-bottom: 12rpx;
}
.scan-section .scan-card .scan-btn .scan-text.data-v-1cf27b2a {
font-size: 36rpx;
color: #ffffff;
font-weight: 500;
}
.scan-section .scan-card .scan-desc.data-v-1cf27b2a {
.empty-state .empty-text.data-v-1cf27b2a {
font-size: 28rpx;
color: #666;
color: #999;
}
/* 收费规则卡片 */
.price-card.data-v-1cf27b2a {
margin: 30rpx;
background: #ffffff;
border-radius: 16rpx;
overflow: hidden;
box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.04);
/* 微信免押金区域 */
}
.price-card .card-header.data-v-1cf27b2a {
padding: 24rpx 30rpx;
background: linear-gradient(to right, #f5f9ff, #ffffff);
border-bottom: 2rpx solid #f0f0f0;
}
.price-card .card-header .card-title.data-v-1cf27b2a {
font-size: 32rpx;
font-weight: 600;
color: #333;
position: relative;
padding-left: 20rpx;
}
.price-card .card-header .card-title.data-v-1cf27b2a::before {
content: "";
position: absolute;
/* 加载状态 */
.loading-overlay.data-v-1cf27b2a {
position: fixed;
top: 0;
left: 0;
top: 50%;
transform: translateY(-50%);
width: 6rpx;
height: 28rpx;
background: #2196F3;
border-radius: 3rpx;
}
.price-card .deposit-free.data-v-1cf27b2a {
margin: 20rpx 30rpx 0;
padding: 12rpx 16rpx;
background: #f0f9ff;
border-radius: 8rpx;
border-left: 4rpx solid #03A9F4;
display: flex;
align-items: center;
}
.price-card .deposit-free .deposit-icon.data-v-1cf27b2a {
width: 40rpx;
height: 40rpx;
margin-right: 16rpx;
}
.price-card .deposit-free .deposit-text.data-v-1cf27b2a {
font-size: 26rpx;
color: #03A9F4;
font-weight: 500;
}
.price-card .price-rules.data-v-1cf27b2a {
padding: 20rpx 30rpx 30rpx;
}
.price-card .price-rules .price-item.data-v-1cf27b2a {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 20rpx;
}
.price-card .price-rules .price-item .price-tag.data-v-1cf27b2a {
font-size: 60rpx;
color: #FF6E00;
font-weight: bold;
line-height: 1;
}
.price-card .price-rules .price-item .price-tag .unit.data-v-1cf27b2a {
font-size: 32rpx;
font-weight: normal;
margin-left: 4rpx;
}
.price-card .price-rules .price-item .price-desc.data-v-1cf27b2a {
font-size: 28rpx;
color: #666;
margin-top: 10rpx;
}
.price-card .price-rules .divider.data-v-1cf27b2a {
height: 2rpx;
background-color: #f0f0f0;
margin: 20rpx 0 30rpx;
}
.price-card .price-rules .rule-list .rule-item.data-v-1cf27b2a {
display: flex;
align-items: flex-start;
margin-bottom: 20rpx;
}
.price-card .price-rules .rule-list .rule-item.data-v-1cf27b2a:last-child {
margin-bottom: 0;
}
.price-card .price-rules .rule-list .rule-item .rule-dot.data-v-1cf27b2a {
width: 12rpx;
height: 12rpx;
background: #2196F3;
border-radius: 50%;
margin: 12rpx 16rpx 0 0;
flex-shrink: 0;
}
.price-card .price-rules .rule-list .rule-item text.data-v-1cf27b2a {
font-size: 28rpx;
color: #666;
line-height: 1.5;
}
/* 使用流程 */
.usage-steps.data-v-1cf27b2a {
margin: 0 30rpx;
background: #ffffff;
border-radius: 16rpx;
box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.04);
overflow: hidden;
}
.usage-steps .steps-header.data-v-1cf27b2a {
padding: 24rpx 30rpx;
background: linear-gradient(to right, #f5f9ff, #ffffff);
border-bottom: 2rpx solid #f0f0f0;
}
.usage-steps .steps-header .steps-title.data-v-1cf27b2a {
font-size: 32rpx;
font-weight: 600;
color: #333;
position: relative;
padding-left: 20rpx;
}
.usage-steps .steps-header .steps-title.data-v-1cf27b2a::before {
content: "";
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
width: 6rpx;
height: 28rpx;
background: #2196F3;
border-radius: 3rpx;
}
.usage-steps .steps-container.data-v-1cf27b2a {
padding: 40rpx 30rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.usage-steps .steps-container .step-item.data-v-1cf27b2a {
display: flex;
flex-direction: column;
align-items: center;
flex: 1;
}
.usage-steps .steps-container .step-item .step-icon.data-v-1cf27b2a {
width: 80rpx;
height: 80rpx;
background: #f0f9ff;
border: 2rpx solid #e1f5fe;
border-radius: 50%;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 16rpx;
z-index: 1000;
}
.usage-steps .steps-container .step-item .step-icon .step-number.data-v-1cf27b2a {
font-size: 36rpx;
color: #2196F3;
font-weight: 600;
.loading-overlay .loading-content.data-v-1cf27b2a {
background: #ffffff;
border-radius: 16rpx;
padding: 40rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.usage-steps .steps-container .step-item .step-text.data-v-1cf27b2a {
font-size: 26rpx;
.loading-overlay .loading-content .loading-spinner.data-v-1cf27b2a {
width: 60rpx;
height: 60rpx;
border: 4rpx solid #f0f0f0;
border-top: 4rpx solid #2196F3;
border-radius: 50%;
animation: spin-1cf27b2a 1s linear infinite;
margin-bottom: 24rpx;
}
.loading-overlay .loading-content text.data-v-1cf27b2a {
font-size: 28rpx;
color: #666;
}
.usage-steps .steps-container .step-arrow.data-v-1cf27b2a {
width: 40rpx;
height: 4rpx;
background: #e1f5fe;
position: relative;
@keyframes spin-1cf27b2a {
0% {
transform: rotate(0deg);
}
.usage-steps .steps-container .step-arrow.data-v-1cf27b2a::after {
content: "";
100% {
transform: rotate(360deg);
}
}
/* 地图加载状态 */
.map-loading-placeholder.data-v-1cf27b2a {
position: absolute;
top: 0;
left: 0;
right: 0;
top: 50%;
margin-top: -8rpx;
border-left: 12rpx solid #e1f5fe;
border-top: 8rpx solid transparent;
border-bottom: 8rpx solid transparent;
bottom: 0;
background: #f6f7fb;
display: flex;
align-items: center;
justify-content: center;
z-index: 100;
}
.map-loading-placeholder .loading-content.data-v-1cf27b2a {
background: #ffffff;
border-radius: 16rpx;
padding: 40rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.map-loading-placeholder .loading-content .loading-spinner.data-v-1cf27b2a {
width: 60rpx;
height: 60rpx;
border: 4rpx solid #f0f0f0;
border-top: 4rpx solid #2196F3;
border-radius: 50%;
animation: spin-1cf27b2a 1s linear infinite;
margin-bottom: 24rpx;
}
.map-loading-placeholder .loading-content text.data-v-1cf27b2a {
font-size: 28rpx;
color: #666;
}
/* 手机号授权弹窗 */
.phone-auth-popup.data-v-1cf27b2a {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 2000;
display: flex;
align-items: center;
justify-content: center;
}
.phone-auth-popup .popup-mask.data-v-1cf27b2a {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
}
.phone-auth-popup .popup-content.data-v-1cf27b2a {
background: #ffffff;
border-radius: 24rpx;
margin: 0 60rpx;
padding: 40rpx;
position: relative;
z-index: 1;
}
.phone-auth-popup .popup-content .popup-header.data-v-1cf27b2a {
text-align: center;
margin-bottom: 30rpx;
}
.phone-auth-popup .popup-content .popup-header .popup-title.data-v-1cf27b2a {
font-size: 36rpx;
font-weight: 600;
color: #333;
}
.phone-auth-popup .popup-content .popup-body .auth-desc.data-v-1cf27b2a {
text-align: center;
margin-bottom: 40rpx;
}
.phone-auth-popup .popup-content .popup-body .auth-desc text.data-v-1cf27b2a {
font-size: 28rpx;
color: #666;
line-height: 1.6;
}
.phone-auth-popup .popup-content .popup-body .auth-btn.data-v-1cf27b2a {
width: 100%;
height: 88rpx;
background: #2196F3;
border-radius: 44rpx;
border: none;
color: #ffffff;
font-size: 32rpx;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 20rpx;
}
.phone-auth-popup .popup-content .popup-body .auth-cancel.data-v-1cf27b2a {
text-align: center;
padding: 20rpx;
}
.phone-auth-popup .popup-content .popup-body .auth-cancel text.data-v-1cf27b2a {
font-size: 28rpx;
color: #999;
}
+1 -1
View File
@@ -95,7 +95,7 @@ const _sfc_main = {
i: common_vendor.o(handleUserProfileClick),
j: common_vendor.t(deposit.value),
k: common_vendor.o(handleWithdraw),
l: common_assets._imports_1$1,
l: common_assets._imports_1,
m: common_vendor.p({
type: "right",
size: "16",