|
@@ -32,8 +32,8 @@ func init() {
|
|
|
xweb.AddAction(&SingleLogin{})
|
|
|
}
|
|
|
|
|
|
-//ShortUrl
|
|
|
-//短地址跳转
|
|
|
+// ShortUrl
|
|
|
+// 短地址跳转
|
|
|
func (this *SingleLogin) ShortUrl(key string) error {
|
|
|
defer qutil.Catch()
|
|
|
var redirectUrl = "/swordfish/about"
|
|
@@ -50,9 +50,10 @@ func (this *SingleLogin) ShortUrl(key string) error {
|
|
|
return this.Redirect(redirectUrl)
|
|
|
}
|
|
|
|
|
|
-//SingleLogin
|
|
|
-//toHref 已关注跳转页面
|
|
|
-//unHref 为关注跳转页面,若无此字段会跳至关注二维码页面
|
|
|
+// SingleLogin
|
|
|
+// toHref 已关注跳转页面
|
|
|
+// unHref 为关注跳转页面,若无此字段会跳至关注二维码页面
|
|
|
+//
|
|
|
// *已有逻辑 1.线上课程推文,用户点击可登陆跳转;未关注扫码会回复课程链接
|
|
|
// 2.文库赚积分
|
|
|
func (this *SingleLogin) SingleLogin() error {
|
|
@@ -103,8 +104,12 @@ func (this *SingleLogin) SingleLogin() error {
|
|
|
redis.Put("other", fmt.Sprintf("digitalreplay_%s", openid), id, 24*60*60)
|
|
|
}(id)
|
|
|
}
|
|
|
- if this.GetSession("userId") == nil {
|
|
|
- loginCreateSess(openid, this.Session())
|
|
|
+ if this.GetSession("userId") == nil || this.GetSession("phone") == nil {
|
|
|
+ CreateSession(map[string]interface{}{
|
|
|
+ "s_m_openid": openid,
|
|
|
+ "s_unionid": map[string]interface{}{"$ne": openid}, //处理排除未关注用户点击菜单创建的用户
|
|
|
+ }, this.Session(), "singleLogin", false, true)
|
|
|
+ //loginCreateSess(openid, this.Session())
|
|
|
}
|
|
|
return this.Redirect(qutil.ObjToString(data["toHref"]))
|
|
|
}
|