From 29527ddb37bd976110b4cafe07b0d4c6c323655e Mon Sep 17 00:00:00 2001
From: wangxiangwen4 <1906413238@qq.com>
Date: Fri, 18 Jul 2025 17:58:40 +0800
Subject: [PATCH 1/5] =?UTF-8?q?TODO=E6=B4=BB=E5=8A=A8=E5=88=A0=E9=99=A4+?=
=?UTF-8?q?=E4=B8=AD=E5=A5=96=E6=9F=A5=E8=AF=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
activitylink/src/api/manage/activity.js | 62 +++-
activitylink/src/api/manage/win.js | 6 +-
.../src/views/zhongchou/activity/detail/index.vue | 371 ++++++++++---------
.../src/views/zhongchou/activity/index.vue | 124 ++++++-
.../src/views/zhongchou/activity/set/index.vue | 393 ++++++++++++++-------
activitylink/src/views/zhongchou/winning/index.vue | 2 +-
6 files changed, 615 insertions(+), 343 deletions(-)
diff --git a/activitylink/src/api/manage/activity.js b/activitylink/src/api/manage/activity.js
index 364800b..c2823c8 100644
--- a/activitylink/src/api/manage/activity.js
+++ b/activitylink/src/api/manage/activity.js
@@ -34,7 +34,67 @@ export function getDetailList() {
return request({
url: '/admin/funding/getActivityDetail',
method: 'post',
-
+
+ })
+
+}
+
+export function getDetailListbyActivityId(data) {
+ return request({
+ url: '/admin/funding/getActivityDetail',
+ method: 'post',
+ data
+ })
+}
+
+
+export function getDetailMessage(activityId){
+ return request({
+ url: '/admin/funding/getActivityDate',
+ method: 'post',
+ params: { activityId }
+ })
+}
+
+
+export function showsetDetail(activityId){
+ return request({
+ url: '/admin/funding/getDate',
+ method: 'post',
+ params: { activityId }
+ })
+}
+
+export function showaddDetail(activityId,stock,addTotal){
+ return request({
+ url: '/admin/funding/addDateVirtual',
+ method: 'post',
+ params: { activityId,stock,addTotal }
+ })
+}
+
+export function setTime(activityId,time){
+ return request({
+ url: '/admin/funding/setActivityTime',
+ method: 'post',
+ params: { activityId,time }
+ })
+}
+
+export function getMarket(){
+ return request({
+ url: '/admin/funding/getMarketList',
+ method: 'get',
+ })
+}
+
+
+export function deleteActivityById(activityId)
+{
+ return request({
+ url: 'activityId/admin/funding/deleteActivity',
+ method: 'post',
+ params: { activityId }
})
}
\ No newline at end of file
diff --git a/activitylink/src/api/manage/win.js b/activitylink/src/api/manage/win.js
index 4fa404e..d8afdc0 100644
--- a/activitylink/src/api/manage/win.js
+++ b/activitylink/src/api/manage/win.js
@@ -1,9 +1,9 @@
import request from '@/utils/request'
-export function deleteUser(id) {
+export function getWinList(data) {
return request({
- url: '/admin/user/delete',
+ url: '/admin/win/list',
method: 'post',
- params: { id }
+ data
})
}
\ No newline at end of file
diff --git a/activitylink/src/views/zhongchou/activity/detail/index.vue b/activitylink/src/views/zhongchou/activity/detail/index.vue
index 2d9d981..328644e 100644
--- a/activitylink/src/views/zhongchou/activity/detail/index.vue
+++ b/activitylink/src/views/zhongchou/activity/detail/index.vue
@@ -1,63 +1,58 @@
-
-
- 返回
+ 返回
-
-
- 当前总参与人数:{{ totalParticipants }}人
- 参与美股总人数:{{ usParticipants }}人 美股助力总次数:{{ usAssists }}次
- 参与港股总人数:{{ hkParticipants }}人 港股助力总次数:{{ hkAssists }}次
-
+
+
+ 当前总参与人数:{{ totalParticipants }}人
+ 参与{{marketOneLabel}}总人数:{{ usParticipants }}人 {{marketOneLabel}}助力总次数:{{ usAssists }}次
+ 参与{{marketTwoLabel}}总人数:{{ hkParticipants }}人 {{marketTwoLabel}}助力总次数:{{ hkAssists }}次
+ 当前活动id:{{ activityStone.selectactivityId }}
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 搜索
-
-
- 重置
-
-
- 导出数据
-
-
-
-
-
-
-
-
-
-
-
- 美股
- 港股
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+
+
+ 重置
+
+
+ 导出数据
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
-
@@ -260,11 +243,11 @@ const handleJingwangIdInput = (value) => {
}
.gray-container {
- width: 100%; /* 宽度自适应 */
- background-color: #ffffff; /* 浅灰色背景 */
- padding: 20px; /* 内边距 */
- box-sizing: border-box; /* 包含内边距在总宽度内 */
- min-height: 80vh; /* 设置最小高度 */
+ width: 100%;
+ background-color: #ffffff;
+ padding: 20px;
+ box-sizing: border-box;
+ min-height: 80vh;
overflow-x: hidden;
}
@@ -273,15 +256,15 @@ const handleJingwangIdInput = (value) => {
}
.market-item {
- width: 200px; /* 根据需要调整宽度 */
+ width: 200px;
}
.market-select {
- width: 100%; /* 确保 select 宽度与 form-item 一致 */
+ width: 100%;
}
.table-container {
- height: 600px; /* 根据需要调整高度 */
- overflow-y: auto; /* 启用垂直滚动条 */
+ height: 600px;
+ overflow-y: auto;
}
\ No newline at end of file
diff --git a/activitylink/src/views/zhongchou/activity/index.vue b/activitylink/src/views/zhongchou/activity/index.vue
index 127fb79..381781e 100644
--- a/activitylink/src/views/zhongchou/activity/index.vue
+++ b/activitylink/src/views/zhongchou/activity/index.vue
@@ -12,10 +12,11 @@
-
+
+
-
-
+
+
@@ -28,8 +29,8 @@
-
- 设置
+
+ 设置
@@ -45,7 +46,29 @@
/>
+
+
+
+
+ 删除
+
+
+
+
+
+
+
+ 您确定删除该活动吗?
+
+
+
+
+
+
-
+
+
+
+
-
+
+
+
@@ -125,8 +163,8 @@
@@ -275,7 +369,8 @@ onMounted(() => {
padding: 20px; /* 内边距 */
box-sizing: border-box; /* 包含内边距在总宽度内 */
min-height: 80vh; /* 设置最小高度 */
- overflow-x: hidden;
+ /* overflow-x: hidden; */
+ overflow-y: auto;
}
.activity-header {
@@ -319,4 +414,9 @@ th {
margin-top: 20px;
text-align: center;
}
+
+.table-container {
+ height: 650px; /* 根据需要调整高度 */
+ overflow-y: auto; /* 启用垂直滚动条 */
+}
\ No newline at end of file
diff --git a/activitylink/src/views/zhongchou/activity/set/index.vue b/activitylink/src/views/zhongchou/activity/set/index.vue
index 979214a..38c626d 100644
--- a/activitylink/src/views/zhongchou/activity/set/index.vue
+++ b/activitylink/src/views/zhongchou/activity/set/index.vue
@@ -1,93 +1,140 @@
+
+
+
+
+ 返回
+
-
-
-
+
数据设置:
-
-
- 返回
-
+
+
+
+ 分钟
+
+ 确认
+
-
数据设置:
+
+
+
+
+
+ 确认
+
+
+
-
-
-
- 分钟
-
- 确认
-
+
+
+
+
+
+ 确认
+
+
+
-
-
-
-
- 确认
-
-
-
+
+
+
+
-
-
-
-
- 确认
-
-
-
+
+
+ 您确定要添加这些次数吗?
+
+
+
+
-
-
- 您确定要添加这些次数吗?
-
-
-
-
-
-
-
- 您确定要设置初始数据为 {{ initialData }} 分钟吗?
-
-
-
-
-
-
+
+
+ 您确定要设置初始数据为 {{ setinitiaData }} 分钟吗?
+
+
+
+
+
+
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/activitylink/src/views/zhongchou/winning/index.vue b/activitylink/src/views/zhongchou/winning/index.vue
index 3bdaf0e..0087ba8 100644
--- a/activitylink/src/views/zhongchou/winning/index.vue
+++ b/activitylink/src/views/zhongchou/winning/index.vue
@@ -78,7 +78,7 @@
\ No newline at end of file
From 503299616ebcc85bfc8a51a001e3809483f17a5e Mon Sep 17 00:00:00 2001
From: wangxiangwen4 <1906413238@qq.com>
Date: Sat, 19 Jul 2025 15:00:20 +0800
Subject: [PATCH 3/5] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=8C=81=E4=B9=85?=
=?UTF-8?q?=E5=8C=96=E5=A4=84=E7=90=86+=E7=AD=89=E7=BA=A7=E7=AE=A1?=
=?UTF-8?q?=E7=90=86=E6=B5=8B=E8=AF=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
activitylink/package-lock.json | 117 +++++
activitylink/package.json | 2 +
activitylink/src/api/manage/activity.js | 12 +-
activitylink/src/api/manage/gift.js | 14 +-
activitylink/src/api/manage/level.js | 26 +-
activitylink/src/api/manage/win.js | 8 +
activitylink/src/main.js | 2 +
activitylink/src/stone/activityStone.js | 50 +-
.../src/views/zhongchou/activity/index.vue | 10 +
.../src/views/zhongchou/activity/set/index.vue | 21 +-
activitylink/src/views/zhongchou/level/index.vue | 521 +++++++++------------
activitylink/src/views/zhongchou/winning/index.vue | 2 +-
activitylink/vite.config.js | 9 -
13 files changed, 446 insertions(+), 348 deletions(-)
diff --git a/activitylink/package-lock.json b/activitylink/package-lock.json
index c0eadc8..bdb532e 100644
--- a/activitylink/package-lock.json
+++ b/activitylink/package-lock.json
@@ -12,7 +12,9 @@
"axios": "^1.10.0",
"element-plus": "^2.10.4",
"file-saver": "^2.0.5",
+ "localforage": "^1.10.0",
"pinia": "^3.0.3",
+ "pinia-plugin-persistedstate": "^4.4.1",
"vite": "^4.5.3",
"vue": "^3.5.17",
"vue-router": "^4.5.1"
@@ -812,6 +814,18 @@
"integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==",
"license": "MIT"
},
+ "node_modules/deep-pick-omit": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/deep-pick-omit/-/deep-pick-omit-1.2.1.tgz",
+ "integrity": "sha512-2J6Kc/m3irCeqVG42T+SaUMesaK7oGWaedGnQQK/+O0gYc+2SP5bKh/KKTE7d7SJ+GCA9UUE1GRzh6oDe0EnGw==",
+ "license": "MIT"
+ },
+ "node_modules/defu": {
+ "version": "6.1.4",
+ "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.4.tgz",
+ "integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==",
+ "license": "MIT"
+ },
"node_modules/delayed-stream": {
"version": "1.0.0",
"resolved": "https://mirrors.huaweicloud.com/repository/npm/delayed-stream/-/delayed-stream-1.0.0.tgz",
@@ -821,6 +835,12 @@
"node": ">=0.4.0"
}
},
+ "node_modules/destr": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.5.tgz",
+ "integrity": "sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA==",
+ "license": "MIT"
+ },
"node_modules/dunder-proto": {
"version": "1.0.1",
"resolved": "https://mirrors.huaweicloud.com/repository/npm/dunder-proto/-/dunder-proto-1.0.1.tgz",
@@ -1126,6 +1146,12 @@
"integrity": "sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==",
"license": "MIT"
},
+ "node_modules/immediate": {
+ "version": "3.0.6",
+ "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",
+ "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==",
+ "license": "MIT"
+ },
"node_modules/is-what": {
"version": "4.1.16",
"resolved": "https://registry.npmjs.org/is-what/-/is-what-4.1.16.tgz",
@@ -1138,6 +1164,24 @@
"url": "https://github.com/sponsors/mesqueeb"
}
},
+ "node_modules/lie": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz",
+ "integrity": "sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw==",
+ "license": "MIT",
+ "dependencies": {
+ "immediate": "~3.0.5"
+ }
+ },
+ "node_modules/localforage": {
+ "version": "1.10.0",
+ "resolved": "https://registry.npmjs.org/localforage/-/localforage-1.10.0.tgz",
+ "integrity": "sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "lie": "3.1.1"
+ }
+ },
"node_modules/lodash": {
"version": "4.17.21",
"resolved": "https://mirrors.huaweicloud.com/repository/npm/lodash/-/lodash-4.17.21.tgz",
@@ -1269,6 +1313,33 @@
}
}
},
+ "node_modules/pinia-plugin-persistedstate": {
+ "version": "4.4.1",
+ "resolved": "https://registry.npmjs.org/pinia-plugin-persistedstate/-/pinia-plugin-persistedstate-4.4.1.tgz",
+ "integrity": "sha512-lmuMPpXla2zJKjxEq34e1E9P9jxkWEhcVwwioCCE0izG45kkTOvQfCzvwhW3i38cvnaWC7T1eRdkd15Re59ldw==",
+ "license": "MIT",
+ "dependencies": {
+ "deep-pick-omit": "^1.2.1",
+ "defu": "^6.1.4",
+ "destr": "^2.0.5"
+ },
+ "peerDependencies": {
+ "@nuxt/kit": ">=3.0.0",
+ "@pinia/nuxt": ">=0.10.0",
+ "pinia": ">=3.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@nuxt/kit": {
+ "optional": true
+ },
+ "@pinia/nuxt": {
+ "optional": true
+ },
+ "pinia": {
+ "optional": true
+ }
+ }
+ },
"node_modules/pinia/node_modules/@vue/devtools-api": {
"version": "7.7.7",
"resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-7.7.7.tgz",
@@ -1898,11 +1969,26 @@
"resolved": "https://mirrors.huaweicloud.com/repository/npm/dayjs/-/dayjs-1.11.13.tgz",
"integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg=="
},
+ "deep-pick-omit": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/deep-pick-omit/-/deep-pick-omit-1.2.1.tgz",
+ "integrity": "sha512-2J6Kc/m3irCeqVG42T+SaUMesaK7oGWaedGnQQK/+O0gYc+2SP5bKh/KKTE7d7SJ+GCA9UUE1GRzh6oDe0EnGw=="
+ },
+ "defu": {
+ "version": "6.1.4",
+ "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.4.tgz",
+ "integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg=="
+ },
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://mirrors.huaweicloud.com/repository/npm/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="
},
+ "destr": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.5.tgz",
+ "integrity": "sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA=="
+ },
"dunder-proto": {
"version": "1.0.1",
"resolved": "https://mirrors.huaweicloud.com/repository/npm/dunder-proto/-/dunder-proto-1.0.1.tgz",
@@ -2098,11 +2184,32 @@
"resolved": "https://registry.npmjs.org/hookable/-/hookable-5.5.3.tgz",
"integrity": "sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ=="
},
+ "immediate": {
+ "version": "3.0.6",
+ "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",
+ "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ=="
+ },
"is-what": {
"version": "4.1.16",
"resolved": "https://registry.npmjs.org/is-what/-/is-what-4.1.16.tgz",
"integrity": "sha512-ZhMwEosbFJkA0YhFnNDgTM4ZxDRsS6HqTo7qsZM08fehyRYIYa0yHu5R6mgo1n/8MgaPBXiPimPD77baVFYg+A=="
},
+ "lie": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz",
+ "integrity": "sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw==",
+ "requires": {
+ "immediate": "~3.0.5"
+ }
+ },
+ "localforage": {
+ "version": "1.10.0",
+ "resolved": "https://registry.npmjs.org/localforage/-/localforage-1.10.0.tgz",
+ "integrity": "sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg==",
+ "requires": {
+ "lie": "3.1.1"
+ }
+ },
"lodash": {
"version": "4.17.21",
"resolved": "https://mirrors.huaweicloud.com/repository/npm/lodash/-/lodash-4.17.21.tgz",
@@ -2193,6 +2300,16 @@
}
}
},
+ "pinia-plugin-persistedstate": {
+ "version": "4.4.1",
+ "resolved": "https://registry.npmjs.org/pinia-plugin-persistedstate/-/pinia-plugin-persistedstate-4.4.1.tgz",
+ "integrity": "sha512-lmuMPpXla2zJKjxEq34e1E9P9jxkWEhcVwwioCCE0izG45kkTOvQfCzvwhW3i38cvnaWC7T1eRdkd15Re59ldw==",
+ "requires": {
+ "deep-pick-omit": "^1.2.1",
+ "defu": "^6.1.4",
+ "destr": "^2.0.5"
+ }
+ },
"postcss": {
"version": "8.5.6",
"resolved": "https://mirrors.huaweicloud.com/repository/npm/postcss/-/postcss-8.5.6.tgz",
diff --git a/activitylink/package.json b/activitylink/package.json
index 9e2dbdd..557f07f 100644
--- a/activitylink/package.json
+++ b/activitylink/package.json
@@ -13,7 +13,9 @@
"axios": "^1.10.0",
"element-plus": "^2.10.4",
"file-saver": "^2.0.5",
+ "localforage": "^1.10.0",
"pinia": "^3.0.3",
+ "pinia-plugin-persistedstate": "^4.4.1",
"vite": "^4.5.3",
"vue": "^3.5.17",
"vue-router": "^4.5.1"
diff --git a/activitylink/src/api/manage/activity.js b/activitylink/src/api/manage/activity.js
index 950fad6..822a75f 100644
--- a/activitylink/src/api/manage/activity.js
+++ b/activitylink/src/api/manage/activity.js
@@ -65,11 +65,19 @@ export function showsetDetail(activityId){
})
}
-export function showaddDetail(activityId,stock,addTotal){
+// export function showaddDetail(activityId,stock,addTotal){
+// return request({
+// url: '/admin/funding/addDateVirtual',
+// method: 'post',
+// params: { activityId,stock,addTotal }
+// })
+// }
+
+export function showaddDetail(data){
return request({
url: '/admin/funding/addDateVirtual',
method: 'post',
- params: { activityId,stock,addTotal }
+ data
})
}
diff --git a/activitylink/src/api/manage/gift.js b/activitylink/src/api/manage/gift.js
index 3a419d1..e3a7c04 100644
--- a/activitylink/src/api/manage/gift.js
+++ b/activitylink/src/api/manage/gift.js
@@ -1,9 +1,17 @@
import request from '@/utils/request'
-export function deleteUser(id) {
+// export function deleteUser(id) {
+// return request({
+// url: '/admin/prize/update',
+// method: 'post',
+// params: { id }
+// })
+// }
+
+export function getGiftList(pageNum,pageSize) {
return request({
- url: '/admin/prize/update',
+ url: '/admin/prize/list',
method: 'post',
- params: { id }
+ params: { pageNum,pageSize }
})
}
\ No newline at end of file
diff --git a/activitylink/src/api/manage/level.js b/activitylink/src/api/manage/level.js
index bde8c3d..d7fed4e 100644
--- a/activitylink/src/api/manage/level.js
+++ b/activitylink/src/api/manage/level.js
@@ -1,10 +1,30 @@
import request from '@/utils/request'
-export function deleteUser() {
+export function deleteLevel() {
return request({
- url: '/admin/funding/getActivity',
- method: 'get',
+ url: '/admin/grade/delete',
+ method: 'post',
})
+}
+
+
+export function getLevelList(pageNum,pageSize){
+ return request({
+ url: '/admin/grade/list',
+ method: 'post',
+ params: {
+ pageNum,
+ pageSize
+ }
+ })
+}
+
+export function addLevel(data) {
+ return request({
+ url: '/admin/grade/add',
+ method: 'post',
+ data
+ })
}
\ No newline at end of file
diff --git a/activitylink/src/api/manage/win.js b/activitylink/src/api/manage/win.js
index d7ae09c..8e302d9 100644
--- a/activitylink/src/api/manage/win.js
+++ b/activitylink/src/api/manage/win.js
@@ -7,4 +7,12 @@ export function getWinList(pageNum,pageSize,data) {
params: { pageNum,pageSize },
data
})
+}
+
+
+export function getWinLevelList(){
+ return request({
+ url: '/admin/grade/allGradeName',
+ method: 'post',
+ })
}
\ No newline at end of file
diff --git a/activitylink/src/main.js b/activitylink/src/main.js
index cfb1058..171ec26 100644
--- a/activitylink/src/main.js
+++ b/activitylink/src/main.js
@@ -6,10 +6,12 @@ import App from './App.vue'
import router from './router'
import { createPinia } from 'pinia'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
+import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import axios from 'axios'
// createApp(App).use(router).mount('#app')
const app = createApp(App)
const pinia = createPinia()
+pinia.use(piniaPluginPersistedstate)
window.axios = axios
// axios.defaults.baseURL = 'http://47.92.148.30:3003/mock/3267'
app.use(router)
diff --git a/activitylink/src/stone/activityStone.js b/activitylink/src/stone/activityStone.js
index fe88578..2f8c8f8 100644
--- a/activitylink/src/stone/activityStone.js
+++ b/activitylink/src/stone/activityStone.js
@@ -1,21 +1,47 @@
-// src/stone/giftFixedListStone.js
+// src/stone/activityStone.js
import { defineStore } from "pinia";
import { ref } from 'vue';
+import localforage from 'localforage';
+
+// 创建本地存储实例
+const activityStorage = localforage.createInstance({
+ name: 'activityStore',
+ storeName: 'activityData'
+});
export const useactivitytone = defineStore('activityStone', () => {
- // 响应式属性
- const selectactivityId = ref(0);
+ // 尝试从本地存储恢复初始值,否则使用默认值
+ const selectactivityId = ref(localStorage.getItem('selectactivityId') || 0);
- // 方法
- const setselectedactivityId = (name) => {
- selectactivityId.value = name;
- };
+ // 方法
+ const setselectedactivityId = (id) => {
+ selectactivityId.value = id;
+ // 同时保存到 localStorage 作为备份
+ localStorage.setItem('selectactivityId', id);
+ };
+ // 在 store 初始化时从持久化存储恢复数据
+ const initialize = async () => {
+ try {
+ const storedId = await activityStorage.getItem('selectactivityId');
+ if (storedId !== null) {
+ selectactivityId.value = storedId;
+ }
+ } catch (error) {
+ console.warn('从 localforage 恢复数据失败,尝试从 localStorage 恢复');
+ const localStorageId = localStorage.getItem('selectactivityId');
+ if (localStorageId !== null) {
+ selectactivityId.value = localStorageId;
+ }
+ }
+ };
+ // 立即初始化
+ initialize();
- // 暴露出去
- return {
- selectactivityId,
- setselectedactivityId,
- };
+ // 暴露出去
+ return {
+ selectactivityId,
+ setselectedactivityId,
+ };
});
\ No newline at end of file
diff --git a/activitylink/src/views/zhongchou/activity/index.vue b/activitylink/src/views/zhongchou/activity/index.vue
index b970f28..bbd1842 100644
--- a/activitylink/src/views/zhongchou/activity/index.vue
+++ b/activitylink/src/views/zhongchou/activity/index.vue
@@ -176,6 +176,16 @@ const activityStone = useactivitytone();
// 响应式数据:市场列表
const marketList = ref([])
+
+// 设置活动ID
+const setActivityId = (id) => {
+ activityStone.setselectedactivityId(id)
+}
+
+// 获取当前活动ID
+const getActivityId = () => {
+ return activityStone.selectactivityId
+}
// 获取市场列表
const fetchMarketList = async () => {
try {
diff --git a/activitylink/src/views/zhongchou/activity/set/index.vue b/activitylink/src/views/zhongchou/activity/set/index.vue
index 38c626d..0696157 100644
--- a/activitylink/src/views/zhongchou/activity/set/index.vue
+++ b/activitylink/src/views/zhongchou/activity/set/index.vue
@@ -199,11 +199,12 @@ const confirmAdd = async () => {
// 调用接口
try {
- const response = await showaddDetail(
- activityStone.selectactivityId,
- marketOne.value,
- addCountOne.value
- );
+ console.log(marketOne.value)
+ const response = await showaddDetail({
+ activityId: activityStone.selectactivityId,
+ stock: marketOne.value,
+ addTotal: addCountOne.value
+ });
if (response.code === 200) {
fetchData();
@@ -230,11 +231,11 @@ const confirmAdd = async () => {
// 调用接口
try {
- const response = await showaddDetail(
- activityStone.selectactivityId,
- marketTwo.value,
- addCountTwo.value
- );
+ const response = await showaddDetail({
+ activityId: activityStone.selectactivityId,
+ stock: marketTwo.value,
+ addTotal: addCountTwo.value
+ });
if (response.code === 200) {
fetchData();
diff --git a/activitylink/src/views/zhongchou/level/index.vue b/activitylink/src/views/zhongchou/level/index.vue
index ebcd508..b01f96f 100644
--- a/activitylink/src/views/zhongchou/level/index.vue
+++ b/activitylink/src/views/zhongchou/level/index.vue
@@ -1,337 +1,242 @@
-
-
-
等级管理
-
-
- 添加等级
-
-
-
-
-
-
-
-
-
-
-
-
-
- 编辑
- 设置多个
- 删除
-
-
-
-
-
+
+
+
等级管理
+
+
+ 添加等级
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+.action-buttons {
+ margin-bottom: 20px;
+}
+
+.table-container {
+ max-height: 600px;
+ overflow-y: auto;
+}
+
\ No newline at end of file
diff --git a/activitylink/src/views/zhongchou/winning/index.vue b/activitylink/src/views/zhongchou/winning/index.vue
index b168053..d5d8dea 100644
--- a/activitylink/src/views/zhongchou/winning/index.vue
+++ b/activitylink/src/views/zhongchou/winning/index.vue
@@ -66,7 +66,7 @@
@@ -168,9 +184,8 @@ onMounted(() => {
margin-bottom: 20px;
}
-/* 添加下拉框样式 */
.prize-level-select {
- width: 220px; /* 设置下拉框宽度 */
+ width: 220px;
}
.table-container {
From 5dfc234ab0d4cefc6602ce49745f9a63b8af7ddb Mon Sep 17 00:00:00 2001
From: wangxiangwen4 <1906413238@qq.com>
Date: Mon, 21 Jul 2025 13:59:21 +0800
Subject: [PATCH 5/5] =?UTF-8?q?=E4=B8=AD=E5=A5=96+=E6=B4=BB=E5=8A=A8?=
=?UTF-8?q?=E6=8C=81=E4=B9=85=E5=8C=96+=E5=AF=BC=E5=87=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
activitylink/src/api/manage/win.js | 10 ++
activitylink/src/stone/winStone.js | 48 +++++++++
.../src/views/zhongchou/activity/detail/index.vue | 15 ++-
.../src/views/zhongchou/activity/index.vue | 3 -
activitylink/src/views/zhongchou/winning/index.vue | 109 ++++++++++++++++-----
5 files changed, 155 insertions(+), 30 deletions(-)
create mode 100644 activitylink/src/stone/winStone.js
diff --git a/activitylink/src/api/manage/win.js b/activitylink/src/api/manage/win.js
index 813e78d..a62d6fb 100644
--- a/activitylink/src/api/manage/win.js
+++ b/activitylink/src/api/manage/win.js
@@ -24,4 +24,14 @@ export function getWinLevelList(){
url: '/admin/grade/allGradeName',
method: 'post',
})
+}
+
+export function exportWinExcel(data)
+{
+ return request({
+ url: '/admin/win/export',
+ method: 'post',
+ data,
+ responseType: 'blob'
+ })
}
\ No newline at end of file
diff --git a/activitylink/src/stone/winStone.js b/activitylink/src/stone/winStone.js
new file mode 100644
index 0000000..d7defb1
--- /dev/null
+++ b/activitylink/src/stone/winStone.js
@@ -0,0 +1,48 @@
+import { defineStore } from "pinia";
+import { ref } from 'vue';
+import localforage from 'localforage';
+
+// 创建本地存储实例
+const winStorage = localforage.createInstance({
+ name: 'winStore',
+ storeName: 'winData'
+});
+
+export const useWinStone = defineStore('winStone', () => {
+ // 持久化参数:searchgradeId
+ const searchgradeId = ref(localStorage.getItem('searchgradeId') || '');
+
+ // 设置 searchgradeId 并持久化
+ const setSearchgradeId = (value) => {
+ searchgradeId.value = value;
+ localStorage.setItem('searchgradeId', value);
+ winStorage.setItem('searchgradeId', value).catch((err) => {
+ console.error('保存 searchgradeId 到 localforage 失败:', err);
+ });
+ };
+
+ // 初始化恢复数据
+ const initialize = async () => {
+ try {
+ const storedgradeId = await winStorage.getItem('searchgradeId');
+ if (storedgradeId !== null) {
+ searchgradeId.value = storedgradeId;
+ }
+ } catch (error) {
+ console.warn('从 localforage 恢复失败,尝试从 localStorage 恢复');
+ const localStoragegradeId = localStorage.getItem('searchgradeId');
+ if (localStoragegradeId !== null) {
+ searchgradeId.value = localStoragegradeId;
+ }
+ }
+ };
+
+ // 初始化时恢复数据
+ initialize();
+
+ // 暴露出去
+ return {
+ searchgradeId,
+ setSearchgradeId,
+ };
+});
\ No newline at end of file
diff --git a/activitylink/src/views/zhongchou/activity/detail/index.vue b/activitylink/src/views/zhongchou/activity/detail/index.vue
index b23e502..5f60233 100644
--- a/activitylink/src/views/zhongchou/activity/detail/index.vue
+++ b/activitylink/src/views/zhongchou/activity/detail/index.vue
@@ -70,7 +70,7 @@