nomadro/apps/miniprogram/h5/src/data/vipStoreCatalog.ts
Eric 3f7528f824 Add VIP knowledge community and device shop with native weapp UX.
Document memo/shop admin routes, deploy scripts, and cache-first feed performance in README.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-06 16:58:17 +08:00

91 lines
2.0 KiB
TypeScript

/** Offline seed — 道具与 VIP PRODUCT_OFFERS 对齐(各商品不同道具) */
export type ShopGoodsType = 'virtual' | 'physical'
export type ShopProduct = {
id: string
title: string
desc: string
cover: string
coverEmoji: string
groupName: string
goodsType: ShopGoodsType
priceFen: number
stock: number
wxProductId?: string
offerKey?: string
enabled?: boolean
}
export type ShopGroup = { id: string; name: string }
export type ShopCatalog = {
ok: boolean
groups: ShopGroup[]
products: ShopProduct[]
offline?: boolean
}
export const LOCAL_SHOP_CATALOG: ShopCatalog = {
ok: true,
offline: true,
groups: [
{ id: 'all', name: '全部' },
{ id: '硬件', name: '硬件' },
{ id: '账号', name: '账号' },
],
products: [
{
id: 'yt-device',
title: '油管 (无人直播)设备',
desc: '开箱即用 · 实体发货',
cover: '',
coverEmoji: '📺',
groupName: '硬件',
goodsType: 'physical',
priceFen: 99800,
stock: 1,
wxProductId: 'svip',
offerKey: 'svip',
},
{
id: 'tt-device',
title: 'Tiktok无人直播-设备',
desc: '开箱即用 · 实体发货',
cover: '',
coverEmoji: '📱',
groupName: '硬件',
goodsType: 'physical',
priceFen: 29800,
stock: 0,
wxProductId: 'tiktok',
offerKey: 'tiktok',
},
{
id: 'ypp-account',
title: 'Ypp油管账号',
desc: '虚拟发卡 · 支付后自动发放',
cover: '',
coverEmoji: '🔑',
groupName: '账号',
goodsType: 'virtual',
priceFen: 18800,
stock: 0,
wxProductId: 'youtube',
offerKey: 'youtube',
},
{
id: 'tt-midvideo',
title: 'Tiktok中视频账号',
desc: '虚拟发卡 · 支付后自动发放',
cover: '',
coverEmoji: '🎬',
groupName: '账号',
goodsType: 'virtual',
priceFen: 4900,
stock: 0,
wxProductId: 'nomad',
offerKey: 'nomad',
},
],
}