feat:文本替换充电宝=>风扇

This commit is contained in:
2025-07-05 11:24:20 +08:00
parent f8c119d489
commit 3d69baf72d
5 changed files with 17 additions and 17 deletions
+10 -10
View File
@@ -97,7 +97,7 @@ export default {
// 检查订单状态
if (orderData.orderStatus === 'IN_USED') {
// 如果已经是使用中状态,可能说明开锁已经完成
this.deviceMessage = '设备已弹出,请取走您的充电宝'
this.deviceMessage = '设备已弹出,请取走您的风扇'
this.isLoading = false
// 如果是第一次加载页面且设备已弹出,记录状态,避免重复弹出
@@ -123,10 +123,10 @@ export default {
}
},
// 触发弹出充电宝
// 触发弹出风扇
async triggerDeviceEject() {
if (this.hasTriggeredDevice) {
console.log('已经触发过弹出充电宝,不重复触发')
console.log('已经触发过弹出风扇,不重复触发')
return
}
@@ -136,26 +136,26 @@ export default {
this.deviceMessage = '正在准备您的设备,请稍候...'
try {
console.log(`准备触发弹出充电宝orderId: ${this.orderId}`)
console.log(`准备触发弹出风扇orderId: ${this.orderId}`)
// 调用确认支付并弹出的方法
const result = await confirmPaymentAndRent(this.orderId)
console.log('确认支付并弹出充电宝结果:', JSON.stringify(result))
console.log('确认支付并弹出风扇结果:', JSON.stringify(result))
if (result && result.code === 200) {
this.deviceMessage = '设备已弹出,请取走您的充电宝'
this.deviceMessage = '设备已弹出,请取走您的风扇'
uni.showToast({
title: '充电宝已弹出',
title: '风扇已弹出',
icon: 'success'
})
} else {
throw new Error((result && result.msg) || '弹出充电宝失败')
throw new Error((result && result.msg) || '弹出风扇失败')
}
} catch (error) {
console.error('弹出充电宝错误:', error)
console.error('弹出风扇错误:', error)
this.deviceMessage = '弹出设备失败,请联系客服'
uni.showToast({
title: error.message || '弹出充电宝失败,请联系客服',
title: error.message || '弹出风扇失败,请联系客服',
icon: 'none'
})
} finally {