|
@@ -193,21 +193,21 @@ func (l *Login) Login() error {
|
|
|
}
|
|
|
// 新用户注册 记录来源
|
|
|
sourceLabel := redis.GetStr("limitation", fmt.Sprintf("firstVisitTagByWX_%s", l.Session().Id()))
|
|
|
- if sourceLabel != "" { //合作商
|
|
|
- data["s_rsource"] = sourceLabel
|
|
|
- channelCode = sourceLabel
|
|
|
- } else if sessVal["RSource"] != nil {
|
|
|
- data["s_rsource"] = sessVal["RSource"]
|
|
|
+ if source == "" {
|
|
|
+ if sourceLabel != "" { //合作商
|
|
|
+ data["s_rsource"] = sourceLabel
|
|
|
+ channelCode = sourceLabel
|
|
|
+ } else if sessVal["RSource"] != nil {
|
|
|
+ data["s_rsource"] = sessVal["RSource"]
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ data["s_rsource"] = source
|
|
|
}
|
|
|
if ck, err := l.GetCookie("source"); err == nil && ck.Value != "" {
|
|
|
//cookie中记录用户的来源
|
|
|
data["s_newsource"] = ck.Value
|
|
|
data["s_module"] = GetModule(ck.Value) //根据cookie中记录的来源获取模块
|
|
|
}
|
|
|
-
|
|
|
- if source != "" {
|
|
|
- data["s_tracksource"] = source
|
|
|
- }
|
|
|
//获取base_user_id
|
|
|
resp := config.Middleground.UserCenter.UserAdd(pb.UserAddReq{
|
|
|
Appid: "10000",
|