获取接口返回的地址

This commit is contained in:
caishi 2023-06-02 13:57:40 +08:00
parent 43b1702d9b
commit f410df6e57
2 changed files with 4 additions and 10 deletions

View File

@ -136,7 +136,7 @@ function HeaderPage(props){
<li>
<Link to={`/${i.login}`}><img src={i.imageUrl} alt="" /></Link>
<span>{i.name}</span>
<p className="task-hide-2" style={{display:i.introduction?"-webkit-flex":"flex"}}>{i.introduction || "暂无~"}</p>
<p className="task-hide-2" style={{display:i.introduction?"":"flex"}}>{i.introduction || "暂无~"}</p>
</li>
)
})

View File

@ -1,14 +1,8 @@
import javaFetch from '../javaFetch';
// let settings = localStorage.chromesetting&&JSON.parse(localStorage.chromesetting);
// let actionUrl = settings && settings.common.glcc;
let actionUrl = "";
const isDev = window.location.port === '3007' || window.location.origin === "https://testforgeplus.trustie.net";
if(isDev === true){
actionUrl = "https://testgetway.trustie.net/api";
}else{
actionUrl = "https://gateway.gitlink.org.cn/api";
}
let settings = localStorage.chromesetting&&JSON.parse(localStorage.chromesetting);
let actionUrl = settings && settings.common.zone +"/api";
const service = javaFetch(actionUrl);
export const httpUrl = actionUrl;