fix:修复bug
This commit is contained in:
+67
-6
@@ -254,7 +254,8 @@
|
||||
reportDeviceNoEject,
|
||||
convertToOwned,
|
||||
closeWithMaxFee,
|
||||
getInUseOrder
|
||||
getInUseOrder,
|
||||
deviceRentByOrderNo
|
||||
} from '@/config/api/order.js'
|
||||
import {
|
||||
withdrawDeposit
|
||||
@@ -328,6 +329,7 @@
|
||||
const convertToOwnPopup = ref(null)
|
||||
const showReturnMapPopup = ref(false)
|
||||
const returnMapImageUrl = ref('')
|
||||
const lastDeviceEjectTime = ref(0) // 上次点击"宝未弹出"的时间戳
|
||||
|
||||
// 计算属性:是否显示优惠券/会员卡可用提示
|
||||
const canUsePromotionTag = computed(() => {
|
||||
@@ -584,8 +586,13 @@
|
||||
|
||||
// 获取订单费用(不含单位)
|
||||
const getOrderFee = () => {
|
||||
let fee;
|
||||
if(orderInfo.value.originalFee){
|
||||
fee = orderInfo.value.originalFee || orderInfo.value.originalFee || '0'
|
||||
}else{
|
||||
fee = orderInfo.value.currentFee;
|
||||
}
|
||||
|
||||
const fee = orderInfo.value.originalFee || orderInfo.value.originalFee || '0'
|
||||
// 移除可能的"元"字符
|
||||
return String(fee).replace(/[元¥]/g, '')
|
||||
}
|
||||
@@ -1139,10 +1146,64 @@
|
||||
}
|
||||
|
||||
// 处理"宝未弹出" - 跳转到反馈页面
|
||||
const handleDeviceNoEject = () => {
|
||||
uni.navigateTo({
|
||||
url: '/subPackages/service/feedback/index?selectedType=0'
|
||||
})
|
||||
const handleDeviceNoEject = async () => {
|
||||
// 检查是否在30秒间隔内
|
||||
// const now = Date.now()
|
||||
// const timeDiff = now - lastDeviceEjectTime.value
|
||||
// const requiredInterval = 30000 // 30秒
|
||||
|
||||
// if (timeDiff < requiredInterval) {
|
||||
// const remainingSeconds = Math.ceil((requiredInterval - timeDiff) / 1000)
|
||||
// uni.showToast({
|
||||
// title: `${t('order.deviceEjectWait')}${remainingSeconds}${t('order.deviceEjectRetry')}`,
|
||||
// icon: 'none',
|
||||
// duration: 2000
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
|
||||
// // 更新最后点击时间
|
||||
// lastDeviceEjectTime.value = now
|
||||
|
||||
//原有逻辑跳转到投诉反馈页面
|
||||
// uni.navigateTo({
|
||||
// url: '/subPackages/service/feedback/index?selectedType=0'
|
||||
// })
|
||||
|
||||
/*
|
||||
现逻辑使用最新接口二次尝试弹出设备
|
||||
*/
|
||||
try {
|
||||
uni.showLoading({
|
||||
title: t('order.deviceEjectProcessing')
|
||||
})
|
||||
|
||||
const res = await deviceRentByOrderNo(orderInfo.value.orderNo)
|
||||
|
||||
uni.hideLoading()
|
||||
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: t('order.deviceEjectSuccess'),
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg || t('order.deviceEjectFailed'),
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
} catch (error) {
|
||||
uni.hideLoading()
|
||||
console.error('二次弹出设备失败:', error)
|
||||
uni.showToast({
|
||||
title: t('order.deviceEjectError'),
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 处理"归还提醒" - 授权微信通知
|
||||
|
||||
Reference in New Issue
Block a user