优化续费体验

This commit is contained in:
WindowBird 2025-08-22 10:13:31 +08:00
parent d23f45f84a
commit 31f8a6a5da
2 changed files with 6 additions and 3 deletions

View File

@ -144,7 +144,6 @@ export default {
rented: '已出租',
maintenance: '维护中',
scrapped: '报废',
normal: '正常',
}
return statusMap[status] || '未知状态'
},

View File

@ -55,6 +55,7 @@ import { getNewAnnouncement } from '../../api/article/article.js'
import { getBannerList } from '../../api/banner/banner.js'
import { getDeviceList } from '../../api/device/device.js'
import { renewDevice, getPeriodPackages } from '../../api/lease/lease.js'
import { sleep } from '../../uni_modules/uv-ui-tools/libs/function'
export default {
components: {
@ -299,9 +300,10 @@ export default {
}
// 使ID
const typeId = device.typeId || device.originalData?.typeId || device.originalData?.deviceTypeId || '1'
const typeId =
device.typeId || device.originalData?.typeId || device.originalData?.deviceTypeId || '1'
console.log('设备类型ID:', typeId)
const response = await getPeriodPackages(typeId)
if (response.code === 200) {
@ -370,6 +372,8 @@ export default {
icon: 'success',
})
await sleep(1000)
//
this.closeRenewModal()