This commit is contained in:
邹宗楠
2023-07-27 14:39:46 +08:00
parent 07df1b00e3
commit 3af5fc8a74

View File

@@ -439,6 +439,7 @@ func checkNameLength(name string, weight int, uint string) string {
}
func uploadImg(api *tao_vegetable.API, imgs []string) *string {
globals.SugarLogger.Debugf("imgs==== := %s", utils.Format4Output(imgs, false))
result := make([]string, 0, 0)
for _, v := range imgs {
if v == "" {
@@ -461,6 +462,9 @@ func uploadImg(api *tao_vegetable.API, imgs []string) *string {
result = append(result, newImg)
}
}
defer func() {
globals.SugarLogger.Debugf("result==== := %s", utils.Format4Output(result, false))
}()
// 商品图片最多五张
if len(result) > 5 {
return utils.String2Pointer(strings.Join(result[1:], ","))