feat: 新增多个页面及功能,优化用户体验
在项目中新增了多个页面,包括押金页面、设备详情页面、反馈页面和帮助页面。同时,更新了订单支付和归还成功页面的逻辑,确保用户在支付和归还设备时能够获得清晰的反馈。优化了扫码和订单状态处理逻辑,提升了整体用户体验。
This commit is contained in:
+4
-12
@@ -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 = '设备已弹出,请取走您的充电宝'
|
||||
|
||||
Reference in New Issue
Block a user