diff --git a/src/api/modules/capital/withdrawChanl.ts b/src/api/modules/capital/withdrawChanl.ts new file mode 100644 index 0000000..8a16d45 --- /dev/null +++ b/src/api/modules/capital/withdrawChanl.ts @@ -0,0 +1,23 @@ +import { request } from '@/api' + +// 获取取款渠道列表 +export const getChannelWithdrawList = () => { + return request.get('/channel/getChannelWithdrawList') +} +// 创建取款渠道 +export const createChannelWithdraw = (params: any) => { + return request.post('/channel/createChannelWithdraw', { ...params }) +} +// 编辑取款渠道 +export const editChannelWithdraw = (params: any) => { + return request.post('/channel/editChannelWithdraw', { ...params }) +} +// 删除取款渠道 +export const delChannelWithdraw = (params: any) => { + return request.post('/channel/delChannelWithdraw', { ...params }) +} + +// 获取货币列表(用于下拉框) +export const getChannelList = () => { + return request.get('/currency/getCurrencyList') +} \ No newline at end of file diff --git a/src/views/capital/withdrawChanl/index.vue b/src/views/capital/withdrawChanl/index.vue index 9683ce2..3afc30f 100644 --- a/src/views/capital/withdrawChanl/index.vue +++ b/src/views/capital/withdrawChanl/index.vue @@ -1,13 +1,191 @@ - - + + diff --git a/src/views/capital/withdrawChanl/options.ts b/src/views/capital/withdrawChanl/options.ts new file mode 100644 index 0000000..5010b17 --- /dev/null +++ b/src/views/capital/withdrawChanl/options.ts @@ -0,0 +1,58 @@ +export const tableColumns = [ + //序号 + { label: '序号', type: 'index', width: 60, align: 'center' }, + //渠道名称 + { label: '渠道名称', prop: 'name' }, + //渠道费用 + { label: '渠道费用', prop: 'channel_fee' }, + //货币类型 + // { label: '入金货币', prop: 'currency.name' }, + // 接口地址 + { label: '接口地址', prop: 'api_url' }, + // 接口appid + { label: '接口appid', prop: 'api_appid' }, + { label: '状态', prop: 'statusStr' }, +] + +export const formItemsData = [ + { label: '渠道名称', prop: 'name', type: 'input', placeholder: '请输入渠道名称' }, + { + label: '渠道费用', + prop: 'channel_fee', + type: 'number', + min: 0, + max: 999999, + controls: false, + placeholder: '请输入渠道费用', + }, + { + label: '入金货币', + prop: 'currency_id', + type: 'select', + placeholder: '请选择入金货币', + }, + { label: '接口地址', prop: 'api_url', type: 'input', placeholder: '请输入接口地址' }, + { label: '接口appid', prop: 'api_appid', type: 'input', placeholder: '请输入接口appid' }, + { label: '接口密钥', prop: 'api_key', type: 'input', placeholder: '请输入接口密钥' }, + { label: '渠道码', prop: 'channel_code', type: 'input', placeholder: '请输入渠道码' }, + { label: '状态', prop: 'status', type: 'radio' }, +] + +export const formRulesData = { + name: [{ required: true, message: '请输入渠道名称', trigger: ['change'] }], + channel_fee: [{ required: true, message: '请输入渠道费用', trigger: ['change'] }], + currency_id: [{ required: true, message: '请选择入金货币', trigger: ['change'] }], + api_url: [{ required: true, message: '请输入接口地址', trigger: ['change'] }], + api_appid: [{ required: true, message: '请输入接口appid', trigger: ['change'] }], + api_key: [{ required: true, message: '请输入接口密钥', trigger: ['change'] }], + channel_code: [{ required: true, message: '请输入渠道码', trigger: ['change'] }], + status: [{ required: true, message: '请选择状态', trigger: ['change'] }], +} + +export const optionsMapData = { + currency_id: [], + status: [ + { label: '正常', value: 1 }, + { label: '禁用', value: 2 }, + ], +} \ No newline at end of file