优化首页展示列表
This commit is contained in:
@@ -7,7 +7,7 @@ export type QuantityKey =
|
||||
| 'helmet6'
|
||||
| 'armor6'
|
||||
| 'kit5'
|
||||
| 'armor6Ammo'
|
||||
| 'level6Ammo'
|
||||
| 'gridCard9'
|
||||
|
||||
export type ScreenshotKey = 'coin' | 'gameId' | 'totalAsset' | 'tencentSecurity' | 'skin'
|
||||
@@ -100,7 +100,7 @@ export const defaultListingPublishOptions: ListingPublishOptions = {
|
||||
{ key: 'helmet6', label: '6头数量', price: '2元/个' },
|
||||
{ key: 'armor6', label: '6甲数量', price: '3元/个' },
|
||||
{ key: 'kit5', label: '5级全装套数量', price: '5元/个' },
|
||||
{ key: 'armor6Ammo', label: '6甲子弹', price: '0.26元/发' },
|
||||
{ key: 'level6Ammo', label: '6级子弹', price: '0.26元/发' },
|
||||
{ key: 'gridCard9', label: '9格体验卡', price: '5元/张', placeholder: '如果是赛季9格,此处填0即可' },
|
||||
],
|
||||
screenshot_slots: [
|
||||
@@ -127,7 +127,16 @@ export function mergeListingPublishOptions(options?: Partial<ListingPublishOptio
|
||||
login_method_options: options?.login_method_options?.length ? options.login_method_options : defaultListingPublishOptions.login_method_options,
|
||||
region_options: options?.region_options?.length ? options.region_options : defaultListingPublishOptions.region_options,
|
||||
skin_groups: options?.skin_groups?.length ? options.skin_groups : defaultListingPublishOptions.skin_groups,
|
||||
quantity_items: options?.quantity_items?.length ? options.quantity_items as PublishQuantityItem[] : defaultListingPublishOptions.quantity_items,
|
||||
quantity_items: options?.quantity_items?.length
|
||||
? normalizeQuantityItems(options.quantity_items as PublishQuantityItem[])
|
||||
: defaultListingPublishOptions.quantity_items,
|
||||
screenshot_slots: options?.screenshot_slots?.length ? options.screenshot_slots as PublishScreenshotSlot[] : defaultListingPublishOptions.screenshot_slots,
|
||||
}
|
||||
}
|
||||
|
||||
function normalizeQuantityItems(items: PublishQuantityItem[]): PublishQuantityItem[] {
|
||||
return items.map((item) => ({
|
||||
...item,
|
||||
key: String(item.key) === 'armor6Ammo' ? 'level6Ammo' : item.key,
|
||||
}))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user