Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
TianGongKaiWu-20251203
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
SparkProjects
TianGongKaiWu-20251203
Commits
ebfb6408
Commit
ebfb6408
authored
Dec 17, 2025
by
天马流星拳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复活动时间判断和月份选择逻辑
在HomePage中添加活动时间判断,防止在非活动时间查看分布 在myQradesPage中修正月份列表生成逻辑并初始化selectId
parent
26ff79e4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
HomePage.tsx
src/pages/HomePage/HomePage.tsx
+1
-0
myqradespage.jsx
src/pages/myQradesPage/myqradespage.jsx
+4
-3
No files found.
src/pages/HomePage/HomePage.tsx
View file @
ebfb6408
...
...
@@ -118,6 +118,7 @@ class HomePage extends React.Component<any, any> {
// 查看分布按钮
viewDistribution
=
(
item
)
=>
{
console
.
log
(
"🚀 ~ HomePage ~ item:"
,
item
)
if
(
!
store
.
judgeActTime
())
return
// 新增 type 0-月榜 1-总榜
item
.
type
=
this
.
state
.
rankingTab
ModalCtrl
.
showModal
(
Positionpop
,
{
item
})
...
...
src/pages/myQradesPage/myqradespage.jsx
View file @
ebfb6408
...
...
@@ -16,7 +16,7 @@ class Myqradespage extends React.Component {
this
.
state
=
{
monthInfo
:[],
// 月份信息
selectIndex
:
0
,
selectId
:
{}
,
selectId
:
''
,
info
:{},
actStartTime
:
0
,
// 活动开始时间戳
actEndTime
:
0
,
//活动结束时间戳
...
...
@@ -67,7 +67,7 @@ class Myqradespage extends React.Component {
// 初始化状态
this
.
setState
({
monthInfo
:
data
.
monthInfo
},
()
=>
{
// 生成完整月份列表
const
monthList
=
this
.
generateMonthList
(
data
.
actStartTime
,
data
.
actEnd
Time
);
const
monthList
=
this
.
generateMonthList
(
data
.
actStartTime
,
data
.
currentEndMonth
Time
);
console
.
log
(
"🚀 ~ Myqradespage ~ monthList:"
,
monthList
);
// 合并月份信息
...
...
@@ -84,7 +84,8 @@ class Myqradespage extends React.Component {
// 更新状态并在回调中执行后续操作
this
.
setState
({
monthInfo
:
mergedMonthInfo
,
selectIndex
:
targetIndex
selectIndex
:
targetIndex
,
selectId
:
mergedMonthInfo
[
targetIndex
].
monthId
},
()
=>
{
console
.
log
(
"🚀 ~ Myqradespage ~ monthInfo:"
,
this
.
state
.
monthInfo
);
// 确保monthInfo数组非空再调用getdrawIndex
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment