فهرست منبع

Merge branch 'release' of http://192.168.3.207:10080/qmx/jy into release

wangshan 6 سال پیش
والد
کامیت
937dd1240a

+ 5 - 2
src/jfw/modules/app/src/jfw/front/login.go

@@ -885,11 +885,14 @@ func checkRepeatLogin(user *map[string]interface{}, rid string) {
 			}, false, false)
 		}()
 		//
-
 		go func() {
+			phoneType := qutil.ObjToString((*user)["s_appponetype"])
+			log.Println("极光推送,踢出下线", phoneType, s_m_openid, jpushid)
+			if phoneType != "HUAWEI" {
+				return
+			}
 			options := jgpush.Jgconfig.Config.Options
 			options["time_to_live"] = 864000
-			log.Println("极光推送,踢出下线", s_m_openid, jpushid)
 			jgpush.JgpushD_Msg("", jgpush.Jgconfig.Title["signOut"].(string), "signOut", []string{jpushid}, nil, options, false)
 		}()
 	}

+ 8 - 1
src/jfw/modules/app/src/web/staticres/jyapp/js/common.js

@@ -425,7 +425,7 @@ function checkRid(){
 			return;
 		}
 		clearInterval(thisInterval);
-		$.post("/jyapp/free/updateRid",{rid:rid,phoneType:JyObj.getPhoneBrand()},function(r){
+		$.post("/jyapp/free/updateRid",{rid:rid,phoneType:getPhoneType()},function(r){
 			if(r.sign == ""){
 				return;
 			}
@@ -456,4 +456,11 @@ function randomNum(Min,Max){
 }
 function getCipherText(phone){
 	return encodeURIComponent(JyObj.getCipherText(phone));
+}
+function getPhoneType(){
+	var phoneType = "";
+	try{
+		phoneType = JyObj.getPhoneBrand();
+	}catch(e){}
+	return phoneType;
 }

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

@@ -199,7 +199,7 @@
 				}
 				var phone = $.trim($("#tel").val());
 				if($(".header-tab>a.header-tab-active").index() == 0){
-					$.post("/jyapp/free/login",{reqType:"phoneLogin",phone:phone,password:$(".onePass input").val(),rid:JyObj.getPushRid(),phoneType:JyObj.getPhoneBrand()},function(r){
+					$.post("/jyapp/free/login",{reqType:"phoneLogin",phone:phone,password:$(".onePass input").val(),rid:JyObj.getPushRid(),phoneType:getPhoneType()},function(r){
 						if(r.status==1){
 							if(localStorage){
 								localStorage.loginPhone = phone;
@@ -210,7 +210,7 @@
 						}		
 					});
 				}else{
-					$.post("/jyapp/free/login",{reqType:"identCodeLogin",phone:phone,identCode:$("#identCode").val(),rid:JyObj.getPushRid(),phoneType:JyObj.getPhoneBrand()},function(r){
+					$.post("/jyapp/free/login",{reqType:"identCodeLogin",phone:phone,identCode:$("#identCode").val(),rid:JyObj.getPushRid(),phoneType:getPhoneType()},function(r){
 						if(r.status==1){
 							if(localStorage){
 								localStorage.loginPhone = phone;
@@ -276,7 +276,7 @@
 			$.ajax({
 				url: "/jyapp/free/wxLogin",
 				type: "post",
-				data: {param:wxSign,rid:JyObj.getPushRid(),phoneType:JyObj.getPhoneBrand()},
+				data: {param:wxSign,rid:JyObj.getPushRid(),phoneType:getPhoneType()},
 				dataType: "json",
 				success: function(r){
 					if(r.status == 1){

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

@@ -110,7 +110,7 @@
 						EasyAlert.show("输入的密码不一致");
 						return;
 					}
-					$.post("/jyapp/free/register",{reqType:"save",password:$(".onePass input").val(),rid:JyObj.getPushRid(),phoneType:JyObj.getPhoneBrand()},function(r){
+					$.post("/jyapp/free/register",{reqType:"save",password:$(".onePass input").val(),rid:JyObj.getPushRid(),phoneType:getPhoneType()},function(r){
 						var url = null;
 						if(r.status=="timeout"){
 							url = "/jyapp/free/register";