wjx 2 năm trước cách đây
mục cha
commit
39f520c003

+ 0 - 6
config/routerConfig.ts

@@ -104,12 +104,6 @@ const launchSystem = {
             name: '广告投放',
             access: 'launchManage',
             routes: [
-                {
-                    path: '/launchSystemNew/launchManage/adAuthorize',
-                    name: '授权',
-                    access: 'adAuthorize',
-                    component: './launchSystemNew/launchManage/adAuthorize',
-                },
                 {
                     path: '/launchSystemNew/launchManage/localAd',
                     name: '广告模板',

+ 0 - 23
src/pages/launchSystemNew/launchManage/adAuthorize/index.less

@@ -1,23 +0,0 @@
-.verticalCenter {
-  display: flex;
-  flex-direction: column;
-  justify-content: center;
-  margin-left: 5px;
-}
-
-.name-wrapper>p {
-  overflow: hidden;
-  text-overflow: ellipsis;
-  white-space: nowrap;
-}
-.boxCol{
-  display: flex;
-  strong{
-    width: 25%;
-    text-align: right;
-  }
-  span{
-    color: #999;
-    width: 75%;
-  }
-}

+ 0 - 98
src/pages/launchSystemNew/launchManage/adAuthorize/index.tsx

@@ -1,98 +0,0 @@
-
-import HocError from '@/Hoc/HocError'
-import { Card, Col, Modal, Row, Table, Tag, Input, message, Space, Button } from 'antd'
-import React, { useCallback, useEffect, useState } from 'react'
-import { columnsMp } from './tableConfig'
-import { useModel } from 'umi'
-import { useAjax } from '@/Hook/useAjax'
-import { putAdAccountApi } from '@/services/launchAdq/adAuthorize'
-import style from './index.less'
-import TableData from '../../components/TableData'
-
-/** 投放管理 */
-const AdAuthorize: React.FC = () => {
-    const { getAdAccount } = useModel('useLaunchAdq.useAdAuthorize')
-    const [tableData, setTableData] = useState<any[]>([])
-    const [remarkData, set_remarkData] = useState<{
-        visible: boolean,
-        remark: string,
-        data: any
-    }>({
-        visible: false,
-        remark: '',
-        data: null
-    })
-    const putRemark = useAjax((adAccountId: any, remark: any) => putAdAccountApi(adAccountId, remark))
-    useEffect(() => {
-        getList()
-    }, [])
-    const getList = () => {
-        // 获取账号列表
-        getAdAccount.run().then(res => {
-            if (res) {
-                setTableData(() => res?.data || [])
-            }
-        })
-    }
-    const remark = useCallback(() => {
-        if (remarkData.remark && remarkData.data) {
-            putRemark.run(remarkData.data.id, remarkData.remark).then(res => {
-                set_remarkData({ ...remarkData, visible: false, remark: '', data: null })
-                getList()
-            })
-        } else {
-            message.error('请输入备注!')
-        }
-
-    }, [getAdAccount, remarkData])
-    const edit = useCallback((data) => {
-        set_remarkData({ ...remarkData, visible: true, data, remark: data.remark })
-    }, [remarkData])
-    
-    return <Card>
-        <TableData
-            // ajax={getAdAccount}
-            dataSource={tableData}
-            loading={getAdAccount?.loading}
-            columns={() => columnsMp(edit)}
-            size="small"
-            scroll={{ x: 2000, y: 600 }}
-            leftChild={<Space>
-                <Input placeholder="广告主ID" style={{ width: 150 }} allowClear  onChange={(e) => {
-                    let value = e.target.value
-                    if (value) {
-                        let newArr = tableData?.filter(item => String(item.accountId).includes(value))
-                        setTableData(newArr)
-                    } else {
-                        setTableData(getAdAccount?.data?.data)
-                    }
-                }} />
-                <Button onClick={getList} type='primary'>搜索</Button>
-            </Space>}
-        />
-        {remarkData.visible && <Modal
-            visible={remarkData.visible}
-            title='编辑账户'
-            onCancel={() => { set_remarkData({ ...remarkData, visible: false, data: null }) }}
-            onOk={remark}
-        >
-            <Row gutter={[20, 20]}>
-                <Col span={24} className={style.boxCol}><strong>广告主ID:</strong><span>{remarkData?.data.accountId}</span></Col>
-                <Col span={24} className={style.boxCol}><strong>类型:</strong><span>{remarkData?.data.sourceType === 0 ? '微信' : 'QQ'}</span></Col>
-                <Col span={24} className={style.boxCol}><strong>公众号信息:</strong><span>{remarkData?.data.wechatAccountName || '无'}</span></Col>
-                <Col span={24} className={style.boxCol}><strong>企业名称:</strong><span>{remarkData?.data.corporationName || '无'}</span></Col>
-                <Col span={24} className={style.boxCol}><strong>服务商ID列表:</strong><span>{remarkData?.data.agencyIdList ? remarkData.data.agencyIdList?.join() : '无'}</span></Col>
-                <Col span={24} className={style.boxCol}><strong>行业ID:</strong><span>{remarkData?.data.systemIndustryId || '无'}</span></Col>
-                <Col span={24} className={style.boxCol}><strong>授权状态:</strong><span>{remarkData?.data.authStatus || '无'}</span></Col>
-                <Col span={24} className={style.boxCol}><strong>日限额(分):</strong><span>{remarkData?.data.dailyBudget || '无'}</span></Col>
-                <Col span={24} className={style.boxCol}><strong>授权时间:</strong><span>{remarkData?.data.createTime || '无'}</span></Col>
-                <Col span={24} className={style.boxCol}><strong>备注:</strong><span><Input.TextArea rows={5} maxLength={200} value={remarkData.remark} onChange={(e) => {
-                    let value = e.target.value
-                    set_remarkData({ ...remarkData, remark: value })
-                }} /></span></Col>
-            </Row>
-        </Modal>}
-    </Card>
-}
-
-export default HocError(AdAuthorize)

+ 0 - 136
src/pages/launchSystemNew/launchManage/adAuthorize/tableConfig.tsx

@@ -1,136 +0,0 @@
-import { FundStatusEnum } from "@/services/launchAdq/enum"
-import { Badge, Space, Tooltip } from "antd"
-import React from "react"
-import './index.less'
-export function columnsMp(edit:(params: any)=>void): any {
-    return [
-        {
-            title: 'ID',
-            dataIndex: 'id',
-            key: 'id',
-            align: 'center',
-            width: 55,
-            fixed:'left'
-        },
-        {
-            title: '广告主ID',
-            dataIndex: 'accountId',
-            key: 'accountId',
-            align: 'center',
-            width: 100,
-            fixed:'left'
-        },
-        {
-            title: '类型',
-            dataIndex: 'sourceType',
-            key: 'sourceType',
-            align: 'center',
-            width: 70,
-            render: (a: any, b: any) => {
-                return <span>{a == 0 ? '微信' : 'QQ'}</span>
-            }
-        },
-        {
-            title: '备注',
-            dataIndex: 'remark',
-            key: 'remark',
-            align: 'center',
-            width: 200,
-            ellipsis:true,
-        },
-        // {
-        //     title: '公众号信息',
-        //     dataIndex: 'wechatAccountName',
-        //     key: 'wechatAccountName',
-        //     width: 150,
-        //     align: 'center',
-        //     render: (a: any, b: any) => {
-        //         return <div className="verticalCenter">
-        //             <div><strong>{a}</strong></div>
-        //             <div style={{ color: "rgb(136, 136, 136)", fontSize: 13 }}>{b?.wechatAccountId}</div>
-        //         </div>
-        //     }
-        // },
-        {
-            title: '企业名称',
-            dataIndex: 'corporationName',
-            key: 'corporationName',
-            width: 150,
-            align: 'center',
-            ellipsis: true
-        },
-        // {
-        //     title: '服务商ID列表',
-        //     dataIndex: 'agencyIdList',
-        //     key: 'agencyIdList',
-        //     width: 130,
-        //     align: 'center',
-        //     render: (a: any) => {
-        //         return <Tooltip title={a}>
-        //             <div className="name-wrapper">
-        //                 <p>{ a }</p>
-        //             </div>
-        //         </Tooltip>
-        //     }
-        // },
-        {
-            title: '行业ID',
-            dataIndex: 'systemIndustryId',
-            key: 'systemIndustryId',
-            width: 130,
-            align: 'center',
-            render: (a: any) => {
-                return <Tooltip title={a}>
-                    <div className="name-wrapper">{ a }</div>
-                </Tooltip>
-            }
-        },
-        {
-            title: '是否有效',
-            dataIndex: 'enabled',
-            key: 'enabled',
-            align: 'center',
-            width:60,
-            render: (a: any, b: any) => {
-                return  <Badge status={a ? "processing" :"error" } text={a? '是' : '否'} />
-            }
-        },
-        {
-            title: '授权时间',
-            dataIndex: 'createTime',
-            key: 'createTime',
-            align: 'center',
-            width: 120
-        },
-        {
-            title: '日限额(分)',
-            dataIndex: 'dailyBudget',
-            key: 'dailyBudget',
-            align: 'center',
-            width: 100
-        },
-        {
-            title: '资金状态',
-            dataIndex: 'fundStatus',
-            key: 'fundStatus',
-            align: 'center',
-            width:100,
-            render:(a: string | number)=>{
-             return FundStatusEnum[a]
-            }
-        },
-        {
-            title: '操作',
-            dataIndex: 'cz',
-            key: 'cz',
-            align: 'center',
-            width: 80,
-            fixed:'right',
-            render:(a: any,b: any)=>{
-                return <Space>
-                    <a onClick={()=>{edit(b)}}>备注</a>
-                </Space>
-            }
-        },
-    ]
-}