Merge branch 'develop' of https://gitee.com/fusenpack/fusenapi into develop
This commit is contained in:
commit
271432953d
@ -4,10 +4,9 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"fusenapi/model"
|
"fusenapi/model"
|
||||||
"fusenapi/utils/image"
|
|
||||||
|
|
||||||
"fusenapi/product/internal/svc"
|
"fusenapi/product/internal/svc"
|
||||||
"fusenapi/product/internal/types"
|
"fusenapi/product/internal/types"
|
||||||
|
"fusenapi/utils/image"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
)
|
)
|
||||||
|
@ -14,15 +14,12 @@ func GetCurrentSize(clientSize uint32) uint32 {
|
|||||||
}
|
}
|
||||||
//小于最小尺寸则返回规则最小尺寸
|
//小于最小尺寸则返回规则最小尺寸
|
||||||
if clientSize < newSizeArray[0] {
|
if clientSize < newSizeArray[0] {
|
||||||
return clientSize
|
return newSizeArray[0]
|
||||||
}
|
}
|
||||||
for k, v := range newSizeArray {
|
for _, v := range newSizeArray {
|
||||||
if v == clientSize {
|
if v >= clientSize {
|
||||||
return v
|
return v
|
||||||
}
|
}
|
||||||
if clientSize > v && k < lenNewSize-1 && clientSize < newSizeArray[k+1] {
|
|
||||||
return newSizeArray[k+1]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return clientSize
|
return clientSize
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user