|
@@ -123,13 +123,13 @@ func (this *Distrib) LinkShareX(discored string) error {
|
|
}
|
|
}
|
|
return this.Redirect("/distribution/share/" + discored)
|
|
return this.Redirect("/distribution/share/" + discored)
|
|
}
|
|
}
|
|
|
|
+
|
|
//企业分销
|
|
//企业分销
|
|
func (this *Distrib) LinkShareG(discored string) error {
|
|
func (this *Distrib) LinkShareG(discored string) error {
|
|
- fmt.Println("jinlaile1")
|
|
|
|
defer util.Catch()
|
|
defer util.Catch()
|
|
- //checkIsSubscribeFlag := true
|
|
|
|
|
|
+ checkIsSubscribeFlag := true
|
|
openid, _ := this.Session().Get("s_m_openid").(string)
|
|
openid, _ := this.Session().Get("s_m_openid").(string)
|
|
- /*if openid == "" {
|
|
|
|
|
|
+ if openid == "" {
|
|
if this.GetString("state") == "wx" {
|
|
if this.GetString("state") == "wx" {
|
|
//微信跳回来的
|
|
//微信跳回来的
|
|
code := this.GetString("code")
|
|
code := this.GetString("code")
|
|
@@ -157,24 +157,20 @@ func (this *Distrib) LinkShareG(discored string) error {
|
|
} else {
|
|
} else {
|
|
//是否为关注用户
|
|
//是否为关注用户
|
|
checkIsSubscribeFlag = CheckUserIsSubscribe(openid)
|
|
checkIsSubscribeFlag = CheckUserIsSubscribe(openid)
|
|
- }*/
|
|
|
|
- if openid==""{
|
|
|
|
- userId, _ := this.Session().Get("userId").(string)
|
|
|
|
- go this.ShareLogs(discored, userId)
|
|
|
|
- log.Println("openid:", openid)
|
|
|
|
- log.Println("DIS_" + discored[1:])
|
|
|
|
- //if !checkIsSubscribeFlag {
|
|
|
|
- if discored == "" {
|
|
|
|
- log.Println(userId, "分销用户微信分享错误")
|
|
|
|
- }
|
|
|
|
- //提示关注页面
|
|
|
|
- this.T["discored"] = discored
|
|
|
|
- log.Println("/weixin/singlelogin/index.html" )
|
|
|
|
- return this.Render("/weixin/singlelogin/index.html")
|
|
|
|
- //}
|
|
|
|
}
|
|
}
|
|
- log.Println("/distribution/share/" + discored )
|
|
|
|
- return this.Redirect("/distribution/share/" + discored)
|
|
|
|
|
|
+ userId, _ := this.Session().Get("userId").(string)
|
|
|
|
+ go this.ShareLogs(discored, userId)
|
|
|
|
+ log.Println("openid:", openid)
|
|
|
|
+ log.Println("DIS_" + discored[1:])
|
|
|
|
+ if !checkIsSubscribeFlag {
|
|
|
|
+ if discored == "" {
|
|
|
|
+ log.Println(userId, "分销用户微信分享错误")
|
|
|
|
+ }
|
|
|
|
+ //提示关注页面
|
|
|
|
+ this.T["discored"] = discored
|
|
|
|
+ return this.Render("/weixin/singlelogin/index.html")
|
|
|
|
+ }
|
|
|
|
+ return this.Redirect("/distribution/share/" + discored)
|
|
}
|
|
}
|
|
|
|
|
|
//type 1:超级订阅 2:数据导出 3:数据报告 4:线上课程5公告信息
|
|
//type 1:超级订阅 2:数据导出 3:数据报告 4:线上课程5公告信息
|