购买套餐没有套餐时修复页面展示
This commit is contained in:
@@ -21,7 +21,14 @@ export type PurchaseSkuData = {
|
||||
|
||||
export function parsePurchaseSkuList(kind: PurchaseKind, skuList: ProductItem['skus']): PurchaseSkuData {
|
||||
if (!skuList?.length) {
|
||||
throw new Error('没有套餐数据')
|
||||
return {
|
||||
items: [],
|
||||
priceMap: new Map(),
|
||||
countMinMap: new Map(),
|
||||
modeList: [],
|
||||
liveList: [],
|
||||
expireList: [],
|
||||
}
|
||||
}
|
||||
|
||||
const items: PurchaseSkuItem[] = []
|
||||
@@ -75,7 +82,14 @@ export function parsePurchaseSkuList(kind: PurchaseKind, skuList: ProductItem['s
|
||||
}
|
||||
|
||||
if (items.length === 0) {
|
||||
throw new Error('没有可用的套餐数据')
|
||||
return {
|
||||
items: [],
|
||||
priceMap,
|
||||
countMinMap,
|
||||
modeList: [],
|
||||
liveList: [],
|
||||
expireList: [],
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user