feat:文本替换充电宝=>风扇
This commit is contained in:
+2
-2
@@ -115,9 +115,9 @@ export const rentPowerBank = (deviceNo, phone) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//确认支付并弹出充电宝
|
//确认支付并弹出风扇
|
||||||
export const confirmPaymentAndRent = (orderId) => {
|
export const confirmPaymentAndRent = (orderId) => {
|
||||||
console.log(`确认支付并弹出充电宝, orderId: ${orderId}`)
|
console.log(`确认支付并弹出风扇, orderId: ${orderId}`)
|
||||||
return request({
|
return request({
|
||||||
url: `/app/device/confirmPaymentAndRent?orderId=${orderId}`,
|
url: `/app/device/confirmPaymentAndRent?orderId=${orderId}`,
|
||||||
method: 'post'
|
method: 'post'
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<view class="status-card">
|
<view class="status-card">
|
||||||
<view class="status-icon success"></view>
|
<view class="status-icon success"></view>
|
||||||
<view class="status-text">归还成功</view>
|
<view class="status-text">归还成功</view>
|
||||||
<view class="status-desc">您的充电宝已归还,费用已从押金中扣除</view>
|
<view class="status-desc">您的风扇已归还,费用已从押金中扣除</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 订单信息 -->
|
<!-- 订单信息 -->
|
||||||
|
|||||||
+10
-10
@@ -97,7 +97,7 @@ export default {
|
|||||||
// 检查订单状态
|
// 检查订单状态
|
||||||
if (orderData.orderStatus === 'IN_USED') {
|
if (orderData.orderStatus === 'IN_USED') {
|
||||||
// 如果已经是使用中状态,可能说明开锁已经完成
|
// 如果已经是使用中状态,可能说明开锁已经完成
|
||||||
this.deviceMessage = '设备已弹出,请取走您的充电宝'
|
this.deviceMessage = '设备已弹出,请取走您的风扇'
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
|
|
||||||
// 如果是第一次加载页面且设备已弹出,记录状态,避免重复弹出
|
// 如果是第一次加载页面且设备已弹出,记录状态,避免重复弹出
|
||||||
@@ -123,10 +123,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 触发弹出充电宝
|
// 触发弹出风扇
|
||||||
async triggerDeviceEject() {
|
async triggerDeviceEject() {
|
||||||
if (this.hasTriggeredDevice) {
|
if (this.hasTriggeredDevice) {
|
||||||
console.log('已经触发过弹出充电宝,不重复触发')
|
console.log('已经触发过弹出风扇,不重复触发')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -136,26 +136,26 @@ export default {
|
|||||||
this.deviceMessage = '正在准备您的设备,请稍候...'
|
this.deviceMessage = '正在准备您的设备,请稍候...'
|
||||||
|
|
||||||
try {
|
try {
|
||||||
console.log(`准备触发弹出充电宝,orderId: ${this.orderId}`)
|
console.log(`准备触发弹出风扇,orderId: ${this.orderId}`)
|
||||||
|
|
||||||
// 调用确认支付并弹出的方法
|
// 调用确认支付并弹出的方法
|
||||||
const result = await confirmPaymentAndRent(this.orderId)
|
const result = await confirmPaymentAndRent(this.orderId)
|
||||||
console.log('确认支付并弹出充电宝结果:', JSON.stringify(result))
|
console.log('确认支付并弹出风扇结果:', JSON.stringify(result))
|
||||||
|
|
||||||
if (result && result.code === 200) {
|
if (result && result.code === 200) {
|
||||||
this.deviceMessage = '设备已弹出,请取走您的充电宝'
|
this.deviceMessage = '设备已弹出,请取走您的风扇'
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '充电宝已弹出',
|
title: '风扇已弹出',
|
||||||
icon: 'success'
|
icon: 'success'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
throw new Error((result && result.msg) || '弹出充电宝失败')
|
throw new Error((result && result.msg) || '弹出风扇失败')
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('弹出充电宝错误:', error)
|
console.error('弹出风扇错误:', error)
|
||||||
this.deviceMessage = '弹出设备失败,请联系客服'
|
this.deviceMessage = '弹出设备失败,请联系客服'
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: error.message || '弹出充电宝失败,请联系客服',
|
title: error.message || '弹出风扇失败,请联系客服',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="notice-item">
|
<view class="notice-item">
|
||||||
<view class="dot"></view>
|
<view class="dot"></view>
|
||||||
<text>将充电宝插入原位置或空闲插口</text>
|
<text>将风扇插入原位置或空闲插口</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="notice-item">
|
<view class="notice-item">
|
||||||
<view class="dot"></view>
|
<view class="dot"></view>
|
||||||
@@ -229,7 +229,7 @@ export default {
|
|||||||
// 显示归还成功弹窗
|
// 显示归还成功弹窗
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '归还成功',
|
title: '归还成功',
|
||||||
content: '充电宝已归还成功,剩余押金将退还到您的账户',
|
content: '风扇已归还成功,剩余押金将退还到您的账户',
|
||||||
confirmText: '查看详情',
|
confirmText: '查看详情',
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ class OrderMonitor {
|
|||||||
|
|
||||||
// 显示全局通知
|
// 显示全局通知
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '充电宝归还成功',
|
title: '风扇归还成功',
|
||||||
icon: 'success',
|
icon: 'success',
|
||||||
duration: 2000
|
duration: 2000
|
||||||
})
|
})
|
||||||
@@ -174,7 +174,7 @@ class OrderMonitor {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '归还成功',
|
title: '归还成功',
|
||||||
content: '充电宝已归还成功,剩余押金将退还到您的账户',
|
content: '风扇已归还成功,剩余押金将退还到您的账户',
|
||||||
confirmText: '查看详情',
|
confirmText: '查看详情',
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
|
|||||||
Reference in New Issue
Block a user