From cd14ee1e9af1eaabb5f7eb0df14f6a6f69da7d9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=BF=83=E5=AE=87?= Date: Fri, 31 May 2024 16:46:58 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E5=90=8C=E6=AD=A5test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/Detail.js | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js index 77ced1348..3d9af68be 100644 --- a/src/forge/Main/Detail.js +++ b/src/forge/Main/Detail.js @@ -270,17 +270,10 @@ class Detail extends Component { console.log("--------start channel --------"); // 是镜像项目,且未完成迁移 this.canvasChannel(); - if (num) { - this.setState({ - secondSync: true, - firstSync: false - }) - } else { - this.setState({ - firstSync: true, - secondSync: false - }) - } + this.setState({ + firstSync: true, + secondSync: false + }) this.setState({ mirror_status:1 }) @@ -334,7 +327,7 @@ class Detail extends Component { disconnected: () => { console.log("###### cannot connected! ######"); }, - received: data => { + received: async data => { console.log(`###### ---received data--- ######`); if (data) { if (deleteFlag) { @@ -344,7 +337,8 @@ class Detail extends Component { if (data.project && data.project.mirror_status === 2) { this.deleteProjectBack(); } - this.getDetail(); + const projectdata = await getProjectDetailFunc(owner, projectsId, !window.location.host).data; + this.getDetail(projectdata) this.getBanner(); } this.setState({ From d0125cb2b1b9b343746b62438c23cbfb0dcc5edf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=BF=83=E5=AE=87?= Date: Thu, 27 Jun 2024 16:31:27 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E6=B7=BB=E5=8A=A0keywords?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Information/Pages/newsDetail.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/forge/Information/Pages/newsDetail.jsx b/src/forge/Information/Pages/newsDetail.jsx index 6f6960829..5b33b7501 100644 --- a/src/forge/Information/Pages/newsDetail.jsx +++ b/src/forge/Information/Pages/newsDetail.jsx @@ -71,9 +71,9 @@ function NewsDetail(props){ document.title= zonedetail.name; setSeoMeta(`${zonedetail.name}`, zonedetail.name, zonedetail.subTitle, `/zone/${deptId}`) } else { - const { name, cmsDir, summary, id} = detail; + let { name, cmsDir, summary, id, keywords} = detail; const title = `${ name }/${ cmsDir.name }`; - const keywords = `${ name },${ cmsDir.name },${ zonedetail.name }`; + keywords = keywords || `${ name },${ cmsDir.name },${ zonedetail.name }`; document.title = title; setSeoMeta(keywords, title, summary, `/zone/${deptId}/newdetail/${ id }`) } From eec5677fadb436a5cab13018ce1e30be21e9345e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=BF=83=E5=AE=87?= Date: Tue, 11 Jun 2024 10:06:36 +0800 Subject: [PATCH 3/6] cont. --- src/forge/Main/Detail.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js index 3d9af68be..6564e0147 100644 --- a/src/forge/Main/Detail.js +++ b/src/forge/Main/Detail.js @@ -935,12 +935,12 @@ Detail.preFetch = ({ store, match, query }) => { return new Promise(async function(resolve, reject) { let { dispatch, getState } = store; // const { owner,projectsId } = match.params + const detail = await dispatch(setProjectDetail(match.params)) const promises = [ - dispatch(setProjectDetail(match.params)), dispatch(setProject(match.params)), - dispatch(setProjectEntries({...match.params, branch: ''})), + dispatch(setProjectEntries({...match.params, branch: match.params.branchName ? match.params.branchName : detail.default_branch})), dispatch(setProjectMenuList(match.params)), - dispatch(setProjectReadMe({...match.params, branch: ''})) + dispatch(setProjectReadMe({...match.params, branch: match.params.branchName ? match.params.branchName : detail.default_branch})) ]; const data = await Promise.all(promises); resolve({ From 05136654c461ebe637fadbd09eefb4597dc21cfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=BF=83=E5=AE=87?= Date: Fri, 28 Jun 2024 11:05:25 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E5=85=B3=E9=94=AE=E8=AF=8D=E5=89=8D?= =?UTF-8?q?=E5=8F=B0=E5=B1=95=E7=A4=BA=E3=80=81=E6=96=87=E6=A1=88=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Information/Pages/newsDetail.jsx | 6 ++++-- src/forge/Information/index.scss | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/forge/Information/Pages/newsDetail.jsx b/src/forge/Information/Pages/newsDetail.jsx index 5b33b7501..0555a0741 100644 --- a/src/forge/Information/Pages/newsDetail.jsx +++ b/src/forge/Information/Pages/newsDetail.jsx @@ -133,8 +133,10 @@ function NewsDetail(props){ { !IsPC() && } { - content ? - + content ? <> + { detail.keywords &&

文章标签:{ detail.keywords }

} + + : 暂无详情~ } diff --git a/src/forge/Information/index.scss b/src/forge/Information/index.scss index 6681aab39..c93811076 100644 --- a/src/forge/Information/index.scss +++ b/src/forge/Information/index.scss @@ -487,6 +487,15 @@ background-image:linear-gradient(180deg,#f8f9fd 0%,#f8f9fd 100%); border:1px solid #ffffff; box-sizing: border-box; + .keywords { + color: #232b3f; + font-size: 14px; + line-height: 28px; + padding-bottom: 10px; + span { + color:#466aff; + } + } } .info_text_main{ margin-bottom: 2em; @@ -553,6 +562,15 @@ background-color: #fff; border-radius: 4px; padding:30px 35px 50px; + .keywords { + color: #232b3f; + font-size: 14px; + line-height: 28px; + padding-bottom: 10px; + span { + color:#466aff; + } + } .info_text_main{ .i_name{ color:#1f2329; From b3dab4177302dfbb28fe894d4244d274066a047f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=BF=83=E5=AE=87?= Date: Fri, 28 Jun 2024 14:22:51 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E3=80=81=E5=BC=80=E6=BA=90=E5=A4=8F=E4=BB=A4=E8=90=A5title?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Information/Pages/newsDetail.jsx | 7 ++++++- src/forge/Information/index.scss | 17 +++++++++++++++-- src/glcc/index.jsx | 2 +- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/forge/Information/Pages/newsDetail.jsx b/src/forge/Information/Pages/newsDetail.jsx index 0555a0741..cd86f2c15 100644 --- a/src/forge/Information/Pages/newsDetail.jsx +++ b/src/forge/Information/Pages/newsDetail.jsx @@ -129,12 +129,17 @@ function NewsDetail(props){ { !!detail.visits &&
  • {detail.visits}
  • } { detail.auditStatus === '2' &&
  • } { detail.auditStatus === '0' &&
  • } + { detail.keywords && !isPhone() &&
  • 文章标签:{ detail.keywords.split(',').map(e => ( + { e } + )) }
  • } { !IsPC() && } { content ? <> - { detail.keywords &&

    文章标签:{ detail.keywords }

    } + { detail.keywords && isPhone() &&
  • 文章标签:{ detail.keywords.split(',').map(e => ( + { e } + )) }
  • } : diff --git a/src/forge/Information/index.scss b/src/forge/Information/index.scss index c93811076..8e021089b 100644 --- a/src/forge/Information/index.scss +++ b/src/forge/Information/index.scss @@ -493,7 +493,14 @@ line-height: 28px; padding-bottom: 10px; span { - color:#466aff; + display: inline-block; + color:#1F2329; + margin-right: 5px; + border: 1px solid; + border-color: #d6d8e0; + border-radius: 4px; + padding: 2px 10px; + margin-bottom: 10px !important; } } } @@ -568,7 +575,13 @@ line-height: 28px; padding-bottom: 10px; span { - color:#466aff; + display: inline-block; + color:#1F2329; + margin-right: 5px; + border: 1px solid; + border-color: #d6d8e0; + border-radius: 4px; + padding: 2px 10px; } } .info_text_main{ diff --git a/src/glcc/index.jsx b/src/glcc/index.jsx index c4e091d3a..5e3033f6b 100644 --- a/src/glcc/index.jsx +++ b/src/glcc/index.jsx @@ -171,7 +171,7 @@ const Glcc = (propsF) => { const [studentRegId, setStudentRegId] = useState(undefined); useEffect(()=>{ - document.title='开源夏令营'; + document.title='确实开源编程夏令营丨GLCC'; }, []) // 是否为导师身份 From 73093e1bad48d93b7996de322adb0bf455518bc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=BF=83=E5=AE=87?= Date: Fri, 28 Jun 2024 14:48:33 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Information/Pages/newsDetail.jsx | 13 ++++--------- src/forge/Information/index.scss | 22 ++++++++++------------ 2 files changed, 14 insertions(+), 21 deletions(-) diff --git a/src/forge/Information/Pages/newsDetail.jsx b/src/forge/Information/Pages/newsDetail.jsx index cd86f2c15..5b96b8ea7 100644 --- a/src/forge/Information/Pages/newsDetail.jsx +++ b/src/forge/Information/Pages/newsDetail.jsx @@ -129,19 +129,14 @@ function NewsDetail(props){ { !!detail.visits &&
  • {detail.visits}
  • } { detail.auditStatus === '2' &&
  • } { detail.auditStatus === '0' &&
  • } - { detail.keywords && !isPhone() &&
  • 文章标签:{ detail.keywords.split(',').map(e => ( - { e } - )) }
  • } + { detail.keywords &&
    文章标签:{ detail.keywords.split(',').map(e => ( + { e } + )) }
    } { !IsPC() && } { - content ? <> - { detail.keywords && isPhone() &&
  • 文章标签:{ detail.keywords.split(',').map(e => ( - { e } - )) }
  • } - - + content ? : 暂无详情~ } diff --git a/src/forge/Information/index.scss b/src/forge/Information/index.scss index 8e021089b..36e8c5ec5 100644 --- a/src/forge/Information/index.scss +++ b/src/forge/Information/index.scss @@ -491,15 +491,14 @@ color: #232b3f; font-size: 14px; line-height: 28px; - padding-bottom: 10px; + margin-top: 10px; span { display: inline-block; - color:#1F2329; - margin-right: 5px; - border: 1px solid; - border-color: #d6d8e0; + background-color: #eff2ff; border-radius: 4px; - padding: 2px 10px; + padding: 0 10px; + color: #466aff; + margin-right: 5px; margin-bottom: 10px !important; } } @@ -573,15 +572,14 @@ color: #232b3f; font-size: 14px; line-height: 28px; - padding-bottom: 10px; + margin-top: 10px; span { display: inline-block; - color:#1F2329; - margin-right: 5px; - border: 1px solid; - border-color: #d6d8e0; + background-color: #eff2ff; border-radius: 4px; - padding: 2px 10px; + padding: 0 10px; + color: #466aff; + margin-right: 5px; } } .info_text_main{