解决我的账单页面报错 & 提交记录添加套餐号筛选

This commit is contained in:
Eamon-meng
2026-05-18 15:52:35 +08:00
parent fde097c601
commit 5c236c0b01
8 changed files with 218 additions and 187 deletions

View File

@@ -185,16 +185,14 @@ function usePurchasePrice(profile: User | null, selection: PurchaseSelection) {
return
}
if (!response.success) {
throw new Error(response.message || '获取价格失败')
if (response.success) {
setPriceData({
price: response.data.price,
actual: response.data.actual ?? response.data.price ?? '0.00',
discounted: response.data.discounted ?? '0.00',
})
setIsError(false)
}
setPriceData({
price: response.data.price,
actual: response.data.actual ?? response.data.price ?? '0.00',
discounted: response.data.discounted ?? '0.00',
})
setIsError(false)
}
catch (error) {
if (requestId !== requestIdRef.current) {