头像地址处理
Context testing / run-01 (push) Failing after 54s Details
Context testing / run-02 (push) Failing after 55s Details
Context testing / run-03 (push) Failing after 55s Details
Context testing / run-04 (push) Failing after 55s Details
Context testing / dump_contexts_to_log (push) Failing after 55s Details

This commit is contained in:
谢思 2026-07-23 17:30:20 +08:00
parent 811bdc3d10
commit 5aae70e4c7
2 changed files with 9 additions and 5 deletions

View File

@ -249,10 +249,12 @@ function List(props) {
if (res && res.data && res.data.rows) {
setList(res.data.rows.map(row => {
const { projectProperties, id } = row;
const imageUrl = projectProperties.authorImageUrl.split(':4000/') && projectProperties.authorImageUrl.split(':4000/')[1]
const authorImageUrl = imageUrl ? `${window.location.origin}/${imageUrl}` : projectProperties.authorImageUrl
return {
id: id,
name: projectProperties.fromOwner === "AI-RESOURCE" ? projectProperties.name.split("/").pop() : projectProperties.name,
image: projectProperties.authorImageUrl,
image: authorImageUrl,
isNew: false,
url: projectProperties.fullName,
desc: projectProperties.description,
@ -398,9 +400,9 @@ function List(props) {
{list.map((model) => (
<ActionItem key={`${type}-${model.id}`} className="ai_home_card" padding="1px" borderRadius="12px">
{type === "agents" ? <div>
<div>
<div className="df">
<img src={model.image ? model.image : require(`../image/${model.id}.png`).default} width={46} className="mr15" style={{ borderRadius: '8px' }} />
<span className="font-18 font-bd">{model.name}</span>
<span className="font-18 font-bd task-hide">{model.name}</span>
</div>
<div className="color3f4 mt15 task-hide-2" style={{minHeight: 56}}>{model.desc}</div>
<div className="btn-Box">

View File

@ -26,7 +26,9 @@ function ForumList({title="最新帖子", forumList, LIMIT, page, setPage, total
</div>
<div className="forums-list4-box pt5">
{forumList.map((item, index) => {
const orderIndex = index+LIMIT*(page-1)
const orderIndex = index+LIMIT*(page-1);
const imageUrl = item.image_url.split(':4000/') && item.image_url.split(':4000/')[1]
const authorImageUrl = imageUrl ? `${window.location.origin}/${imageUrl}` : item.image_url
return <div className="forums-list4-item">
<div className="pr80 AlignCenter">
{orderIndex < 3 ? <img src={sortImg1[orderIndex]} width={24} className="mr10"/> : <span className="font-bd font-20 mr10">{orderIndex + 1}</span>}
@ -39,7 +41,7 @@ function ForumList({title="最新帖子", forumList, LIMIT, page, setPage, total
<i className="iconfont icon-jiantou21 font-16"></i>
</div>
<div className="opacity8 mt15 forums-list4-item-bottom">
<img src={item.image_url} alt="" className="user-img" />
<img src={authorImageUrl} alt="" className="user-img" />
{item.username}
<span className="ml10">{item.published_time}</span>
<Divider type="vertical" />