From 74a99107825f77dbede6c704a5cc88e66f1678a9 Mon Sep 17 00:00:00 2001
From: Ygb <2694611394@qq.com>
Date: Wed, 16 Jul 2025 18:43:00 +0800
Subject: [PATCH] =?UTF-8?q?feat:=E6=B4=BB=E8=B7=83=E5=8D=A1=E5=AF=86?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/modules/cards.js | 27 ++-
src/layout/Sidebar.vue | 5 +-
src/router/index.js | 5 +
src/views/Login/index.vue | 63 +++----
src/views/Tools/Cards/ActiveCardsList.vue | 192 ++++++++++++++++++++++
5 files changed, 259 insertions(+), 33 deletions(-)
create mode 100644 src/views/Tools/Cards/ActiveCardsList.vue
diff --git a/src/api/modules/cards.js b/src/api/modules/cards.js
index 17e493b..ff11615 100644
--- a/src/api/modules/cards.js
+++ b/src/api/modules/cards.js
@@ -41,7 +41,32 @@ const cardsApi = {
batchCreateCards: (data) => instance.post('/cards/batchCreate', data),
// 修改卡密状态
- updateCardStatus: (data) => instance.put('/cards/updateStatus', data)
+ updateCardStatus: (data) => instance.put('/cards/updateStatus', data),
+
+ // 获取活跃卡密列表(分页)
+ getActiveCardsPage: (params) => {
+ // 转换分页参数名称
+ const convertedParams = {
+ pageNum: params.current,
+ pageSize: params.size
+ }
+
+ // 删除旧的参数
+ delete convertedParams.current
+ delete convertedParams.size
+
+ console.log('活跃卡密查询参数:', convertedParams)
+ return instance.get('/verifyPrice/getActiveCardsPage', {
+ params: convertedParams,
+ paramsSerializer: params => {
+ return Object.entries(params)
+ .filter(([_, v]) => v !== undefined)
+ .map(([k, v]) => `${k}=${encodeURIComponent(v)}`)
+ .join('&')
+ }
+ })
+ }
+
}
export { cardsApi }
\ No newline at end of file
diff --git a/src/layout/Sidebar.vue b/src/layout/Sidebar.vue
index 50910e2..22d65db 100644
--- a/src/layout/Sidebar.vue
+++ b/src/layout/Sidebar.vue
@@ -133,7 +133,10 @@
children: [{
title: '卡密列表',
path: '/tools/cards/list'
- }]
+ },{
+ title: '活跃卡密列表',
+ path: '/tools/cards/activeCardsList'
+ }]
}]
},
{
diff --git a/src/router/index.js b/src/router/index.js
index 9792132..f2c8cb2 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -48,6 +48,11 @@ const routes = [{
component: () => import('@/views/Tools/Cards/List.vue'),
meta: { title: '卡密列表' }
},
+ {
+ path: '/tools/cards/activeCardsList',
+ component: () => import('@/views/Tools/Cards/ActiveCardsList.vue'),
+ meta: { title: '活跃卡密列表' }
+ },
{
path: '/examine/violation/list',
component: () => import('@/views/Examine/Violation/List.vue'),
diff --git a/src/views/Login/index.vue b/src/views/Login/index.vue
index 3fe6ef0..edca692 100644
--- a/src/views/Login/index.vue
+++ b/src/views/Login/index.vue
@@ -1,28 +1,29 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
![]()
-
-
-
- 登录
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
![]()
+
+
+
+ 登录
+
+
+
+
\ No newline at end of file