1.新增获取充值/提现配置接口/api/finance/depositWithdrawConfig

2.优化充值和提现方式
This commit is contained in:
2026-04-23 10:15:01 +08:00
parent 0f28c0fd2a
commit aa1299c018
55 changed files with 901 additions and 750 deletions

View File

@@ -44,7 +44,6 @@ const baTable = new baTableClass(
defaultOrder: { prop: 'sort', order: 'asc' },
extend: {
registry: {} as Record<string, { name: string; name_en: string; sort: number }>,
tier_options: [] as { id: string; label: string }[],
},
column: [
{ type: 'selection', align: 'center', operator: false },
@@ -83,25 +82,6 @@ const baTable = new baTableClass(
operatorPlaceholder: t('Fuzzy query'),
showOverflowTooltip: true,
},
{
label: t('config.depositChannel.tier_ids'),
prop: 'tier_ids',
align: 'center',
minWidth: 240,
operator: false,
render: 'tags',
formatter: (row: anyObj) => {
const ids = row.tier_ids
if (!Array.isArray(ids) || ids.length === 0) {
return [t('config.depositChannel.tier_all')]
}
const opts = (baTable.table.extend?.tier_options ?? []) as { id: string; label: string }[]
return ids.map((id: string) => {
const o = opts.find((x) => x.id === id)
return o ? o.label : id
})
},
},
{
label: t('Operate'),
align: 'center',
@@ -119,7 +99,6 @@ const baTable = new baTableClass(
code: '',
sort: 10,
status: 1,
tier_ids: [] as string[],
},
},
{},
@@ -128,15 +107,11 @@ const baTable = new baTableClass(
const d = res.data as
| {
registry?: Record<string, { name: string; name_en: string; sort: number }>
tier_options?: { id: string; label: string }[]
}
| undefined
if (d?.registry) {
baTable.table.extend.registry = d.registry
}
if (d?.tier_options) {
baTable.table.extend.tier_options = d.tier_options
}
},
}
)

View File

@@ -43,20 +43,6 @@
<el-switch v-model="baTable.form.items!.status" :active-value="1" :inactive-value="0" />
</el-form-item>
<el-form-item :label="t('config.depositChannel.tier_ids')" prop="tier_ids">
<el-select
v-model="baTable.form.items!.tier_ids"
multiple
collapse-tags
collapse-tags-tooltip
filterable
clearable
class="w100"
:placeholder="t('config.depositChannel.tier_ids_ph')"
>
<el-option v-for="opt in tierOptions" :key="opt.id" :label="opt.label" :value="opt.id" />
</el-select>
</el-form-item>
</el-form>
</div>
</el-scrollbar>
@@ -77,18 +63,11 @@ import { computed, inject, useTemplateRef } from 'vue'
import { useI18n } from 'vue-i18n'
import { useConfig } from '/@/stores/config'
type TierOpt = { id: string; label: string }
const config = useConfig()
const formRef = useTemplateRef<FormInstance>('formRef')
const baTable = inject('baTable') as baTable
const { t } = useI18n()
const tierOptions = computed(() => {
const raw = baTable.table.extend?.tier_options
return Array.isArray(raw) ? (raw as TierOpt[]) : []
})
const registryDisplayName = computed(() => {
const code = String(baTable.form.items?.code ?? '')
const reg = baTable.table.extend?.registry as Record<string, { name?: string }> | undefined