移除渠道ChannelManage
This commit is contained in:
@@ -1,95 +0,0 @@
|
||||
import request from '@/utils/http'
|
||||
|
||||
/**
|
||||
* 渠道 API接口
|
||||
*/
|
||||
export default {
|
||||
/**
|
||||
* 获取数据列表
|
||||
* @param params 搜索参数
|
||||
* @returns 数据列表
|
||||
*/
|
||||
list(params: Record<string, any>) {
|
||||
return request.get<Api.Common.ApiPage>({
|
||||
url: '/core/channel/manage/ChannelManage/index',
|
||||
params
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 读取数据
|
||||
* @param id 数据ID
|
||||
* @returns 数据详情
|
||||
*/
|
||||
read(id: number | string) {
|
||||
return request.get<Api.Common.ApiData>({
|
||||
url: '/core/channel/manage/ChannelManage/read?id=' + id
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 创建数据
|
||||
* @param params 数据参数
|
||||
* @returns 执行结果
|
||||
*/
|
||||
save(params: Record<string, any>) {
|
||||
return request.post<any>({
|
||||
url: '/core/channel/manage/ChannelManage/save',
|
||||
data: params
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 更新数据
|
||||
* @param params 数据参数
|
||||
* @returns 执行结果
|
||||
*/
|
||||
update(params: Record<string, any>) {
|
||||
return request.put<any>({
|
||||
url: '/core/channel/manage/ChannelManage/update',
|
||||
data: params
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
* @returns 执行结果
|
||||
* @param params
|
||||
*/
|
||||
delete(params: Record<string, any>) {
|
||||
return request.del<any>({
|
||||
url: '/core/channel/manage/ChannelManage/destroy',
|
||||
data: params
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 仅更新状态(列表内开关用)
|
||||
*/
|
||||
updateStatus(params: { id: number | string; status: number }) {
|
||||
return request.put<any>({
|
||||
url: '/core/channel/manage/ChannelManage/updateStatus',
|
||||
data: params
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取可操作部门列表(树形)
|
||||
* @returns 部门树
|
||||
*/
|
||||
getDeptList() {
|
||||
return request.get<Api.Common.ApiData>({
|
||||
url: '/core/channel/manage/ChannelManage/getDeptList'
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取管理员下拉列表(SystemUser 的 id、username、realname)
|
||||
* @returns 管理员列表
|
||||
*/
|
||||
getAdminList() {
|
||||
return request.get<Api.Common.ApiData>({
|
||||
url: '/core/channel/manage/ChannelManage/getAdminList'
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -1,199 +0,0 @@
|
||||
<template>
|
||||
<div class="art-full-height">
|
||||
<!-- 搜索面板 -->
|
||||
<TableSearch v-model="searchForm" @search="handleSearch" @reset="handleReset" />
|
||||
|
||||
<ElCard class="art-table-card" shadow="never">
|
||||
<!-- 表格头部 -->
|
||||
<ArtTableHeader v-model:columns="columnChecks" :loading="loading" @refresh="refreshData">
|
||||
<template #left>
|
||||
<ElSpace wrap>
|
||||
<ElButton
|
||||
v-permission="'channel:manage:index:save'"
|
||||
@click="showDialog('add')"
|
||||
v-ripple
|
||||
>
|
||||
<template #icon>
|
||||
<ArtSvgIcon icon="ri:add-fill" />
|
||||
</template>
|
||||
新增
|
||||
</ElButton>
|
||||
<ElButton
|
||||
v-permission="'channel:manage:index:destroy'"
|
||||
:disabled="selectedRows.length === 0"
|
||||
@click="deleteSelectedRows(api.delete, refreshData)"
|
||||
v-ripple
|
||||
>
|
||||
<template #icon>
|
||||
<ArtSvgIcon icon="ri:delete-bin-5-line" />
|
||||
</template>
|
||||
删除
|
||||
</ElButton>
|
||||
</ElSpace>
|
||||
</template>
|
||||
</ArtTableHeader>
|
||||
|
||||
<!-- 表格 -->
|
||||
<ArtTable
|
||||
ref="tableRef"
|
||||
rowKey="id"
|
||||
:loading="loading"
|
||||
:data="data"
|
||||
:columns="columns"
|
||||
:pagination="pagination"
|
||||
@sort-change="handleSortChange"
|
||||
@selection-change="handleSelectionChange"
|
||||
@pagination:size-change="handleSizeChange"
|
||||
@pagination:current-change="handleCurrentChange"
|
||||
>
|
||||
<!-- 状态:开关直接修改(仅渠道管理员和超管可操作) -->
|
||||
<template #status="{ row }">
|
||||
<ElSwitch
|
||||
v-if="row.canOperate"
|
||||
v-permission="'channel:manage:index:update'"
|
||||
:model-value="row.status === 1"
|
||||
:loading="row._statusLoading"
|
||||
@change="(v: string | number | boolean) => handleStatusChange(row, v ? 1 : 0)"
|
||||
/>
|
||||
<span v-else>{{ row.status === 1 ? '启用' : '禁用' }}</span>
|
||||
</template>
|
||||
<!-- 操作列(仅渠道管理员和超管可操作) -->
|
||||
<template #operation="{ row }">
|
||||
<div v-if="row.canOperate" class="flex gap-2">
|
||||
<SaButton
|
||||
v-permission="'channel:manage:index:update'"
|
||||
type="secondary"
|
||||
@click="showDialog('edit', row)"
|
||||
/>
|
||||
<SaButton
|
||||
v-permission="'channel:manage:index:destroy'"
|
||||
type="error"
|
||||
@click="deleteRow(row, api.delete, refreshData)"
|
||||
/>
|
||||
</div>
|
||||
<span v-else class="text-gray-400">-</span>
|
||||
</template>
|
||||
</ArtTable>
|
||||
</ElCard>
|
||||
|
||||
<!-- 编辑弹窗 -->
|
||||
<EditDialog
|
||||
v-model="dialogVisible"
|
||||
:dialog-type="dialogType"
|
||||
:data="dialogData"
|
||||
@success="refreshData"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useTable } from '@/hooks/core/useTable'
|
||||
import { useSaiAdmin } from '@/composables/useSaiAdmin'
|
||||
import api from '../../api/manage/index'
|
||||
import TableSearch from './modules/table-search.vue'
|
||||
import EditDialog from './modules/edit-dialog.vue'
|
||||
|
||||
// 搜索表单
|
||||
const searchForm = ref({
|
||||
name: undefined,
|
||||
title: undefined,
|
||||
status: undefined,
|
||||
department_id: undefined,
|
||||
total_recharge: undefined,
|
||||
total_withdrawal: undefined,
|
||||
total_profit: undefined
|
||||
})
|
||||
|
||||
// 搜索处理
|
||||
const handleSearch = (params: Record<string, any>) => {
|
||||
Object.assign(searchParams, params)
|
||||
getData()
|
||||
}
|
||||
|
||||
// 重置时清空部门筛选
|
||||
const handleReset = () => {
|
||||
searchForm.value.department_id = undefined
|
||||
resetSearchParams()
|
||||
}
|
||||
|
||||
// 表格配置
|
||||
const {
|
||||
columns,
|
||||
columnChecks,
|
||||
data,
|
||||
loading,
|
||||
getData,
|
||||
searchParams,
|
||||
pagination,
|
||||
resetSearchParams,
|
||||
handleSortChange,
|
||||
handleSizeChange,
|
||||
handleCurrentChange,
|
||||
refreshData
|
||||
} = useTable({
|
||||
core: {
|
||||
apiFn: api.list,
|
||||
apiParams: {
|
||||
...searchForm.value
|
||||
},
|
||||
columnsFactory: () => [
|
||||
{
|
||||
type: 'selection',
|
||||
selectable: (row: Record<string, any>) => row.canOperate === true
|
||||
},
|
||||
{ prop: 'title', label: '标题' },
|
||||
{ prop: 'status', label: '状态', useSlot: true },
|
||||
{
|
||||
prop: 'admin_id',
|
||||
label: '管理员',
|
||||
formatter: (row: Record<string, any>) => {
|
||||
const admin = row.admin
|
||||
if (!admin) return row.admin_id ?? '-'
|
||||
return (
|
||||
(admin.realname && String(admin.realname).trim()) || admin.username || `#${admin.id}`
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'department_id',
|
||||
label: '所属部门',
|
||||
formatter: (row: Record<string, any>) => row.department?.name ?? row.department_id ?? '-'
|
||||
},
|
||||
{ prop: 'game_url', label: '游戏地址' },
|
||||
{ prop: 'image', label: '图标', saiType: 'image' },
|
||||
{ prop: 'agent', label: '代理agent' },
|
||||
{ prop: 'ip_white', label: 'IP白名单' },
|
||||
{ prop: 'total_recharge', label: '总充值' },
|
||||
{ prop: 'total_withdrawal', label: '总提现' },
|
||||
{ prop: 'total_profit', label: '总盈利' },
|
||||
{ prop: 'player_count', label: '玩家数量' },
|
||||
{ prop: 'operation', label: '操作', width: 100, fixed: 'right', useSlot: true }
|
||||
]
|
||||
}
|
||||
})
|
||||
|
||||
// 状态开关切换(列表内直接修改)
|
||||
const handleStatusChange = async (row: Record<string, any>, status: number) => {
|
||||
row._statusLoading = true
|
||||
try {
|
||||
await api.updateStatus({ id: row.id, status })
|
||||
row.status = status
|
||||
} catch {
|
||||
refreshData()
|
||||
} finally {
|
||||
row._statusLoading = false
|
||||
}
|
||||
}
|
||||
|
||||
// 编辑配置
|
||||
const {
|
||||
dialogType,
|
||||
dialogVisible,
|
||||
dialogData,
|
||||
showDialog,
|
||||
deleteRow,
|
||||
deleteSelectedRows,
|
||||
handleSelectionChange,
|
||||
selectedRows
|
||||
} = useSaiAdmin()
|
||||
</script>
|
||||
@@ -1,227 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-model="visible"
|
||||
:title="dialogType === 'add' ? '新增渠道' : '编辑渠道'"
|
||||
width="600px"
|
||||
align-center
|
||||
:close-on-click-modal="false"
|
||||
@close="handleClose"
|
||||
>
|
||||
<el-form ref="formRef" :model="formData" :rules="rules" label-width="120px">
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="formData.name" placeholder="请输入名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="标题" prop="title">
|
||||
<el-input v-model="formData.title" placeholder="请输入标题" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<sa-switch v-model="formData.status" />
|
||||
</el-form-item>
|
||||
<el-form-item label="管理员" prop="admin_id">
|
||||
<el-select
|
||||
v-model="formData.admin_id"
|
||||
placeholder="请选择管理员"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 100%"
|
||||
:loading="adminOptionsLoading"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in adminOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属部门" prop="department_id">
|
||||
<el-tree-select
|
||||
v-model="formData.department_id"
|
||||
:data="deptOptions"
|
||||
:props="{ value: 'id', label: 'label' }"
|
||||
placeholder="请选择部门"
|
||||
clearable
|
||||
check-strictly
|
||||
:render-after-expand="false"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="游戏地址" prop="game_url">
|
||||
<el-input v-model="formData.game_url" placeholder="请输入游戏地址" />
|
||||
</el-form-item>
|
||||
<el-form-item label="图标" prop="image">
|
||||
<sa-image-upload v-model="formData.image" :limit="1" :multiple="false" />
|
||||
</el-form-item>
|
||||
<el-form-item label="IP白名单" prop="ip_white">
|
||||
<el-input v-model="formData.ip_white" placeholder="请输入IP白名单" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="handleClose">取消</el-button>
|
||||
<el-button type="primary" @click="handleSubmit">提交</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import api from '../../../api/manage/index'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import type { FormInstance, FormRules } from 'element-plus'
|
||||
|
||||
interface Props {
|
||||
modelValue: boolean
|
||||
dialogType: string
|
||||
data?: Record<string, any>
|
||||
}
|
||||
|
||||
interface Emits {
|
||||
(e: 'update:modelValue', value: boolean): void
|
||||
(e: 'success'): void
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
modelValue: false,
|
||||
dialogType: 'add',
|
||||
data: undefined
|
||||
})
|
||||
|
||||
const emit = defineEmits<Emits>()
|
||||
|
||||
const formRef = ref<FormInstance>()
|
||||
|
||||
/**
|
||||
* 弹窗显示状态双向绑定
|
||||
*/
|
||||
const visible = computed({
|
||||
get: () => props.modelValue,
|
||||
set: (value) => emit('update:modelValue', value)
|
||||
})
|
||||
|
||||
/**
|
||||
* 表单验证规则
|
||||
*/
|
||||
const rules = reactive<FormRules>({
|
||||
name: [{ required: true, message: '名称必需填写', trigger: 'blur' }],
|
||||
title: [{ required: true, message: '标题必需填写', trigger: 'blur' }],
|
||||
admin_id: [{ required: true, message: '管理员必需填写', trigger: 'blur' }],
|
||||
game_url: [{ required: true, message: '游戏地址必需填写', trigger: 'blur' }],
|
||||
image: [{ required: true, message: '图标必需填写', trigger: 'blur' }]
|
||||
})
|
||||
|
||||
/**
|
||||
* 初始数据
|
||||
*/
|
||||
const initialFormData = {
|
||||
id: null,
|
||||
name: '',
|
||||
title: '',
|
||||
status: 1,
|
||||
admin_id: null,
|
||||
department_id: null,
|
||||
game_url: '',
|
||||
image: '',
|
||||
ip_white: ''
|
||||
}
|
||||
|
||||
/**
|
||||
* 表单数据
|
||||
*/
|
||||
const formData = reactive({ ...initialFormData })
|
||||
|
||||
/**
|
||||
* 监听弹窗打开,初始化表单数据
|
||||
*/
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
(newVal) => {
|
||||
if (newVal) {
|
||||
initPage()
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
/** 管理员下拉选项:value=SystemUser.id, label=SystemUser.name(远程关联) */
|
||||
const adminOptions = ref<Array<{ id: number; name: string }>>([])
|
||||
const adminOptionsLoading = ref(false)
|
||||
|
||||
/** 部门下拉选项(树形) */
|
||||
const deptOptions = ref<Array<{ id: number; label: string; children?: any[] }>>([])
|
||||
|
||||
const fetchAdminList = async () => {
|
||||
adminOptionsLoading.value = true
|
||||
try {
|
||||
// 接口返回的已是 data 解包后的数组(value=SystemUser.id, name=展示名)
|
||||
const list = await api.getAdminList()
|
||||
adminOptions.value = Array.isArray(list) ? list : []
|
||||
} catch {
|
||||
adminOptions.value = []
|
||||
} finally {
|
||||
adminOptionsLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化页面数据
|
||||
*/
|
||||
const fetchDeptList = async () => {
|
||||
try {
|
||||
const list = await api.getDeptList()
|
||||
deptOptions.value = Array.isArray(list) ? list : []
|
||||
} catch {
|
||||
deptOptions.value = []
|
||||
}
|
||||
}
|
||||
|
||||
const initPage = async () => {
|
||||
// 先重置为初始值
|
||||
Object.assign(formData, initialFormData)
|
||||
await Promise.all([fetchAdminList(), fetchDeptList()])
|
||||
// 如果有数据,则填充数据
|
||||
if (props.data) {
|
||||
await nextTick()
|
||||
initForm()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化表单数据
|
||||
*/
|
||||
const initForm = () => {
|
||||
if (props.data) {
|
||||
for (const key in formData) {
|
||||
if (props.data[key] != null && props.data[key] != undefined) {
|
||||
;(formData as any)[key] = props.data[key]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭弹窗并重置表单
|
||||
*/
|
||||
const handleClose = () => {
|
||||
visible.value = false
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交表单
|
||||
*/
|
||||
const handleSubmit = async () => {
|
||||
if (!formRef.value) return
|
||||
try {
|
||||
await formRef.value.validate()
|
||||
if (props.dialogType === 'add') {
|
||||
await api.save(formData)
|
||||
ElMessage.success('新增成功')
|
||||
} else {
|
||||
await api.update(formData)
|
||||
ElMessage.success('修改成功')
|
||||
}
|
||||
emit('success')
|
||||
handleClose()
|
||||
} catch (error) {
|
||||
console.log('表单验证失败:', error)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,119 +0,0 @@
|
||||
<template>
|
||||
<sa-search-bar
|
||||
ref="searchBarRef"
|
||||
v-model="formData"
|
||||
label-width="100px"
|
||||
:showExpand="false"
|
||||
@reset="handleReset"
|
||||
@search="handleSearch"
|
||||
@expand="handleExpand"
|
||||
>
|
||||
<el-col v-bind="setSpan(6)">
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="formData.name" placeholder="请输入名称" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-bind="setSpan(6)">
|
||||
<el-form-item label="标题" prop="title">
|
||||
<el-input v-model="formData.title" placeholder="请输入标题" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-bind="setSpan(6)">
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-input v-model="formData.status" placeholder="请输入状态" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-bind="setSpan(6)">
|
||||
<el-form-item label="所属部门" prop="department_id">
|
||||
<el-tree-select
|
||||
v-model="formData.department_id"
|
||||
:data="deptOptions"
|
||||
:props="{ value: 'id', label: 'label' }"
|
||||
placeholder="请选择部门"
|
||||
clearable
|
||||
check-strictly
|
||||
:render-after-expand="false"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-bind="setSpan(6)">
|
||||
<el-form-item label="总充值" prop="total_recharge">
|
||||
<el-input v-model="formData.total_recharge" placeholder="请输入总充值" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-bind="setSpan(6)">
|
||||
<el-form-item label="总提现" prop="total_withdrawal">
|
||||
<el-input v-model="formData.total_withdrawal" placeholder="请输入总提现" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-bind="setSpan(6)">
|
||||
<el-form-item label="总盈利" prop="total_profit">
|
||||
<el-input v-model="formData.total_profit" placeholder="请输入总盈利" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</sa-search-bar>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import api from '../../../api/manage/index'
|
||||
|
||||
interface Props {
|
||||
modelValue: Record<string, any>
|
||||
}
|
||||
interface Emits {
|
||||
(e: 'update:modelValue', value: Record<string, any>): void
|
||||
(e: 'search', params: Record<string, any>): void
|
||||
(e: 'reset'): void
|
||||
}
|
||||
const props = defineProps<Props>()
|
||||
const emit = defineEmits<Emits>()
|
||||
// 展开/收起
|
||||
const isExpanded = ref<boolean>(false)
|
||||
|
||||
// 部门下拉选项(树形,后端返回 id/label/children)
|
||||
const deptOptions = ref<Array<{ id: number; label: string; children?: any[] }>>([])
|
||||
onMounted(async () => {
|
||||
try {
|
||||
const list = await api.getDeptList()
|
||||
deptOptions.value = Array.isArray(list) ? list : []
|
||||
} catch {
|
||||
deptOptions.value = []
|
||||
}
|
||||
})
|
||||
|
||||
// 表单数据双向绑定
|
||||
const searchBarRef = ref()
|
||||
const formData = computed({
|
||||
get: () => props.modelValue,
|
||||
set: (val) => emit('update:modelValue', val)
|
||||
})
|
||||
|
||||
// 重置
|
||||
function handleReset() {
|
||||
searchBarRef.value?.ref.resetFields()
|
||||
emit('reset')
|
||||
}
|
||||
|
||||
// 搜索
|
||||
async function handleSearch() {
|
||||
emit('search', formData.value)
|
||||
}
|
||||
|
||||
// 展开/收起
|
||||
function handleExpand(expanded: boolean) {
|
||||
isExpanded.value = expanded
|
||||
}
|
||||
|
||||
// 栅格占据的列数
|
||||
const setSpan = (span: number) => {
|
||||
return {
|
||||
span: span,
|
||||
xs: 24, // 手机:满宽显示
|
||||
sm: span >= 12 ? span : 12, // 平板:大于等于12保持,否则用半宽
|
||||
md: span >= 8 ? span : 8, // 中等屏幕:大于等于8保持,否则用三分之一宽
|
||||
lg: span,
|
||||
xl: span
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -11,7 +11,7 @@ export default {
|
||||
*/
|
||||
list(params: Record<string, any>) {
|
||||
return request.get<Api.Common.ApiPage>({
|
||||
url: '/dice/player_wallet_record/DicePlayerWalletRecord/index',
|
||||
url: '/core/dice/player_wallet_record/DicePlayerWalletRecord/index',
|
||||
params
|
||||
})
|
||||
},
|
||||
@@ -23,7 +23,7 @@ export default {
|
||||
*/
|
||||
read(id: number | string) {
|
||||
return request.get<Api.Common.ApiData>({
|
||||
url: '/dice/player_wallet_record/DicePlayerWalletRecord/read?id=' + id
|
||||
url: '/core/dice/player_wallet_record/DicePlayerWalletRecord/read?id=' + id
|
||||
})
|
||||
},
|
||||
|
||||
@@ -34,7 +34,7 @@ export default {
|
||||
*/
|
||||
save(params: Record<string, any>) {
|
||||
return request.post<any>({
|
||||
url: '/dice/player_wallet_record/DicePlayerWalletRecord/save',
|
||||
url: '/core/dice/player_wallet_record/DicePlayerWalletRecord/save',
|
||||
data: params
|
||||
})
|
||||
},
|
||||
@@ -46,7 +46,7 @@ export default {
|
||||
*/
|
||||
update(params: Record<string, any>) {
|
||||
return request.put<any>({
|
||||
url: '/dice/player_wallet_record/DicePlayerWalletRecord/update',
|
||||
url: '/core/dice/player_wallet_record/DicePlayerWalletRecord/update',
|
||||
data: params
|
||||
})
|
||||
},
|
||||
@@ -58,7 +58,7 @@ export default {
|
||||
*/
|
||||
delete(params: Record<string, any>) {
|
||||
return request.del<any>({
|
||||
url: '/dice/player_wallet_record/DicePlayerWalletRecord/destroy',
|
||||
url: '/core/dice/player_wallet_record/DicePlayerWalletRecord/destroy',
|
||||
data: params
|
||||
})
|
||||
},
|
||||
@@ -68,7 +68,7 @@ export default {
|
||||
*/
|
||||
getPlayerOptions() {
|
||||
return request.get<{ id: number; username: string }[]>({
|
||||
url: '/dice/player_wallet_record/DicePlayerWalletRecord/getPlayerOptions'
|
||||
url: '/core/dice/player_wallet_record/DicePlayerWalletRecord/getPlayerOptions'
|
||||
})
|
||||
},
|
||||
|
||||
@@ -77,7 +77,7 @@ export default {
|
||||
*/
|
||||
getPlayerWalletBefore(playerId: number | string) {
|
||||
return request.get<{ wallet_before: number }>({
|
||||
url: '/dice/player_wallet_record/DicePlayerWalletRecord/getPlayerWalletBefore',
|
||||
url: '/core/dice/player_wallet_record/DicePlayerWalletRecord/getPlayerWalletBefore',
|
||||
params: { player_id: playerId }
|
||||
})
|
||||
},
|
||||
@@ -93,7 +93,7 @@ export default {
|
||||
remark?: string
|
||||
}) {
|
||||
return request.post<any>({
|
||||
url: '/dice/player_wallet_record/DicePlayerWalletRecord/adminOperate',
|
||||
url: '/core/dice/player_wallet_record/DicePlayerWalletRecord/adminOperate',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ export default {
|
||||
*/
|
||||
list(params: Record<string, any>) {
|
||||
return request.get<Api.Common.ApiPage>({
|
||||
url: '/dice/reward_config/DiceRewardConfig/index',
|
||||
url: '/core/dice/reward_config/DiceRewardConfig/index',
|
||||
params
|
||||
})
|
||||
},
|
||||
@@ -23,7 +23,7 @@ export default {
|
||||
*/
|
||||
read(id: number | string) {
|
||||
return request.get<Api.Common.ApiData>({
|
||||
url: '/dice/reward_config/DiceRewardConfig/read?id=' + id
|
||||
url: '/core/dice/reward_config/DiceRewardConfig/read?id=' + id
|
||||
})
|
||||
},
|
||||
|
||||
@@ -34,7 +34,7 @@ export default {
|
||||
*/
|
||||
save(params: Record<string, any>) {
|
||||
return request.post<any>({
|
||||
url: '/dice/reward_config/DiceRewardConfig/save',
|
||||
url: '/core/dice/reward_config/DiceRewardConfig/save',
|
||||
data: params
|
||||
})
|
||||
},
|
||||
@@ -46,7 +46,7 @@ export default {
|
||||
*/
|
||||
update(params: Record<string, any>) {
|
||||
return request.put<any>({
|
||||
url: '/dice/reward_config/DiceRewardConfig/update',
|
||||
url: '/core/dice/reward_config/DiceRewardConfig/update',
|
||||
data: params
|
||||
})
|
||||
},
|
||||
@@ -58,7 +58,7 @@ export default {
|
||||
*/
|
||||
delete(params: Record<string, any>) {
|
||||
return request.del<any>({
|
||||
url: '/dice/reward_config/DiceRewardConfig/destroy',
|
||||
url: '/core/dice/reward_config/DiceRewardConfig/destroy',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user