Browse Source

报告查看、修改

WH01243 4 months ago
parent
commit
a7b41a5c93

+ 19 - 15
src/jfw/front/org_structure.go

@@ -197,21 +197,25 @@ func (this *OrgStructure) AutoLogon() error {
 			}); resp != nil && resp.Data.Id > 0 {
 				data["base_user_id"] = resp.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)
 					nsq_topic, _ := config.Sysconfig["nsq_topic"].(string)
 					jy.Publish(public.Mgo_Log, nsqPath, nsq_topic, "task", id, jy.Jyweb_node2, map[string]interface{}{

+ 21 - 17
src/jfw/front/otherAct.go

@@ -155,23 +155,27 @@ func (f *Front) Lpsubmit() error {
 			}
 			_id := mongodb.Save("user", data)
 			if _id != "" {
-				//用户日志保存
-				referer := f.Refer()
-				source := f.GetString("source")
-				go jy.SaveUserLog(public.Mgo_Log,
-					_id,
-					phoneNum,
-					"phone",
-					jyutil.IsAndroidOrIOS(f.UserAgent()),
-					source,
-					"",
-					jyutil.GetSearchEngine(gconv.String(f.GetSession("RSource"))),
-					util.ObjToString(f.GetSession("RSource")),
-					util.GetIp(f.Request),
-					f.UserAgent(),
-					"",
-					"",
-					referer)
+                //用户日志保存
+                referer := f.Refer()
+                source := f.GetString("source")
+                var Rref = f.GetString("rref")
+                if f.GetSession("RReferer") != nil && util.ObjToString(f.GetSession("RReferer")) != "" {
+                    Rref = gconv.String(f.GetSession("RReferer"))
+                }
+                go jy.SaveUserLog(public.Mgo_Log,
+                    _id,
+                    phoneNum,
+                    "phone",
+                    jyutil.IsAndroidOrIOS(f.UserAgent()),
+                    source,
+                    "",
+                    Rref,
+                    util.ObjToString(f.GetSession("RSource")),
+                    util.GetIp(f.Request),
+                    f.UserAgent(),
+                    "",
+                    "",
+                    referer)
 				deleteIdentSession(f.Session())
 				return "y"
 			}

+ 20 - 16
src/jfw/front/pchelper.go

@@ -154,22 +154,26 @@ func (l *PcHelper) Login() error {
 						}
 						_id := mongodb.Save("user", data)
 						if _id != "" {
-							referer := l.Refer()
-							source := l.GetString("source")
-							go jy.SaveUserLog(public.Mgo_Log,
-								_id,
-								phone,
-								"phone",
-								"pc",
-								source,
-								"",
-								jyutil.GetSearchEngine(gconv.String(l.GetSession("RSource"))),
-								gconv.String(l.GetSession("RSource")),
-								util.GetIp(l.Request),
-								l.UserAgent(),
-								"jybx",
-								"",
-								referer)
+                            referer := l.Refer()
+                            source := l.GetString("source")
+                            var Rref = l.GetString("rref")
+                            if l.GetSession("RReferer") != nil && util.ObjToString(l.GetSession("RReferer")) != "" {
+                                Rref = gconv.String(l.GetSession("RReferer"))
+                            }
+                            go jy.SaveUserLog(public.Mgo_Log,
+                                _id,
+                                phone,
+                                "phone",
+                                "pc",
+                                source,
+                                "",
+                                Rref,
+                                gconv.String(l.GetSession("RSource")),
+                                util.GetIp(l.Request),
+                                l.UserAgent(),
+                                "jybx",
+                                "",
+                                referer)
 							jy.ClearPhoneIdentSession(l.Session())
 							reToken = getUToken(mac, phone)
 							reOpenId = phone

+ 9 - 20
src/jfw/jyutil/jyutil.go

@@ -361,24 +361,13 @@ func GetES(state int) *JyES {
 	return ESInfo
 }
 func IsAndroidOrIOS(s string) string {
-	typ := ""
-	if strings.Contains(s, "Android") {
-		typ = "Android"
-	} else if strings.Contains(s, "iPhone") || strings.Contains(s, "iPad") {
-		typ = "IOS"
-	} else {
-		typ = "other"
-	}
-	return typ
-}
-func GetSearchEngine(promotion string) string {
-	search_engine := ""
-	refererlist := config.Seoconfig["referer"].(map[string]interface{})
-	for k, v := range refererlist {
-		if promotion == v {
-			search_engine = k
-			break
-		}
-	}
-	return search_engine
+    typ := ""
+    if strings.Contains(s, "Android") {
+        typ = "Android"
+    } else if strings.Contains(s, "iPhone") || strings.Contains(s, "iPad") {
+        typ = "IOS"
+    } else {
+        typ = "other"
+    }
+    return typ
 }

+ 2 - 2
src/jfw/modules/subscribepay/src/service/bidCreditReport.go

@@ -52,7 +52,7 @@ func (this *BidCreditReport) GetReport() {
 	for _, adminId := range adminIdArr {
 		if userId == adminId {
 			fool = false
-			continue
+			break
 		}
 	}
 	if fool {
@@ -86,7 +86,7 @@ func (this *BidCreditReport) UpdateReport() {
 	for _, adminId := range adminIdArr {
 		if userId == adminId {
 			fool = false
-			continue
+			break
 		}
 	}
 	if fool {