Browse Source

feat:session信息优化

wangshan 1 year ago
parent
commit
23230efc92

+ 2 - 2
src/go.mod

@@ -6,7 +6,7 @@ require (
 	app.yhyue.com/moapp/jyMarketing v0.0.2-0.20230308011651-df591d32df88
 	app.yhyue.com/moapp/jybase v0.0.0-20231026082242-8eb41c7bdda6
 	app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545
-	app.yhyue.com/moapp/jypkg v1.0.7-0.20231114075116-499de5b076d3
+	app.yhyue.com/moapp/jypkg v1.1.0
 	bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.15-0.20230925060020-8e4db0f1e13e
 	github.com/ClickHouse/clickhouse-go v1.5.4
 	github.com/SKatiyar/qr v0.0.0-20151201054752-25b6bdf44e67
@@ -23,7 +23,7 @@ require (
 	app.yhyue.com/moapp/esv1 v0.0.0-20220414031211-3da4123e648d // indirect
 	app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae // indirect
 	bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20230214091519-89a98c01ab0e // indirect
-	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230225125145-431a4f70093a // indirect
+	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20231115092908-cb4608f3a96d // indirect
 	bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.8 // indirect
 	github.com/BurntSushi/toml v1.1.0 // indirect
 	github.com/RoaringBitmap/roaring v1.5.0 // indirect

+ 4 - 4
src/go.sum

@@ -9,14 +9,14 @@ app.yhyue.com/moapp/jybase v0.0.0-20231026082242-8eb41c7bdda6 h1:uyaBp5Iuc/Il4+O
 app.yhyue.com/moapp/jybase v0.0.0-20231026082242-8eb41c7bdda6/go.mod h1:Hv9U/7oHRucqH315Tr1+d03NCvS9mOKPfk8pwwlOIwQ=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545 h1:+Lak4m1zgsigQloOsvp8AJ+0XeX/+PGp9QP550xlbBQ=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545/go.mod h1:uFrsdUBFbETiJlEmr4PtJWPsZlUpPj2bHQRhryu6ggk=
-app.yhyue.com/moapp/jypkg v1.0.7-0.20231114075116-499de5b076d3 h1:6Jv5DcoGYCsHVMwUjvlZubuTgY/vu4fWP5+rcXIKNj0=
-app.yhyue.com/moapp/jypkg v1.0.7-0.20231114075116-499de5b076d3/go.mod h1:LuxdVd+j3uwm7N5j2hivmpPU0LJytEV7iwAIljdoc4Q=
+app.yhyue.com/moapp/jypkg v1.1.0 h1:I0YiMfIEYjmaaGBiadb1bQ2u+9tDFIp570Hg8yq7PBY=
+app.yhyue.com/moapp/jypkg v1.1.0/go.mod h1:sMZxJOsD3STWGY04aDhUtRD+1u5nqhQpdDdpSW3JC1Y=
 app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae h1:6rDDaz6yxvE8viTSzEBwKYOFWq14TMfuBivSazUZMz4=
 app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae/go.mod h1:b0zZHev3gmJao1Fo+2Z2KPVjsuLOJVvVxf+kCnu9WkA=
 bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20230214091519-89a98c01ab0e h1:h+VEI3o1qC0jeCzkFGTrLI4f27cfa/W/y+0sXokWMgE=
 bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20230214091519-89a98c01ab0e/go.mod h1:7Xhygw0KBuL4h0G76FnFg4otQcA9bmOO0c8M0FCjAyQ=
-bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230225125145-431a4f70093a h1:JX2jEMrbdLzXfVC/nTUvdFOkqNj5DUxkJFjl3XE1gyg=
-bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230225125145-431a4f70093a/go.mod h1:5nimT8GJh46AyfeeDeyRlDQygMlO7TRM8Pwm41Gxemc=
+bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20231115092908-cb4608f3a96d h1:x17+SAYxlBChNWn2IS2eDWZlhZrxtgEWjlb1JF0946E=
+bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20231115092908-cb4608f3a96d/go.mod h1:rCCaOSWBYfQabf/yIvSVheSPtN2THnHeTl2J5/RrcuU=
 bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.8 h1:14Yxzutsej7LQe3jnN61wuRX9qjAZ4FtdWMA27ewQ3w=
 bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.8/go.mod h1:rRiGzKG4F/fmkNxXQCxrkxNWc8yf1SmW8qWCKfGIQSM=
 bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.15-0.20230925060020-8e4db0f1e13e h1:bncHHkJLqiDW1ZN6MVe+3bj3i0LxWgFkfqge6Gk7lB4=

+ 25 - 20
src/jfw/front/dataExport.go

@@ -217,11 +217,12 @@ func (d *DataExport) SieveData() {
 		"comeintime":  time.Now().Unix(),
 		"comeinfrom":  "exportPage",
 	}
-	if d.GetSession("s_m_openid") != nil {
-		sieveCondition["s_openid"] = d.GetSession("s_m_openid").(string)
+	sessVal := d.Session().GetMultiple()
+	if sessVal["s_m_openid"] != nil {
+		sieveCondition["s_openid"] = util.ObjToString(sessVal["s_m_openid"])
 	}
-	if d.GetSession("userId") != nil {
-		sieveCondition["s_userid"] = d.GetSession("userId").(string)
+	if sessVal["userId"] != nil {
+		sieveCondition["s_userid"] = util.ObjToString(sessVal["userId"])
 	}
 	_id := mongodb.Save(dataexport.ExportTable, sieveCondition)
 	_res := map[string]interface{}{
@@ -409,8 +410,9 @@ func (d *DataExport) GetOrderCode(order_code string) error {
 
 // ---------------------------生成订单预览----------------------------------
 func (d *DataExport) SuperSearchExport() error {
-	openid := util.ObjToString(d.GetSession("s_m_openid"))
-	userId := util.ObjToString(d.GetSession("userId"))
+	sessVal := d.Session().GetMultiple()
+	openid := util.ObjToString(sessVal["s_m_openid"])
+	userId := util.ObjToString(sessVal["userId"])
 	searchGroup, _ := d.GetInteger("searchGroup")
 	searchMode, _ := d.GetInteger("searchMode")
 	wordsMode, _ := d.GetInteger("wordsMode")
@@ -486,8 +488,9 @@ func (d *DataExport) SuperSearchExport() error {
 }
 func (d *DataExport) ToCreateOrderPage(_id string) error {
 	id := encrypt.SE.Decode4Hex(_id)
-	openid := util.ObjToString(d.GetSession("s_m_openid"))
-	userId := util.ObjToString(d.GetSession("userId"))
+	sessVal := d.Session().GetMultiple()
+	openid := util.ObjToString(sessVal["s_m_openid"])
+	userId := util.ObjToString(sessVal["userId"])
 	if userId == "" {
 		return errors.New("未登录")
 	}
@@ -514,10 +517,10 @@ func (d *DataExport) ToCreateOrderPage(_id string) error {
 		"id":         id,       //用户的筛选条件mongodb中的id string
 		"data_count": msgCount, //匹配到的数据总数 int
 	})
-	resEmail, _ := d.GetSession("DataExportVerifyEmail_val").(string)
-	resPhone, _ := d.GetSession("DataExportVerifyPhone_val").(string)
+	resEmail := util.ObjToString(sessVal["DataExportVerifyEmail_val"])
+	resPhone := util.ObjToString(sessVal["DataExportVerifyPhone_val"])
 	if resEmail != "" {
-		lastSendDEVerify := util.Int64All(d.GetSession("CreatEVerifyTime"))
+		lastSendDEVerify := util.Int64All(sessVal["CreatEVerifyTime"])
 		timeSpaceing := lastSendDEVerify - time.Now().Unix() + 60*5
 		d.T["email"] = resEmail
 		d.T["timeSpaceing"] = timeSpaceing
@@ -528,7 +531,7 @@ func (d *DataExport) ToCreateOrderPage(_id string) error {
 
 	if resEmail == "" || resPhone == "" {
 		lastEmail, lastPhone := "", ""
-		if lastPhone, lastEmail = dataexport.GetLastExportPhoneAndMail(public.Mysql, userId, util.ObjToString(d.GetSession("entUserId"))); lastPhone == "" || lastEmail == "" {
+		if lastPhone, lastEmail = dataexport.GetLastExportPhoneAndMail(public.Mysql, userId, util.ObjToString(sessVal["entUserId"])); lastPhone == "" || lastEmail == "" {
 			userData := jyutil.Compatible.Select(userId, `{"s_myemail":1,"s_phone":1,"s_m_phone":1}`)
 			if userData != nil && len(*userData) > 0 {
 				if lastEmail == "" {
@@ -558,7 +561,7 @@ func (d *DataExport) ToCreateOrderPage(_id string) error {
 	}
 	d.T["_id"] = _id
 	d.T["msgCount"] = msgCount
-	incurKey := fmt.Sprintf("PreviewData_%s_%d", d.GetSession("userId"), time.Now().Day())
+	incurKey := fmt.Sprintf("PreviewData_%s_%d", util.ObjToString(sessVal["userId"]), time.Now().Day())
 	d.T["PreviewData"] = util.IntAll(redis.Get("other", incurKey))
 	d.Render("/pc/createOrderPage.html", &d.T)
 	return nil
@@ -566,13 +569,14 @@ func (d *DataExport) ToCreateOrderPage(_id string) error {
 
 func (d *DataExport) PreviewData(source, _id string) error {
 	if !strings.Contains(source, "app") {
-		userId := util.ObjToString(d.GetSession("userId"))
+		sessVal := d.Session().GetMultiple()
+		userId := util.ObjToString(sessVal["userId"])
 		//	openid := util.ObjToString(d.GetSession("s_m_openid"))
 		if userId == "" {
 			return errors.New("未登录")
 		}
 		//数据预览每天限制50次
-		incurKey := fmt.Sprintf("PreviewData_%s_%d", d.GetSession("userId"), time.Now().Day())
+		incurKey := fmt.Sprintf("PreviewData_%s_%d", util.ObjToString(sessVal["userId"]), time.Now().Day())
 		times := util.IntAll(redis.Get("other", incurKey))
 		if times >= 50 {
 			return errors.New("超出预览次数")
@@ -659,10 +663,11 @@ func (d *DataExport) SendMailVerify() {
 	email := d.GetString("email")
 	if isEmail(email) {
 		var email_used = true
-		if email != d.GetSession("DataExportVerifyEmail") {
+		sessVal := d.Session().GetMultiple()
+		if email != util.ObjToString(sessVal["DataExportVerifyEmail"]) {
 			d.DelSession("CreatEVerifyTime")
 			//			openid := util.ObjToString(d.GetSession("s_m_openid"))
-			userId := util.ObjToString(d.GetSession("userId"))
+			userId := util.ObjToString(sessVal["userId"])
 			emails := public.Mysql.FindOne("dataexport_order", map[string]interface{}{
 				"user_mail": email,
 				"user_id":   userId,
@@ -677,9 +682,9 @@ func (d *DataExport) SendMailVerify() {
 			}
 		}
 		if email_used {
-			lastSendDEVerify := util.Int64All(d.GetSession("CreatEVerifyTime"))
+			lastSendDEVerify := util.Int64All(sessVal["CreatEVerifyTime"])
 			timeSpaceing := lastSendDEVerify - time.Now().Unix() + 60*5
-			incurKey := fmt.Sprintf("SendEmail_%s_%d", d.GetSession("userId"), time.Now().Day())
+			incurKey := fmt.Sprintf("SendEmail_%s_%d", util.ObjToString(sessVal["userId"]), time.Now().Day())
 			//log.Println(incurKey)
 			if lastSendDEVerify == 0 || timeSpaceing < 0 {
 				//每日限制10次
@@ -696,7 +701,7 @@ func (d *DataExport) SendMailVerify() {
 					d.SetSession("DataExportVerifyEmail", email)
 					d.SetSession("DataExportVerify", verifyStr)
 					d.SetSession("CreatEVerifyTime", time.Now().Unix())
-					log.Println("====================", verifyStr, "====================", d.GetSession("CreatEVerifyTime"), "====================")
+					log.Println("====================", verifyStr, "====================", sessVal["CreatEVerifyTime"], "====================")
 					//发送邮箱验证码
 					go public.SendMailIdentCode(email, verifyStr, config.GmailAuth)
 					d.T["success"] = true

+ 6 - 5
src/jfw/front/front.go

@@ -1097,7 +1097,8 @@ func (m *Front) Isrecord(name string) {
 // 招标订阅向导
 func (f *Front) TSGuide() error {
 	defer util.Catch()
-	userid := util.ObjToString(f.GetSession("userId"))
+	sessVal := f.Session().GetMultiple()
+	userid := util.ObjToString(sessVal["userId"])
 	if userid == "" {
 		return f.Redirect("/swordfish/share/-1")
 	}
@@ -1149,12 +1150,12 @@ func (f *Front) TSGuide() error {
 				}
 				nsqPath, _ := config.Sysconfig["nsq"].(string)
 				nsq_topic, _ := config.Sysconfig["nsq_topic"].(string)
-				jy.Publish(public.Mgo_Log, nsqPath, nsq_topic, "task", util.ObjToString(f.GetSession("mgoUserId")), jy.Jywx_node1, map[string]interface{}{
+				jy.Publish(public.Mgo_Log, nsqPath, nsq_topic, "task", util.ObjToString(sessVal["mgoUserId"]), jy.Jywx_node1, map[string]interface{}{
 					"code":       1015, //首次订阅
 					"types":      "subscribeKeyWords",
 					"num":        50,
-					"baseUserId": f.GetSession("base_user_id"),
-					"positionId": f.GetSession("positionId"),
+					"baseUserId": sessVal["base_user_id"],
+					"positionId": sessVal["positionId"],
 				})
 				result["flag"] = jyutil.Compatible.Update(userid, bson.M{"$set": saveData})
 			}
@@ -1173,7 +1174,7 @@ func (f *Front) TSGuide() error {
 			result["data"] = rlt
 		}
 		if result["flag"] != nil && result["flag"].(bool) {
-			positionId := util.Int64All(f.GetSession("positionId"))
+			positionId := util.Int64All(sessVal["positionId"])
 			s_positionId := fmt.Sprint(positionId)
 			jy.ClearBigVipUserPower(s_positionId)
 			config.Middleground.UserCenter.WorkDesktopClearUserInfo(pb.WorkDesktopClearUserInfoReq{

+ 10 - 7
src/jfw/front/login.go

@@ -140,8 +140,9 @@ func (l *Login) Login() error {
 			}
 			return 0, false
 		} else if reqType == "identCodeLogin" { //短信验证码登录
-			phone, _ := l.GetSession("identCodeKey").(string)
-			if phone == "" || l.GetSession("identCodeValue") == nil || l.GetString("identCode") != l.GetSession("identCodeValue") { //验证码不正确
+			sessVal := l.Session().GetMultiple()
+			phone := qutil.ObjToString(sessVal["identCodeKey"])
+			if phone == "" || sessVal["identCodeValue"] == nil || l.GetString("identCode") != sessVal["identCodeValue"] { //验证码不正确
 				return -1, false
 			} else {
 				//用户不存在
@@ -208,6 +209,7 @@ func (l *Login) Login() error {
 							log.Println("nsq队列写入失败-->", jy.Jypc_phone_register, _id)
 						}
 						if ok {
+							sessVal = l.Session().GetMultiple()
 							result["userInfo"] = userInfo
 							go anonymousLogin(l.Session(), l.Cookie("JYTrustedId"))
 							jy.Publish(public.Mgo_Log, nsqPath, nsq_topic, "task", _id, jy.Jyweb_node2, map[string]interface{}{
@@ -215,7 +217,7 @@ func (l *Login) Login() error {
 								"types":      "bindPhone",
 								"num":        50,
 								"baseUserId": resp.Data.Id,
-								"positionId": l.GetSession("positionId"),
+								"positionId": sessVal["positionId"],
 							})
 							return 2, true
 						}
@@ -254,12 +256,13 @@ func (l *Login) Login() error {
 		return 0, false
 	}()
 	if status >= 1 && isLogin {
+		sessVal := l.Session().GetMultiple()
 		//登录source 更新 p414
-		mgoUserId := qutil.ObjToString(l.GetSession("mgoUserId"))
+		mgoUserId := qutil.ObjToString(sessVal["mgoUserId"])
 		us := jy.UserSource{
 			UserId:           mgoUserId,
-			PositionId:       qutil.Int64All(l.GetSession("positionId")),
-			Phone:            qutil.ObjToString(l.GetSession("phone")),
+			PositionId:       qutil.Int64All(sessVal["positionId"]),
+			Phone:            qutil.ObjToString(sessVal["phone"]),
 			State:            qutil.If(status == 2, status, 1).(int), //注册/登录标志 1:登录;2:注册
 			ChannelCode:      channelCode,
 			EncryptionUserId: encrypt.SE.EncodeString(mgoUserId),
@@ -273,7 +276,7 @@ func (l *Login) Login() error {
 		}(us)
 		//当前用户登录选择 下次自动登录
 		if isAutoLogin && err == nil {
-			baseUserId := qutil.Int64All(l.GetSession("base_user_id"))
+			baseUserId := qutil.Int64All(sessVal["base_user_id"])
 			if baseUserId > 0 {
 				//往cookie中加入标识
 				jutil.SetCookieValueForAutoLogin(l.ResponseWriter, baseUserId)

+ 11 - 5
src/jfw/front/pcIndex.go

@@ -77,7 +77,9 @@ func (m *PcIndex) NewSordfish(flag string) error {
 		pageSize = 50
 	}
 	var shareid = m.GetString("id")
-	userId, _ := m.GetSession("userId").(string)
+	//userId, _ := m.GetSession("userId").(string)
+	sessVal := m.Session().GetMultiple()
+	userId := util.ObjToString(sessVal["userId"])
 	pcindexKey := "jypcindex"
 	if cacheKey, _ := config.Sysconfig["pcindexCacheKey"].(string); cacheKey != "" {
 		pcindexKey = cacheKey
@@ -94,7 +96,7 @@ func (m *PcIndex) NewSordfish(flag string) error {
 	m.T["userCard"] = "f"
 	regex, _ := regexp.Compile("(Android|Mobile)")
 	var isLogin bool
-	if util.ObjToString(m.GetSession("userId")) != "" {
+	if userId != "" {
 		isLogin = true
 		userPower := jy.GetBigVipUserBaseMsg(m.Session(), *config.Middleground)
 		switch {
@@ -107,10 +109,14 @@ func (m *PcIndex) NewSordfish(flag string) error {
 		}
 	}
 	if ispc == 0 && len(regex.FindAllString(m.Header("User-Agent"), -1)) > 0 {
-		m.T["s_m_openid"] = util.ObjToString(m.GetSession("s_m_openid"))
+		//m.T["s_m_openid"] = util.ObjToString(m.GetSession("s_m_openid"))
+		//m.T["signature"] = wx.SignJSSDK(m.Site() + m.Url())
+		//m.T["nickname"] = util.ObjToString(m.GetSession("s_nickname"))
+		//m.T["avatar"] = util.ObjToString(m.GetSession("s_avatar"))
+		m.T["s_m_openid"] = util.ObjToString(sessVal["s_m_openid"])
+		m.T["nickname"] = util.ObjToString(sessVal["s_nickname"])
+		m.T["avatar"] = util.ObjToString(sessVal["s_avatar"])
 		m.T["signature"] = wx.SignJSSDK(m.Site() + m.Url())
-		m.T["nickname"] = util.ObjToString(m.GetSession("s_nickname"))
-		m.T["avatar"] = util.ObjToString(m.GetSession("s_avatar"))
 		return m.Render("/pc/mobileindex.html", &m.T)
 	} else {
 		//信息条数(上线以来..)

+ 26 - 16
src/jfw/front/shorturl.go

@@ -97,8 +97,10 @@ func (s *Short) Article(stype, id string) error {
 	bm := mobileReg.MatchString(s.Header("User-Agent"))
 	//是否是微信浏览器
 	isWxB := public.CheckWxBrowser(s.Request)
-	userId, _ := s.GetSession("userId").(string)
+	//userId, _ := s.GetSession("userId").(string)
+	sess := s.Session().GetMultiple()
 	//未登录用户是否访问的微信浏览器
+	userId, _ := sess["userId"].(string)
 	if userId == "" {
 		if IsWxBrowserContent[stype] {
 			if s.GetString("state") == "wx" {
@@ -108,7 +110,9 @@ func (s *Short) Article(stype, id string) error {
 						if CheckUserIsSubscribe(openid) {
 							FindUserAndCreateSess(openid, s.Session(), "wx", false, true)
 							//生session后 重新获取一下
-							userId, _ = s.GetSession("userId").(string)
+							//userId, _ = s.GetSession("userId").(string)
+							sess = s.Session().GetMultiple()
+							userId, _ = sess["userId"].(string)
 						} else if !bm { //未关注用户 pc端到关注页面
 							log.Println("PC微信端浏览器 未关注用户 访问地址----")
 							s.Request.Header.Del("Referer")
@@ -131,10 +135,10 @@ func (s *Short) Article(stype, id string) error {
 		//	return s.Redirect("/notin/page")
 		//}
 	}
-	return s.LoginCommon(userId, stype, id, bm)
+	return s.LoginCommon(sess, stype, id, bm)
 }
 
-func (s *Short) LoginCommon(userId, stype, id string, bm bool) error {
+func (s *Short) LoginCommon(sess map[string]interface{}, stype, id string, bm bool) error {
 	//电脑端 剑鱼快照页面访问
 	if stype == "content" && !bm {
 		//工作桌面内嵌 快照页
@@ -149,7 +153,8 @@ func (s *Short) LoginCommon(userId, stype, id string, bm bool) error {
 			return s.Redirect(fmt.Sprintf("%s%s%s", config.Sysconfig["workDesktopUrl"].(string), config.Sysconfig["webdomain"].(string), url.QueryEscape(strings.Replace(s.Request.URL.String(), replaceStr, paramSuffix, 1))))
 		}
 	}
-	getsession := s.Session().GetMultiple()
+	userId, _ := sess["userId"].(string)
+	//getsession := s.Session().GetMultiple()
 	//先判断是否有session
 	source := s.GetString("source")
 	disWord := s.GetString("disWord")
@@ -230,7 +235,7 @@ func (s *Short) LoginCommon(userId, stype, id string, bm bool) error {
 			s.T["logid"] = config.Seoconfig["jysskzy"].(string)
 			s.T["shareid"] = se.EncodeString(shareid)
 			s.T["keywords"] = s.GetString("kds")
-			ssOpenid := getsession["s_m_openid"]
+			ssOpenid := sess["s_m_openid"]
 			po, bo, wo, obj := pcVRT(sid, industry, stype, true, true)
 			if obj != nil && len(obj) > 0 {
 
@@ -291,7 +296,7 @@ func (s *Short) LoginCommon(userId, stype, id string, bm bool) error {
 			return s.SetBody([]byte(res.(string)))
 		}
 	}
-	ssOpenid := getsession["s_m_openid"]
+	ssOpenid := sess["s_m_openid"]
 	var (
 		res *map[string]interface{}
 		ok  bool
@@ -305,7 +310,6 @@ func (s *Short) LoginCommon(userId, stype, id string, bm bool) error {
 		//判断用户是否是vip
 		res = jyutil.Compatible.Select(userId, `{"i_vip_status":1,"i_member_status":1,"s_m_phone":1,"s_phone":1,"l_vip_starttime":1}`)
 	}
-	entid := util.Int64All(s.GetSession("entId"))
 	userPower := jy.GetBigVipUserBaseMsg(s.Session(), *config.Middleground)
 	var (
 		isEntnicheNew bool = userPower.EntIsNew                                                           //新版超级订阅
@@ -322,7 +326,8 @@ func (s *Short) LoginCommon(userId, stype, id string, bm bool) error {
 			isOldVip = true
 		}
 	}
-	entId := util.IntAll(entid)
+	//entid := util.Int64All(s.GetSession("entId"))
+	entId := util.IntAll(sess["entId"])
 	if entId > 0 && userPower.EntInfo[entId] != nil {
 		isEntniche = userPower.EntInfo[entId].Status == 1 && userPower.EntInfo[entId].IsPower
 		isEntnicheNew = userPower.EntInfo[entId].IsNew && isEntniche
@@ -366,7 +371,8 @@ func (s *Short) LoginCommon(userId, stype, id string, bm bool) error {
 
 		if stype == "advancedProject" {
 			//判断此用户是否有打开的权限
-			newUserId := s.GetSession("base_user_id")
+			//newUserId := s.GetSession("base_user_id")
+			newUserId := sess["base_user_id"]
 			pushData := public.BaseMysql.FindOne("leadproject_push", map[string]interface{}{"user_id": newUserId, "info_id": sid}, "id", "")
 			//访问次数加1
 			if pushData == nil {
@@ -380,15 +386,17 @@ func (s *Short) LoginCommon(userId, stype, id string, bm bool) error {
 		if shareopenid != "" {
 			s.T["shareopenid"] = shareopenid
 		}
-		myopenid, _ := getsession["s_m_openid"].(string)
+		myopenid, _ := sess["s_m_openid"].(string)
 		if myopenid == "" {
 			myopenid = shareopenid
 			s.T["openid"] = myopenid //"-1"
 		} else {
 			s.T["openid"] = se.EncodeString(myopenid) //"-1"
 		}
-		mynickname, _ := s.GetSession("s_nickname").(string)
-		myavatar, _ := s.GetSession("s_avatar").(string)
+		//mynickname, _ := s.GetSession("s_nickname").(string)
+		//myavatar, _ := s.GetSession("s_avatar").(string)
+		mynickname := util.ObjToString(sess["s_nickname"])
+		myavatar := util.ObjToString(sess["s_avatar"])
 		s.T["nickname"] = mynickname
 		s.T["avatar"] = myavatar
 		s.T["signature"] = wx.SignJSSDK(s.Site() + s.Url())
@@ -496,7 +504,8 @@ func (s *Short) LoginCommon(userId, stype, id string, bm bool) error {
 		}
 		if stype == "advancedProject" {
 			//判断此用户是否有打开的权限
-			newUserId := s.GetSession("base_user_id")
+			//newUserId := s.GetSession("base_user_id")
+			newUserId := sess["base_user_id"]
 			pushData := public.BaseMysql.FindOne("leadproject_push", map[string]interface{}{"user_id": newUserId, "info_id": sid}, "id", "")
 			//访问次数加1
 			if pushData == nil {
@@ -1188,14 +1197,15 @@ func SearchFilter(obj map[string]interface{}) map[string]interface{} {
 }
 
 func (s *Short) NologinArticle(stype, id string) error {
-	userId := util.ObjToString(s.GetSession("userId"))
+	sess := s.Session().GetMultiple()
+	userId := util.ObjToString(sess["userId"])
 	sids := encrypt.CommonDecodeArticle(stype, id)
 	if len(sids) == 0 || (len(sids) > 0 && sids[0] == "") {
 		s.Redirect("/notin/page", 302)
 		return nil
 	}
 	if userId != "" { //已登录用户直接跳转至正常三级页
-		return s.LoginCommon(userId, stype, id, mobileReg.MatchString(s.Header("User-Agent"))) //是否是移动端
+		return s.LoginCommon(sess, stype, id, mobileReg.MatchString(s.Header("User-Agent"))) //是否是移动端
 	}
 	if detailNeedMosaic == nil {
 		detailNeedMosaic, _ = config.Sysconfig["detailNeedMosaic"].(map[string]interface{})

+ 55 - 26
src/jfw/front/supsearch.go

@@ -243,12 +243,15 @@ func (p *Pcsearch) Getstatus() error {
 }
 
 func (p *Pcsearch) GetNewBids() error {
+	sessVal := p.Session().GetMultiple()
 	pagenum, _ := p.GetInteger("pageNumber")
 	pageSize, _ := p.GetInteger("pageSize")
 	pageType := p.GetString("pageType")
 	bidField := p.GetString("bid_field")
-	userId, _ := p.GetSession("userId").(string)
-	baseUserId := p.GetSession("base_user_id")
+	//userId, _ := p.GetSession("userId").(string)
+	userId := util.ObjToString(sessVal["base_user_id"])
+	//baseUserId := p.GetSession("base_user_id")
+	baseUserId := util.Int64All(sessVal["base_user_id"])
 	searchGroup, _ := p.GetInteger("searchGroup") //搜索分组;默认0:全部;1:招标采购搜索;2:超前项目。
 	vipStatus := jy.GetVipState(p.Session(), *config.Middleground, userId)
 	// 如果是领域化数据j
@@ -273,7 +276,7 @@ func (p *Pcsearch) GetNewBids() error {
 		PageNum:     pagenum,
 		PageSize:    pageSize,
 		BidField:    bidField,
-		NewUserId:   util.Int64All(baseUserId),
+		NewUserId:   baseUserId,
 		SearchGroup: searchGroup,
 		IsPay:       vipStatus.IsPayedUser(),
 		R:           p.Request,
@@ -321,6 +324,7 @@ func (p *Pcsearch) GetNewBids() error {
 // PcSearchIndex 路由搜索
 func (p *Pcsearch) PcSearchIndex(module string) error {
 	defer util.Catch()
+	sessVal := p.Session().GetMultiple()
 	p.T["logid"] = config.Seoconfig["jysslby"].(string)
 	pageSize, _ := p.GetInteger("pageSize")
 	if pageSize == 0 {
@@ -342,8 +346,10 @@ func (p *Pcsearch) PcSearchIndex(module string) error {
 	wordsMode, _ := p.GetInteger("wordsMode")         //搜索关键词模式;默认0:包含所有关键词;1:包含任意关键词。
 	additionalWords := p.GetString("additionalWords") //关键词:附加关键词(副:五组,每组最多15个字符 每组,号隔开)
 	//--end--
-	userId, _ := p.GetSession("userId").(string)
-	phone, _ := p.GetSession("phone").(string)
+	//userId, _ := p.GetSession("userId").(string)
+	//phone, _ := p.GetSession("phone").(string)
+	userId := util.ObjToString(sessVal["userId"])
+	phone := util.ObjToString(sessVal["phone"])
 	selectType := p.GetString("selectType") //搜索范围
 	if selectType == "" {
 		selectType = "title,content"
@@ -410,27 +416,50 @@ func (p *Pcsearch) PcSearchIndex(module string) error {
 	}
 	//历史导出数据回显
 	if strings.Contains(p.Url(), "?goback") {
-		keywords = util.ObjToString(p.GetSession("Echo_keywords"))
-		publishtime = util.ObjToString(p.GetSession("Echo_publishtime"))
-		area = util.ObjToString(p.GetSession("Echo_area"))
-		subtype = util.ObjToString(p.GetSession("Echo_subtype"))
-		minprice = util.ObjToString(p.GetSession("Echo_minprice"))
-		maxprice = util.ObjToString(p.GetSession("Echo_maxprice"))
-		buyerclass = util.ObjToString(p.GetSession("Echo_buyerclass"))
-		selectType = util.ObjToString(p.GetSession("Echo_selectType"))
-		timeslot = util.ObjToString(p.GetSession("Echo_timeslot"))
-		hasBuyerTel = util.ObjToString(p.GetSession("Echo_hasBuyertel"))
-		hasWinnerTel = util.ObjToString(p.GetSession("Echo_hasWinnertel"))
-		industry = util.ObjToString(p.GetSession("Echo_industry"))
-		notkey = util.ObjToString(p.GetSession("Echo_notkey"))
-		fileExists = util.ObjToString(p.GetSession("Echo_fileExists"))
-		city = util.ObjToString(p.GetSession("Echo_city"))
-		bidField = util.ObjToString(p.GetSession("Echo_bid_field"))              // 领域化数据 0101-医疗行业
-		territorialization = util.ObjToString(p.GetSession("Echo_bid_field"))    // 领域化数据 0101-医疗行业
-		searchGroup = util.IntAll(p.GetSession("Echo_searchGroup"))              //搜索分组;默认0:全部;1:招标采购搜索;2:超前项目。
-		searchMode = util.IntAll(p.GetSession("Echo_searchMode"))                //搜索模式;默认0:精准模式(不进行系统分词);1:模糊模式(进行系统分词)。
-		wordsMode = util.IntAll(p.GetSession("Echo_wordsMode"))                  //搜索关键词模式;默认0:包含所有关键词;1:包含任意关键词。
-		additionalWords = util.ObjToString(p.GetSession("Echo_additionalWords")) //关键词:附加关键词(副:五组,每组最多15个字符 每组,号隔开)
+		//keywords = util.ObjToString(p.GetSession("Echo_keywords"))
+		//publishtime = util.ObjToString(p.GetSession("Echo_publishtime"))
+		//area = util.ObjToString(p.GetSession("Echo_area"))
+		//subtype = util.ObjToString(p.GetSession("Echo_subtype"))
+		//minprice = util.ObjToString(p.GetSession("Echo_minprice"))
+		//maxprice = util.ObjToString(p.GetSession("Echo_maxprice"))
+		//buyerclass = util.ObjToString(p.GetSession("Echo_buyerclass"))
+		//selectType = util.ObjToString(p.GetSession("Echo_selectType"))
+		//timeslot = util.ObjToString(p.GetSession("Echo_timeslot"))
+		//hasBuyerTel = util.ObjToString(p.GetSession("Echo_hasBuyertel"))
+		//hasWinnerTel = util.ObjToString(p.GetSession("Echo_hasWinnertel"))
+		//industry = util.ObjToString(p.GetSession("Echo_industry"))
+		//notkey = util.ObjToString(p.GetSession("Echo_notkey"))
+		//fileExists = util.ObjToString(p.GetSession("Echo_fileExists"))
+		//city = util.ObjToString(p.GetSession("Echo_city"))
+		//bidField = util.ObjToString(p.GetSession("Echo_bid_field"))              // 领域化数据 0101-医疗行业
+		//territorialization = util.ObjToString(p.GetSession("Echo_bid_field"))    // 领域化数据 0101-医疗行业
+		//searchGroup = util.IntAll(p.GetSession("Echo_searchGroup"))              //搜索分组;默认0:全部;1:招标采购搜索;2:超前项目。
+		//searchMode = util.IntAll(p.GetSession("Echo_searchMode"))                //搜索模式;默认0:精准模式(不进行系统分词);1:模糊模式(进行系统分词)。
+		//wordsMode = util.IntAll(p.GetSession("Echo_wordsMode"))                  //搜索关键词模式;默认0:包含所有关键词;1:包含任意关键词。
+		//additionalWords = util.ObjToString(p.GetSession("Echo_additionalWords")) //关键词:附加关键词(副:五组,每组最多15个字符 每组,号隔开)
+		//queryItems = userInfo.GetQueryItems(selectType, util.Int64All(config.Sysconfig["bidSearchOldUserLimit"]))
+
+		keywords = util.ObjToString(sessVal["Echo_keywords"])
+		publishtime = util.ObjToString(sessVal["Echo_publishtime"])
+		area = util.ObjToString(sessVal["Echo_area"])
+		subtype = util.ObjToString(sessVal["Echo_subtype"])
+		minprice = util.ObjToString(sessVal["Echo_minprice"])
+		maxprice = util.ObjToString(sessVal["Echo_maxprice"])
+		buyerclass = util.ObjToString(sessVal["Echo_buyerclass"])
+		selectType = util.ObjToString(sessVal["Echo_selectType"])
+		timeslot = util.ObjToString(sessVal["Echo_timeslot"])
+		hasBuyerTel = util.ObjToString(sessVal["Echo_hasBuyertel"])
+		hasWinnerTel = util.ObjToString(sessVal["Echo_hasWinnertel"])
+		industry = util.ObjToString(sessVal["Echo_industry"])
+		notkey = util.ObjToString(sessVal["Echo_notkey"])
+		fileExists = util.ObjToString(sessVal["Echo_fileExists"])
+		city = util.ObjToString(sessVal["Echo_city"])
+		bidField = util.ObjToString(sessVal["Echo_bid_field"])              // 领域化数据 0101-医疗行业
+		territorialization = util.ObjToString(sessVal["Echo_bid_field"])    // 领域化数据 0101-医疗行业
+		searchGroup = util.IntAll(sessVal["Echo_searchGroup"])              //搜索分组;默认0:全部;1:招标采购搜索;2:超前项目。
+		searchMode = util.IntAll(sessVal["Echo_searchMode"])                //搜索模式;默认0:精准模式(不进行系统分词);1:模糊模式(进行系统分词)。
+		wordsMode = util.IntAll(sessVal["Echo_wordsMode"])                  //搜索关键词模式;默认0:包含所有关键词;1:包含任意关键词。
+		additionalWords = util.ObjToString(sessVal["Echo_additionalWords"]) //关键词:附加关键词(副:五组,每组最多15个字符 每组,号隔开)
 		queryItems = userInfo.GetQueryItems(selectType, util.Int64All(config.Sysconfig["bidSearchOldUserLimit"]))
 	}
 	keywordsLimit := util.IntAllDef(config.Sysconfig["keywordsLimit"], 35)

+ 3 - 2
src/jfw/front/swordfish.go

@@ -82,8 +82,9 @@ func (m *Front) Searchinfolist(p string) error {
 func (m *Front) PcAjaxReq() {
 	territorialization := m.GetString("bid_field") // 领域类型 0101- 医疗
 	tabularflag := m.GetString("tabularflag")
-	userId := util.ObjToString(m.GetSession("userId"))
-	phone := util.ObjToString(m.GetSession("phone"))
+	sessVal := m.Session().GetMultiple()
+	userId := util.ObjToString(sessVal["userId"])
+	phone := util.ObjToString(sessVal["phone"])
 	currentPage, _ := m.GetInteger("pageNumber")
 	pageSize, _ := m.GetInteger("pageSize")
 	if pageSize == 0 {

+ 6 - 5
src/jfw/modules/app/src/app/front/front.go

@@ -293,7 +293,8 @@ func (m *Front) Feedback() error {
 // 招标订阅向导
 func (f *Front) TSGuide() error {
 	defer util.Catch()
-	userid := util.ObjToString(f.GetSession("userId"))
+	sessVal := f.Session().GetMultiple()
+	userid := util.ObjToString(sessVal["userId"])
 	if f.Method() == "GET" {
 		if !isInTSguide(userid, f.Session()) {
 			return f.Redirect("/jyapp/wxkeyset/keyset/index")
@@ -342,12 +343,12 @@ func (f *Front) TSGuide() error {
 				}
 				nsqPath, _ := config.Sysconfig["nsq"].(string)
 				nsq_topic, _ := config.Sysconfig["nsq_topic"].(string)
-				jy.Publish(public.Mgo_Log, nsqPath, nsq_topic, "task", util.ObjToString(f.GetSession("mgoUserId")), jy.Jywx_node1, map[string]interface{}{
+				jy.Publish(public.Mgo_Log, nsqPath, nsq_topic, "task", util.ObjToString(sessVal["mgoUserId"]), jy.Jywx_node1, map[string]interface{}{
 					"code":       1015, //首次订阅
 					"types":      "subscribeKeyWords",
 					"num":        50,
-					"baseUserId": f.GetSession("base_user_id"),
-					"positionId": f.GetSession("positionId"),
+					"baseUserId": sessVal["base_user_id"],
+					"positionId": sessVal["positionId"],
 				})
 				result["flag"] = utils.Compatible.Update(userid, map[string]interface{}{"$set": saveData})
 			}
@@ -366,7 +367,7 @@ func (f *Front) TSGuide() error {
 			result["data"] = rlt
 		}
 
-		positionId := util.Int64All(f.GetSession("positionId"))
+		positionId := util.Int64All(sessVal["positionId"])
 		s_positionId := fmt.Sprint(positionId)
 		jy.ClearBigVipUserPower(s_positionId)
 		config.Middleground.UserCenter.WorkDesktopClearUserInfo(pb.WorkDesktopClearUserInfoReq{

+ 5 - 3
src/jfw/modules/app/src/app/front/shorturl.go

@@ -82,7 +82,9 @@ func (s *Short) WhiteList() error {
 
 func (s *Short) Article(contentType, stype, id string) error {
 	//先判断是否有session
-	userId, _ := s.GetSession("userId").(string)
+	sess := s.Session().GetMultiple()
+	userId := util.ObjToString(sess["userId"])
+	//userId, _ := s.GetSession("userId").(string)
 	//if userId == "" {
 	//	return s.Redirect("/jyapp/free/swordfish/about", 302)
 	//}
@@ -110,7 +112,7 @@ func (s *Short) Article(contentType, stype, id string) error {
 			isEntService = userPower.Data.Ent.PowerSource > 0 && userPower.Data.Entniche.IsEntPower > 0 //商机管理服务
 		} //用户邮箱
 		_, isOldVip, _, _, _ = UserPermission(userId)
-		entId := util.IntAll(s.GetSession("entId"))
+		entId := util.IntAll(sess["entId"])
 		if entId > 0 && userPower.EntInfo[entId] != nil {
 			isEntniche = userPower.EntInfo[entId].Status == 1 && userPower.EntInfo[entId].IsPower
 			isEntnicheNew = userPower.EntInfo[entId].IsNew && isEntniche
@@ -208,7 +210,7 @@ func (s *Short) Article(contentType, stype, id string) error {
 		if stype == "advancedProject" {
 			newCanRead := false
 			//判断此用户是否有打开的权限
-			newUserId := s.GetSession("base_user_id")
+			newUserId := sess["base_user_id"]
 			pushData := public.BaseMysql.FindOne("leadproject_push", map[string]interface{}{"user_id": newUserId, "info_id": sid}, "id", "")
 			//访问次数加1
 			if pushData == nil {

+ 3 - 2
src/jfw/modules/app/src/app/front/ws_dataExport.go

@@ -41,13 +41,14 @@ func init() {
 }
 
 func (w *WsDataExport) GetPreview() error {
-	userId := util.ObjToString(w.GetSession("userId"))
+	sessVal := w.Session().GetMultiple()
+	userId := util.ObjToString(sessVal["userId"])
 	if userId == "" {
 		return errors.New("未登录")
 	}
 	_res := make(map[string]interface{})
 	//数据预览每天限制50次
-	incurKey := fmt.Sprintf("PreviewData_%s_%d", w.GetSession("userId"), time.Now().Day())
+	incurKey := fmt.Sprintf("PreviewData_%s_%d", sessVal["userId"], time.Now().Day())
 	times := util.IntAll(redis.Get("other", incurKey))
 	if times >= 50 {
 		_res["msg"] = "超出预览次数"

+ 2 - 2
src/jfw/modules/app/src/go.mod

@@ -5,7 +5,7 @@ go 1.18
 require (
 	app.yhyue.com/moapp/jybase v0.0.0-20230901064756-2fc66b18db40
 	app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545
-	app.yhyue.com/moapp/jypkg v1.0.7-0.20231114075116-499de5b076d3
+	app.yhyue.com/moapp/jypkg v1.1.0
 	bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.15-0.20230925060020-8e4db0f1e13e
 	github.com/SKatiyar/qr v0.0.0-20151201054752-25b6bdf44e67
 	github.com/gogf/gf/v2 v2.3.1
@@ -18,7 +18,7 @@ require (
 	app.yhyue.com/moapp/jyMarketing v0.0.2-0.20230304035551-21bb1eedf547 // indirect
 	app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae // indirect
 	bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20230214091519-89a98c01ab0e // indirect
-	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230225125145-431a4f70093a // indirect
+	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20231115092908-cb4608f3a96d // indirect
 	bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.8 // indirect
 	github.com/BurntSushi/toml v1.1.0 // indirect
 	github.com/RoaringBitmap/roaring v1.5.0 // indirect

+ 4 - 4
src/jfw/modules/app/src/go.sum

@@ -9,14 +9,14 @@ app.yhyue.com/moapp/jybase v0.0.0-20230901064756-2fc66b18db40 h1:/FcBvpf/KW8g6GB
 app.yhyue.com/moapp/jybase v0.0.0-20230901064756-2fc66b18db40/go.mod h1:Hv9U/7oHRucqH315Tr1+d03NCvS9mOKPfk8pwwlOIwQ=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545 h1:+Lak4m1zgsigQloOsvp8AJ+0XeX/+PGp9QP550xlbBQ=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545/go.mod h1:uFrsdUBFbETiJlEmr4PtJWPsZlUpPj2bHQRhryu6ggk=
-app.yhyue.com/moapp/jypkg v1.0.7-0.20231114075116-499de5b076d3 h1:6Jv5DcoGYCsHVMwUjvlZubuTgY/vu4fWP5+rcXIKNj0=
-app.yhyue.com/moapp/jypkg v1.0.7-0.20231114075116-499de5b076d3/go.mod h1:LuxdVd+j3uwm7N5j2hivmpPU0LJytEV7iwAIljdoc4Q=
+app.yhyue.com/moapp/jypkg v1.1.0 h1:I0YiMfIEYjmaaGBiadb1bQ2u+9tDFIp570Hg8yq7PBY=
+app.yhyue.com/moapp/jypkg v1.1.0/go.mod h1:sMZxJOsD3STWGY04aDhUtRD+1u5nqhQpdDdpSW3JC1Y=
 app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae h1:6rDDaz6yxvE8viTSzEBwKYOFWq14TMfuBivSazUZMz4=
 app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae/go.mod h1:b0zZHev3gmJao1Fo+2Z2KPVjsuLOJVvVxf+kCnu9WkA=
 bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20230214091519-89a98c01ab0e h1:h+VEI3o1qC0jeCzkFGTrLI4f27cfa/W/y+0sXokWMgE=
 bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20230214091519-89a98c01ab0e/go.mod h1:7Xhygw0KBuL4h0G76FnFg4otQcA9bmOO0c8M0FCjAyQ=
-bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230225125145-431a4f70093a h1:JX2jEMrbdLzXfVC/nTUvdFOkqNj5DUxkJFjl3XE1gyg=
-bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230225125145-431a4f70093a/go.mod h1:5nimT8GJh46AyfeeDeyRlDQygMlO7TRM8Pwm41Gxemc=
+bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20231115092908-cb4608f3a96d h1:x17+SAYxlBChNWn2IS2eDWZlhZrxtgEWjlb1JF0946E=
+bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20231115092908-cb4608f3a96d/go.mod h1:rCCaOSWBYfQabf/yIvSVheSPtN2THnHeTl2J5/RrcuU=
 bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.8 h1:14Yxzutsej7LQe3jnN61wuRX9qjAZ4FtdWMA27ewQ3w=
 bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.8/go.mod h1:rRiGzKG4F/fmkNxXQCxrkxNWc8yf1SmW8qWCKfGIQSM=
 bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.15-0.20230925060020-8e4db0f1e13e h1:bncHHkJLqiDW1ZN6MVe+3bj3i0LxWgFkfqge6Gk7lB4=

+ 4 - 4
src/jfw/modules/bigmember/src/go.mod

@@ -5,8 +5,8 @@ go 1.19
 require (
 	app.yhyue.com/moapp/jybase v0.0.0-20230727083622-4dfc804ea6cf
 	app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545
-	app.yhyue.com/moapp/jypkg v0.0.0-20231024062045-5c364be1561d
-	bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.14
+	app.yhyue.com/moapp/jypkg v1.1.0
+	bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.15-0.20230925060020-8e4db0f1e13e
 	github.com/donnie4w/go-logger v0.0.0-20230316073421-36a48f87a69a
 	github.com/gogf/gf/v2 v2.4.2
 	github.com/olivere/elastic/v7 v7.0.32
@@ -18,8 +18,8 @@ require (
 	app.yhyue.com/moapp/jyMarketing v0.0.2-0.20230304035551-21bb1eedf547 // indirect
 	app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae // indirect
 	bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20230214091519-89a98c01ab0e // indirect
-	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230225125145-431a4f70093a // indirect
-	bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.7 // indirect
+	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20231115092908-cb4608f3a96d // indirect
+	bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.8 // indirect
 	github.com/BurntSushi/toml v1.1.0 // indirect
 	github.com/beorn7/perks v1.0.1 // indirect
 	github.com/cenkalti/backoff/v4 v4.2.1 // indirect

+ 8 - 8
src/jfw/modules/bigmember/src/go.sum

@@ -9,18 +9,18 @@ app.yhyue.com/moapp/jybase v0.0.0-20230727083622-4dfc804ea6cf h1:/Tk5haITmGc5c3/
 app.yhyue.com/moapp/jybase v0.0.0-20230727083622-4dfc804ea6cf/go.mod h1:D40Ae0rQilH8Hc5o2Vtt04Tjh/DNEFpcS3/WkJMPJb8=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545 h1:+Lak4m1zgsigQloOsvp8AJ+0XeX/+PGp9QP550xlbBQ=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545/go.mod h1:uFrsdUBFbETiJlEmr4PtJWPsZlUpPj2bHQRhryu6ggk=
-app.yhyue.com/moapp/jypkg v0.0.0-20231024062045-5c364be1561d h1:h8SnO8ONZlmtx8ZSYtpw36TdBhYPy8WgLeWHyMGZj0Q=
-app.yhyue.com/moapp/jypkg v0.0.0-20231024062045-5c364be1561d/go.mod h1:76Kz6+MuxcRJRyFad9W8R4AByiQlVGzuGFzklY+2m38=
+app.yhyue.com/moapp/jypkg v1.1.0 h1:I0YiMfIEYjmaaGBiadb1bQ2u+9tDFIp570Hg8yq7PBY=
+app.yhyue.com/moapp/jypkg v1.1.0/go.mod h1:sMZxJOsD3STWGY04aDhUtRD+1u5nqhQpdDdpSW3JC1Y=
 app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae h1:6rDDaz6yxvE8viTSzEBwKYOFWq14TMfuBivSazUZMz4=
 app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae/go.mod h1:b0zZHev3gmJao1Fo+2Z2KPVjsuLOJVvVxf+kCnu9WkA=
 bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20230214091519-89a98c01ab0e h1:h+VEI3o1qC0jeCzkFGTrLI4f27cfa/W/y+0sXokWMgE=
 bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20230214091519-89a98c01ab0e/go.mod h1:7Xhygw0KBuL4h0G76FnFg4otQcA9bmOO0c8M0FCjAyQ=
-bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230225125145-431a4f70093a h1:JX2jEMrbdLzXfVC/nTUvdFOkqNj5DUxkJFjl3XE1gyg=
-bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230225125145-431a4f70093a/go.mod h1:5nimT8GJh46AyfeeDeyRlDQygMlO7TRM8Pwm41Gxemc=
-bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.7 h1:G6PHMWAHfYEuY6kbl7OM/KnCQf1Xa54mdhuP7JzK8/I=
-bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.7/go.mod h1:rRiGzKG4F/fmkNxXQCxrkxNWc8yf1SmW8qWCKfGIQSM=
-bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.14 h1:L/0RrgU+l8nMS7YO2JizszaX3lAo0gqzg2Bqmu0So0s=
-bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.14/go.mod h1:03M9BWIGHy7BbGxLvjt8V9zZzEZDWhN6BuHVfVcDFbQ=
+bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20231115092908-cb4608f3a96d h1:x17+SAYxlBChNWn2IS2eDWZlhZrxtgEWjlb1JF0946E=
+bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20231115092908-cb4608f3a96d/go.mod h1:rCCaOSWBYfQabf/yIvSVheSPtN2THnHeTl2J5/RrcuU=
+bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.8 h1:14Yxzutsej7LQe3jnN61wuRX9qjAZ4FtdWMA27ewQ3w=
+bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.8/go.mod h1:rRiGzKG4F/fmkNxXQCxrkxNWc8yf1SmW8qWCKfGIQSM=
+bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.15-0.20230925060020-8e4db0f1e13e h1:bncHHkJLqiDW1ZN6MVe+3bj3i0LxWgFkfqge6Gk7lB4=
+bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.15-0.20230925060020-8e4db0f1e13e/go.mod h1:+6ZjaqpCr+ih1GYOh6ZhoDri9ZjiuxxSHvR7ovvhLx0=
 cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
 cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
 cloud.google.com/go v0.37.4/go.mod h1:NHPJ89PdicEuT9hdPXMROBD91xc5uRDxsMtSB16k7hw=

+ 1 - 1
src/jfw/modules/publicapply/src/go.mod

@@ -5,7 +5,7 @@ go 1.18
 require (
 	app.yhyue.com/moapp/jybase v0.0.0-20231116061739-cd852201a8f4
 	app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545
-	app.yhyue.com/moapp/jypkg v1.0.7-0.20231115093146-8cc6eaee8df2
+	app.yhyue.com/moapp/jypkg v1.1.0
 	bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.15
 	github.com/SKatiyar/qr v0.0.0-20151201054752-25b6bdf44e67
 	github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.4

+ 2 - 2
src/jfw/modules/publicapply/src/go.sum

@@ -9,8 +9,8 @@ app.yhyue.com/moapp/jybase v0.0.0-20231116061739-cd852201a8f4 h1:qfqQL2GJV3N31DF
 app.yhyue.com/moapp/jybase v0.0.0-20231116061739-cd852201a8f4/go.mod h1:Hv9U/7oHRucqH315Tr1+d03NCvS9mOKPfk8pwwlOIwQ=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545 h1:+Lak4m1zgsigQloOsvp8AJ+0XeX/+PGp9QP550xlbBQ=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545/go.mod h1:uFrsdUBFbETiJlEmr4PtJWPsZlUpPj2bHQRhryu6ggk=
-app.yhyue.com/moapp/jypkg v1.0.7-0.20231115093146-8cc6eaee8df2 h1:r49ErNEAuGETZ9Ru5LqDafZO6tFF8NYj9Hm5aXwWDeI=
-app.yhyue.com/moapp/jypkg v1.0.7-0.20231115093146-8cc6eaee8df2/go.mod h1:sMZxJOsD3STWGY04aDhUtRD+1u5nqhQpdDdpSW3JC1Y=
+app.yhyue.com/moapp/jypkg v1.1.0 h1:I0YiMfIEYjmaaGBiadb1bQ2u+9tDFIp570Hg8yq7PBY=
+app.yhyue.com/moapp/jypkg v1.1.0/go.mod h1:sMZxJOsD3STWGY04aDhUtRD+1u5nqhQpdDdpSW3JC1Y=
 app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae h1:6rDDaz6yxvE8viTSzEBwKYOFWq14TMfuBivSazUZMz4=
 app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae/go.mod h1:b0zZHev3gmJao1Fo+2Z2KPVjsuLOJVvVxf+kCnu9WkA=
 bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20230214091519-89a98c01ab0e h1:h+VEI3o1qC0jeCzkFGTrLI4f27cfa/W/y+0sXokWMgE=

+ 2 - 2
src/jfw/modules/subscribepay/src/go.mod

@@ -5,7 +5,7 @@ go 1.20
 require (
 	app.yhyue.com/moapp/jybase v0.0.0-20230718012114-37013054344b
 	app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545
-	app.yhyue.com/moapp/jypkg v1.0.7-0.20231114075116-499de5b076d3
+	app.yhyue.com/moapp/jypkg v1.1.0
 	bp.jydev.jianyu360.cn/BaseService/pushpkg v0.0.0-20230225061813-384daf716c9d
 	bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.15-0.20230925060020-8e4db0f1e13e
 	github.com/SKatiyar/qr v0.0.0-20151201054752-25b6bdf44e67
@@ -22,7 +22,7 @@ require (
 	app.yhyue.com/moapp/jyMarketing v0.0.2-0.20230304035551-21bb1eedf547 // indirect
 	app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae // indirect
 	bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20230214091519-89a98c01ab0e // indirect
-	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230225125145-431a4f70093a // indirect
+	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20231115092908-cb4608f3a96d // indirect
 	bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.8 // indirect
 	github.com/BurntSushi/toml v1.1.0 // indirect
 	github.com/beorn7/perks v1.0.1 // indirect

+ 4 - 4
src/jfw/modules/subscribepay/src/go.sum

@@ -9,14 +9,14 @@ app.yhyue.com/moapp/jybase v0.0.0-20230718012114-37013054344b h1:Wtytm2QqQWtBV+s
 app.yhyue.com/moapp/jybase v0.0.0-20230718012114-37013054344b/go.mod h1:D40Ae0rQilH8Hc5o2Vtt04Tjh/DNEFpcS3/WkJMPJb8=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545 h1:+Lak4m1zgsigQloOsvp8AJ+0XeX/+PGp9QP550xlbBQ=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545/go.mod h1:uFrsdUBFbETiJlEmr4PtJWPsZlUpPj2bHQRhryu6ggk=
-app.yhyue.com/moapp/jypkg v1.0.7-0.20231114075116-499de5b076d3 h1:6Jv5DcoGYCsHVMwUjvlZubuTgY/vu4fWP5+rcXIKNj0=
-app.yhyue.com/moapp/jypkg v1.0.7-0.20231114075116-499de5b076d3/go.mod h1:LuxdVd+j3uwm7N5j2hivmpPU0LJytEV7iwAIljdoc4Q=
+app.yhyue.com/moapp/jypkg v1.1.0 h1:I0YiMfIEYjmaaGBiadb1bQ2u+9tDFIp570Hg8yq7PBY=
+app.yhyue.com/moapp/jypkg v1.1.0/go.mod h1:sMZxJOsD3STWGY04aDhUtRD+1u5nqhQpdDdpSW3JC1Y=
 app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae h1:6rDDaz6yxvE8viTSzEBwKYOFWq14TMfuBivSazUZMz4=
 app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae/go.mod h1:b0zZHev3gmJao1Fo+2Z2KPVjsuLOJVvVxf+kCnu9WkA=
 bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20230214091519-89a98c01ab0e h1:h+VEI3o1qC0jeCzkFGTrLI4f27cfa/W/y+0sXokWMgE=
 bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20230214091519-89a98c01ab0e/go.mod h1:7Xhygw0KBuL4h0G76FnFg4otQcA9bmOO0c8M0FCjAyQ=
-bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230225125145-431a4f70093a h1:JX2jEMrbdLzXfVC/nTUvdFOkqNj5DUxkJFjl3XE1gyg=
-bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230225125145-431a4f70093a/go.mod h1:5nimT8GJh46AyfeeDeyRlDQygMlO7TRM8Pwm41Gxemc=
+bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20231115092908-cb4608f3a96d h1:x17+SAYxlBChNWn2IS2eDWZlhZrxtgEWjlb1JF0946E=
+bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20231115092908-cb4608f3a96d/go.mod h1:rCCaOSWBYfQabf/yIvSVheSPtN2THnHeTl2J5/RrcuU=
 bp.jydev.jianyu360.cn/BaseService/pushpkg v0.0.0-20230225061813-384daf716c9d h1:mqOFpjEX8eNNskmu0cejgA8fqmbDjFG/ggeNrUO3shw=
 bp.jydev.jianyu360.cn/BaseService/pushpkg v0.0.0-20230225061813-384daf716c9d/go.mod h1:UKLwPLx9be595yaiIwqqdKSloKK/Kdf/wTLr4XUClV0=
 bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.8 h1:14Yxzutsej7LQe3jnN61wuRX9qjAZ4FtdWMA27ewQ3w=

+ 23 - 18
src/jfw/modules/subscribepay/src/service/userAccountInfo.go

@@ -69,12 +69,13 @@ const (
 
 // 客服接口 获取基本信息
 func (this *UserAccount) GetSimpleData() {
-	headImage := this.GetSession("s_avatar")
+	sessVal := this.Session().GetMultiple()
+	headImage := sessVal["s_avatar"]
 	if headImage == "" {
-		headImage = this.GetSession("s_headimageurl")
+		headImage = sessVal["s_headimageurl"]
 	}
-	phone, _ := this.GetSession("phone").(string)
-	name, _ := qutil.If(this.GetSession("s_nickname") != nil, this.GetSession("s_nickname"), this.GetSession("app_name")).(string)
+	phone, _ := sessVal["phone"].(string)
+	name, _ := qutil.If(sessVal["s_nickname"] != nil, sessVal["s_nickname"], sessVal["app_name"]).(string)
 	if phone != "" {
 		var PhoneReg = regexp.MustCompile(`^(100\d{8}|1[3-9]\d{9})$`)
 		if PhoneReg.MatchString(phone) {
@@ -82,7 +83,7 @@ func (this *UserAccount) GetSimpleData() {
 		}
 	}
 	this.ServeJson(map[string]interface{}{
-		"userId":    encrypt.EncodeArticleId(qutil.ObjToString(this.GetSession("mgoUserId"))),
+		"userId":    encrypt.EncodeArticleId(qutil.ObjToString(sessVal["mgoUserId"])),
 		"nickName":  qutil.If(phone != "", phone, name).(string),
 		"phone":     phone,
 		"name":      name,
@@ -94,7 +95,8 @@ func (this *UserAccount) GetSimpleData() {
 // 手机号 邮箱 头像 昵称 超级订阅 大会员 用户加密id
 func (this *UserAccount) GetAccountInfo() {
 	rData, errMsg := func() (interface{}, error) {
-		userId, _ := this.GetSession("mgoUserId").(string)
+		sessVal := this.Session().GetMultiple()
+		userId, _ := sessVal["mgoUserId"].(string)
 		//由于超级订阅vip状态需要查库,无法从session中获取,所以直接所有字段从数据库中获取
 		userMsg := util.Compatible.Select(userId, `{"s_m_phone":1,"s_phone":1,"s_myemail":1,"s_nickname":1,"s_headimageurl":1,"s_password":1,"s_company":1,"s_unionid":1}`)
 		if userMsg == nil || len(*userMsg) == 0 {
@@ -121,10 +123,10 @@ func (this *UserAccount) GetAccountInfo() {
 		}
 		b := jy.GetBigVipUserBaseMsg(this.Session(), *config.Middleground)
 		//s从数据导出填写的邮箱或者从数据定制服务这里获取的邮箱
-		_, otherMail := dataexport.GetLastExportPhoneAndMail(util.Mysql, userId, qutil.ObjToString(this.GetSession("entUserId")))
+		_, otherMail := dataexport.GetLastExportPhoneAndMail(util.Mysql, userId, qutil.ObjToString(sessVal["entUserId"]))
 		if otherMail == "" {
 			saleData, _ := util.MQFW.FindOne("saleLeads", map[string]interface{}{
-				"userid": this.GetSession("userId"),
+				"userid": sessVal["userId"],
 				"mail": map[string]interface{}{
 					"$exists": true,
 				},
@@ -199,7 +201,8 @@ func (this *UserAccount) Interested(doType string) {
 
 // 绑定邮箱&更改邮箱【绑定邮箱和更改邮箱流程一样】
 func (this *UserAccount) MailSet(doType string) {
-	userId, _ := this.GetSession("mgoUserId").(string)
+	sessVal := this.Session().GetMultiple()
+	userId, _ := sessVal["mgoUserId"].(string)
 	rData, errMsg := func() (interface{}, error) {
 		step, _ := this.GetInteger("step")
 		mail := this.GetString("mail")
@@ -232,8 +235,8 @@ func (this *UserAccount) MailSet(doType string) {
 				"code":       qutil.If(isNew, 1009, 1016),
 				"types":      "bindMail",
 				"num":        50,
-				"baseUserId": this.GetSession("base_user_id"),
-				"positionId": this.GetSession("positionId"),
+				"baseUserId": sessVal["base_user_id"],
+				"positionId": sessVal["positionId"],
 			})
 			this.Session().Del(mailAuthPassSessionKey)
 		}
@@ -324,7 +327,8 @@ func (this *UserAccount) PhoneCaptcha() {
 
 // 我的页面身份验证【绑定、更改手机号之前需要先进行身份验证 15分钟内无须重复验证】
 func (this *UserAccount) Authentication(doType string) {
-	userId, _ := this.GetSession("mgoUserId").(string)
+	sessVal := this.Session().GetMultiple()
+	userId, _ := sessVal["mgoUserId"].(string)
 	rData, errMsg := func() (interface{}, error) {
 		step, _ := this.GetInteger("step")
 		code := this.GetString("code")
@@ -352,7 +356,7 @@ func (this *UserAccount) Authentication(doType string) {
 					return nil, err
 				}
 			}
-			phone, _ := this.GetSession("s_phone").(string)
+			phone, _ := sessVal["s_phone"].(string)
 			if phone == "" {
 				phone = getPhoneByUserId(userId)
 			}
@@ -386,7 +390,8 @@ func (this *UserAccount) Authentication(doType string) {
 //       A账户已绑定微信,此微信必须与当前账户绑定的微信一致
 
 func (this *UserAccount) PhoneBind() {
-	userId, _ := this.GetSession("mgoUserId").(string)
+	sessVal := this.Session().GetMultiple()
+	userId, _ := sessVal["mgoUserId"].(string)
 	rData, errMsg := func() (interface{}, error) {
 		step, _ := this.GetInteger("step")
 		phone := this.GetString("phone")
@@ -445,15 +450,15 @@ func (this *UserAccount) PhoneBind() {
 						"code":       1007,
 						"types":      "bindPhone",
 						"num":        50,
-						"baseUserId": this.GetSession("base_user_id"),
-						"positionId": this.GetSession("positionId"),
+						"baseUserId": sessVal["base_user_id"],
+						"positionId": sessVal["positionId"],
 					})
 					jy.Publish(util.Mgo_log, config.Config.Nsq, config.Config.Nsq_Topic, "task", userId, jy.Jyweb_node2, map[string]interface{}{
 						"code":       1008,
 						"types":      "followWx",
 						"num":        50,
-						"baseUserId": this.GetSession("base_user_id"),
-						"positionId": this.GetSession("positionId"),
+						"baseUserId": sessVal["base_user_id"],
+						"positionId": sessVal["positionId"],
 					})
 				}
 				data := map[string]interface{}{

+ 20 - 19
src/jfw/qrmanager/qrmanager.go

@@ -19,8 +19,9 @@ var se = encrypt.SE
 
 func RedisInfo(oid, action, sione, sitwo string, i int, hsn *httpsession.Session, hrt *http.Request) {
 	oldData := redis.Get("sso", "p_userdata_"+se.DecodeString(oid))
-	var Rurl = util.ObjToString(hsn.Get("RURL"))
-	var Rref = util.ObjToString(hsn.Get("Rref"))
+	sessVal := hsn.GetMultiple()
+	var Rurl = util.ObjToString(sessVal["RURL"])
+	var Rref = util.ObjToString(sessVal["Rref"])
 	rheader := hrt.Header
 	rhdua := "" //UA
 	if len(rheader["User-Agent"]) > 0 {
@@ -37,7 +38,7 @@ func RedisInfo(oid, action, sione, sitwo string, i int, hsn *httpsession.Session
 	userData["Ros"] = util.GetOS(rhdua)
 	userData["Rip"] = util.GetIp(hrt)
 	userData["Rbrowse"] = util.GetBrowse(rhdua)
-	if hsn.Get("RReferer") == nil || util.ObjToString(hsn.Get("RReferer")) == "" {
+	if sessVal["RReferer"] == nil || util.ObjToString(sessVal["RReferer"]) == "" {
 		if Rref == "" {
 			hsn.Set("RReferer", Rurl)
 		} else {
@@ -53,7 +54,7 @@ func RedisInfo(oid, action, sione, sitwo string, i int, hsn *httpsession.Session
 			break
 		}
 	}
-	if hsn.Get("RModule") == nil || util.ObjToString(hsn.Get("RModule")) == "" {
+	if sessVal["RModule"] == nil || util.ObjToString(sessVal["RModule"]) == "" {
 		hsn.Set("RModule", "首页")
 	}
 	//活动页模块
@@ -67,7 +68,7 @@ func RedisInfo(oid, action, sione, sitwo string, i int, hsn *httpsession.Session
 		sourcelist := Seoconfig["source"].(map[string]interface{})
 		for k, v := range sourcelist {
 			if k == activeCode {
-				if hsn.Get("RSource") == nil {
+				if sessVal["RSource"] == nil {
 					hsn.Set("RSource", v)
 					hsn.Set("RModule", activeCode+"活动页")
 					hsn.Set("RActiveCode", activeCode)
@@ -75,18 +76,18 @@ func RedisInfo(oid, action, sione, sitwo string, i int, hsn *httpsession.Session
 				break
 			}
 		}
-		if hsn.Get("RSource") == nil {
+		if sessVal["RSource"] == nil {
 			hsn.Set("RSource", activeCode)
 			hsn.Set("RModule", activeCode+"活动页")
 			hsn.Set("RActiveCode", activeCode)
 		}
 	}
-	userData["RModule"] = hsn.Get("RModule")
-	userData["RActiveCode"] = hsn.Get("RActiveCode")
-	userData["RReferer"] = hsn.Get("RReferer")
-	if hsn.Get("RSource") == nil || util.ObjToString(hsn.Get("RSource")) == "" {
+	userData["RModule"] = sessVal["RModule"]
+	userData["RActiveCode"] = sessVal["RActiveCode"]
+	userData["RReferer"] = sessVal["RReferer"]
+	if sessVal["RSource"] == nil || util.ObjToString(sessVal["RSource"]) == "" {
 		var open = ""
-		if strings.Contains(util.ObjToString(hsn.Get("RReferer")), "open") { //api.jianyu360
+		if strings.Contains(util.ObjToString(sessVal["RReferer"]), "open") { //api.jianyu360
 			reg := regexp.MustCompile(".*/article/(.+)\\.html.*")
 			res := reg.ReplaceAllString(Rref, "$1")
 			rec := strings.Split(res, "ABC")
@@ -98,22 +99,22 @@ func RedisInfo(oid, action, sione, sitwo string, i int, hsn *httpsession.Session
 		refererlist := Seoconfig["referer"].(map[string]interface{})
 		for k, v := range refererlist {
 			if strings.Contains(Rref, k) {
-				if hsn.Get("RSource") == nil {
+				if sessVal["RSource"] == nil {
 					hsn.Set("RSource", util.ObjToString(v)+open)
 				}
 				break
 			}
 		}
-		if hsn.Get("RSource") == nil || util.ObjToString(hsn.Get("RSource")) == "" {
+		if sessVal["RSource"] == nil || util.ObjToString(sessVal["RSource"]) == "" {
 			hsn.Set("RSource", "剑鱼标讯网站")
 		}
 	}
-	userData["RSource"] = hsn.Get("RSource")
-	userData["Rparamkey"] = hsn.Get("paramkey")
-	userData["Rparampublishtime"] = hsn.Get("parampublishtime")
-	userData["Rparamarea"] = hsn.Get("paramarea")
-	userData["Rparaminfotype"] = hsn.Get("paraminfotype")
-	userData["Rprojectname"] = hsn.Get("projectname")
+	userData["RSource"] = sessVal["RSource"]
+	userData["Rparamkey"] = sessVal["paramkey"]
+	userData["Rparampublishtime"] = sessVal["parampublishtime"]
+	userData["Rparamarea"] = sessVal["paramarea"]
+	userData["Rparaminfotype"] = sessVal["paraminfotype"]
+	userData["Rprojectname"] = sessVal["projectname"]
 	userData["action"] = action
 	ck_source, err := hrt.Cookie("source")
 	if err == nil {