diff --git a/src/components/button/index.jsx b/src/components/button/index.jsx index e2f97d11..05c912a8 100644 --- a/src/components/button/index.jsx +++ b/src/components/button/index.jsx @@ -4,11 +4,11 @@ import './index.scss'; export const FlowBorderButton = ({ className = '', children, - href = '/', + href , onClick, ...restProps }) => { - return + return
{children}
@@ -17,7 +17,7 @@ export const FlowBorderButton = ({ const GlowButton = ({ className = '', children, - href = '/', + href, onClick, ...restProps }) => { diff --git a/src/forge/Information/Component/addProjects.jsx b/src/forge/Information/Component/addProjects.jsx index a20ce90f..e7e78e1c 100644 --- a/src/forge/Information/Component/addProjects.jsx +++ b/src/forge/Information/Component/addProjects.jsx @@ -85,7 +85,7 @@ function AddProjects({id,visible,typeList,needAudit,role,onCancel,onFresh}){ zoneId:id } return item.isChoose ? - + : } @@ -110,7 +110,7 @@ function AddProjects({id,visible,typeList,needAudit,role,onCancel,onFresh}){ } const res = response.data; if(res && res.code === 200){ - message.success(needAudit === 1 ? "操作成功,请等待管理员审核" : "操作成功!"); + message.success((needAudit === 1 && role && role.role !== "Manager") ? "操作成功,请等待管理员审核" : "操作成功!"); Init(page,searchValue); onFresh(); }else{ diff --git a/src/forge/Information/Component/memberList.jsx b/src/forge/Information/Component/memberList.jsx index b0b67013..5d5667ea 100644 --- a/src/forge/Information/Component/memberList.jsx +++ b/src/forge/Information/Component/memberList.jsx @@ -8,7 +8,7 @@ import { Input } from 'antd'; const { Search } = Input; function Member(props) { - const { vipLists, temp , deptId } = props; + const { vipLists, temp , deptId , headIcon , hoverIcon } = props; const isUOS = deptId === "uos";//id===91:泛在的开发社区成员,定制 const [ list , setList ] = useState(vipLists); @@ -37,7 +37,7 @@ function Member(props) { return(
- + { headIcon || }
{i.typeName} @@ -65,13 +65,17 @@ function Member(props) { i.zoneMemberList.map((j,key)=>{ return(
  • -
    + { !(isUOS && i.id === 91) && }
    -
    {j.name}{j.memberLevel && {j.memberLevel} }
    +
    + {j.name} + {hoverIcon} + {j.memberLevel && {j.memberLevel} } +

    {j.introduction}

    -
    +
  • ) }) diff --git a/src/forge/Information/Component/publicBanner.jsx b/src/forge/Information/Component/publicBanner.jsx index 1b93bbfa..457fd213 100644 --- a/src/forge/Information/Component/publicBanner.jsx +++ b/src/forge/Information/Component/publicBanner.jsx @@ -20,6 +20,7 @@ function PublicBanner(props) { const [memberStatus, setMemberStatus] = useState(memberStatusEnum.notMember); const [applyVisible, setApplyVisible] = useState(false); const [ searchShow ,setSearchShow ] = useState(false); + const [ searchValue ,setSearchValue ] = useState(null); const searchRef = useRef(); const showMenu = useMemo(() => { @@ -141,9 +142,11 @@ function PublicBanner(props) { setSearchValue(e.target.value)} onPressEnter={(e)=>{props.history.push(`/zone/${deptId}/search?s=${e.target.value}`)}} prefix={} - suffix={{e.stopPropagation();setSearchShow(false)}}/>} + suffix={{e.stopPropagation();setSearchShow(false);setSearchValue(null)}}/>} />
    } diff --git a/src/forge/Information/Pages/custom/index.less b/src/forge/Information/Pages/custom/index.less new file mode 100644 index 00000000..edb8b3b6 --- /dev/null +++ b/src/forge/Information/Pages/custom/index.less @@ -0,0 +1,139 @@ +.customvipBox{ + font-family: 'alibaba PuHuiTi'; + background-image: url(../../img/custom/bc.png); + background-size: 100%; + .project-cate-title { + font-family: "DouyinSans"; + font-weight: 700; + font-size: 36px; + text-align: center; + padding:80px 0 20px; + } + .statistics-cards{ + width: 80%; + margin: 25px auto; + text-align: center; + border: 2px solid #ffffff; + border-radius: 15px; + background: rgba(255, 255, 255, 0.2352941176); + backdrop-filter: blur(10px); + padding: 30px 0; + color:#091221; + font-size:15px; + } + .applyCards{ + text-align: center; + margin-bottom: 45px; + a.glow-button{ + width: 162px; + } + .tips{ + color:#091221; + } + } + .vip_list{ + margin-top: 15px; + padding-bottom: 80px; + .vip_list_card{ + margin-top: 30px; + background-color: #fff; + border-radius: 14px 14px 0px 0px; + .card_title{ + border-radius: 14px 14px 0px 0px; + background-image: url(../../img/custom/cardHeadbc.png); + background-size: 100% 100%; + padding:35px 30px; + font-family:Alibaba PuHuiTi; + color:#091221; + font-size:24px; + display: flex; + align-items: center; + height: 93px; + } + .card_desc{ + background:rgba(9, 18, 33, 0.04); + border-radius:4px; + margin:20px 30px; + padding:20px 24px; + font-size: 15px; + color:#091221; + } + .card_ul{ + padding-bottom: 30px; + .card_u_li{ + padding:25px 40px 0px; + cursor: pointer; + &:hover{ + background:linear-gradient(271.98deg,rgba(10, 145, 255, 0.08) 0.05%,rgba(43, 103, 238, 0.08) 55.23%,rgba(133, 110, 250, 0.08) 99.86%); + .card_tag{ + opacity: 0; + transition: .3s; + } + .card_u_wrap{ + .card_u_up{ + .hovericon{ + color: #05101a!important; + width: 15px; + top: 2px; + left: 0px; + opacity: 1; + transition: top 0.5s ease, left 0.5s ease, opacity 0.3s ease 0.1s,width .3s ease .1s; + } + } + } + } + .card_u_wrap{ + display: flex; + >a>img{ + width: 100px; + height: 100px; + border-radius: 50%; + margin-right: 22px; + margin-bottom: 15px; + } + .card_u_info{ + border-bottom: 1px dashed rgba(76, 88, 118, .5); + flex: 1; + } + .card_u_up{ + display: flex; + align-items: center; + .hovericon{ + opacity: 0; + transition: top 0.5s ease, left 0.5s ease; + pointer-events: none; + position: relative; + top: 18px; + left: -18px; + width: 0px; + } + .card_name{ + color:#091221; + font-size:18px; + } + .card_tag{ + background-image: url(../../img/custom/schoolbc.png); + background-size: 100% 100%; + padding:0px 10px; + color:#ffffff; + font-size:12px; + text-align:center; + font-family: "DouyinSans"; + height: 21px; + line-height: 20px; + display: block; + margin-top: 2px; + margin-left: 10px; + } + } + .card_u_down{ + margin-top: 20px; + color:rgba(9, 18, 33,.8); + font-size:15px; + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/forge/Information/Pages/custom/vip.jsx b/src/forge/Information/Pages/custom/vip.jsx new file mode 100644 index 00000000..e6dbcb04 --- /dev/null +++ b/src/forge/Information/Pages/custom/vip.jsx @@ -0,0 +1,128 @@ +import React , {useEffect , useState } from 'react'; +import "./index.less"; +import "../../index.scss"; +import Nodata from '../../../Nodata'; +import { Spin, Button, Icon } from 'antd'; +import { tempConfig, tempEnum } from '../../tempInfo' +import MemberApply from '../../Component/memberApply'; +import { getVIPLists, getAuditStatus, applyJoin } from '../../api'; +import nodata from '../../img/nodata.png'; +import MemberList from '../../Component/memberList'; +import {getUniqueIdentifier,getUserName,getBrowserPlatform,getBrowserBrand} from '../../utils'; +import {setZoneVisits} from '../../api'; +import GlowButton, { FlowBorderButton } from '../../../../components/button'; +import HeadIcon from '../../img/custom/headIcon.png'; + +export const memberStatusEnum = { + applying: '0', + isMember: '1', + notMember: '2' +} + + +function CustomVip(props){ + const { deptId } = props.match.params; + const [ vipLists , setVIPLists ] = useState(undefined); + const [ isSpin , setIsSpin ] = useState(true); + const [ applyVisible , setApplyVisible ] = useState(false); + const [ memberStatus , setMemberStatus] = useState(memberStatusEnum.notMember); + const { id, showNotification, checkIfLogin, showLoginDialog, temp, sectionMemberTitle } = props; + const isNSCC = deptId === "NSCC"; + + useEffect(()=>{ + let uuid = getUniqueIdentifier() + let url = props.location.pathname + let platform = getBrowserPlatform() + let browser = getBrowserBrand() + let username = getUserName(props.current_user) + // if(!username) uuid = getUniqueIdentifier() + let remark = ` 操作系统:${platform};浏览器:${browser};` + setZoneVisits({url,username,uuid,remark}) + },[]) + + useEffect(()=>{ + if(id){ + setIsSpin(true); + getLists(); + getMemberStatus(); + } + },[id]) + + function getLists(){ + getVIPLists(id).then(response=>{ + if(response){ + setVIPLists(response.data.rows); + setIsSpin(false); + } + }).catch(error=>{setIsSpin(false);}) + } + + function getMemberStatus() { + getAuditStatus(id).then(res => { + if (res && res.data && res.data.code === 200) { + setMemberStatus(res.data.data) + } else { + setMemberStatus(memberStatusEnum.notMember) + } + }).catch(() => { setMemberStatus(memberStatusEnum.notMember) }) + } + + function onOk(e) { + applyJoin(id, e).then(res => { + if (res && res.data) { + showNotification(res.data.msg) + setApplyVisible(!applyVisible) + if (res.data.code === 200) { + setMemberStatus(memberStatusEnum.applying) + } + } + }) + } + + function apply() { + if(checkIfLogin()===false){ + showLoginDialog() + return false; + } + setApplyVisible(!applyVisible) + } + const nsccTitle = (title, delay=0.1, classname)=>
    + {title && title.split("").map((char, index) => ( + + {char} + + ))} +
    + return( +
    + setApplyVisible(!applyVisible)} current_user={props.current_user}/> +
    + { nsccTitle(sectionMemberTitle) } +
    {tempConfig[temp].vipDesc}
    +
    + { memberStatus === memberStatusEnum.notMember && 申请加入} + { memberStatus === memberStatusEnum.applying &&
    您的申请已提交,请耐心等待管理员审核!
    } +
    + + +
    + { + vipLists && (vipLists.length > 0 ? + } + headIcon={} + vipLists={vipLists} + temp={temp} + deptId={deptId} + /> + :
    + { temp === tempEnum.zone1 ? : } +
    ) + } +
    +
    +
    +
    + ) +} +export default CustomVip; \ No newline at end of file diff --git a/src/forge/Information/Pages/main.jsx b/src/forge/Information/Pages/main.jsx index 6faccff6..b62b6f7c 100644 --- a/src/forge/Information/Pages/main.jsx +++ b/src/forge/Information/Pages/main.jsx @@ -139,9 +139,9 @@ function Main(props){

    {sectionCmsTitle}

    {role && role.role !== "None" &&
    - + {role.role === "Member" ? :""}
    } diff --git a/src/forge/Information/Pages/project/cateList/index.jsx b/src/forge/Information/Pages/project/cateList/index.jsx index 1a7a9dcd..475cb019 100644 --- a/src/forge/Information/Pages/project/cateList/index.jsx +++ b/src/forge/Information/Pages/project/cateList/index.jsx @@ -196,7 +196,7 @@ function ProjectCateList(props) { ))}
    {role && role.role !== "None" &&
    - {role.role === "Member" ? "我的项目" : "管理项目" } + {role.role === "Member" ? 我的项目:""} { setVisible(true); e.stopPropagation(); @@ -227,7 +227,11 @@ function ProjectCateList(props) {
    共同构建超算开源生态
    - 提交项目 + {role && role.role !== "None" && { + setVisible(true); + e.stopPropagation(); + }}>添加项目 + }
    diff --git a/src/forge/Information/Pages/project/cateList/index.scss b/src/forge/Information/Pages/project/cateList/index.scss index a4ab7fe0..db2855a4 100644 --- a/src/forge/Information/Pages/project/cateList/index.scss +++ b/src/forge/Information/Pages/project/cateList/index.scss @@ -1,5 +1,7 @@ + .project_cate_home { background-color: #F6F8FE; + // 公共样式 .NSCC_project_btn { border-radius: 8px; @@ -17,7 +19,6 @@ } } } - .hover_img_big { padding: 25px; background-image: url('../../../img/project/cate_page_img2.png'); @@ -962,28 +963,10 @@ font-size: 32px; font-weight: bold; color: #ffffff; - margin-bottom: 40px; } - .submit-project-btn { - display: inline-flex; - justify-content: center; - width: 160px; - height: 44px; - line-height: 44px; - text-align: center; - background-color: #ffffff; - color:#091221; - border-radius: 8px; - font-size: 15px; - text-decoration: none; - transition: all 0.3s ease; - - &:hover { - .iconfont { - animation: arrow-move 1.2s ease-in-out infinite; - } - } + a{ + margin-top: 40px; } } } diff --git a/src/forge/Information/Pages/selfList.jsx b/src/forge/Information/Pages/selfList.jsx index 042661b1..cbef91ff 100644 --- a/src/forge/Information/Pages/selfList.jsx +++ b/src/forge/Information/Pages/selfList.jsx @@ -195,11 +195,11 @@ function SelfList(props){ { source==="source"?sectionResourceTitle:source==="news"?sectionCmsTitle:sectionProjectTitle } 我的{source==="source"?"资源":source==="news"?"资讯":"项目"} -
      + { needAudit &&
      • setStatus(1)} className={status===1?"active":""}>已发布
      • - { needAudit &&
      • setStatus(0)} className={status===0?"active":""}>待审核
      • } - { needAudit &&
      • setStatus(2)} className={status===2?"active":""}>未通过
      • } -
      +
    • setStatus(0)} className={status===0?"active":""}>待审核
    • +
    • setStatus(2)} className={status===2?"active":""}>未通过
    • +
    }
      diff --git a/src/forge/Information/Pages/source.jsx b/src/forge/Information/Pages/source.jsx index d14042e0..89855b0a 100644 --- a/src/forge/Information/Pages/source.jsx +++ b/src/forge/Information/Pages/source.jsx @@ -120,9 +120,9 @@ function Source(props){ enterButton={temp === "zone" ? 搜索 :undefined} />} {role && role.role !== "None" &&
      - + {role.role === "Member" ? :""}
      }
    diff --git a/src/forge/Information/fetch.js b/src/forge/Information/fetch.js index 36d39993..69994dc0 100644 --- a/src/forge/Information/fetch.js +++ b/src/forge/Information/fetch.js @@ -15,7 +15,7 @@ function beforeFetch(actionUrl){ service.interceptors.request.use(request => { let deptId = sessionStorage.getItem('deptId'); - // request.headers.Authorization = 'baf748d0570754d3126d1a3fc29b9c456becf93f' + // request.headers.Authorization = '880cad95bdb367e24d48f04a6cc2c4a362ee285c' if (deptId) { // 用于权限区分 request.headers['Dept-Id'] = deptId diff --git a/src/forge/Information/img/custom/bc.png b/src/forge/Information/img/custom/bc.png new file mode 100644 index 00000000..d499b4ed Binary files /dev/null and b/src/forge/Information/img/custom/bc.png differ diff --git a/src/forge/Information/img/custom/cardHeadbc.png b/src/forge/Information/img/custom/cardHeadbc.png new file mode 100644 index 00000000..9ad09326 Binary files /dev/null and b/src/forge/Information/img/custom/cardHeadbc.png differ diff --git a/src/forge/Information/img/custom/headIcon.png b/src/forge/Information/img/custom/headIcon.png new file mode 100644 index 00000000..8e00343e Binary files /dev/null and b/src/forge/Information/img/custom/headIcon.png differ diff --git a/src/forge/Information/img/custom/schoolbc.png b/src/forge/Information/img/custom/schoolbc.png new file mode 100644 index 00000000..586ac196 Binary files /dev/null and b/src/forge/Information/img/custom/schoolbc.png differ diff --git a/src/forge/Information/index.jsx b/src/forge/Information/index.jsx index 99b5d8d9..05ae3b25 100644 --- a/src/forge/Information/index.jsx +++ b/src/forge/Information/index.jsx @@ -20,6 +20,10 @@ import { setSeoMeta } from 'educoder'; import { configShareForCustom } from 'educoder'; +const CustomVip = Loadable({ + loader: () => import("./Pages/custom/vip"), + loading: Loading, +}); const SourceDetail = Loadable({ loader: () => import("./Pages/sourceDetail"), loading: Loading, @@ -290,6 +294,12 @@ function Index(props){ )} > + ( + + )} + > (