feat: midjourney mobile page all function is ready

This commit is contained in:
RockYang
2024-02-16 15:55:04 +08:00
parent d2ac807252
commit 8ab15e5dc4
13 changed files with 116 additions and 54 deletions

View File

@@ -141,6 +141,11 @@ func (h *MidJourneyHandler) Image(c *gin.Context) {
prompt += fmt.Sprintf(" %s", data.Model)
}
// 处理融图和换脸的提示词
if data.TaskType == types.TaskSwapFace.String() || data.TaskType == types.TaskBlend.String() {
prompt = fmt.Sprintf("%s:%s", data.TaskType, strings.Join(data.ImgArr, ","))
}
idValue, _ := c.Get(types.LoginUserID)
userId := utils.IntValue(utils.InterfaceToString(idValue), 0)
// generate task id