From 391e846e013b0f78f4ffa253ce098bc4ab004b81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=BF=83=E5=AE=87?= Date: Wed, 14 Jun 2023 11:46:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=9A=E5=91=98=E7=94=B3=E8=AF=B7=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Information/Pages/zoneVIP.jsx | 18 +++++++++++++----- src/forge/Information/index.jsx | 3 --- src/forge/Information/index.scss | 2 +- src/forge/Information/indexZone1.scss | 2 +- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/forge/Information/Pages/zoneVIP.jsx b/src/forge/Information/Pages/zoneVIP.jsx index 19e167ae3..76ad49d9a 100644 --- a/src/forge/Information/Pages/zoneVIP.jsx +++ b/src/forge/Information/Pages/zoneVIP.jsx @@ -10,9 +10,9 @@ import { getVIPLists, getAuditStatus, applyJoin } from '../api'; import '../indexZone1.scss'; const memberStatusEnum = { - notMember: 0, - isMember: 1, - applying: 2 + applying: '0', + isMember: '1', + notMember: '2' } function ZoneVIP(props){ @@ -21,7 +21,7 @@ function ZoneVIP(props){ const [ isSpin , setIsSpin ] = useState(true); const [ applyVisible , setApplyVisible ] = useState(false); const [ memberStatus , setMemberStatus] = useState(memberStatusEnum.notMember); - const { id, showNotification } = props; + const { id, showNotification, checkIfLogin, showLoginDialog } = props; const temp = props.pathName useEffect(()=>{ @@ -63,11 +63,19 @@ function ZoneVIP(props){ }) } + function apply() { + if(checkIfLogin()===false){ + showLoginDialog() + return false; + } + setApplyVisible(!applyVisible) + } + return(

{ tempConfig[temp].member }

{ tempConfig[temp].vipDesc }

- { memberStatus === memberStatusEnum.notMember && } + { memberStatus === memberStatusEnum.notMember && } { memberStatus === memberStatusEnum.applying && } setApplyVisible(!applyVisible)} current_user={props.current_user}/> diff --git a/src/forge/Information/index.jsx b/src/forge/Information/index.jsx index fac4e7ada..056bc1f78 100644 --- a/src/forge/Information/index.jsx +++ b/src/forge/Information/index.jsx @@ -52,9 +52,6 @@ function Index(props){ const { deptId } = props.match.params; const [ id , setId ] = useState(undefined); const temp = props.pathName - const current_user = props.current_user - console.log(current_user) - console.log(props) useEffect(()=>{ if(deptId){ diff --git a/src/forge/Information/index.scss b/src/forge/Information/index.scss index 40927143a..308edc446 100644 --- a/src/forge/Information/index.scss +++ b/src/forge/Information/index.scss @@ -906,7 +906,7 @@ align-items: center; .apply_button { flex-grow: 0; - margin-top: 10px; + margin-top: 20px; &:hover, &:active, &:focus { color: var(--primary-color); border-color: var(--primary-color); diff --git a/src/forge/Information/indexZone1.scss b/src/forge/Information/indexZone1.scss index 686427e21..42eed23c2 100644 --- a/src/forge/Information/indexZone1.scss +++ b/src/forge/Information/indexZone1.scss @@ -515,7 +515,7 @@ align-items: center; .apply_button { flex-grow: 0; - margin-top: 10px; + margin-top: 20px; &:hover, &:active, &:focus { color: var(--primary-color); border-color: var(--primary-color);