浏览代码

修改 微信无法 正常识别的问题

paddy 3 年之前
父节点
当前提交
8663905493
共有 1 个文件被更改,包括 2 次插入4 次删除
  1. 2 4
      internal/svc/wechat.go

+ 2 - 4
internal/svc/wechat.go

@@ -174,10 +174,8 @@ func (wc *Wechat) GenGaQrCode(scene, page string) (r io.ReadCloser, err error) {
 }
 func (wc *Wechat) GenTestQrCode(scene, page string) (r io.Reader, err error) {
 	ret := "https://open.weixin.qq.com/sns/getexpappinfo" +
-		"?appid=" + wc.c.Weixin.Appid +
-		"&path=" + url.QueryEscape(page) + ".html" +
-		"&scene=" + url.QueryEscape(scene) +
-		"&is_hyaline=true" +
+		"?appid=" + wc.c.Weixin.Appid + "&path=" +
+		url.QueryEscape(page+".html&scene="+scene+"&is_hyaline=true") +
 		"#wechat-redirect"
 	code, err := qr.Encode(ret, qr.L, qr.Unicode)
 	if err != nil {