wjx há 2 anos atrás
pai
commit
347a9b1acd

+ 5 - 0
src/pages/launchSystemNew/account/addAccountToGroup.tsx

@@ -87,6 +87,11 @@ const AddAccountToGroup: React.FC<Props> = (props) => {
                         showSearch
                         titles={['未选', '已选']}
                         oneWay
+                        filterOption={(input: any, option: any) => {
+                            let newInput: string[] = input ? input?.split(/[,,\n\s]+/ig).filter((item: any) => item) : []
+                            return newInput?.some(val => option!.title?.toString().toLowerCase()?.includes(val))
+                        }}
+                        listStyle={{ minHeight: 320 }}
                         render={item => item.title}
                     />
                 </Form.Item>}

+ 2 - 2
src/pages/launchSystemNew/account/index.tsx

@@ -64,7 +64,7 @@ const AdAuthorize: React.FC = () => {
 
     useEffect(() => {
         groupListInit()
-        !erpUserALL.data  && erpUserALL.run()
+        !erpUserALL.data && erpUserALL.run()
     }, [])
 
     useEffect(() => {
@@ -174,7 +174,7 @@ const AdAuthorize: React.FC = () => {
                             value={queryForm?.accountIds}
                             rows={1}
                             onChange={(e) => {
-                                setQueryForm({ ...queryForm, accountIds: e.target.value.replaceAll(/\s/ig,'') })
+                                setQueryForm({ ...queryForm, accountIds: e.target.value.replaceAll(/\s/ig, '') })
                             }}
                         />
                         <Button onClick={getList} type='primary' loading={getAdAccountList.loading}>搜索</Button>

+ 1 - 1
src/pages/launchSystemNew/components/pageModal/index.tsx

@@ -48,7 +48,7 @@ const PageModal: React.FC<Props> = (props) => {
     const getList = () => {
         console.log('data-->', cloudParams);
 
-        listAjax.run({ ...queryForm, ...cloudParams })
+        listAjax.run({ ...queryForm, ...cloudParams, pageStatus: 'NORMAL' })
     }
 
     const handleOk = () => {

+ 1 - 1
src/pages/launchSystemNew/launchManage/createAd/creative/modal/index.tsx

@@ -898,7 +898,7 @@ function CreativePup(props: Props) {
                         }
                         {/* 过滤了不必传和品牌名称,品牌标识图(外部传)短视频结构(组装使用) */}
                         {adcreative_template?.adcreativeElements?.filter(item => item.required && item.name === 'description').map(item => {
-                            let maxNum = adcreativeTemplateId === 1708 || adcreativeTemplateId === 1707 ? pupState.xd_show ? 10 : item.restriction.textRestriction.maxLength : item.restriction.textRestriction.maxLength
+                            let maxNum = (adcreativeTemplateId === 1708 || adcreativeTemplateId === 1707) && actionBtn ? 10 : item.restriction.textRestriction.maxLength
                             return <div key={item.fieldType}>
                                 <Form.Item label={<strong>{item.description}</strong>} className={'my_description'}>
                                     <Form.Item name={item.name} noStyle rules={[{ required: true, pattern: RegExp(item.restriction.textRestriction.textPattern?.replace(/\+/ig, `{1,${maxNum}}`)), message: '请输入正确的' + item.description }]}>

+ 2 - 2
src/pages/launchSystemNew/launchManage/createAd/creativeCL/modal/copywriting.tsx

@@ -27,7 +27,7 @@ const Copywriting: React.FC<Props> = (props) => {
 
     /******************************/
     const { onChange, textData = [], sysAdcreative, value, model, material } = props
-    const { adcreativeTemplateId } = sysAdcreative
+    const { adcreativeTemplateId, linkNameType } = sysAdcreative
     const [visible, setVisible] = useState<boolean>(false)
     const [form] = Form.useForm();
     /******************************/
@@ -109,7 +109,7 @@ const Copywriting: React.FC<Props> = (props) => {
                                         </div>
                                     }
                                     if (item.name === 'description') {
-                                        let maxNum = adcreativeTemplateId === 1708 || adcreativeTemplateId === 1707 ? item.pupState.xd_show ? 10 : item.restriction.textRestriction.maxLength : item.restriction.textRestriction.maxLength
+                                        let maxNum = (adcreativeTemplateId === 1708 || adcreativeTemplateId === 1707) && linkNameType ?  10 : item.restriction.textRestriction.maxLength
                                         return <div key={'description' + item.fieldType}>
                                             <Form.Item {...field} label={<strong>{item.description}</strong>} name={[field.name, item.name]} rules={[{ required: true, pattern: RegExp(item.restriction.textRestriction.textPattern?.replace(/\+/ig, `{1,${maxNum}}`)), message: '请输入正确的' + item.description }]}>
                                                 <TextAideInput placeholder={'请输入' + item.description} style={{ width: 450 }} maxTextLength={maxNum} />

+ 11 - 12
src/pages/launchSystemNew/launchManage/createAd/index.tsx

@@ -87,7 +87,6 @@ const CreateAd: React.FC = () => {
     const getAdcreativeTemplate = useAjax((params) => get_adcreative_template(params))
     const getGroupList = useAjax(() => getGroupListApi())
     /*************************/
-    console.log('accountCreateLogs-->', accountCreateLogs);
     
     useEffect(() => {
         getGroupList.run()
@@ -118,7 +117,7 @@ const CreateAd: React.FC = () => {
                 let adCreateLogsData = adCreateLogs?.map((item: any) => {
                     return {
                         adAccountId: item?.accountId,
-                        id: item?.adAccountId,
+                        id: item?.accountId,
                         // 数据源
                         userActionSetsList: item?.userActionSetList?.map((item: any) => ({ ...item, id: item?.userActionSetId })),
                         // 商品
@@ -171,7 +170,7 @@ const CreateAd: React.FC = () => {
                             return item.map((item1: any) => ({
                                 pageList: [{ ...item1.page, id: item1.page.pageId }],
                                 adAccountId: item1?.accountId,
-                                id: item1?.adAccountId,
+                                id: item1?.accountId,
                             }))
                         } else {
                             return null
@@ -196,7 +195,7 @@ const CreateAd: React.FC = () => {
                                 let corpUserGroup1s = item?.corpUserGroup1s
                                 let corpUserGroup2s = item?.corpUserGroup2s
                                 return {
-                                    adAccountId: item.accountId, id: item.adAccountId, data: groupList.map((crop: any, index: number) => {
+                                    adAccountId: item.accountId, id: item.accountId, data: groupList.map((crop: any, index: number) => {
                                         return { ...crop, cropList: crop.type === 1 ? corpUserGroup1s[index] ? [{ ...corpUserGroup1s[index], id: corpUserGroup1s[index].groupId }] : [] : corpUserGroup2s[0] ? [{ ...corpUserGroup2s[0], id: corpUserGroup2s[0].groupId }] : [] }
                                     })
                                 }
@@ -226,7 +225,7 @@ const CreateAd: React.FC = () => {
                                 return item.map((item1: any) => ({
                                     pageList: [{ ...item1.page, id: item1.page.pageId }],
                                     adAccountId: item1?.accountId,
-                                    id: item1?.adAccountId,
+                                    id: item1?.accountId,
                                 }))
                             } else {
                                 return null
@@ -297,7 +296,7 @@ const CreateAd: React.FC = () => {
                                 let corpUserGroup1s = item?.corpUserGroup1s
                                 let corpUserGroup2s = item?.corpUserGroup2s
                                 return {
-                                    adAccountId: item.accountId, id: item.adAccountId, data: groupList.map((crop: any, index: number) => {
+                                    adAccountId: item.accountId, id: item.accountId, data: groupList.map((crop: any, index: number) => {
                                         return { ...crop, cropList: crop.type === 1 ? corpUserGroup1s[index] ? [{ ...corpUserGroup1s[index], id: corpUserGroup1s[index].groupId }] : [] : corpUserGroup2s[0] ? [{ ...corpUserGroup2s[0], id: corpUserGroup2s[0].groupId }] : [] }
                                     })
                                 }
@@ -878,7 +877,7 @@ const CreateAd: React.FC = () => {
                             }
                         })
                     })
-                    setAccountCreateLogs(userArr?.map((item) => ({ adAccountId: item?.accountId, id: item.id })))
+                    setAccountCreateLogs(userArr?.map((item) => ({ adAccountId: item?.accountId, id: item.accountId })))
                     clearData()
                     setQueryForm({ ...queryForm, adqPageList: [], pageList: [], taskMediaMaps: queryForm?.taskMediaMaps?.map((item: { sysPageId: number }) => ({ ...item, sysPageId: '', accountPageIdMap: {}, cropUserGroupMap: [] })) })
                 } else {
@@ -929,7 +928,7 @@ const CreateAd: React.FC = () => {
                     <Select
                         mode="multiple"
                         style={{ minWidth: 200, maxWidth: 500 }}
-                        placeholder="请选择媒体账户"
+                        placeholder="媒体账户(多个,,空格换行)"
                         maxTagCount={1}
                         allowClear
                         bordered={false}
@@ -939,7 +938,7 @@ const CreateAd: React.FC = () => {
                         dropdownMatchSelectWidth={false}
                         autoClearSearchValue={false}
                         filterOption={(input: any, option: any) => {
-                            let newInput: string[] = input ? input?.split(/[,,\n\s]+/ig) : []
+                            let newInput: string[] = input ? input?.split(/[,,\n\s]+/ig).filter((item: any) => item) : []
                             return newInput?.some(val => option!.children?.toString().toLowerCase()?.includes(val))
                         }}
                         value={accountCreateLogs?.map((item: { id: number }) => item?.id)}
@@ -962,19 +961,19 @@ const CreateAd: React.FC = () => {
                                         if (e.target.checked) {
                                             data = JSON.parse(JSON.stringify(getAllUserAccount?.data?.data))
                                             if (accSearch) {
-                                                let newAccSearch = accSearch?.split(/[,,\n\s]+/ig)
+                                                let newAccSearch = accSearch?.split(/[,,\n\s]+/ig).filter((item: any) => item)
                                                 data = data?.filter((item: any) => newAccSearch?.some(val => item!.accountId?.toString().toLowerCase()?.includes(val)))
                                             }
                                         }
                                         setQueryForm({ ...queryForm, adqPageList: [], pageList: [], taskMediaMaps: queryForm?.taskMediaMaps?.map((item: { sysPageId: number }) => ({ ...item, sysPageId: '', accountPageIdMap: {}, cropUserGroupMap: [] })) })
-                                        setAccountCreateLogs(data?.map((item: any) => ({ adAccountId: item?.accountId, id: item?.id })))
+                                        setAccountCreateLogs(data?.map((item: any) => ({ adAccountId: item?.accountId, id: item?.adAccountId })))
                                         clearData()
                                     }}>全选</Checkbox>
                                 </Space>
                             </>
                         )}
                     >
-                        {getAllUserAccount?.data?.data?.map((item: any) => <Select.Option value={item.id} key={item.id}>{item.remark ? item.accountId + '_' + item.remark : item.accountId}</Select.Option>)}
+                        {getAllUserAccount?.data?.data?.map((item: any) => <Select.Option value={item.accountId} key={item.id}>{item.remark ? item.accountId + '_' + item.remark : item.accountId}</Select.Option>)}
                     </Select>
                 </Selector>
                 <Selector label="推广目标">

+ 1 - 1
src/services/api.ts

@@ -1,4 +1,4 @@
-export let api: any = process.env.NODE_ENV === 'development' ? 'api' : 'http://test.api.zanxiangwl.com/api'
+export let api: any = process.env.NODE_ENV === 'development' ? 'api' : 'http://test.api.zanxiangwl.com'
 // export let api: any = process.env.NODE_ENV === 'development' ? 'api' : 'http://api.zanxiangwl.com'
 export let dataApi: any = process.env.NODE_ENV === 'development' ? 'dapi' : `http://data.zanxiangnet.com`
 export let wxApi: any = process.env.NODE_ENV === 'development' ? 'wxapi' : `https://report.zanxiangwl.com`