diff --git a/src/api/activity.js b/src/api/activity.js index c788d5c..0d05e82 100644 --- a/src/api/activity.js +++ b/src/api/activity.js @@ -62,14 +62,50 @@ export const getHistoryTopOne = async (activityType) => { } // 获取指定类型活动资源 -export const activityResource = async (data) => { +export const apiGetActivityResource = async (activityType) => { try { const response = await get( - `/props-activity-cnf/client/listActivityResource?sysOrigin=${data.sysOrigin}&activityType=${data.activityType}`, + `/props-activity-cnf/client/listActivityResource?sysOrigin=LIKEI&activityType=${activityType}`, ) return response } catch (error) { - console.error('Failed to get this week rewards and gifts:', error) + console.error('Failed to get activity resource:', error) + console.error('error:' + error.response.errorMsg) + throw error + } +} + +// 获取每日充值活动等级任务信息 +export const getDailyRechargeInfo = async () => { + try { + const response = await get('/activity/daily-recharge/info') + return response + } catch (error) { + console.error('Failed to get daily recharge info:', error) + console.error('error:' + error.response.errorMsg) + throw error + } +} + +// 领取每日充值活动 task1 历史累计奖励 +export const claimDailyRechargeTask1 = async () => { + try { + const response = await post('/activity/daily-recharge/claim/task1') + return response + } catch (error) { + console.error('Failed to claim daily recharge task1 reward:', error) + console.error('error:' + error.response.errorMsg) + throw error + } +} + +// 领取每日充值活动 task2 当前等级奖励 +export const claimDailyRechargeTask2 = async (data) => { + try { + const response = await post('/activity/daily-recharge/claim/task2', data) + return response + } catch (error) { + console.error('Failed to claim daily recharge task2 reward:', error) console.error('error:' + error.response.errorMsg) throw error } diff --git a/src/config/security.js b/src/config/security.js index 883dbea..9296e93 100644 --- a/src/config/security.js +++ b/src/config/security.js @@ -17,6 +17,7 @@ export const PUBLIC_PATHS = Object.freeze([ '/recharge-reward', '/login-reward', '/activities/poker-ace', + '/daily-recharge', '/activities/lucky-dollars-season4', '/activities/lesser-bairam', '/activities/lucky-dollars-season3', diff --git a/src/locales/ar.json b/src/locales/ar.json index 998b831..3f0b172 100644 --- a/src/locales/ar.json +++ b/src/locales/ar.json @@ -495,5 +495,16 @@ "weekly_rank": "الترتيب الأسبوعي", "daily_rank": "الترتيب اليومي", "weekly_rewards": "المكافآت الأسبوعية", - "daily_rewards": "المكافآت اليومية" + "daily_rewards": "المكافآت اليومية", + + "active_game_current_daily_recharge_amount": "مبلغ الشحن اليومي الحالي: {amount}.", + "active_game_current_daily_game_spending": "إنفاق الألعاب اليومي الحالي: {coins} عملة.", + "active_game_task1_detail": "1. الهدف اليومي: أنفق ({progress} عملة). افتح مكافأة {reward} عملة ليوم غد!", + "active_game_task2_detail": "2. وصل إلى ({progress}) للمطالبة بالمكافأة الحالية.", + "active_game_level_label": "Lv.{level}", + "active_game_rule_1": "(1) يتم إصدار جميع مكافآت العملات المكتسبة اليوم في اليوم التالي.", + "active_game_rule_2": "(2) يجب المطالبة بالمهمة 2 يدويا.", + "active_game_rule_3": "(3) يجب إكمال المهمتين للانتقال إلى المستوى التالي.", + "active_game_vap_playback_failed": "فشل تشغيل VAP", + "active_game_claim_reward_failed": "فشل المطالبة بالمكافأة" } diff --git a/src/locales/bn.json b/src/locales/bn.json index f0b25ef..7de0806 100644 --- a/src/locales/bn.json +++ b/src/locales/bn.json @@ -495,5 +495,16 @@ "weekly_rank": "সাপ্তাহিক র্যাঙ্ক", "daily_rank": "দৈনিক র্যাঙ্ক", "weekly_rewards": "সাপ্তাহিক পুরস্কার", - "daily_rewards": "দৈনিক পুরস্কার" + "daily_rewards": "দৈনিক পুরস্কার", + + "active_game_current_daily_recharge_amount": "বর্তমান দৈনিক রিচার্জের পরিমাণ: {amount}.", + "active_game_current_daily_game_spending": "বর্তমান দৈনিক গেম খরচ: {coins} কয়েন।", + "active_game_task1_detail": "1. দৈনিক লক্ষ্য: খরচ করুন ({progress} কয়েন)। আগামীকালের জন্য {reward} কয়েন পুরস্কার আনলক করুন!", + "active_game_task2_detail": "2. বর্তমান পুরস্কার দাবি করতে ({progress}) পৌঁছান।", + "active_game_level_label": "Lv.{level}", + "active_game_rule_1": "(1) আজ অর্জিত সব কয়েন পুরস্কার পরের দিন দেওয়া হবে।", + "active_game_rule_2": "(2) টাস্ক 2 ম্যানুয়ালি দাবি করতে হবে।", + "active_game_rule_3": "(3) পরবর্তী লেভেলে যেতে দুটি টাস্কই সম্পন্ন করতে হবে।", + "active_game_vap_playback_failed": "VAP প্লেব্যাক ব্যর্থ হয়েছে", + "active_game_claim_reward_failed": "পুরস্কার দাবি করতে ব্যর্থ হয়েছে" } diff --git a/src/locales/en.json b/src/locales/en.json index cb0cc16..19034cd 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -495,5 +495,16 @@ "weekly_rank": "Weekly Rank", "daily_rank": "Daily Rank", "weekly_rewards": "Weekly Rewards", - "daily_rewards": "Daily Rewards" + "daily_rewards": "Daily Rewards", + + "active_game_current_daily_recharge_amount": "Current daily recharge amount: {amount}.", + "active_game_current_daily_game_spending": "Current daily game spending: {coins} coins.", + "active_game_task1_detail": "1. Daily Goal: Spend ({progress} coins). Unlock a {reward} coin reward for tomorrow!", + "active_game_task2_detail": "2. Reach ({progress}) to claim the current reward.", + "active_game_level_label": "Lv.{level}", + "active_game_rule_1": "(1) All coin rewards earned today are issued the next day.", + "active_game_rule_2": "(2) Task 2 must be claimed manually.", + "active_game_rule_3": "(3) You must complete both tasks to proceed to the next level.", + "active_game_vap_playback_failed": "VAP playback failed", + "active_game_claim_reward_failed": "Failed to claim reward" } diff --git a/src/locales/tr.json b/src/locales/tr.json index c0221a5..46d4f84 100644 --- a/src/locales/tr.json +++ b/src/locales/tr.json @@ -495,5 +495,16 @@ "weekly_rank": "Haftalık Sıralama", "daily_rank": "Günlük Sıralama", "weekly_rewards": "Haftalık Ödüller", - "daily_rewards": "Günlük Ödüller" + "daily_rewards": "Günlük Ödüller", + + "active_game_current_daily_recharge_amount": "Mevcut günlük yükleme tutarı: {amount}.", + "active_game_current_daily_game_spending": "Mevcut günlük oyun harcaması: {coins} coin.", + "active_game_task1_detail": "1. Günlük Hedef: Harca ({progress} coin). Yarın için {reward} coin ödülünü aç!", + "active_game_task2_detail": "2. Mevcut ödülü almak için ({progress}) seviyesine ulaş.", + "active_game_level_label": "Lv.{level}", + "active_game_rule_1": "(1) Bugün kazanılan tüm coin ödülleri ertesi gün verilir.", + "active_game_rule_2": "(2) Görev 2 manuel olarak alınmalıdır.", + "active_game_rule_3": "(3) Sonraki seviyeye geçmek için iki görevi de tamamlamalısınız.", + "active_game_vap_playback_failed": "VAP oynatma başarısız", + "active_game_claim_reward_failed": "Ödül alınamadı" } diff --git a/src/locales/zh.json b/src/locales/zh.json index c4f793f..2b96771 100644 --- a/src/locales/zh.json +++ b/src/locales/zh.json @@ -495,5 +495,16 @@ "weekly_rank": "周榜", "daily_rank": "日榜", "weekly_rewards": "周榜奖励", - "daily_rewards": "日榜奖励" + "daily_rewards": "日榜奖励", + + "active_game_current_daily_recharge_amount": "当前每日充值金额:{amount}。", + "active_game_current_daily_game_spending": "当前每日游戏消费:{coins} 金币。", + "active_game_task1_detail": "1. 每日目标:消费({progress} 金币)。解锁 {reward} 金币奖励,奖励将在明天发放!", + "active_game_task2_detail": "2. 达到({progress})即可领取当前奖励。", + "active_game_level_label": "Lv.{level}", + "active_game_rule_1": "(1)今天获得的所有金币奖励将在次日发放。", + "active_game_rule_2": "(2)任务 2 需要手动领取。", + "active_game_rule_3": "(3)必须完成两个任务才能进入下一等级。", + "active_game_vap_playback_failed": "VAP 播放失败", + "active_game_claim_reward_failed": "领取奖励失败" } diff --git a/src/router/index.js b/src/router/index.js index 0d4f04f..ef39bfc 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -395,6 +395,12 @@ const router = createRouter({ }, // 限时活动 + { + path: '/activities/active-game', + name: 'active-game', + component: () => import('../views/Activities/ActiveGame/index.vue'), + meta: { requiresAuth: true }, + }, //2026年5月1日上午5点结束 { path: '/activities/poker-ace', name: 'pokerAce', diff --git a/src/utils/permissionManager.js b/src/utils/permissionManager.js index 3504c14..6bbacc1 100644 --- a/src/utils/permissionManager.js +++ b/src/utils/permissionManager.js @@ -61,6 +61,7 @@ const ACTIVITIES = [ '/login-reward', // 登录奖励 '/activities/poker-ace', // 扑克王牌排行榜 + '/daily-recharge', // 每日充值页面 '/activities/lucky-dollars-season4', // 幸运美金活动 '/activities/lesser-bairam', // 开斋节打榜 '/activities/lucky-dollars-season3', // 斋月打榜 diff --git a/src/views/Activities/DailyRecharge/index.vue b/src/views/Activities/DailyRecharge/index.vue new file mode 100644 index 0000000..1b84bee --- /dev/null +++ b/src/views/Activities/DailyRecharge/index.vue @@ -0,0 +1,987 @@ + + + + + + + + + + {{ t('loading') }}... + + + + + + + + + + + + + + + + + + + + + {{ taskInfo.task1PendingCoins }} + + + + + + + + + + + + + + + + + + + + + + + + + {{ + t('active_game_current_daily_recharge_amount', { + amount: displayedRechargeAmountText, + }) + }} + + + {{ + t('active_game_current_daily_game_spending', { + coins: displayedSpendCoinsText, + }) + }} + + + + + + + + + + + {{ + t('active_game_task1_detail', { + progress: task1ProgressText, + reward: currentTask1RewardCoinsText, + }) + }} + + + + + {{ + t('active_game_task2_detail', { + progress: task2ProgressText, + }) + }} + + + + + + + + + + + + {{ t('active_game_level_label', { level: currentLevel }) }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + handleRewardImageError(e, mainReward.type)" + /> + + + + {{ formatRewardDisplay(mainReward.type, mainReward) }} + + + + + + + handleRewardImageError(e, reward.type)" + /> + + + {{ formatRewardDisplay(reward.type, reward) }} + + + + + + + + + + + + + + + + + + + + + + {{ t('active_game_rule_1') }} + + + {{ t('active_game_rule_2') }} + + + {{ t('active_game_rule_3') }} + + + + + + + + + + + + + + diff --git a/src/views/Activities/DailyRecharge/vapBg.vue b/src/views/Activities/DailyRecharge/vapBg.vue new file mode 100644 index 0000000..f04a69f --- /dev/null +++ b/src/views/Activities/DailyRecharge/vapBg.vue @@ -0,0 +1,57 @@ + + + + + + + + +
{{ t('loading') }}...