diff --git a/frontend/portal/package-lock.json b/frontend/portal/package-lock.json index 6c00958..e9b6e0c 100644 --- a/frontend/portal/package-lock.json +++ b/frontend/portal/package-lock.json @@ -10,6 +10,7 @@ "dependencies": { "@primevue/themes": "^4.5.4", "@tailwindcss/vite": "^4.1.18", + "dayjs": "^1.11.19", "pinia": "^3.0.4", "primeicons": "^7.0.0", "primevue": "^4.5.4", @@ -1685,6 +1686,12 @@ "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", "license": "MIT" }, + "node_modules/dayjs": { + "version": "1.11.19", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.19.tgz", + "integrity": "sha512-t5EcLVS6QPBNqM2z8fakk/NKel+Xzshgt8FFKAn+qwlD1pzZWxh0nVCrvFK7ZDb6XucZeF9z8C7CBWTRIVApAw==", + "license": "MIT" + }, "node_modules/detect-libc": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", diff --git a/frontend/portal/package.json b/frontend/portal/package.json index 5403f87..efd9656 100644 --- a/frontend/portal/package.json +++ b/frontend/portal/package.json @@ -11,6 +11,7 @@ "dependencies": { "@primevue/themes": "^4.5.4", "@tailwindcss/vite": "^4.1.18", + "dayjs": "^1.11.19", "pinia": "^3.0.4", "primeicons": "^7.0.0", "primevue": "^4.5.4", diff --git a/frontend/portal/src/views/user/WalletView.vue b/frontend/portal/src/views/user/WalletView.vue index 916de18..30b73f2 100644 --- a/frontend/portal/src/views/user/WalletView.vue +++ b/frontend/portal/src/views/user/WalletView.vue @@ -10,7 +10,7 @@
账户余额 (元)
-
128.50
+
{{ balance.toFixed(2) }}
-
- @@ -63,15 +76,15 @@ 交易明细 -
+
-
{{ item.title }}
-
{{ item.date }}
+
{{ item.title || (item.type === 'income' ? '充值' : '消费') }}
+
{{ formatDate(item.date) }}
@@ -79,6 +92,9 @@
+
+ 暂无交易记录 +
@@ -86,24 +102,62 @@ \ No newline at end of file