[update]GameRtp页面接入后端
This commit is contained in:
94
web/src/api/backend/embed.ts
Normal file
94
web/src/api/backend/embed.ts
Normal file
@@ -0,0 +1,94 @@
|
||||
import createAxios from '/@/utils/axios'
|
||||
|
||||
export interface GameRtpParams {
|
||||
provider: string
|
||||
game_name: string
|
||||
page: number
|
||||
}
|
||||
|
||||
export function gameRtp(params: GameRtpParams) {
|
||||
return createAxios({
|
||||
url: '/admin/embed.Embed/gameRtp',
|
||||
method: 'get',
|
||||
params,
|
||||
})
|
||||
}
|
||||
|
||||
export interface AddGamePayload {
|
||||
provider_site: string
|
||||
game_name: string
|
||||
image_url: string
|
||||
rtp: number
|
||||
status: 0 | 1
|
||||
}
|
||||
|
||||
export function addGame(data: AddGamePayload) {
|
||||
return createAxios(
|
||||
{
|
||||
url: '/admin/embed.Embed/addGame',
|
||||
method: 'post',
|
||||
data,
|
||||
},
|
||||
{
|
||||
showSuccessMessage: true,
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
export interface EditGamePayload extends AddGamePayload {
|
||||
id: number | string
|
||||
}
|
||||
|
||||
export function editGame(data: EditGamePayload) {
|
||||
return createAxios(
|
||||
{
|
||||
url: '/admin/embed.Embed/editGame',
|
||||
method: 'post',
|
||||
data,
|
||||
},
|
||||
{
|
||||
showSuccessMessage: true,
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
export function del(data: { ids: (number | string)[] }) {
|
||||
return createAxios(
|
||||
{
|
||||
url: '/admin/embed.Embed/del',
|
||||
method: 'post',
|
||||
data,
|
||||
},
|
||||
{
|
||||
showSuccessMessage: true,
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
export interface SaveGameRtpPayload {
|
||||
auto_game_rtp: 0 | 1
|
||||
auto_rtp_amount: Record<string, string | number>
|
||||
auto_frequency: number
|
||||
provider_display: string
|
||||
custom_config: string
|
||||
header_image_url: string
|
||||
text_color: string
|
||||
button_text_color: string
|
||||
base_color: string
|
||||
button_bg_color: string
|
||||
outline_color: string
|
||||
progress_bar_bg_color: string
|
||||
}
|
||||
|
||||
export function saveGameRtp(data: SaveGameRtpPayload) {
|
||||
return createAxios(
|
||||
{
|
||||
url: '/admin/embed.Embed/saveGameRtp',
|
||||
method: 'post',
|
||||
data,
|
||||
},
|
||||
{
|
||||
showSuccessMessage: true,
|
||||
}
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user