From f2bbfcf7317caf5c0fb356a4f7ec560c6568fd69 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 25 三月 2026 10:29:24 +0800
Subject: [PATCH] 585 趣动海外渠道对接(登录)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/LogicProcess/UserCtrlDB.py | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 49 insertions(+), 0 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/LogicProcess/UserCtrlDB.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/LogicProcess/UserCtrlDB.py
index ea44e08..997eb04 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/LogicProcess/UserCtrlDB.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/LogicProcess/UserCtrlDB.py
@@ -3215,6 +3215,55 @@
else:
self.loginStartTime = nowTime
self.loginHeap = 0
+
+ elif appType == CommonDefine.gitFunshine:
+ #读取旧数据, 用到扩展字段
+ accountRec.adoLoadC(collection)
+
+ accountRec.AppID = authPack.AppID.strip(chr(0))
+ accountRec.AccountID = authPack.AccountID
+ accountRec.TokenExpire = authPack.TokenExpire.strip(chr(0))
+ accountRec.Phone = authPack.Phone
+ accountRec.Psw = "1" # token太长 放在Extra
+ accountRec.Adult = authPack.Adult
+ accountRec.RegIP = authPack.IP.strip(chr(0)) # RegIP 当做登录IP用 2018-03-03
+
+ # quick游戏token太长,第一位是spid,第二位是deviceFlag, 第三位是token
+ extraList = authPack.Extra.split("|")
+ if len(extraList) < redefineIndex + 2:
+ self.sendLoginFail(CommonDefine.dgPlayerLogin, authPack, disPswCheckError)
+ return True
+ token = extraList[redefineIndex]
+ uid = extraList[redefineIndex + 1] #原始的uid,含大小写
+
+ if accountRec.RegIP == "127.0.0.1":
+ #debug内部服务器不验证token, 脱机挂玩家不验证
+ mylog.debug('iner no check')
+ else:
+ # url的访问没有多线程 有可能导致登录堆积卡顿的现象
+ if self.loginHeap < 5:
+ # 10秒内前X个玩家验证,后面不验证
+ try:
+ # 节省配置复杂度 写死地址
+ req = urllib2.Request("https://api.funshine-game.com/v3/auth/token?token=%s" % token)
+ response = urllib2.urlopen(req, timeout=1)
+ the_page = response.read()
+ # 返回结果:(JSON格式): { "status": 1, "message":描述信息, "data":{"user_id":用户ID} } // 1 为成功,0 为失败
+ retDict = eval(the_page)
+ if retDict.get("status") != 1:
+ mylog.debug('checktoken fail:%s-%s'%(token, the_page))
+ self.sendLoginFail(CommonDefine.dgPlayerLogin, authPack, disPswCheckError)
+ return True
+ except:
+ pass
+
+ nowTime = time()
+ if nowTime - self.loginStartTime < 10:
+ self.loginHeap += 1
+ else:
+ self.loginStartTime = nowTime
+ self.loginHeap = 0
+
elif appType == CommonDefine.gitHYGame:
#读取旧数据, 用到扩展字段
accountRec.adoLoadC(collection)
--
Gitblit v1.8.0