|
@@ -22,9 +22,9 @@ const { Text } = Typography;
|
|
|
const Ad: React.FC<ADQV3.AdProps> = ({ userId, creativeHandle }) => {
|
|
|
|
|
|
/*****************************************/
|
|
|
- const [useType, setUseType] = useLocalStorageState<1 | 2>('AD_USETYPE', 1);
|
|
|
+ const [useType, setUseType] = useLocalStorageState<string>('AD_UNIT_TYPE', 'NOVEL');
|
|
|
const [pageSize, setPageSize] = useLocalStorageState<number>('AD_PAGESIZE', 20);
|
|
|
- const [queryFrom, set_queryFrom] = useState<ADQV3.GetAdListProps>({ pageNum: 1, pageSize: pageSize || 20, useType: useType || 1 })
|
|
|
+ const [queryFrom, set_queryFrom] = useState<ADQV3.GetAdListProps>({ pageNum: 1, pageSize: pageSize || 20, adUnitType: 'NOVEL' })
|
|
|
const [isClearSelect, setIsClearSelect] = useState(true)
|
|
|
const [selectedRows, setSelectedRows] = useState<any[]>([])
|
|
|
const [tactics, setTactics] = useState<any>()
|
|
@@ -41,7 +41,7 @@ const Ad: React.FC<ADQV3.AdProps> = ({ userId, creativeHandle }) => {
|
|
|
/*****************************************/
|
|
|
|
|
|
useEffect(() => {
|
|
|
- getList({ pageNum: 1, pageSize: pageSize || 20, useType: useType || 1 })
|
|
|
+ getList({ pageNum: 1, pageSize: pageSize || 20, adUnitType: 'NOVEL' })
|
|
|
}, [userId, pageSize])
|
|
|
|
|
|
// 获取列表
|
|
@@ -92,7 +92,7 @@ const Ad: React.FC<ADQV3.AdProps> = ({ userId, creativeHandle }) => {
|
|
|
<Row gutter={[6, 6]} align='middle' style={{ marginBottom: 15 }}>
|
|
|
<Col>
|
|
|
<Select
|
|
|
- placeholder='应用类型'
|
|
|
+ placeholder='业务单元类型'
|
|
|
style={{ width: 90 }}
|
|
|
showSearch
|
|
|
filterOption={(input: any, option: any) =>
|
|
@@ -100,14 +100,17 @@ const Ad: React.FC<ADQV3.AdProps> = ({ userId, creativeHandle }) => {
|
|
|
}
|
|
|
value={useType}
|
|
|
onChange={(value: any) => {
|
|
|
- let params = { ...queryFrom, useType: value, pageNum: 1 }
|
|
|
+ let params = { ...queryFrom, adUnitType: value, pageNum: 1 }
|
|
|
setUseType(value)
|
|
|
set_queryFrom(params)
|
|
|
getList(params)
|
|
|
}}
|
|
|
>
|
|
|
- <Select.Option value={1}>小说</Select.Option>
|
|
|
- <Select.Option value={2}>游戏</Select.Option>
|
|
|
+ <Select.Option value={'NOVEL'}>小说</Select.Option>
|
|
|
+ <Select.Option value={'NOVEL_IAA'}>小说IAA</Select.Option>
|
|
|
+ <Select.Option value={'SKIT_IAA'}>短剧IAA</Select.Option>
|
|
|
+ <Select.Option value={'GAME'}>游戏</Select.Option>
|
|
|
+ <Select.Option value={'GAME_IAA'}>游戏IAA</Select.Option>
|
|
|
</Select>
|
|
|
</Col>
|
|
|
<Col>
|
|
@@ -240,7 +243,7 @@ const Ad: React.FC<ADQV3.AdProps> = ({ userId, creativeHandle }) => {
|
|
|
</Row>
|
|
|
<TableData
|
|
|
isCard={false}
|
|
|
- columns={() => tableConfig(() => getAdqV3AdList.refresh(), creativeHandle, useType)}
|
|
|
+ columns={() => tableConfig(() => getAdqV3AdList.refresh(), useType, creativeHandle)}
|
|
|
ajax={getAdqV3AdList}
|
|
|
syncAjax={sync}
|
|
|
fixed={{ left: 2, right: 5 }}
|
|
@@ -334,7 +337,7 @@ const Ad: React.FC<ADQV3.AdProps> = ({ userId, creativeHandle }) => {
|
|
|
addDynamic()
|
|
|
}}
|
|
|
userId={userId}
|
|
|
- putInType={useType === 1 ? 'NOVEL' : 'GAME'}
|
|
|
+ putInType={['GAME', 'GAME_IAA'].includes(useType) ? 'GAME' : 'NOVEL'}
|
|
|
/></Col>
|
|
|
<Col><Button type='primary' icon={<PlusOutlined />} disabled={selectedRows.length === 0} onClick={addDynamic}>添加创意</Button></Col>
|
|
|
<Col>
|
|
@@ -345,8 +348,8 @@ const Ad: React.FC<ADQV3.AdProps> = ({ userId, creativeHandle }) => {
|
|
|
{selectedRows?.length > 0 && <div style={{ maxWidth: '380px' }}>
|
|
|
<Text type="danger" ellipsis={{ tooltip: true }} strong style={{ fontSize: 12 }}>
|
|
|
{`当前广告选择:
|
|
|
- 营销目的:${useType === 2 ? MARKETING_SUB_GOAL_ENUM[selectedRows?.[0]?.marketingSubGoal as keyof typeof MARKETING_SUB_GOAL_ENUM] : MARKETING_GOAL_ENUM[selectedRows?.[0]?.marketingGoal as keyof typeof MARKETING_GOAL_ENUM]},
|
|
|
- 推广产品类型:${useType === 2 ? MARKETING_TARGET_TYPE_GAME_ENUM[selectedRows?.[0]?.marketingTargetType as keyof typeof MARKETING_TARGET_TYPE_GAME_ENUM] : MARKETING_TARGET_TYPE_ENUM[selectedRows?.[0]?.marketingTargetType as keyof typeof MARKETING_TARGET_TYPE_ENUM]},
|
|
|
+ 营销目的:${['GAME', 'GAME_IAA'].includes(useType) ? MARKETING_SUB_GOAL_ENUM[selectedRows?.[0]?.marketingSubGoal as keyof typeof MARKETING_SUB_GOAL_ENUM] : MARKETING_GOAL_ENUM[selectedRows?.[0]?.marketingGoal as keyof typeof MARKETING_GOAL_ENUM]},
|
|
|
+ 推广产品类型:${['GAME', 'GAME_IAA'].includes(useType) ? MARKETING_TARGET_TYPE_GAME_ENUM[selectedRows?.[0]?.marketingTargetType as keyof typeof MARKETING_TARGET_TYPE_GAME_ENUM] : MARKETING_TARGET_TYPE_ENUM[selectedRows?.[0]?.marketingTargetType as keyof typeof MARKETING_TARGET_TYPE_ENUM]},
|
|
|
营销载体类型:${MARKETING_CARRIER_TYPE_ENUM[selectedRows?.[0]?.marketingCarrierType as keyof typeof MARKETING_CARRIER_TYPE_ENUM]},
|
|
|
版位选择:${selectedRows?.[0]?.automaticSiteEnabled ? '自动版位' : '选择特定版位'},
|
|
|
${!selectedRows?.[0]?.automaticSiteEnabled && `广告版位:${selectedRows?.[0]?.siteSet.map((item: string | number) => SITE_SET_ENUM[item as keyof typeof SITE_SET_ENUM]).toString()}`}
|
|
@@ -475,7 +478,7 @@ const Ad: React.FC<ADQV3.AdProps> = ({ userId, creativeHandle }) => {
|
|
|
{/* 新增创意 */}
|
|
|
{addDynamicVisible && <AddDynamic
|
|
|
adData={selectedRows}
|
|
|
- putInType={useType === 1 ? 'NOVEL' : 'GAME'}
|
|
|
+ putInType={['GAME', 'GAME_IAA'].includes(useType) ? 'GAME' : 'NOVEL'}
|
|
|
visible={addDynamicVisible}
|
|
|
onClose={() => {
|
|
|
setAddDynamicVisible(false)
|