import { actionColumn, createGridOptions } from '#/components/crud'; import { wxAppApi } from '../api'; /** * 应用配置列表的表格列定义。 * 后端 WxAppConfigService::list 返回: * id, code, name, app_id, mch_id, mch_serial_no, notify_url, template_code, * status, remark, created_at, updated_at * 外加 *_set 三个布尔(密钥是否已配置) * 密钥本身绝不展示。 */ export const gridOptions = createGridOptions({ columns: [ { field: 'id', align: 'left', title: 'ID', width: 80 }, { field: 'code', title: '应用 code', width: 140 }, { field: 'name', align: 'left', title: '应用名称', minWidth: 160 }, { field: 'app_id', title: '小程序 AppID', width: 200 }, { field: 'mch_id', title: '商户号', width: 140 }, { field: 'template_code', title: '默认模板', width: 140 }, { field: 'package_enabled', title: '套餐', width: 90, slots: { default: 'package' }, }, { field: 'secrets', title: '密钥配置', width: 180, slots: { default: 'secrets' }, }, { field: 'status', title: '状态', width: 100, slots: { default: 'status' }, }, { field: 'created_at', title: '创建时间', width: 180 }, actionColumn(200), ], query: (params) => wxAppApi.list(params), });