This commit is contained in:
2025-03-13 17:06:30 +08:00
parent 7e912f5d86
commit 179ce30a7c
2 changed files with 17 additions and 9 deletions
+2 -9
View File
@@ -2,7 +2,6 @@ package dto
import (
"case-open-api/api/model"
"case-open-api/config"
"case-open-api/utils"
"fmt"
)
@@ -138,9 +137,6 @@ func GetCaseResListDto(m []*model.Case) []*ResCaseDto {
StarTime: v.CreatedAt,
}
// 加载访问链接
response.LoadLink(v)
// 将转换后的结构体添加到新切片中
responses[i] = response
}
@@ -174,11 +170,8 @@ func (r *ResProjectDto) LoadIsRecentlyUpdate(m *model.Case) *ResProjectDto {
}
// LoadLink 加载访问链接
func (r *ResCaseDto) LoadLink(m *model.Case) *ResCaseDto {
if m != nil {
link := config.C.DomainName + "/caseIntro" + "?project_id=" + fmt.Sprintf("%d", m.ProjectId) + "&source=3" + "&platform_key=opf$di!3" + "&case_id=" + fmt.Sprintf("%d", m.CaseId)
r.Url = link
}
func (r *ResCaseDto) LoadLink(link string) *ResCaseDto {
r.Url = link
return r
}