正在显示
1 个修改的文件
包含
11 行增加
和
2 行删除
| @@ -28,13 +28,17 @@ type ReviseContentsItemData struct { | @@ -28,13 +28,17 @@ type ReviseContentsItemData struct { | ||
| 28 | Type string `json:"type"` | 28 | Type string `json:"type"` |
| 29 | Value string `json:"value"` | 29 | Value string `json:"value"` |
| 30 | Path string `json:"path"` | 30 | Path string `json:"path"` |
| 31 | + Cover struct { | ||
| 32 | + Path string `json:"path"` | ||
| 33 | + } `json:"cover"` | ||
| 34 | + Duration int `json:"duration"` | ||
| 31 | } | 35 | } |
| 32 | 36 | ||
| 33 | type ReviseContentsItem struct { | 37 | type ReviseContentsItem struct { |
| 34 | Content string `json:"content"` | 38 | Content string `json:"content"` |
| 35 | - Data []ReviseContentsItemData `json:"data"` | 39 | + Data []ReviseContentsItemData `json:"data,omitempty"` |
| 36 | InputType string `json:"inputType"` | 40 | InputType string `json:"inputType"` |
| 37 | - Lable string `json:"lable "` | 41 | + Lable string `json:"lable"` |
| 38 | } | 42 | } |
| 39 | 43 | ||
| 40 | type ChanceReviseLogData struct { | 44 | type ChanceReviseLogData struct { |
| @@ -76,5 +80,10 @@ func GetChanceReviseLogData(flowLogId int64) (*ChanceReviseLog, *ChanceReviseLog | @@ -76,5 +80,10 @@ func GetChanceReviseLogData(flowLogId int64) (*ChanceReviseLog, *ChanceReviseLog | ||
| 76 | Videos: make([]ChanceDataVideos, 0), | 80 | Videos: make([]ChanceDataVideos, 0), |
| 77 | } | 81 | } |
| 78 | json.Unmarshal([]byte(reviseLog.Data), reviseLogData) | 82 | json.Unmarshal([]byte(reviseLog.Data), reviseLogData) |
| 83 | + for i := range reviseLogData.ReviseContents { | ||
| 84 | + if reviseLogData.ReviseContents[i].InputType == "" { | ||
| 85 | + reviseLogData.ReviseContents[i].InputType = InputTypeText | ||
| 86 | + } | ||
| 87 | + } | ||
| 79 | return reviseLog, reviseLogData, err | 88 | return reviseLog, reviseLogData, err |
| 80 | } | 89 | } |
-
请 注册 或 登录 后发表评论