Browse Source

微信分享

wangshan 4 years ago
parent
commit
0b14a14467
2 changed files with 4 additions and 0 deletions
  1. 2 0
      src/jfw/front/swordfish.go
  2. 2 0
      src/web/staticres/wxswordfish/share.js

+ 2 - 0
src/jfw/front/swordfish.go

@@ -1697,8 +1697,10 @@ func (m *Front) About() error {
 				if code == "" {
 					m.T["code"] = "wx01" //新用户微信访问,统计app下载量
 				}
+				//微信浏览器访问 基本不走此
 				return m.Render("/weixin/sharePage.html")
 			} else {
+				//非微信浏览器访问
 				return m.Redirect("/active/appExt/sh001")
 			}
 		} else {

+ 2 - 0
src/web/staticres/wxswordfish/share.js

@@ -8,6 +8,8 @@ function initShare(signature,openid,isentry,activecode,nickname,avatar,id){
 	activecode=activecode||""
 	if(typeof(openid) == "undefined" || openid == null || openid == ""){
 		openid = "-1";
+	}else{
+		openid = encodeURIComponent(openid)
 	}
 	if(typeof(signature) != "undefined" && signature != null && signature.length == 4){
 		wx.config({