浏览代码

Merge branch 'dev_v4.8.97_wh' of qmx/jy into feature/v4.8.97

王浩 1 年之前
父节点
当前提交
b8d6c72874
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      src/jfw/front/front.go

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

@@ -886,6 +886,7 @@ func (m *Front) Sess(ostr string) error {
 			ok = true
 		} else {
 			var identity *pb.Identity
+
 			if str[1] == "userId" || str[1] == "entUserId" || str[1] == "positionId" {
 				if str[1] == "userId" {
 					identity = config.Middleground.UserCenter.IdentityByUserId(util.Int64All(userFlag))
@@ -905,7 +906,11 @@ func (m *Front) Sess(ostr string) error {
 					if m.GetSession("positionId") != nil {
 						hasIdentity = true
 					}
-					ok, _, _ = FindUserAndCreateSess(userFlag, m.Session(), "wx", false, !hasIdentity)
+					if userFlag == "" && m.GetSession("positionId") != nil {
+						ok = true
+					} else if userFlag != "" {
+						ok, _, _ = FindUserAndCreateSess(userFlag, m.Session(), "wx", false, !hasIdentity)
+					}
 				}
 				if !hasIdentity {
 					identity = config.Middleground.UserCenter.IdentityByUserId(util.Int64All(m.GetSession("base_user_id")))