wjx 2 år sedan
förälder
incheckning
eae7a180b7

+ 2 - 2
src/components/FileBoxAD/index.less

@@ -396,8 +396,8 @@
 .wxSelect {
   position: absolute;
   top: 0;
-  right: 20px;
-  width: 200px;
+  right: 0;
+  // width: 200px;
 
   >div {
     margin-top: 0 !important;

+ 3 - 4
src/components/FileBoxAD/index.tsx

@@ -59,7 +59,6 @@ function FlieBox(props: Props) {
     const [moveId, setMoveId] = useState<any>('')//移动的素材ID
     const [treeEl, item, folderId, setActionId, setHoverId] = TreeBox({ data: get_folder_tree.data, belongUser })
     const [listData, setListData] = useState<any>({})
-    const [imgVisible, setImgVisible] = useState<boolean>(false)
 
     // 获取数据
     useEffect(() => {
@@ -184,7 +183,7 @@ function FlieBox(props: Props) {
             },
         }
     }, [folderId, moveId, mediaType])
-    
+
 
     return <div style={{ display: 'flex', flexFlow: 'row' }}>
         {get_folder_tree?.data?.length > 0 && <div style={{ flexShrink: 0 }}>
@@ -194,7 +193,7 @@ function FlieBox(props: Props) {
             <div className={style.files} onContextMenu={rightMenu} style={height ? { height } : {}}>
                 {/* 关联公众号筛选 */}
                 <div className={style.wxSelect}>
-
+                    
                 </div>
                 {/* 层级路径 */}
                 <div className={style.path} >
@@ -296,7 +295,7 @@ function FlieBox(props: Props) {
                                             topName = "顶部视频"
                                             El = <div className={style.pageVideo}>
                                                 <span className={style.pagePreview} onClick={(e) => { e.stopPropagation(); setPage && setPage(1, item.id) }}><EyeOutlined /> 预览</span>
-                                                <video src={topPageElements?.topVideoSpec?.videoUrl} style={{ width: 130, height: 100 }} controls/>
+                                                <video src={topPageElements?.topVideoSpec?.videoUrl} style={{ width: 130, height: 100 }} controls />
                                             </div>
                                             break
                                     }

+ 11 - 4
src/pages/launchSystemNew/components/selectCloud/index.tsx

@@ -1,8 +1,8 @@
-import { Image, message, Modal, Space, Tabs } from "antd"
-import React, { useEffect, useState } from "react"
+import { Button, Image, message, Modal, Space, Tabs, Tooltip } from "antd"
+import React, { useEffect } from "react"
 import { useModel } from "umi"
 import FileBoxAD from "@/components/FileBoxAD"
-import { CloseCircleFilled } from "@ant-design/icons"
+import { CloseCircleFilled, QuestionCircleFilled } from "@ant-design/icons"
 import style from './index.less'
 
 interface Props {
@@ -85,7 +85,14 @@ const SelectCloud: React.FC<Props> = (props) => {
         maskClosable={false}
         bodyStyle={{ padding: 0 }}
     >
-        <Tabs onChange={(activeKey: any) => { set({ belongUser: activeKey }) }} activeKey={belongUser} style={{ margin: '0 24px' }}>
+        <Tabs onChange={(activeKey: any) => { set({ belongUser: activeKey }) }} activeKey={belongUser} style={{ margin: '0 24px' }} tabBarExtraContent={<Space>
+            {
+                mediaType === 'PAGE' ? null : <Button size='small' type="primary" onClick={() => { set({ imgVisrible: true }) }}>新建素材</Button>
+            }
+            <Tooltip title="功能都在下方内容区右键" placement="left">
+                <QuestionCircleFilled />
+            </Tooltip>
+        </Space>}>
             <Tabs.TabPane tab={'个人本地'} key={1} />
             <Tabs.TabPane tab={'公共本地'} key={0} />
         </Tabs>

+ 13 - 4
src/pages/launchSystemNew/material/cloud/index.tsx

@@ -1,6 +1,7 @@
 import FlieBox from '@/components/FileBoxAD'
 import HocError from '@/Hoc/HocError'
-import { Tabs } from 'antd'
+import { QuestionCircleFilled } from '@ant-design/icons'
+import { Button, Space, Tabs, Tooltip } from 'antd'
 import React, { useEffect, useRef, useState } from 'react'
 import { useModel } from 'umi'
 import AddLandingPage from '../../components/addLandingPage'
@@ -38,10 +39,18 @@ function Cloud() {
             className={style.card}
             activeKey={mediaType}
         >
+
             {
                 ['IMG', 'VIDEO', 'PAGE'].map((key: any) => {
                     return <TabPane tab={typeEnum[key]} key={key} style={{ backgroundColor: '#fff', padding: '0 15px' }} >
-                        <Tabs onChange={(activeKey: any) => { set({ belongUser: activeKey }) }} activeKey={belongUser}>
+                        <Tabs onChange={(activeKey: any) => { set({ belongUser: activeKey }) }} activeKey={belongUser} tabBarExtraContent={<Space>
+                            {
+                                mediaType === 'PAGE' ? <Button type="primary" size='small' onClick={() => { setVisible(true) }}>新建素材</Button> : <Button size='small' type="primary" onClick={() => { set({ imgVisrible: true }) }}>新建素材</Button>
+                            }
+                            <Tooltip title="功能都在下方内容区右键" placement="left">
+                                <QuestionCircleFilled />
+                            </Tooltip>
+                        </Space>}>
                             <TabPane tab={'个人本地'} key={1} />
                             <TabPane tab={'公共本地'} key={0} />
                         </Tabs>
@@ -60,11 +69,11 @@ function Cloud() {
             }
         </Tabs>
         {/* 落地页新增 复制 */}
-        {visible && <AddLandingPage visible={visible} hideModal={() => setVisible(false)} ajax={list} id={id}/>}
+        {visible && <AddLandingPage visible={visible} hideModal={() => setVisible(false)} ajax={list} id={id} />}
         {/* 查看落地页 */}
         {lookVisible && <LookLanding visible={lookVisible} onClose={() => setLookVisible(false)} id={id} />}
         {/* 批量复制 */}
-        {copyVisible && <BathLauCopy visible={copyVisible} onClose={() => setCopyVisible(false)} id={id} ajaxHome={list}/>}
+        {copyVisible && <BathLauCopy visible={copyVisible} onClose={() => setCopyVisible(false)} id={id} ajaxHome={list} />}
     </div>
 
 }