style:修改页面样式
This commit is contained in:
+5
-4
@@ -295,12 +295,13 @@ const _sfc_main = {
|
||||
j: hasActiveOrder.value ? 1 : "",
|
||||
k: common_vendor.o(($event) => handleRent("wx-score-pay")),
|
||||
l: common_assets._imports_0$2,
|
||||
m: showPhoneAuthPopup.value
|
||||
m: common_vendor.o(($event) => handleRent("wx-pay")),
|
||||
n: showPhoneAuthPopup.value
|
||||
}, showPhoneAuthPopup.value ? {
|
||||
n: common_vendor.o(() => {
|
||||
o: common_vendor.o(() => {
|
||||
}),
|
||||
o: common_vendor.o(onGetPhoneNumber),
|
||||
p: common_vendor.o(($event) => showPhoneAuthPopup.value = false)
|
||||
p: common_vendor.o(onGetPhoneNumber),
|
||||
q: common_vendor.o(($event) => showPhoneAuthPopup.value = false)
|
||||
} : {});
|
||||
};
|
||||
}
|
||||
|
||||
+1
-1
@@ -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">¥5.00</text><text class="unit data-v-d65de3a7">/小时</text></view><text class="cap-price data-v-d65de3a7">封顶 ¥99</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', j && 'return-button']}}" bindtap="{{k}}"><text class="data-v-d65de3a7">{{i}}</text></button><view class="wechat-credit data-v-d65de3a7"><image src="{{l}}" 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="{{m}}" class="phone-auth-popup data-v-d65de3a7"><view class="popup-mask data-v-d65de3a7" catchtap="{{n}}"></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="{{o}}"> 一键获取手机号 </button><view class="auth-cancel data-v-d65de3a7" bindtap="{{p}}"><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 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">¥5.00</text><text class="unit data-v-d65de3a7">/小时</text></view><text class="cap-price data-v-d65de3a7">封顶 ¥99</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', j && 'return-button']}}" bindtap="{{k}}"><text class="data-v-d65de3a7">{{i}}</text></button><view class="wechat-credit data-v-d65de3a7"><image src="{{l}}" 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 class=" data-v-d65de3a7" style="align-items:center;align-content:center;text-align:center;line-height:50rpx" bindtap="{{m}}"> 无法免押点这里></view></view><view wx:if="{{n}}" class="phone-auth-popup data-v-d65de3a7"><view class="popup-mask data-v-d65de3a7" catchtap="{{o}}"></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="{{p}}"> 一键获取手机号 </button><view class="auth-cancel data-v-d65de3a7" bindtap="{{q}}"><text class="data-v-d65de3a7">暂不授权</text></view></view></view></view></view>
|
||||
+6
-1
@@ -67,6 +67,11 @@ const _sfc_main = {
|
||||
isPopupVisible.value = true;
|
||||
}
|
||||
};
|
||||
function maskPhone(phone) {
|
||||
if (!phone)
|
||||
return "";
|
||||
return phone.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2");
|
||||
}
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: userInfo.value.avatar
|
||||
@@ -80,7 +85,7 @@ const _sfc_main = {
|
||||
e: userInfo.value
|
||||
}, userInfo.value ? {
|
||||
f: common_vendor.t(userInfo.value.nickName),
|
||||
g: common_vendor.t(userInfo.value.phone || "未绑定手机号")
|
||||
g: common_vendor.t(userInfo.value.phone ? maskPhone(userInfo.value.phone) : "未绑定手机号")
|
||||
} : {}, {
|
||||
h: common_vendor.p({
|
||||
type: "right",
|
||||
|
||||
+19
-133
@@ -11,7 +11,7 @@ const _sfc_main = {
|
||||
const status = orderInfo.value.orderStatus;
|
||||
switch (status) {
|
||||
case "waiting_for_payment":
|
||||
return "等待支付";
|
||||
return "待支付";
|
||||
case "in_used":
|
||||
return "使用中";
|
||||
case "used_done":
|
||||
@@ -19,47 +19,7 @@ const _sfc_main = {
|
||||
case "order_cancelled":
|
||||
return "已取消";
|
||||
default:
|
||||
return "未知状态";
|
||||
}
|
||||
});
|
||||
const orderStatusClass = common_vendor.computed(() => {
|
||||
const status = orderInfo.value.orderStatus;
|
||||
switch (status) {
|
||||
case "waiting_for_payment":
|
||||
return "status-waiting";
|
||||
case "in_used":
|
||||
return "status-using";
|
||||
case "used_done":
|
||||
return "status-finished";
|
||||
case "order_cancelled":
|
||||
return "status-cancelled";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
});
|
||||
const orderStatusDesc = common_vendor.computed(() => {
|
||||
const status = orderInfo.value.orderStatus;
|
||||
switch (status) {
|
||||
case "waiting_for_payment":
|
||||
return "请在15分钟内完成支付";
|
||||
case "in_used":
|
||||
return "设备正在使用中";
|
||||
case "used_done":
|
||||
return "感谢您的使用";
|
||||
case "order_cancelled":
|
||||
return "该订单已取消";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
});
|
||||
common_vendor.computed(() => {
|
||||
const payWay = orderInfo.value.payWay;
|
||||
if (payWay === "wx_score_pay") {
|
||||
return "微信支付分 (免押金)";
|
||||
} else if (payWay === "wx_pay") {
|
||||
return "微信支付";
|
||||
} else {
|
||||
return "押金支付";
|
||||
return "使用中";
|
||||
}
|
||||
});
|
||||
common_vendor.onLoad(async (options) => {
|
||||
@@ -78,9 +38,7 @@ const _sfc_main = {
|
||||
});
|
||||
const loadOrderDetails = async () => {
|
||||
try {
|
||||
common_vendor.index.showLoading({
|
||||
title: "加载中"
|
||||
});
|
||||
common_vendor.index.showLoading({ title: "加载中" });
|
||||
const res = await config_user.queryById(orderId.value);
|
||||
if (res.code === 200 && res.data) {
|
||||
orderInfo.value = res.data;
|
||||
@@ -125,106 +83,34 @@ const _sfc_main = {
|
||||
return remainingMins > 0 ? `${hours}小时${remainingMins}分钟` : `${hours}小时`;
|
||||
}
|
||||
};
|
||||
const handleCancelOrder = () => {
|
||||
common_vendor.index.showModal({
|
||||
title: "确认取消",
|
||||
content: "确定要取消此订单吗?",
|
||||
success: async (res) => {
|
||||
if (res.confirm) {
|
||||
try {
|
||||
common_vendor.index.showLoading({ title: "处理中" });
|
||||
const result = await config_user.cancelOrder({
|
||||
orderId: orderId.value
|
||||
});
|
||||
if (result.code === 200) {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.showToast({
|
||||
title: "订单已取消",
|
||||
icon: "success"
|
||||
});
|
||||
await loadOrderDetails();
|
||||
} else {
|
||||
throw new Error(result.msg || "取消订单失败");
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.showToast({
|
||||
title: error.message || "取消订单失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
const handlePayment = async () => {
|
||||
try {
|
||||
common_vendor.index.showLoading({
|
||||
title: "处理中"
|
||||
});
|
||||
const res = await config_user.confirmPaymentAndRent(orderId.value);
|
||||
if (res.code === 200) {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.showToast({
|
||||
title: "支付成功",
|
||||
icon: "success"
|
||||
});
|
||||
await loadOrderDetails();
|
||||
} else {
|
||||
throw new Error(res.msg || "支付失败");
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.showToast({
|
||||
title: error.message || "支付失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
};
|
||||
const navigateToReturn = () => {
|
||||
common_vendor.index.navigateTo({
|
||||
url: `/pages/return/index?deviceId=${orderInfo.value.deviceNo}&orderId=${orderId.value}`
|
||||
});
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.n(orderStatusClass.value),
|
||||
b: common_vendor.t(orderStatusText.value),
|
||||
c: common_vendor.t(orderStatusDesc.value),
|
||||
d: common_vendor.t(orderInfo.value.orderNo || "-"),
|
||||
e: common_vendor.t(orderInfo.value.deviceNo || "-"),
|
||||
f: orderInfo.value.payWay === "wx_score_pay"
|
||||
a: common_vendor.t(orderStatusText.value),
|
||||
b: common_vendor.t(orderInfo.value.orderNo || "-"),
|
||||
c: common_vendor.t(orderInfo.value.deviceNo || "-"),
|
||||
d: orderInfo.value.payWay === "wx_score_pay"
|
||||
}, orderInfo.value.payWay === "wx_score_pay" ? {
|
||||
g: common_assets._imports_0$2
|
||||
e: common_assets._imports_0$2
|
||||
} : {}, {
|
||||
h: common_vendor.t(orderInfo.value.createTime || "-"),
|
||||
i: common_vendor.t(orderInfo.value.startTime || "-"),
|
||||
j: orderInfo.value.endTime
|
||||
f: common_vendor.t(orderInfo.value.startTime || "-"),
|
||||
g: orderInfo.value.endTime
|
||||
}, orderInfo.value.endTime ? {
|
||||
k: common_vendor.t(orderInfo.value.endTime)
|
||||
h: common_vendor.t(orderInfo.value.endTime)
|
||||
} : {}, {
|
||||
l: orderInfo.value.phone
|
||||
i: orderInfo.value.phone
|
||||
}, orderInfo.value.phone ? {
|
||||
m: common_vendor.t(orderInfo.value.phone)
|
||||
j: common_vendor.t(orderInfo.value.phone)
|
||||
} : {}, {
|
||||
n: orderInfo.value.depositAmount
|
||||
k: orderInfo.value.depositAmount
|
||||
}, orderInfo.value.depositAmount ? {
|
||||
o: common_vendor.t(orderInfo.value.depositAmount)
|
||||
l: common_vendor.t(orderInfo.value.depositAmount)
|
||||
} : {}, {
|
||||
p: orderInfo.value.packageTime && orderInfo.value.packagePrice
|
||||
m: orderInfo.value.packageTime && orderInfo.value.packagePrice
|
||||
}, orderInfo.value.packageTime && orderInfo.value.packagePrice ? {
|
||||
q: common_vendor.t(orderInfo.value.packagePrice),
|
||||
r: common_vendor.t(formatTime(orderInfo.value.packageTime))
|
||||
n: common_vendor.t(orderInfo.value.packagePrice),
|
||||
o: common_vendor.t(formatTime(orderInfo.value.packageTime))
|
||||
} : {}, {
|
||||
s: common_vendor.t(orderInfo.value.payAmount || 0),
|
||||
t: orderInfo.value.orderStatus === "waiting_for_payment"
|
||||
}, orderInfo.value.orderStatus === "waiting_for_payment" ? {
|
||||
v: common_vendor.o(handleCancelOrder),
|
||||
w: common_vendor.o(handlePayment)
|
||||
} : orderInfo.value.orderStatus === "in_used" ? {
|
||||
y: common_vendor.o(navigateToReturn)
|
||||
} : {}, {
|
||||
x: orderInfo.value.orderStatus === "in_used"
|
||||
p: common_vendor.t(orderInfo.value.payAmount || 0)
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
<view class="details-container data-v-2b5cbeae"><view class="status-card data-v-2b5cbeae"><view class="{{['status-icon', 'data-v-2b5cbeae', a]}}"></view><view class="status-text data-v-2b5cbeae">{{b}}</view><view class="status-desc data-v-2b5cbeae">{{c}}</view></view><view class="info-card data-v-2b5cbeae"><view class="card-title data-v-2b5cbeae">订单信息</view><view class="info-item data-v-2b5cbeae"><text class="label data-v-2b5cbeae">订单号</text><text class="value data-v-2b5cbeae">{{d}}</text></view><view class="info-item data-v-2b5cbeae"><text class="label data-v-2b5cbeae">设备号</text><text class="value data-v-2b5cbeae">{{e}}</text></view><view class="info-item data-v-2b5cbeae"><text class="label data-v-2b5cbeae">租借方式</text><view class="value payment-method data-v-2b5cbeae"><view wx:if="{{f}}" class="payment-badge wx-score data-v-2b5cbeae"><image src="{{g}}" mode="aspectFit" class="badge-icon data-v-2b5cbeae"></image><view class="badge-text data-v-2b5cbeae"><text class="data-v-2b5cbeae">微信支付分</text><text class="divider data-v-2b5cbeae">|</text><text class="highlight data-v-2b5cbeae">免押租借</text></view></view><view wx:else class="payment-badge deposit data-v-2b5cbeae"><text class="badge-text data-v-2b5cbeae">押金租借</text></view></view></view><view class="info-item data-v-2b5cbeae"><text class="label data-v-2b5cbeae">创建时间</text><text class="value data-v-2b5cbeae">{{h}}</text></view><view class="info-item data-v-2b5cbeae"><text class="label data-v-2b5cbeae">开始时间</text><text class="value data-v-2b5cbeae">{{i}}</text></view><view wx:if="{{j}}" class="info-item data-v-2b5cbeae"><text class="label data-v-2b5cbeae">结束时间</text><text class="value data-v-2b5cbeae">{{k}}</text></view><view wx:if="{{l}}" class="info-item data-v-2b5cbeae"><text class="label data-v-2b5cbeae">联系电话</text><text class="value data-v-2b5cbeae">{{m}}</text></view></view><view class="info-card data-v-2b5cbeae"><view class="card-title data-v-2b5cbeae">费用信息</view><view wx:if="{{n}}" class="info-item data-v-2b5cbeae"><text class="label data-v-2b5cbeae">押金</text><text class="value data-v-2b5cbeae">¥{{o}}</text></view><view wx:if="{{p}}" class="info-item data-v-2b5cbeae"><text class="label data-v-2b5cbeae">套餐</text><text class="value data-v-2b5cbeae">¥{{q}}元 / {{r}}</text></view><view class="info-item total data-v-2b5cbeae"><text class="label data-v-2b5cbeae">合计</text><text class="value data-v-2b5cbeae">¥{{s}}</text></view></view><view wx:if="{{t}}" class="action-buttons data-v-2b5cbeae"><view class="btn cancel data-v-2b5cbeae" bindtap="{{v}}">取消订单</view><view class="btn primary data-v-2b5cbeae" bindtap="{{w}}">立即支付</view></view><view wx:elif="{{x}}" class="action-buttons data-v-2b5cbeae"><view class="btn primary data-v-2b5cbeae" bindtap="{{y}}">归还设备</view></view></view>
|
||||
<view class="return-container data-v-2b5cbeae"><view class="order-card data-v-2b5cbeae"><view class="order-header data-v-2b5cbeae"><text class="title data-v-2b5cbeae">{{a}}</text><text class="order-no data-v-2b5cbeae">订单号:{{b}}</text></view><view class="device-info data-v-2b5cbeae"><view class="device-left data-v-2b5cbeae"><view class="device-name data-v-2b5cbeae">共享风扇</view><view class="device-id data-v-2b5cbeae">设备号:{{c}}</view></view><view class="device-right data-v-2b5cbeae"><view wx:if="{{d}}" class="payment-badge wx-score data-v-2b5cbeae"><image src="{{e}}" mode="aspectFit" class="badge-icon data-v-2b5cbeae"></image><view class="badge-text data-v-2b5cbeae"><text class="data-v-2b5cbeae">微信支付分</text><text class="divider data-v-2b5cbeae">|</text><text class="highlight data-v-2b5cbeae">免押租借</text></view></view><view wx:else class="payment-badge deposit data-v-2b5cbeae"><text class="badge-text data-v-2b5cbeae">押金租借</text></view></view></view><view class="time-info data-v-2b5cbeae"><view class="time-item data-v-2b5cbeae"><text class="label data-v-2b5cbeae">开始时间</text><text class="value data-v-2b5cbeae">{{f}}</text></view><view wx:if="{{g}}" class="time-item data-v-2b5cbeae"><text class="label data-v-2b5cbeae">结束时间</text><text class="value data-v-2b5cbeae">{{h}}</text></view><view wx:if="{{i}}" class="time-item data-v-2b5cbeae"><text class="label data-v-2b5cbeae">联系电话</text><text class="value data-v-2b5cbeae">{{j}}</text></view></view></view><view class="notice-card data-v-2b5cbeae"><view class="notice-title data-v-2b5cbeae">费用信息</view><view class="notice-list data-v-2b5cbeae"><view wx:if="{{k}}" class="notice-item data-v-2b5cbeae"><view class="dot data-v-2b5cbeae"></view><text class="data-v-2b5cbeae">押金:¥{{l}}</text></view><view wx:if="{{m}}" class="notice-item data-v-2b5cbeae"><view class="dot data-v-2b5cbeae"></view><text class="data-v-2b5cbeae">套餐:¥{{n}}元 / {{o}}</text></view><view class="notice-item data-v-2b5cbeae"><view class="dot data-v-2b5cbeae"></view><text class="data-v-2b5cbeae">合计:¥{{p}}</text></view></view></view></view>
|
||||
+130
-116
@@ -23,175 +23,189 @@
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.details-container.data-v-2b5cbeae {
|
||||
.return-container.data-v-2b5cbeae {
|
||||
min-height: 100vh;
|
||||
background: #f7f8fa;
|
||||
padding: 30rpx;
|
||||
padding-bottom: 100rpx;
|
||||
padding-bottom: 180rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.details-container .status-card.data-v-2b5cbeae {
|
||||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 40rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-bottom: 30rpx;
|
||||
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
.details-container .status-card .status-icon.data-v-2b5cbeae {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 50%;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.details-container .status-card .status-icon.status-waiting.data-v-2b5cbeae {
|
||||
background: #FFF9C4;
|
||||
}
|
||||
.details-container .status-card .status-icon.status-using.data-v-2b5cbeae {
|
||||
background: #E8F5E9;
|
||||
}
|
||||
.details-container .status-card .status-icon.status-finished.data-v-2b5cbeae {
|
||||
background: #E3F2FD;
|
||||
}
|
||||
.details-container .status-card .status-icon.status-cancelled.data-v-2b5cbeae {
|
||||
background: #FFEBEE;
|
||||
}
|
||||
.details-container .status-card .status-text.data-v-2b5cbeae {
|
||||
font-size: 36rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.details-container .status-card .status-desc.data-v-2b5cbeae {
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
}
|
||||
.details-container .info-card.data-v-2b5cbeae {
|
||||
.return-container .order-card.data-v-2b5cbeae {
|
||||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
.details-container .info-card .card-title.data-v-2b5cbeae {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
margin-bottom: 20rpx;
|
||||
position: relative;
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
.details-container .info-card .card-title.data-v-2b5cbeae::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 8rpx;
|
||||
height: 32rpx;
|
||||
background: #1976D2;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
.details-container .info-card .info-item.data-v-2b5cbeae {
|
||||
.return-container .order-card .order-header.data-v-2b5cbeae {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20rpx 0;
|
||||
border-bottom: 1px solid #f5f5f5;
|
||||
margin-bottom: 20rpx;
|
||||
padding-bottom: 16rpx;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
}
|
||||
.details-container .info-card .info-item.data-v-2b5cbeae:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
.details-container .info-card .info-item .label.data-v-2b5cbeae {
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
}
|
||||
.details-container .info-card .info-item .value.data-v-2b5cbeae {
|
||||
font-size: 28rpx;
|
||||
.return-container .order-card .order-header .title.data-v-2b5cbeae {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
word-break: break-all;
|
||||
text-align: right;
|
||||
max-width: 70%;
|
||||
}
|
||||
.details-container .info-card .info-item .value.payment-method.data-v-2b5cbeae {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
.return-container .order-card .order-header .order-no.data-v-2b5cbeae {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
.details-container .info-card .info-item .value.payment-method .payment-badge.data-v-2b5cbeae {
|
||||
margin-top: 8rpx;
|
||||
.return-container .order-card .device-info.data-v-2b5cbeae {
|
||||
margin-bottom: 24rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
}
|
||||
.return-container .order-card .device-info .device-left.data-v-2b5cbeae {
|
||||
flex: 1;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
.return-container .order-card .device-info .device-left .device-name.data-v-2b5cbeae {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
.return-container .order-card .device-info .device-left .device-id.data-v-2b5cbeae {
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.return-container .order-card .device-info .device-right .payment-badge.data-v-2b5cbeae {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: 4rpx 10rpx;
|
||||
padding: 6rpx 12rpx;
|
||||
border-radius: 8rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.details-container .info-card .info-item .value.payment-method .payment-badge.wx-score.data-v-2b5cbeae {
|
||||
.return-container .order-card .device-info .device-right .payment-badge.wx-score.data-v-2b5cbeae {
|
||||
background: rgba(7, 193, 96, 0.08);
|
||||
}
|
||||
.details-container .info-card .info-item .value.payment-method .payment-badge.wx-score .badge-icon.data-v-2b5cbeae {
|
||||
.return-container .order-card .device-info .device-right .payment-badge.wx-score .badge-icon.data-v-2b5cbeae {
|
||||
width: 32rpx;
|
||||
height: 26rpx;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
.details-container .info-card .info-item .value.payment-method .payment-badge.wx-score .badge-text.data-v-2b5cbeae {
|
||||
.return-container .order-card .device-info .device-right .payment-badge.wx-score .badge-text.data-v-2b5cbeae {
|
||||
font-size: 22rpx;
|
||||
color: #07c160;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.details-container .info-card .info-item .value.payment-method .payment-badge.wx-score .badge-text .divider.data-v-2b5cbeae {
|
||||
.return-container .order-card .device-info .device-right .payment-badge.wx-score .badge-text .divider.data-v-2b5cbeae {
|
||||
margin: 0 6rpx;
|
||||
}
|
||||
.details-container .info-card .info-item .value.payment-method .payment-badge.wx-score .badge-text .highlight.data-v-2b5cbeae {
|
||||
.return-container .order-card .device-info .device-right .payment-badge.wx-score .badge-text .highlight.data-v-2b5cbeae {
|
||||
font-weight: 500;
|
||||
}
|
||||
.details-container .info-card .info-item .value.payment-method .payment-badge.deposit.data-v-2b5cbeae {
|
||||
.return-container .order-card .device-info .device-right .payment-badge.deposit.data-v-2b5cbeae {
|
||||
background: #f5f5f5;
|
||||
}
|
||||
.details-container .info-card .info-item .value.payment-method .payment-badge.deposit .badge-text.data-v-2b5cbeae {
|
||||
.return-container .order-card .device-info .device-right .payment-badge.deposit .badge-text.data-v-2b5cbeae {
|
||||
font-size: 22rpx;
|
||||
color: #666;
|
||||
font-weight: 500;
|
||||
}
|
||||
.details-container .info-card .info-item.total.data-v-2b5cbeae {
|
||||
margin-top: 10rpx;
|
||||
padding-top: 30rpx;
|
||||
border-top: 1px solid #f5f5f5;
|
||||
.return-container .order-card .time-info.data-v-2b5cbeae {
|
||||
background: #f9f9f9;
|
||||
border-radius: 16rpx;
|
||||
padding: 20rpx;
|
||||
}
|
||||
.details-container .info-card .info-item.total .label.data-v-2b5cbeae, .details-container .info-card .info-item.total .value.data-v-2b5cbeae {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
.details-container .info-card .info-item.total .value.data-v-2b5cbeae {
|
||||
color: #FF5722;
|
||||
}
|
||||
.details-container .action-buttons.data-v-2b5cbeae {
|
||||
.return-container .order-card .time-info .time-item.data-v-2b5cbeae {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 30rpx 0;
|
||||
align-items: center;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
.details-container .action-buttons .btn.data-v-2b5cbeae {
|
||||
flex: 1;
|
||||
.return-container .order-card .time-info .time-item.data-v-2b5cbeae:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.return-container .order-card .time-info .time-item .label.data-v-2b5cbeae {
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
}
|
||||
.return-container .order-card .time-info .time-item .value.data-v-2b5cbeae {
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
}
|
||||
.return-container .order-card .time-info .time-item .value.highlight.data-v-2b5cbeae {
|
||||
color: #ff6b6b;
|
||||
font-weight: bold;
|
||||
}
|
||||
.return-container .notice-card.data-v-2b5cbeae {
|
||||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
.return-container .notice-card .notice-title.data-v-2b5cbeae {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.return-container .notice-card .notice-list .notice-item.data-v-2b5cbeae {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
.return-container .notice-card .notice-list .notice-item.data-v-2b5cbeae:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.return-container .notice-card .notice-list .notice-item .dot.data-v-2b5cbeae {
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
background: #07c160;
|
||||
border-radius: 50%;
|
||||
margin-top: 10rpx;
|
||||
margin-right: 16rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.return-container .notice-card .notice-list .notice-item text.data-v-2b5cbeae {
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.return-container .bottom-bar.data-v-2b5cbeae {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
padding: 20rpx 30rpx;
|
||||
padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
|
||||
background: #fff;
|
||||
box-shadow: 0 -4rpx 16rpx rgba(0, 0, 0, 0.04);
|
||||
z-index: 10;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 20rpx;
|
||||
}
|
||||
.return-container .bottom-bar .action-item.data-v-2b5cbeae {
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
font-size: 30rpx;
|
||||
border-radius: 44rpx;
|
||||
flex: 1;
|
||||
}
|
||||
.details-container .action-buttons .btn.cancel.data-v-2b5cbeae {
|
||||
background: #f5f5f5;
|
||||
color: #666;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
.details-container .action-buttons .btn.primary.data-v-2b5cbeae {
|
||||
background: #1976D2;
|
||||
.return-container .bottom-bar .action-item.primary.data-v-2b5cbeae {
|
||||
background: #07c160;
|
||||
color: #fff;
|
||||
}
|
||||
.details-container .action-buttons .btn.data-v-2b5cbeae:active {
|
||||
opacity: 0.9;
|
||||
.return-container .bottom-bar .action-item.primary.data-v-2b5cbeae:active {
|
||||
opacity: 0.8;
|
||||
}
|
||||
.return-container .bottom-bar .action-item.secondary.data-v-2b5cbeae {
|
||||
background: #f5f5f5;
|
||||
color: #333;
|
||||
border: 1rpx solid #e0e0e0;
|
||||
}
|
||||
.return-container .bottom-bar .action-item.secondary.data-v-2b5cbeae:active {
|
||||
opacity: 0.8;
|
||||
}
|
||||
+1
-1
@@ -49,7 +49,7 @@ const _sfc_main = {
|
||||
if (options && options.orderId) {
|
||||
this.orderId = options.orderId;
|
||||
if (options.totalAmount) {
|
||||
this.passedTotalAmount = options.totalAmount;
|
||||
this.passedTotalAmount = options.depositAmount;
|
||||
}
|
||||
if (options.depositAmount) {
|
||||
this.passedDepositAmount = options.depositAmount;
|
||||
|
||||
+47
-40
@@ -16,8 +16,9 @@ const _sfc_main = {
|
||||
currentFee: "0.00",
|
||||
orderStatus: "in_used",
|
||||
// 默认状态为使用中
|
||||
payWay: ""
|
||||
payWay: "",
|
||||
// 新增支付方式字段
|
||||
orderNo: ""
|
||||
},
|
||||
timer: null,
|
||||
statusCheckTimer: null,
|
||||
@@ -31,11 +32,11 @@ const _sfc_main = {
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:117", "Return page loaded with options:", JSON.stringify(options));
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:120", "Return page loaded with options:", JSON.stringify(options));
|
||||
this.isPageActive = true;
|
||||
this.orderInfo.orderId = options.orderId || "";
|
||||
this.deviceId = options.deviceNo || options.deviceId || "";
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:126", `初始化参数: orderId=${this.orderInfo.orderId}, deviceId=${this.deviceId}`);
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:130", `初始化参数: orderId=${this.orderInfo.orderId}, deviceId=${this.deviceId}`);
|
||||
if (!this.orderInfo.orderId && this.deviceId) {
|
||||
this.getOrderByDevice();
|
||||
} else if (this.orderInfo.orderId) {
|
||||
@@ -45,14 +46,18 @@ const _sfc_main = {
|
||||
common_vendor.index.setStorageSync("activeOrderId", this.orderInfo.orderId);
|
||||
try {
|
||||
if (this.$orderMonitor) {
|
||||
this.$orderMonitor.removeOrder({ orderId: this.orderInfo.orderId });
|
||||
this.$orderMonitor.addOrder({ orderId: this.orderInfo.orderId }, "return");
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:149", "订单已添加到监控队列:", this.orderInfo.orderId);
|
||||
this.$orderMonitor.removeOrder({
|
||||
orderId: this.orderInfo.orderId
|
||||
});
|
||||
this.$orderMonitor.addOrder({
|
||||
orderId: this.orderInfo.orderId
|
||||
}, "return");
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:157", "订单已添加到监控队列:", this.orderInfo.orderId);
|
||||
} else {
|
||||
common_vendor.index.__f__("warn", "at pages/return/index.vue:151", "$orderMonitor 未定义,无法添加订单到监控队列");
|
||||
common_vendor.index.__f__("warn", "at pages/return/index.vue:159", "$orderMonitor 未定义,无法添加订单到监控队列");
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/return/index.vue:154", "添加订单到监控队列失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/return/index.vue:162", "添加订单到监控队列失败:", error);
|
||||
}
|
||||
} else {
|
||||
common_vendor.index.showToast({
|
||||
@@ -67,14 +72,14 @@ const _sfc_main = {
|
||||
},
|
||||
// 添加onHide生命周期,处理页面隐藏时的清理工作
|
||||
onHide() {
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:174", "归还页面隐藏,清理计时器资源和监控服务");
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:182", "归还页面隐藏,清理计时器资源和监控服务");
|
||||
this.isPageActive = false;
|
||||
this.clearTimer();
|
||||
this.clearStatusCheckTimer();
|
||||
this.removeFromOrderMonitor();
|
||||
},
|
||||
onUnload() {
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:186", "归还页面卸载,清理所有资源");
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:194", "归还页面卸载,清理所有资源");
|
||||
this.isPageActive = false;
|
||||
this.clearTimer();
|
||||
this.clearStatusCheckTimer();
|
||||
@@ -86,16 +91,18 @@ const _sfc_main = {
|
||||
removeFromOrderMonitor() {
|
||||
if (this.orderInfo.orderId && this.$orderMonitor) {
|
||||
try {
|
||||
this.$orderMonitor.removeOrder({ orderId: this.orderInfo.orderId });
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:206", "订单已从监控队列移除:", this.orderInfo.orderId);
|
||||
this.$orderMonitor.removeOrder({
|
||||
orderId: this.orderInfo.orderId
|
||||
});
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:216", "订单已从监控队列移除:", this.orderInfo.orderId);
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/return/index.vue:208", "从监控队列移除订单失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/return/index.vue:218", "从监控队列移除订单失败:", error);
|
||||
}
|
||||
}
|
||||
},
|
||||
// 处理订单完成事件(可由任何地方触发)
|
||||
handleOrderCompleted(orderData) {
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:214", "收到订单完成事件:", orderData);
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:224", "收到订单完成事件:", orderData);
|
||||
if (orderData.orderId === this.orderInfo.orderId || orderData.orderNo === this.orderInfo.orderNo) {
|
||||
this.showReturnSuccessModal(orderData);
|
||||
}
|
||||
@@ -138,20 +145,18 @@ const _sfc_main = {
|
||||
// 获取订单详情
|
||||
async getOrderDetails() {
|
||||
if (!this.isPageActive) {
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:270", "页面已不活跃,跳过订单详情请求");
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:280", "页面已不活跃,跳过订单详情请求");
|
||||
return;
|
||||
}
|
||||
try {
|
||||
if (!this.orderInfo.orderId) {
|
||||
throw new Error("订单ID不能为空");
|
||||
}
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:281", "请求订单详情, orderId:", this.orderInfo.orderId);
|
||||
const result = await config_user.queryById(this.orderInfo.orderId);
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:283", "订单详情结果:", JSON.stringify(result));
|
||||
if (result.code === 200 && result.data) {
|
||||
const orderData = result.data;
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:287", "订单原始数据:", orderData);
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:288", "开始时间字段:", orderData.startTime, typeof orderData.startTime);
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:295", "订单原始数据:", orderData);
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:296", "开始时间字段:", orderData.startTime, typeof orderData.startTime);
|
||||
if (orderData.orderStatus) {
|
||||
this.orderInfo.orderStatus = orderData.orderStatus;
|
||||
}
|
||||
@@ -164,12 +169,12 @@ const _sfc_main = {
|
||||
return;
|
||||
}
|
||||
this.updateOrderInfo(orderData);
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:315", "更新后的开始时间:", this.orderInfo.startTime);
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:323", "更新后的开始时间:", this.orderInfo.startTime);
|
||||
} else {
|
||||
throw new Error(result.msg || "获取订单详情失败");
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/return/index.vue:320", "获取订单详情错误:", error);
|
||||
common_vendor.index.__f__("error", "at pages/return/index.vue:328", "获取订单详情错误:", error);
|
||||
common_vendor.index.showToast({
|
||||
title: error.message || "获取订单信息失败",
|
||||
icon: "none"
|
||||
@@ -192,7 +197,6 @@ const _sfc_main = {
|
||||
},
|
||||
// 使用后端返回的使用时长和费用数据
|
||||
updateOrderInfo(orderData) {
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:348", "更新订单信息:", JSON.stringify(orderData));
|
||||
this.orderInfo.usedTime = orderData.usedTime || "0分钟";
|
||||
this.orderInfo.currentFee = orderData.currentFee || orderData.actualDeviceAmount || orderData.payAmount || "0.00";
|
||||
if (orderData.orderStatus) {
|
||||
@@ -204,21 +208,24 @@ const _sfc_main = {
|
||||
this.orderInfo._rawStartTime = orderData.startTime;
|
||||
if (orderData.startTime) {
|
||||
try {
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:372", "API返回的开始时间:", orderData.startTime);
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:379", "API返回的开始时间:", orderData.startTime);
|
||||
this.orderInfo.startTime = orderData.startTime;
|
||||
} catch (e) {
|
||||
common_vendor.index.__f__("error", "at pages/return/index.vue:376", "更新开始时间错误:", e);
|
||||
common_vendor.index.__f__("error", "at pages/return/index.vue:383", "更新开始时间错误:", e);
|
||||
this.orderInfo.startTime = "未知";
|
||||
}
|
||||
} else {
|
||||
common_vendor.index.__f__("warn", "at pages/return/index.vue:380", "API返回的订单数据中没有startTime字段");
|
||||
common_vendor.index.__f__("warn", "at pages/return/index.vue:387", "API返回的订单数据中没有startTime字段");
|
||||
if (orderData.createTime) {
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:383", "使用createTime作为备选:", orderData.createTime);
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:390", "使用createTime作为备选:", orderData.createTime);
|
||||
this.orderInfo.startTime = orderData.createTime;
|
||||
} else {
|
||||
this.orderInfo.startTime = "未知";
|
||||
}
|
||||
}
|
||||
if (orderData.orderNo) {
|
||||
this.orderInfo.orderNo = orderData.orderNo;
|
||||
}
|
||||
if (orderData.deviceNo && !this.deviceId) {
|
||||
this.deviceId = orderData.deviceNo;
|
||||
}
|
||||
@@ -228,21 +235,21 @@ const _sfc_main = {
|
||||
this.clearTimer();
|
||||
this.timer = setInterval(() => {
|
||||
if (this.isPageActive) {
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:405", "执行定时更新订单信息");
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:415", "执行定时更新订单信息");
|
||||
this.getOrderDetails();
|
||||
} else {
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:408", "页面已不活跃,停止计时器");
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:418", "页面已不活跃,停止计时器");
|
||||
this.clearTimer();
|
||||
}
|
||||
}, 6e4);
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:413", "已启动使用时长更新计时器");
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:423", "已启动使用时长更新计时器");
|
||||
},
|
||||
// 清除定时器
|
||||
clearTimer() {
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:421", "已清除使用时长更新计时器");
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:431", "已清除使用时长更新计时器");
|
||||
}
|
||||
},
|
||||
// 清除状态检查定时器
|
||||
@@ -250,7 +257,7 @@ const _sfc_main = {
|
||||
if (this.statusCheckTimer) {
|
||||
clearInterval(this.statusCheckTimer);
|
||||
this.statusCheckTimer = null;
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:430", "已清除归还状态检查计时器");
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:440", "已清除归还状态检查计时器");
|
||||
}
|
||||
},
|
||||
// 开始状态检查定时器
|
||||
@@ -260,7 +267,7 @@ const _sfc_main = {
|
||||
this.statusCheckTimer = setInterval(() => {
|
||||
if (this.isPageActive) {
|
||||
this.currentStatusChecks++;
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:444", `执行归还状态检查 (${this.currentStatusChecks}/${this.maxStatusChecks})`);
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:454", `执行归还状态检查 (${this.currentStatusChecks}/${this.maxStatusChecks})`);
|
||||
this.checkReturnStatus();
|
||||
if (this.currentStatusChecks >= this.maxStatusChecks) {
|
||||
this.clearStatusCheckTimer();
|
||||
@@ -271,11 +278,11 @@ const _sfc_main = {
|
||||
});
|
||||
}
|
||||
} else {
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:459", "页面已不活跃,停止状态检查计时器");
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:469", "页面已不活跃,停止状态检查计时器");
|
||||
this.clearStatusCheckTimer();
|
||||
}
|
||||
}, this.statusCheckInterval);
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:464", "已启动归还状态检查计时器");
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:474", "已启动归还状态检查计时器");
|
||||
},
|
||||
// 通过设备号查询使用中的订单
|
||||
async getOrderByDevice() {
|
||||
@@ -291,10 +298,10 @@ const _sfc_main = {
|
||||
"Clientid": common_vendor.index.getStorageSync("client_id")
|
||||
}
|
||||
});
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:486", "通过设备号查询订单结果:", JSON.stringify(inUseRes));
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:496", "通过设备号查询订单结果:", JSON.stringify(inUseRes));
|
||||
if (inUseRes.statusCode === 200 && inUseRes.data.code === 200 && inUseRes.data.data) {
|
||||
const inUseOrder = inUseRes.data.data;
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:490", "使用中的订单:", inUseOrder);
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:500", "使用中的订单:", inUseOrder);
|
||||
this.orderInfo.orderId = inUseOrder.orderId;
|
||||
if (inUseOrder.orderStatus) {
|
||||
this.orderInfo.orderStatus = inUseOrder.orderStatus;
|
||||
@@ -303,7 +310,7 @@ const _sfc_main = {
|
||||
this.orderInfo.payWay = inUseOrder.payWay;
|
||||
}
|
||||
if (inUseOrder.startTime) {
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:507", "inUse API返回的开始时间:", inUseOrder.startTime);
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:517", "inUse API返回的开始时间:", inUseOrder.startTime);
|
||||
this.orderInfo.startTime = inUseOrder.startTime;
|
||||
}
|
||||
this.getOrderDetails();
|
||||
@@ -313,7 +320,7 @@ const _sfc_main = {
|
||||
throw new Error("未找到使用中的订单");
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/return/index.vue:521", "通过设备号查询订单失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/return/index.vue:531", "通过设备号查询订单失败:", error);
|
||||
common_vendor.index.showToast({
|
||||
title: error.message || "获取订单信息失败",
|
||||
icon: "none"
|
||||
@@ -332,7 +339,7 @@ const _sfc_main = {
|
||||
await this.getOrderDetails();
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/return/index.vue:544", "检查归还状态失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/return/index.vue:554", "检查归还状态失败:", error);
|
||||
}
|
||||
},
|
||||
// 返回首页
|
||||
@@ -346,7 +353,7 @@ const _sfc_main = {
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t($options.getOrderStatusText()),
|
||||
b: common_vendor.t($data.orderInfo.orderId),
|
||||
b: common_vendor.t($data.orderInfo.orderNo),
|
||||
c: common_vendor.t($data.deviceId),
|
||||
d: $data.orderInfo.payWay == "wx_score_pay"
|
||||
}, $data.orderInfo.payWay == "wx_score_pay" ? {
|
||||
|
||||
Reference in New Issue
Block a user