wjx 3 veckor sedan
förälder
incheckning
dfe0cb73fe

+ 11 - 17
src/pages/launchSystemV3/account/index.tsx

@@ -27,7 +27,7 @@ const AdAuthorize: React.FC = () => {
     /*************************/
     const { groupListInit } = useModel('useLaunchAdq.useAdAuthorize')
     const userInfo = useModel('@@initialState', model => model.initialState?.currentUser)
-    const [queryForm, setQueryForm] = useState<GetAdAccountParams>({ pageNum: 1, pageSize: 20, appType: 1 })
+    const [queryForm, setQueryForm] = useState<GetAdAccountParams>({ pageNum: 1, pageSize: 20, adUnitTypeList: ['NOVEL', 'NOVEL_IAA'] })
     const [remarkData, set_remarkData] = useState<{ visible: boolean, remark: string, data: any }>({
         visible: false,
         remark: '',
@@ -197,16 +197,20 @@ const AdAuthorize: React.FC = () => {
                     scroll={{ y: 600 }}
                     leftChild={<Space wrap>
                         <Select
-                            style={{ width: 100 }}
+                            style={{ minWidth: 100 }}
                             placeholder="选择应用类型"
                             onChange={(e) => {
-                                setQueryForm({ ...queryForm, appType: e })
+                                setQueryForm({ ...queryForm, adUnitTypeList: e })
                             }}
-                            value={queryForm.appType}
+                            mode="multiple"
+                            maxTagCount={1}
+                            value={queryForm.adUnitTypeList}
                             options={[
-                                { label: '小说投放', value: 1 },
-                                { label: '游戏投放', value: 2 },
-                                { label: '短剧投放', value: 3 }
+                                { label: '付费小说', value: 'NOVEL' },
+                                { label: '小说IAA', value: 'NOVEL_IAA' },
+                                { label: '付费游戏', value: 'GAME' },
+                                { label: '游戏IAA', value: 'GAME_IAA' },
+                                { label: '短剧IAA', value: 'SKIT_IAA' },
                             ]}
                         />
                         <Select
@@ -255,16 +259,6 @@ const AdAuthorize: React.FC = () => {
                             value={queryForm?.adUnitAccount}
                             options={[{ label: '是', value: true }, { label: '否', value: false }]}
                         />
-                        <Select
-                            style={{ width: 120 }}
-                            placeholder="业务单元类型"
-                            allowClear
-                            onChange={(e) => {
-                                setQueryForm({ ...queryForm, adUnitType: e })
-                            }}
-                            value={queryForm?.adUnitType}
-                            options={Object.keys(AdUnitType_Enum).filter(item => (queryForm.appType == 1 ? ['NOVEL', 'NOVEL_IAA', 'SHOP'] : queryForm.appType == 2 ? ['GAME', 'GAME_IAA'] : ['SKIT_IAA']).includes(item)).map(key => ({ label: AdUnitType_Enum[key as keyof typeof AdUnitType_Enum], value: key }))}
-                        />
                         <Button onClick={getList} type='primary' loading={getAdAccountList.loading}>搜索</Button>
                         <AddAccountToGroup onChange={() => getAdAccountList.refresh()} />
                         {/* <Button type='primary' onClick={() => setVisible(true)}><PlusOutlined />广告账号授权</Button> */}

+ 3 - 3
src/pages/launchSystemV3/adqv3/ad/index.tsx

@@ -93,7 +93,7 @@ const Ad: React.FC<ADQV3.AdProps> = ({ userId, creativeHandle }) => {
             <Col>
                 <Select
                     placeholder='业务单元类型'
-                    style={{ width: 90 }}
+                    style={{ width: 100 }}
                     showSearch
                     filterOption={(input: any, option: any) =>
                         (option!.children as unknown as string).toLowerCase().includes(input.toLowerCase())
@@ -106,10 +106,10 @@ const Ad: React.FC<ADQV3.AdProps> = ({ userId, creativeHandle }) => {
                         getList(params)
                     }}
                 >
-                    <Select.Option value={'NOVEL'}>小说</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'}>付费游戏</Select.Option>
                     <Select.Option value={'GAME_IAA'}>游戏IAA</Select.Option>
                 </Select>
             </Col>

+ 3 - 3
src/services/launchAdq/adAuthorize.ts

@@ -8,7 +8,7 @@ import { api } from '../api'
 export interface GetAdAccountParams {
     pageNum: number,
     pageSize: number,
-    appType: 1 | 2 | 3, // 1小说 2游戏 3短剧
+    adUnitTypeList: Array<'NOVEL' | 'NOVEL_IAA' | 'GAME' | 'GAME_IAA' | 'SKIT_IAA'>, // 1小说 2游戏 3短剧
     groupId?: number,
     accountIds?: string[] | string
     putUserId?: number,
@@ -17,7 +17,7 @@ export interface GetAdAccountParams {
     adUnitType?: string
 }
 export async function getAdAccountListApi(data: GetAdAccountParams) {
-    return request(api + '/adq/adAccount/accountListOfType', {
+    return request(api + '/adq/adAccount/accountListOfAdUnitType', {
         method: 'POST',
         data
     });
@@ -75,7 +75,7 @@ export async function getAccountAllListApi() {
  * 获取账号列表
  * @returns 
  */
-export async function putAdAccountApi(adAccountId: any,remark: any) {
+export async function putAdAccountApi(adAccountId: any, remark: any) {
     return request(api + `/adq/adAccount/modifyRemark/${adAccountId}/${encodeURIComponent(remark)}`, {
         method: 'PUT',
     });