浏览代码

Merge branch 'crm_15.7' into debug

zwxi 10 月之前
父节点
当前提交
976fc94ee4
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      controller/public.go

+ 5 - 1
controller/public.go

@@ -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 {