修复不能生成二维码的bug

This commit is contained in:
johlanse 2022-08-14 17:25:09 +08:00
parent 498c7c24c1
commit c681068189
2 changed files with 3 additions and 2 deletions

View File

@ -14,6 +14,7 @@ func init() {
client.SetProxy(http.ProxyFromEnvironment)
if log.GetLevel() == log.DebugLevel {
client.DebugLog = true
client = client.DevMode().EnableDumpAll().EnableDebugLog()
}
client.SetLogger(&myLog{})
client.SetCommonHeader("user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36")

View File

@ -4,7 +4,6 @@ package web
import (
"fmt"
"io"
"net/http"
"net/http/httputil"
"net/url"
@ -302,8 +301,9 @@ func sign() gin.HandlerFunc {
})
return
}
data := response.Bytes()
log.Debugln("访问sign结果返回内容为 ==》 " + string(data))
ctx.Writer.WriteHeader(200)
data, _ := io.ReadAll(response.Body)
ctx.Writer.Write(data)
}
}