|
@@ -197,21 +197,25 @@ func (this *OrgStructure) AutoLogon() error {
|
|
}); resp != nil && resp.Data.Id > 0 {
|
|
}); resp != nil && resp.Data.Id > 0 {
|
|
data["base_user_id"] = resp.Data.Id
|
|
data["base_user_id"] = resp.Data.Id
|
|
if id := mongodb.Save("user", data); id != "" {
|
|
if id := mongodb.Save("user", data); id != "" {
|
|
- referer := this.Refer()
|
|
|
|
- go jy.SaveUserLog(public.Mgo_Log,
|
|
|
|
- id,
|
|
|
|
- phone,
|
|
|
|
- "phone",
|
|
|
|
- jyutil.IsAndroidOrIOS(this.UserAgent()),
|
|
|
|
- source,
|
|
|
|
- openId,
|
|
|
|
- jyutil.GetSearchEngine(gconv.String(this.GetSession("RSource"))),
|
|
|
|
- gconv.String(this.GetSession("RSource")),
|
|
|
|
- util.GetIp(this.Request),
|
|
|
|
- this.UserAgent(),
|
|
|
|
- "",
|
|
|
|
- "",
|
|
|
|
- referer)
|
|
|
|
|
|
+ referer := this.Refer()
|
|
|
|
+ var Rref = this.GetString("rref")
|
|
|
|
+ if this.GetSession("RReferer") != nil && util.ObjToString(this.GetSession("RReferer")) != "" {
|
|
|
|
+ Rref = gconv.String(this.GetSession("RReferer"))
|
|
|
|
+ }
|
|
|
|
+ go jy.SaveUserLog(public.Mgo_Log,
|
|
|
|
+ id,
|
|
|
|
+ phone,
|
|
|
|
+ "phone",
|
|
|
|
+ jyutil.IsAndroidOrIOS(this.UserAgent()),
|
|
|
|
+ source,
|
|
|
|
+ openId,
|
|
|
|
+ Rref,
|
|
|
|
+ gconv.String(this.GetSession("RSource")),
|
|
|
|
+ util.GetIp(this.Request),
|
|
|
|
+ this.UserAgent(),
|
|
|
|
+ "",
|
|
|
|
+ "",
|
|
|
|
+ referer)
|
|
nsqPath, _ := config.Sysconfig["nsq"].(string)
|
|
nsqPath, _ := config.Sysconfig["nsq"].(string)
|
|
nsq_topic, _ := config.Sysconfig["nsq_topic"].(string)
|
|
nsq_topic, _ := config.Sysconfig["nsq_topic"].(string)
|
|
jy.Publish(public.Mgo_Log, nsqPath, nsq_topic, "task", id, jy.Jyweb_node2, map[string]interface{}{
|
|
jy.Publish(public.Mgo_Log, nsqPath, nsq_topic, "task", id, jy.Jyweb_node2, map[string]interface{}{
|