Merged
Conversation
29ea209 to
cdb4745
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📄 Step 26-1 規格書(商城基礎 - 規則與購買)
1. 階段目標
2. 功能需求
2.1 導覽與結構
常駐資源/限時優惠包2.2 清單分組與項目(由設定檔渲染)
Tab:常駐資源
store.card_click_permstore.card_idle_permstore.card_click_2x_30mstore.card_idle_2x_1hstore.card_offline_perm_6hstore.card_offline_once_6hstore.card_cap_permstore.ticket_pet_singlestore.ticket_pet_10plus1Tab:限時優惠包
store.pack_dailystore.pack_monthlystore.pack_7n_starterstore.pack_30n_starter2.3 卡片樣式(通用)
ads_pay=true,在右側再顯示「看廣告購買」按鈕(觀看完成才執行購買)purchase_limit_type顯示不同樣式):limited:一次性unlimited:可重複daily:每日限購monthly:每月限購first7:前 7 天first30:前 30 天ads_pay=true,在卡片右上角顯示「🎬」小角標store.*.image;若載入失敗顯示 placeholder:/assets/images/store/placeholder.png2.4 資料來源與鍵位
ConfigService載入store節點(你提供的 JSON 結構)。name、desc、image、purchase_limit_type、purchase_max_count、ads_pay{ "store.tab.permanent": {"zh":"常駐資源","en":"Permanent"}, "store.tab.limited": {"zh":"限時優惠包","en":"Limited Offers"}, "store.section.boost_permanent": {"zh":"迷因點數加成卡","en":"Meme Point Boosters"}, "store.section.boost_temporary": {"zh":"臨時加成卡","en":"Temporary Boosters"}, "store.section.offline": {"zh":"離線掛機時間加成","en":"Offline Cap Boost"}, "store.section.tap_cap": {"zh":"點擊上限提升","en":"Tap Cap Increase"}, "store.section.tickets": {"zh":"寵物抽獎券","en":"Pet Gacha Tickets"}, "store.section.daily": {"zh":"每日限購禮包","en":"Daily Packs"}, "store.section.monthly": {"zh":"每月限購禮包","en":"Monthly Packs"}, "store.section.starter": {"zh":"新手成長包","en":"Starter Packs"}, "store.badge.once": {"zh":"一次性","en":"One-time"}, "store.badge.repeat": {"zh":"可重複","en":"Repeatable"}, "store.badge.daily": {"zh":"每日限購","en":"Daily Limit"}, "store.badge.monthly": {"zh":"每月限購","en":"Monthly Limit"}, "store.badge.first7": {"zh":"前 7 天","en":"First 7 Days"}, "store.badge.first30": {"zh":"前 30 天","en":"First 30 Days"}, "store.badge.ads": {"zh":"影片回饋","en":"Ad Reward"}, "store.btn.buy": {"zh":"購買","en":"Buy"}, "store.btn.disabled": {"zh":"未開放","en":"Disabled"} }2.5 購買與呈現規則
購買限制規則(以
purchase_limit_type判定):unlimited:無上限,永遠可購買。limited:終身上限;終身購買次數 <purchase_max_count時可購買。daily:每日上限;當天購買次數 <purchase_max_count時可購買,隔日自動歸零(時區:Asia/Taipei)。monthly:每月上限;當月購買次數 <purchase_max_count時可購買,跨月自動歸零(時區:Asia/Taipei)。first7:安裝後前 7 天可購買;在視窗內且終身次數 <purchase_max_count時可購買(終身累計,不重置)。first30:安裝後前 30 天可購買;在視窗內且終身次數 <purchase_max_count時可購買(終身累計,不重置)。廣告購買(
ads_pay=true):RewardedAdService.showAd播放激勵流程,完成才執行同樣的購買邏輯。3. 驗收標準
ads_pay=true的商品於卡片右上角顯示 🎬 角標。ads_pay=true的商品,同時顯示「購買」與「看廣告購買」兩顆按鈕,後者需觀看完成才購買。4. 實例化需求測試案例(購買規則)
測試案例 1:結構與分組
storeJSON測試案例 2:卡片視覺元素
store.card_click_perm測試案例 3:ads 角標
store.pack_daily(ads_pay=true)測試案例 4:圖片失敗 fallback
image路徑測試案例 5:i18n 切換
測試案例 6:unlimited 可重複
unlimited之 item測試案例 7:limited 終身上限
limited且purchase_max_count=1測試案例 8:daily 每日重置
daily且purchase_max_count=1測試案例 9:monthly 每月重置
monthly且purchase_max_count=1測試案例 10:first7 首 7 天限制
first7且purchase_max_count=1測試案例 11:first30 首 30 天限制
first30且purchase_max_count=1測試案例 12:ads_pay 廣告購買
ads_pay=true之 item5. 限制與備註
name/desc,並在控制台警告缺失鍵值。