|
@@ -88,6 +88,14 @@ type VisitFilter struct {
|
|
|
Ms *mysql.Mysql
|
|
|
}
|
|
|
|
|
|
+func GetVisitSource(sess *httpsession.Session) string {
|
|
|
+ source := common.InterfaceToStr(sess.Get("RSource"))
|
|
|
+ if sSource := GetSevenSourceByRedis(sess); sSource != "" {
|
|
|
+ source = sSource
|
|
|
+ }
|
|
|
+ return source
|
|
|
+}
|
|
|
+
|
|
|
// 7天缓存
|
|
|
func GetSevenSourceByRedis(sess *httpsession.Session) string {
|
|
|
cacheKey := fmt.Sprintf(sevenSourceKey, sess.Id())
|