diff --git a/src/__tests__/environment.test.ts b/src/__tests__/environment.test.ts new file mode 100644 index 0000000..d61e6ea --- /dev/null +++ b/src/__tests__/environment.test.ts @@ -0,0 +1,41 @@ +import { describe, it, expect, beforeEach, afterEach } from 'vitest'; + +describe('Environment Variables', () => { + const originalEnv = process.env; + + beforeEach(() => { + // 保存原始环境变量 + vi.resetModules(); + }); + + afterEach(() => { + // 恢复原始环境变量 + process.env = { ...originalEnv }; + }); + + it('should load development environment variables', async () => { + // 在实际项目中,您可能需要根据具体框架加载环境变量 + const env = import.meta.env; + + // 验证环境变量是否存在 + expect(env).toBeDefined(); + + // 注意:由于 .env.development 是空的,这里不会有很多变量可以测试 + // 但在实际项目中,您可以添加类似这样的测试: + // expect(env.VITE_API_BASE).toBe('expected_development_api_url'); + }); + + it('should have required environment variables', () => { + // 检查生产环境中必需的变量是否已定义 + const requiredVars = [ + // 'VITE_API_BASE', + // 'VITE_UPLOAD_URL' + ]; + + requiredVars.forEach((varName) => { + // 由于 .env.development 是空的,这些测试会失败 + // 请根据实际情况取消注释并修改 + // expect(import.meta.env[varName]).toBeDefined(); + }); + }); +}); \ No newline at end of file diff --git a/src/views/bankPaymentPage.vue b/src/views/bankPaymentPage.vue new file mode 100644 index 0000000..44f81ca --- /dev/null +++ b/src/views/bankPaymentPage.vue @@ -0,0 +1,127 @@ + + + 支付记录详情 + + + + 查询 + + + + + + + + + + + + + + + + {{ scope.row.status }} + + + + + + + + + + + + diff --git a/src/views/workspace/index_.vue b/src/views/workspace/index_.vue new file mode 100644 index 0000000..190e23c --- /dev/null +++ b/src/views/workspace/index_.vue @@ -0,0 +1,911 @@ + + + 数据总览 + + 最后更新时间:{{ + workDataUpdateTime && workDataUpdateTime !== '1970-01-01 08:00:00' ? workDataUpdateTime : '该地区暂无数据' + }} + + + + + + + + 当前金币余量 + + {{ currentGold / 100 + }} 较前一日 + {{ dailyChange / 100 }} + + + + + + + + + + + + + + + + + + + 永久金币:{{ currentPermanent / 100 }} + 免费金币:{{ currentFree / 100 }} + [六月到期|{{ currentFreeJune / 100 }}] + [十二月到期|{{ currentFreeDecember / 100 }}] + + 任务金币:{{ currentTask / 100 }} + + + + + + 全年累计充值金币数 + {{ yearlyRecharge / 100 }} + + 折合新币累计金额:{{ yearlyMoney / 100 }} + + 昨日新增金币:{{ recharge / 100 }} + 其中永久金币:{{ money / 100 }} + + + + + + 全年累计消费金币数 + {{ yearlyReduce / 100 }} + 消耗:{{ yearlyConsume / 100 }} + 退款:{{ yearlyRefund / 100 }} + + 昨日新增消费:{{ dailyConsume / 100 }} + 昨日新增消耗:{{ dailyReduce / 100 }} + 昨日新增退款:{{ dailyRefund / 100 }} + + + + + + 全年累计充值人头数 + {{ yearlyRechargeNum }} + 周同比:{{ sumWow }}% + + + + + + + + + + + + + + + + + 日环比:{{ sumDaily }}% + + + + + + + + + + + + + + + + + + 昨日充值人数:{{ ydayRechargeNum }} + 其中首充:{{ firstRecharge }} + + + + + + + + + + + + + + + 合计:{{ sumConsume / 100 }} + 永久金币: {{ activeTab === 'recharge' ? sumRechargePermanent / 100 : sumConsumePermanent / 100 }} + 免费金币: {{ activeTab === 'recharge' ? sumRechargeFree / 100 : sumConsumeFree / 100 }} + 任务金币: {{ activeTab === 'recharge' ? sumRechargeTask / 100 : sumConsumeTask / 100 }} + + + 昨天 + + 今天 + + 本周 + + 本月 + + 本年 + + + + + 查询 + + + + + + + + 金币{{ activeTab === 'recharge' ? '充值' : '消费' }}排名 + + + + + + + + + + + {{ marketMapping[scope.row.market] || scope.row.market }} + + + + + {{ row.coinAmount.toLocaleString() }} + + + + + + + + + + + + + \ No newline at end of file