瀏覽代碼

Merge branch 'dev4.6.3.11' of http://192.168.3.207:8080/qmx/jy into dev4.6.3.11

wangshan 3 年之前
父節點
當前提交
f2e0486c28

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

@@ -610,6 +610,7 @@ func (f *Front) HasSign() error {
 			"s_headimage": f.GetSession("s_avatar"),
 			"encryptId":   se.EncodeString(userId),
 		}
+		//是否需要重新登录,企业基础架构给虚拟账号重置密码后,需要重新登录
 		if resetpwd, _ := redis.Exists("other", "resetpwd_"+userId); resetpwd {
 			redis.Del("other", "resetpwd_"+userId)
 			redis.Del("session", f.Session().Id())
@@ -779,8 +780,8 @@ func CreateSession(q map[string]interface{}, sess *httpsession.Session, typ stri
 	if person == nil {
 		return false, nil, nil
 	}
+	userid := util.ObjToString(sessionVal["userId"])
 	if pcSessionFlag, ok := config.Sysconfig["pcSessionFlag"].(bool); pcSessionFlag && ok && flag {
-		userid := util.ObjToString(sessionVal["userId"])
 		//无限制登陆用户
 		if util.IntAll(sessionVal["i_unlimited"]) <= 0 {
 			redis.Put("other", jyutil.LoginRedisKey(userid), sess.Id(), 3600*util.IntAllDef(config.Sysconfig["pcSessionTimeout"], 168))
@@ -800,6 +801,8 @@ func CreateSession(q map[string]interface{}, sess *httpsession.Session, typ stri
 	}
 	//大会员动画 清除首页缓存
 	redis.Del("other", "jypcindex")
+	//清除企业基础架构给虚拟账号重置密码后需要重新登录的标识
+	redis.Del("other", "resetpwd_"+userid)
 	return true, person, infoData
 }
 

+ 1 - 1
src/jfw/modules/app/src/web/templates/me/login.html

@@ -487,7 +487,7 @@
 					return;
 				}
 				appQuit(true);
-				JyObj.alert(kicked);
+				//JyObj.alert(kicked);
 			}
 		}
 		function time(o) {

+ 4 - 0
src/jfw/modules/common/src/qfw/util/jy/jy.go

@@ -434,7 +434,11 @@ func LoginOutPush(mongodb MongodbSim, userid, sessid, apppushRpc string) {
 	if err2 != nil {
 		log.Println("json Unmarshal err:", err)
 	}
+	if apppush.JgPushId == "" {
+		return
+	}
 	mongodb.UpdateById("user", userid, map[string]interface{}{
+		"$unset":    map[string]interface{}{"s_jpushid": "", "s_opushid": ""},
 		"$addToSet": map[string]interface{}{"a_jpushid": apppush.JgPushId},
 	})
 	//

+ 4 - 0
src/web/staticres/js/login.js

@@ -981,6 +981,10 @@ $(function(){
                     if (r && r.error_code > -1) {
                         if(r.data.state==1){
                             if (isBindPage) {
+                              var backToUrl = getParam('backTo')
+                              if (backToUrl) {
+                                return location.replace(decodeURIComponent(backToUrl))
+                              }
                               if (history.length === 1) {
                                 goBackOrigin()
                               } else {

+ 1 - 1
src/web/staticres/public-pc/js/article-content.js

@@ -1150,7 +1150,7 @@ $(function(){
         $(".pdf-div").html(pdfshow);
         var pdfhtml = "";
         pdfhtml = '<div class="preb-encont"><div style="float:left;"><img src="'+goTemplateData.cdn+'/images/wx/pdf.png"/></div><div style="float:left;line-height: 22px;">'+arr["filename"]+'<br><a style="color:blue;" href="'+arr["url"]+'">下载</a></div><div style="clear:both;"></div></div>';
-        PDFObject.embed(arr["url"], "#preb-pdf"+j);
+        //PDFObject.embed(arr["url"], "#preb-pdf"+j);
       }
       //}
       $(".preb-enclosure").append(pdfhtml)