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
6f7c627b
Commit
6f7c627b
authored
Apr 02, 2026
by
lijiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【需求 20520】 chore: 加入接口、常量、第三方库
parent
20288209
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
208 additions
and
0 deletions
+208
-0
package.json
package.json
+1
-0
pnpm-lock.yaml
pnpm-lock.yaml
+8
-0
index.ts
src/api/backend/activity/index.ts
+46
-0
types.ts
src/api/backend/activity/types.ts
+39
-0
index.ts
src/api/index.ts
+2
-0
index.ts
src/api/luckyWheel/index.ts
+53
-0
types.ts
src/api/luckyWheel/types.ts
+51
-0
enums.ts
src/constants/enums.ts
+4
-0
options.ts
src/constants/options.ts
+4
-0
No files found.
package.json
View file @
6f7c627b
...
...
@@ -33,6 +33,7 @@
"
axios
"
:
"^1.13.0"
,
"
dayjs
"
:
"^1.11.19"
,
"
element-plus
"
:
"^2.11.5"
,
"
gsap
"
:
"^3.14.2"
,
"
inquirer
"
:
"^13.0.2"
,
"
notivue
"
:
"^2.4.5"
,
"
pinia
"
:
"^3.0.3"
,
...
...
pnpm-lock.yaml
View file @
6f7c627b
...
...
@@ -41,6 +41,9 @@ importers:
element-plus
:
specifier
:
^2.11.5
version
:
2.11.5(@vue/composition-api@1.7.2(vue@3.5.22(typescript@5.9.3)))(vue@3.5.22(typescript@5.9.3))
gsap
:
specifier
:
^3.14.2
version
:
3.14.2
inquirer
:
specifier
:
^13.0.2
version
:
13.0.2(@types/node@22.18.12)
...
...
@@ -2287,6 +2290,9 @@ packages:
graphemer@1.4.0
:
resolution
:
{
integrity
:
sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==
}
gsap@3.14.2
:
resolution
:
{
integrity
:
sha512-P8/mMxVLU7o4+55+1TCnQrPmgjPKnwkzkXOK1asnR9Jg2lna4tEY5qBJjMmAaOBDDZWtlRjBXjLa0w53G/uBLA==
}
gzip-size@6.0.0
:
resolution
:
{
integrity
:
sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==
}
engines
:
{
node
:
'
>=10'
}
...
...
@@ -6440,6 +6446,8 @@ snapshots:
graphemer@1.4.0
:
{}
gsap@3.14.2
:
{}
gzip-size@6.0.0
:
dependencies
:
duplexer
:
0.1.2
...
...
src/api/backend/activity/index.ts
View file @
6f7c627b
...
...
@@ -9,6 +9,11 @@ import type {
BackendAddOrUpdateLotteryPrizeDto
,
BackendAddOrUpdateLotteryConfigDto
,
BackendLotteryConfigDto
,
BackendWheelPrizeListSearchParams
,
BackendWheelPrizeListItemDto
,
BackendAddOrUpdateWheelPrizeDto
,
BackendAddOrUpdateWheelConfigDto
,
BackendWheelConfigDto
,
}
from
'./types'
import
type
{
BackendServicePageResult
}
from
'@/utils/request/types'
import
{
BooleanFlag
}
from
'@/constants'
...
...
@@ -121,3 +126,44 @@ export const setLotteryConfig = (data: BackendAddOrUpdateLotteryConfigDto) => {
data
,
})
}
// ========== 大转盘抽奖 ==========
export
const
getWheelPrizeList
=
(
data
:
BackendWheelPrizeListSearchParams
)
=>
{
return
service
.
request
<
BackendServicePageResult
<
BackendWheelPrizeListItemDto
>>
({
url
:
'/api/cultureWheelPrizes/listPrizesByPage'
,
method
:
'POST'
,
data
,
})
}
export
const
addOrUpdateWheelPrize
=
(
data
:
BackendAddOrUpdateWheelPrizeDto
)
=>
{
return
service
.
request
({
url
:
'/api/cultureWheelPrizes/addOrUpdatePrize'
,
method
:
'POST'
,
data
,
})
}
export
const
deleteWheelPrize
=
(
idList
:
number
[])
=>
{
return
service
.
request
({
url
:
'/api/cultureWheelPrizes/deletePrizes'
,
method
:
'POST'
,
data
:
{
idList
},
})
}
export
const
getWheelConfig
=
()
=>
{
return
service
.
request
<
BackendWheelConfigDto
>
({
url
:
'/api/cultureWheelPrizes/getWheelConfig'
,
method
:
'POST'
,
})
}
export
const
setWheelConfig
=
(
data
:
BackendAddOrUpdateWheelConfigDto
)
=>
{
return
service
.
request
({
url
:
'/api/cultureWheelPrizes/setWheelConfig'
,
method
:
'POST'
,
data
,
})
}
src/api/backend/activity/types.ts
View file @
6f7c627b
...
...
@@ -107,3 +107,42 @@ export type BackendLotteryConfigDto = {
inRegistrationTime
:
BooleanFlag
registrationTimeDesc
:
string
}
|
null
// ========== 大转盘抽奖 ==========
export
interface
BackendWheelPrizeListSearchParams
extends
PageSearchParams
{
name
?:
string
isEnabled
?:
BooleanFlag
}
export
interface
BackendWheelPrizeListItemDto
{
id
:
number
name
:
string
imageUrl
:
string
quantity
:
number
probability
:
number
isEnabled
:
BooleanFlag
createdAt
:
number
}
export
interface
BackendAddOrUpdateWheelPrizeDto
{
id
?:
number
name
:
string
imageUrl
:
string
quantity
:
number
probability
:
number
isEnabled
:
BooleanFlag
}
export
type
BackendWheelConfigDto
=
{
isActivityActive
:
boolean
startTime
:
number
endTime
:
number
costYaCoin
:
number
}
|
null
export
interface
BackendAddOrUpdateWheelConfigDto
{
costYaCoin
:
number
startTime
:
string
endTime
:
string
}
src/api/index.ts
View file @
6f7c627b
...
...
@@ -15,6 +15,7 @@ export * from './otherUserPage'
export
*
from
'./auction'
export
*
from
'./dailyLottery'
export
*
from
'./launchCampaign'
export
*
from
'./luckyWheel'
// 导出类型
export
*
from
'./task/types'
export
*
from
'./shop/types'
...
...
@@ -32,3 +33,4 @@ export * from './otherUserPage/types'
export
*
from
'./auction/types'
export
*
from
'./dailyLottery/types'
export
*
from
'./launchCampaign/types'
export
*
from
'./luckyWheel/types'
src/api/luckyWheel/index.ts
0 → 100644
View file @
6f7c627b
import
service
from
'@/utils/request'
import
type
{
WheelPrizeItemDto
,
WheelConfigDto
,
LuckWheelResultDto
,
UserWheelRecordItemDto
,
}
from
'./types'
import
type
{
BackendServicePageResult
,
PageSearchParams
}
from
'@/utils/request/types'
// 大转盘相关接口
/**
* 获取转盘列表
*/
export
const
getWheelPrizeList
=
()
=>
{
return
service
.
request
<
WheelPrizeItemDto
[]
>
({
url
:
`/api/cultureWheelPrizes/getWheelPrizes`
,
method
:
'POST'
,
data
:
{},
})
}
/**
* 前台相关转盘配置
*/
export
const
getWheelConfig
=
()
=>
{
return
service
.
request
<
WheelConfigDto
>
({
url
:
`/api/cultureWheelPrizes/getWheelConfig`
,
method
:
'POST'
,
data
:
{},
})
}
/**
* 用户抽奖
*/
export
const
participateLuckyWheel
=
()
=>
{
return
service
.
request
<
LuckWheelResultDto
>
({
url
:
`/api/cultureWheelPrizes/participate`
,
method
:
'POST'
,
data
:
{},
})
}
/**
* 获取用户大转盘记录
*/
export
const
getUserWheelRecordList
=
(
data
:
PageSearchParams
)
=>
{
return
service
.
request
<
BackendServicePageResult
<
UserWheelRecordItemDto
>>
({
url
:
`/api/cultureWheelPrizes/listWheelRecordsByPage`
,
method
:
'POST'
,
data
,
})
}
src/api/luckyWheel/types.ts
0 → 100644
View file @
6f7c627b
import
type
{
BooleanFlag
}
from
'@/constants/enums'
export
interface
WheelPrizeItemDto
{
createdAt
:
number
createdUser
:
string
description
:
string
id
:
number
|
null
imageUrl
:
string
isEnabled
:
BooleanFlag
name
:
string
probability
:
number
quantity
:
number
sortOrder
:
number
type
:
number
updatedAt
:
number
}
export
type
WheelConfigDto
=
{
isActivityActive
:
boolean
startTime
:
number
endTime
:
number
costYaCoin
:
number
}
|
null
export
type
LuckWheelResultDto
=
{
blessingText
:
string
|
null
coinCost
:
number
isWin
:
boolean
prizeId
:
number
|
null
prizeImageUrl
:
string
prizeName
:
string
}
export
interface
UserWheelRecordItemDto
{
blessingText
:
string
coinCost
:
number
createdAt
:
number
createdAtStr
:
string
id
:
number
isWin
:
BooleanFlag
issueTime
:
null
issueTimeStr
:
string
issuerName
:
null
memo
:
string
prizeId
:
null
prizeImageUrl
:
null
prizeName
:
null
status
:
null
userId
:
number
userName
:
string
}
src/constants/enums.ts
View file @
6f7c627b
...
...
@@ -112,6 +112,8 @@ export enum ActivityTypeEnum {
AUCTION
=
1
,
// 每日抽奖
DAILY_LOTTERY
=
2
,
// 大转盘
WHEEL
=
3
,
}
// 竞拍状态枚举
...
...
@@ -150,6 +152,8 @@ export enum GoodsDistributionTypeEnum {
ORDER
=
'order'
,
// 竞拍
AUCTION
=
'auction'
,
// 大转盘
WHEEL
=
'wheel'
,
}
// 特定视频奖励枚举
...
...
src/constants/options.ts
View file @
6f7c627b
...
...
@@ -233,6 +233,10 @@ export const goodsDistributionTypeListOptions: {
label
:
'竞拍'
,
value
:
GoodsDistributionTypeEnum
.
AUCTION
,
},
{
label
:
'大转盘'
,
value
:
GoodsDistributionTypeEnum
.
WHEEL
,
},
]
// 特定视频奖励列表
...
...
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