|
@@ -144,6 +144,7 @@ func (this *OrgStructure) AutoLogon() error {
|
|
phone := this.GetString("phone")
|
|
phone := this.GetString("phone")
|
|
name := this.GetString("name")
|
|
name := this.GetString("name")
|
|
mail := this.GetString("email")
|
|
mail := this.GetString("email")
|
|
|
|
+ source := this.GetString("source")
|
|
rb := false
|
|
rb := false
|
|
if openId != "" && phone != "" {
|
|
if openId != "" && phone != "" {
|
|
//解密
|
|
//解密
|
|
@@ -168,6 +169,7 @@ func (this *OrgStructure) AutoLogon() error {
|
|
"l_registedate": time.Now().Unix(),
|
|
"l_registedate": time.Now().Unix(),
|
|
"i_ts_guide": 2,
|
|
"i_ts_guide": 2,
|
|
"s_platform": "wx",
|
|
"s_platform": "wx",
|
|
|
|
+ "s_rsource": gconv.String(util.If(source != "", source, this.GetSession("RSource"))),
|
|
"o_jy": map[string]interface{}{
|
|
"o_jy": map[string]interface{}{
|
|
"s_email": mail,
|
|
"s_email": mail,
|
|
"i_apppush": 1,
|
|
"i_apppush": 1,
|
|
@@ -197,25 +199,26 @@ 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()
|
|
|
|
- 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)
|
|
|
|
|
|
+ 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()),
|
|
|
|
+ "pc",
|
|
|
|
+ openId,
|
|
|
|
+ Rref,
|
|
|
|
+ gconv.String(util.If(source != "", source,
|
|
|
|
+ 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{}{
|