From ef3ee596f2729e0664ad8feae6e8ac3b03c36363 Mon Sep 17 00:00:00 2001 From: caishi Date: Fri, 22 Oct 2021 17:11:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=A8=E5=85=B0-=E5=A2=9E=E5=8A=A0sonar?= =?UTF-8?q?=E8=B4=A8=E9=87=8F=E5=88=86=E6=9E=90=E7=9A=84url=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/AppConfig.js | 12 ++++++------ src/forge/Main/CoderDepot.jsx | 23 +++++++++++++++++++++++ 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/src/AppConfig.js b/src/AppConfig.js index ea85a4e5..d76e9999 100644 --- a/src/AppConfig.js +++ b/src/AppConfig.js @@ -32,7 +32,7 @@ export function initAxiosInterceptors(props) { // 判断网络是否连接 initOnlineOfflineListener(); - var proxy = "https://testforgeplus.trustie.net"; + var proxy = "https://code.mulanos.cn"; //响应前的设置 axios.interceptors.request.use( config => { @@ -45,11 +45,11 @@ export function initAxiosInterceptors(props) { if (`${config[0]}` !== `true`) { if (window.location.port === "3007") { config.url = `${proxy}${url}`; - if (config.url.indexOf('?') === -1) { - config.url = `${config.url}?debug=${debugType}`; - } else { - config.url = `${config.url}&debug=${debugType}`; - } + // if (config.url.indexOf('?') === -1) { + // config.url = `${config.url}?debug=${debugType}`; + // } else { + // config.url = `${config.url}&debug=${debugType}`; + // } } else { config.url = url; } diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index f50c134a..7507ae5c 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -63,6 +63,7 @@ function CoderDepot(props){ const [ desc , setDesc ] = useState(undefined); const [ website , setWebsite ] = useState(undefined); const [ lesson_url , setLessonUrl ] = useState(undefined); + const [ sonar_url , setSonarUrl ] = useState(undefined); const [ readme , setReadme ] = useState(undefined); const [ defaultBranch , setDefaultBranch ] = useState(undefined); const [ editReadme , setEditReadme ] = useState(false); @@ -100,6 +101,7 @@ function CoderDepot(props){ setDesc(details.description); setWebsite(details.website); setLessonUrl(details.lesson_url); + setSonarUrl(details.sonar_url); setDefaultBranch(details.default_branch); setInviteCode(details.invite_code); } @@ -334,6 +336,7 @@ function CoderDepot(props){ setDesc(result.data.description); setWebsite(result.data.website); setLessonUrl(result.data.lesson_url); + setSonarUrl(result.data.sonar_url); } }) } @@ -558,6 +561,26 @@ function CoderDepot(props){ {lesson_url} } + { + +
+ +

sonar质量分析

+ { + sonar_url ? + {sonar_url} + : + + 暂时还没有检测结果 + { + projectDetail && projectDetail.permission && projectDetail.permission !=="Reporter" ? + 去检测 + :"" + } + + } +
+ } {/* 发布 */} { releaseVersions &&