This commit is contained in:
suyl
2021-07-07 16:54:17 +08:00
parent a7b7a2aa3b
commit ac6882ef5e
5 changed files with 1171 additions and 2 deletions

View File

@@ -387,7 +387,7 @@ func replaceContent(content string) (result string) {
}
if strings.Contains(result, byteSignQrCenter) && strings.Contains(result, byteSignQrCenterE) {
if qrs := regexpQrc.FindStringSubmatch(result); len(qrs) > 0 {
lenqr = len(qrs[1])
lenqr = len(qrs[1]) / 2
hexLenqr = fmt.Sprintf("%x", lenqr)
if len(hexLenqr) < 2 {
hexLenqr = "0" + hexLenqr
@@ -398,7 +398,7 @@ func replaceContent(content string) (result string) {
}
if strings.Contains(result, byteSignQrLeft) && strings.Contains(result, byteSignQrLeftE) {
if qrs := regexpQrl.FindStringSubmatch(result); len(qrs) > 0 {
lenqr = len(qrs[1])
lenqr = len(qrs[1]) / 2
hexLenqr = fmt.Sprintf("%x", lenqr)
if len(hexLenqr) < 2 {
hexLenqr = "0" + hexLenqr