This commit is contained in:
laodaming 2023-09-20 14:56:24 +08:00
parent 7bebadc517
commit f0afda0f26

View File

@ -15,6 +15,7 @@ import (
"github.com/zeromicro/go-zero/core/logx"
"gorm.io/gorm"
"strconv"
"strings"
"time"
)
@ -82,6 +83,10 @@ func (w *wsConnectItem) renderImage(data []byte) {
w.renderErrResponse(renderImageData.RenderId, renderImageData.RenderData.TemplateTag, "", "请传入logo", renderImageData.RenderData.ProductId, w.userId, w.guestId, 0, 0, 0, 0)
return
}
if !strings.Contains(renderImageData.RenderData.Logo, "storage.fusenpack.com") {
w.renderErrResponse(renderImageData.RenderId, renderImageData.RenderData.TemplateTag, "", "logo不是属于fusen的资源", renderImageData.RenderData.ProductId, w.userId, w.guestId, 0, 0, 0, 0)
return
}
lenColor := len(renderImageData.RenderData.TemplateTagColor.Colors)
if lenColor == 0 {
w.renderErrResponse(renderImageData.RenderId, renderImageData.RenderData.TemplateTag, "", "请传入模板标签选择的颜色", renderImageData.RenderData.ProductId, w.userId, w.guestId, 0, 0, 0, 0)