作者 tangxvhui

图片url 上传个修改

... ... @@ -16,12 +16,6 @@ type AchievementChance struct {
Code string `json:"code"`
}
type AchievementImage struct {
Path string `json:"path"`
W int `json:"-"`
H int `json:"-"`
}
//RequestAddAchievement 添加成果
type RequestAddAchievement struct {
ChanceData []AchievementChance `json:"chance_data"`
... ... @@ -33,7 +27,7 @@ type RequestAddAchievement struct {
UserGraspScore float64 `json:"user_grasp_score"` //把握人总得分
Provider []AchievementProvider `json:"provider"` //机会提供者
SourceContent string `json:"source_content"` //成果描述文本
Images []AchievementImage `json:"image"` //图片
Images []ImageJsonData `json:"image"` //图片
}
//RequestAddAchievement 添加成果
... ... @@ -46,7 +40,7 @@ type RequestEditAchievement struct {
UserGraspScore float64 `json:"user_grasp_score"` //把握人总得分
SourceContent string `json:"source_content"` //成果描述文本
Provider []AchievementProvider `json:"provider"` //机会提供者
Images []AchievementImage `json:"image"` //图片
Images []ImageJsonData `json:"image"` //图片
}
// ResponseRankSeasonList 赛季列表
... ... @@ -83,6 +77,6 @@ type ResponseAchievementInfo struct {
UserGraspScore float64 `json:"user_grasp_score"` //把握人总得分
Provider []AchievementProvider `json:"provider"` //机会提供者
SourceContent string `json:"source_content"` //成果描述文本
Images []AchievementImage `json:"image"` //图片
Images []ImageJsonData `json:"image"` //图片
CrreateAt string `json:"create_at"`
}
... ...
... ... @@ -111,3 +111,10 @@ type SelectChanceList struct {
ResponsePageInfo
List []SelectChanceListItem `json:"lists"`
}
type ImageJsonData struct {
Path string `json:"path"`
ImageId int `json:"imageId"`
W int `json:"w"`
H int `json:"h"`
}
... ...
... ... @@ -310,7 +310,7 @@ func GetAchievementList(pageIndex int, pageSize int, companyId int64, status int
func GetAchievementInfo(id int64, companyId int64) *protocol.ResponseAchievementInfo {
rspData := &protocol.ResponseAchievementInfo{
Images: make([]protocol.AchievementImage, 0),
Images: make([]protocol.ImageJsonData, 0),
Provider: make([]protocol.AchievementProvider, 0),
ChanceData: make([]protocol.AchievementChance, 0),
}
... ... @@ -326,7 +326,7 @@ func GetAchievementInfo(id int64, companyId int64) *protocol.ResponseAchievement
rspData.ChanceTypeId = achievementData.ChanceTypeId
rspData.DepartmentId = achievementData.DepartmentId
rspData.SourceContent = achievementData.SourceContent
img := make([]protocol.AchievementImage, 0)
img := make([]protocol.ImageJsonData, 0)
json.Unmarshal([]byte(achievementData.Images), &img)
rspData.Images = img
rspData.GraspScore = achievementData.GraspScore
... ...