import { Badge } from "antd"
import React from "react"

const weAppTableConfig = (): any => {
    return [
        {
            title: 'ID',
            dataIndex: 'id',
            key: 'id',
            align: 'center',
            width: 50,
            ellipsis: true
        },
        {
            title: 'appId',
            dataIndex: 'appId',
            key: 'appId',
            width: 160,
            align: 'center',
            ellipsis: true,
        },
        {
            title: '小程序名称',
            dataIndex: 'appName',
            key: 'appName',
            width: 160,
            align: 'center',
            ellipsis: true,
        },
        {
            title: '小程序状态',
            dataIndex: 'useStatus',
            key: 'useStatus',
            align: 'center',
            width: 90,
            ellipsis: true,
            render:(a:any)=>{
                let arr:any =['processing','error','warning']
                let arr1:any = ['正常','封停','备用']
                return <Badge text={arr1[a]} status={arr[a]}/> 
            }
        },
        {
            title: '文章公众号appId',
            dataIndex: 'articleMpAppId',
            key: 'articleMpAppId',
            width: 160,
            align: 'center',
            ellipsis: true,
            render:(a: any)=>{
                return a || '/'
            }
        },
        {
            title: '文章公众号名称',
            dataIndex: 'articleMpAppName',
            key: 'articleMpAppName',
            width: 160,
            align: 'center',
            ellipsis: true,
            render:(a: any)=>{
                return a || '/'
            }
        },
        {
            title: '投手名称',
            dataIndex: 'pitcherName',
            key: 'pitcherName',
            align: 'center',
            width: 90,
            ellipsis: true,
        },   
        {
            title: '单日点击量',
            dataIndex: 'clickCount',
            key: 'clickCount',
            align: 'center',
            width: 90,
            ellipsis: true,
        },   
    ]
}
export default weAppTableConfig