Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
corporate-culture-qd
Overview
Overview
Details
Activity
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王立鹏
corporate-culture-qd
Commits
2582dbc9
Commit
2582dbc9
authored
Jul 23, 2026
by
lijiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【需求 23684】feat: 支持每日抽奖报名分钟配置
parent
e5af948b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
7 deletions
+30
-7
types.ts
src/api/backend/activity/types.ts
+6
-2
lotteryConfigDialog.vue
...enu/dailyLotteryManage/components/lotteryConfigDialog.vue
+24
-5
No files found.
src/api/backend/activity/types.ts
View file @
2582dbc9
...
...
@@ -89,8 +89,10 @@ export interface BackendAddOrUpdateLotteryConfigDto {
startDate
:
string
endDate
:
string
autoCloseWeekend
:
BooleanFlag
registrationStartHour
:
string
registrationEndHour
:
string
registrationStartHour
:
number
registrationStartMinute
:
number
registrationEndHour
:
number
registrationEndMinute
:
number
registrationFee
:
number
}
...
...
@@ -104,8 +106,10 @@ export type BackendLotteryConfigDto = {
prizesImg
:
string
prizesName
:
string
registrationEndHour
:
number
registrationEndMinute
:
number
registrationFee
:
number
registrationStartHour
:
number
registrationStartMinute
:
number
startDate
:
number
status
:
BooleanFlag
updatedAt
:
number
...
...
src/views/backend/settingsMenu/dailyLotteryManage/components/lotteryConfigDialog.vue
View file @
2582dbc9
...
...
@@ -38,8 +38,8 @@
start-placeholder=
"开始时间"
end-placeholder=
"结束时间"
is-range
format=
"HH:
00
"
value-format=
"H"
format=
"HH:
mm
"
value-format=
"H
H:mm
"
/>
</el-form-item>
<!-- 报名费用 -->
...
...
@@ -93,6 +93,18 @@ const visible = ref(false)
const
formRef
=
ref
<
FormInstance
>
()
const
loading
=
ref
(
false
)
const
formatRegistrationTime
=
(
hour
:
number
,
minute
=
0
)
=>
`
${
String
(
hour
).
padStart
(
2
,
'0'
)}
:
${
String
(
minute
).
padStart
(
2
,
'0'
)}
`
const
parseRegistrationTime
=
(
time
:
string
)
=>
{
const
[
hour
=
0
,
minute
=
0
]
=
time
.
split
(
':'
).
map
(
Number
)
return
{
hour
,
minute
,
}
}
const
open
=
async
()
=>
{
const
{
data
}
=
await
getLotteryConfigDetail
()
if
(
!
data
)
{
...
...
@@ -102,7 +114,10 @@ const open = async () => {
id
:
data
.
id
,
openRangeTime
:
[
String
(
data
.
startDate
),
String
(
data
.
endDate
)],
autoCloseWeekend
:
data
.
autoCloseWeekend
,
registrationRangeTime
:
[
String
(
data
.
registrationStartHour
),
String
(
data
.
registrationEndHour
)],
registrationRangeTime
:
[
formatRegistrationTime
(
data
.
registrationStartHour
,
data
.
registrationStartMinute
),
formatRegistrationTime
(
data
.
registrationEndHour
,
data
.
registrationEndMinute
),
],
registrationFee
:
data
.
registrationFee
,
}
}
...
...
@@ -111,12 +126,16 @@ const open = async () => {
const
handleSubmit
=
async
()
=>
{
await
formRef
.
value
?.
validate
()
const
registrationStartTime
=
parseRegistrationTime
(
form
.
value
.
registrationRangeTime
[
0
]
!
)
const
registrationEndTime
=
parseRegistrationTime
(
form
.
value
.
registrationRangeTime
[
1
]
!
)
const
data
=
{
startDate
:
form
.
value
.
openRangeTime
[
0
]
!
,
endDate
:
formatSeconds
(
form
.
value
.
openRangeTime
[
1
]
!
),
autoCloseWeekend
:
form
.
value
.
autoCloseWeekend
,
registrationStartHour
:
form
.
value
.
registrationRangeTime
[
0
]
!
,
registrationEndHour
:
form
.
value
.
registrationRangeTime
[
1
]
!
,
registrationStartHour
:
registrationStartTime
.
hour
,
registrationStartMinute
:
registrationStartTime
.
minute
,
registrationEndHour
:
registrationEndTime
.
hour
,
registrationEndMinute
:
registrationEndTime
.
minute
,
registrationFee
:
form
.
value
.
registrationFee
,
}
loading
.
value
=
true
...
...
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