Files
lckt-admin/src/config.js

428 lines
7.1 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 移除 top-level await改为静态配置
export const userStatus = [
{ label: '启用', value: 1 },
{ label: '禁用', value: 0 }
]
export const ORDER_SEARCH_CONFIG = [
{
type: 'input',
prop:'order_no',
label: '订单号',
placeholder: '请输入订单号',
},
{
type: 'input',
prop:'title',
label: '商品名称',
placeholder: '请输入商品名称',
},
{
type: 'input',
prop:'name',
label: '用户姓名',
placeholder: '请输入用户姓名',
},
{
type: 'select',
prop:'order_type',
label: '订单类型',
placeholder: '请选择订单类型',
children:{
list: [
{
label: '全部',
value: ''
},
{
label: '课程',
value: 1
},
{
label: 'VIP',
value: 2
}
]
},
},
{
type: 'select',
prop:'pay_type',
label: '支付方式',
placeholder: '请选择支付方式',
children:{
list: [
{
label: '全部',
value: ''
},
{
label: '微信',
value: 1
},
{
label: '支付宝',
value: 2
},
{
label: '余额',
value: 3
}
]
},
},
{
type: 'select',
prop:'status',
label: '订单状态',
placeholder: '请选择订单状态',
children:{
list: [
{
label: '全部',
value: ''
},
{
label: '未付款',
value: 1
},
{
label: '已付款',
value: 2
},
{
label: '已过期',
value: 3
}
]
},
},
{
type: 'daterange',
prop: 'times',
label: '创建时间',
valueFormat: 'YYYY-MM-DD',
placeholder: '请选择创建时间',
startPlaceholder: '开始日期',
endPlaceholder: '结束日期',
rangeSeparator: '-'
},
]
export const USER_SEARCH_CONFIG = [
{
type: 'input',
prop:'name',
label: '用户名称',
placeholder: '请输入',
},
{
type: 'select',
prop:'status',
label: '状态',
placeholder: '请选择',
children:{
list: [
{
label: '全部',
value: ''
},
...userStatus
]
},
},
{
type: 'select',
prop:'type',
label: '用户类型',
placeholder: '请选择',
children:{
list: [
{
label: '全部',
value: ''
},
{
label: '普通用户',
value: 1
},
{
label: '讲师',
value: 2
}
]
},
},
{
type: 'select',
prop:'user_label',
label: 'VIP等级',
placeholder: '请选择',
children:{
list: [
{
label: '全部',
value: ''
},
{
label: '注册会员',
value: 1
},
{
label: 'VIP',
value: 2
},
{
label: 'SVIP',
value: 3
}
]
},
},
]
export const ARTICLE_SEARCH_CONFIG = [
{
type: 'input',
prop:'title',
label: '文章标题',
placeholder: '请输入文章标题',
},
{
type: 'select',
prop:'categoryId',
label: '文章分类',
placeholder: '请选择分类',
children:{
list: [
{
label: '全部',
value: ''
}
]
},
},
{
type: 'select',
prop:'teacherId',
label: '讲师',
placeholder: '请选择讲师',
children:{
list: [
{
label: '全部',
value: ''
}
]
},
},
]
// 订单列表
export const ORDER_TABLE_CONFIG = {
index: true,
schemes: [
{
attrs: {
label: '订单号',
prop: 'order_no',
align: 'center'
}
},
{
attrs: {
label: '商品名称',
prop: 'title',
align: 'center'
}
},
{
attrs: {
label: '用户姓名',
prop: 'name',
align: 'center'
}
},
{
attrs: {
label: '价格',
align: 'center',
prop: 'price',
slot: 'price'
}
},
{
attrs: {
label: '订单类型',
align: 'center',
prop: 'order_type',
slot: 'order_type'
}
},
{
attrs: {
label: '支付方式',
align: 'center',
prop: 'pay_type',
slot: 'pay_type'
}
},
{
attrs: {
label: '订单状态',
prop: 'status',
align: 'center',
slot: 'status'
}
},
{
attrs: {
label: '创建时间',
prop: 'CreatedAt',
align: 'center',
slot: 'CreatedAt'
}
},
{
attrs: {
label: '操作',
prop: 'operate',
align: 'center'
},
slot: 'operate'
}
]
}
// 用户列表
export const USER_TABLE_CONFIG = {
index: true,
schemes: [
{
attrs: {
label: 'ID',
prop: 'ID',
align: 'center'
}
},
{
attrs: {
label: '头像',
prop: 'avatar',
align: 'center'
},
slot: 'avatar'
},
{
attrs: {
label: '名称',
prop: 'nick_name',
align: 'center'
}
},
{
attrs: {
label: '状态',
prop: 'status',
align: 'center'
},
slot: 'status'
},{
attrs: {
label: '创建时间',
prop: 'CreatedAt',
align: 'center'
},
slot: 'CreatedAt'
},{
attrs: {
label: '用户类别',
prop: 'user_type',
align: 'center'
},
slot: 'user_type'
},
{
attrs: {
label: 'VIP',
prop: 'user_label',
align: 'center'
},
slot: 'user_label'
},
{
attrs: {
label: '账户余额',
prop: 'balance',
align: 'center'
},
slot: 'balance'
},
{
attrs: {
label: '操作',
prop: 'operate',
align: 'center'
},
slot: 'operate'
}
]
}
// 文章列表
export const ARTICLE_TABLE_CONFIG = {
index: true,
schemes: [
{
attrs: {
label: '封面',
prop: 'coverImg',
align: 'center'
},
slot: 'coverImg'
},
{
attrs: {
label: '标题',
prop: 'title',
align: 'center'
}
},
{
attrs: {
label: '讲师',
prop: 'teacherName',
align: 'center'
}
},
{
attrs: {
label: '价格',
prop: 'price',
align: 'center'
},
slot: 'price'
},
{
attrs: {
label: '是否免费',
prop: 'isFree',
align: 'center'
},
slot: 'isFree'
},
{
attrs: {
label: '更新时间',
prop: 'UpdatedAt',
align: 'center'
},
slot: 'UpdatedAt'
},
{
attrs: {
label: '操作',
prop: 'operate',
align: 'center'
},
slot: 'operate'
}
]
}