feat: 新增多个页面及功能,优化用户体验

在项目中新增了多个页面,包括押金页面、设备详情页面、反馈页面和帮助页面。同时,更新了订单支付和归还成功页面的逻辑,确保用户在支付和归还设备时能够获得清晰的反馈。优化了扫码和订单状态处理逻辑,提升了整体用户体验。
This commit is contained in:
8vd8
2025-04-16 18:26:02 +08:00
parent f96ff2b030
commit 431ceb4bdb
117 changed files with 1854 additions and 616 deletions
+4 -12
View File
@@ -45,7 +45,7 @@
</template>
<script>
import { queryById, confirmPaymentAndRent, sendRentCommand } from '@/config/user.js'
import { queryById, confirmPaymentAndRent } from '@/config/user.js'
export default {
data() {
@@ -138,17 +138,9 @@ export default {
try {
console.log(`准备触发弹出充电宝,orderId: ${this.orderId}`)
// 先尝试使用确认支付并弹出的方法
let result
try {
result = await confirmPaymentAndRent(this.orderId)
console.log('确认支付并弹出充电宝结果:', JSON.stringify(result))
} catch (error) {
console.error('确认支付并弹出失败,尝试备用方法:', error)
// 如果第一种方法失败,尝试使用备用方法直接发送租借指令
result = await sendRentCommand(this.orderId)
console.log('发送租借指令结果:', JSON.stringify(result))
}
// 用确认支付并弹出的方法
const result = await confirmPaymentAndRent(this.orderId)
console.log('确认支付并弹出充电宝结果:', JSON.stringify(result))
if (result && result.code === 200) {
this.deviceMessage = '设备已弹出,请取走您的充电宝'