|
@@ -25,6 +25,7 @@ import (
|
|
|
"hongze/hongze_yb/services/user"
|
|
|
"hongze/hongze_yb/utils"
|
|
|
"io/ioutil"
|
|
|
+ "net/url"
|
|
|
"os"
|
|
|
"path"
|
|
|
"strconv"
|
|
@@ -555,8 +556,11 @@ func BannerGetQRCode(c *gin.Context) {
|
|
|
randStr := utils.GetRandStringNoSpecialChar(28)
|
|
|
filePath := "./static/" + randStr + ".png"
|
|
|
fileName := randStr + ".png"
|
|
|
+
|
|
|
+ companyNameCode := url.QueryEscape(companyName) // 进行URL编码
|
|
|
+ remarkCode := url.QueryEscape(remark) // 进行URL编码
|
|
|
url := "pages-report/signUpPage/signUpPage?RealName=%s&CompanyName=%s&Mobile=%s&BannerId=%d&Title=%s"
|
|
|
- url = fmt.Sprintf(url, wxUserInfo.RealName, companyName, userDetail.Mobile, bannerId,remark)
|
|
|
+ url = fmt.Sprintf(url, wxUserInfo.RealName, companyNameCode, userDetail.Mobile, bannerId, remarkCode)
|
|
|
|
|
|
err = qrcode.WriteFile(url, qrcode.Medium, 256, filePath)
|
|
|
if err != nil {
|