新测试服务器
parent
94ffacd568
commit
740313ab80
|
|
@ -47,6 +47,7 @@ local function __Login(cmd, _data, callBack)
|
|||
user.group_id = account["groupId"]
|
||||
user.type = account["type"]
|
||||
user.agent = account["mng"]
|
||||
user.bind_pwd = data.havePassword
|
||||
|
||||
user.real_info = account.real_info
|
||||
user.phone = account.phone
|
||||
|
|
@ -117,6 +118,7 @@ end
|
|||
|
||||
function M:QuickLogin(session_id, callback)
|
||||
local _data = {}
|
||||
_data["deviceCode"] = UnityEngine.SystemInfo.deviceUniqueIdentifier
|
||||
local _client = ControllerManager.WebClient
|
||||
_client:setSession(session_id)
|
||||
-- ControllerManager.GroupClient:setSession(session_id)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
User = {
|
||||
account_id = "",
|
||||
-- acc
|
||||
acc ="",
|
||||
acc = "",
|
||||
--头像
|
||||
head_url = "",
|
||||
-- 用户IP
|
||||
|
|
@ -28,6 +28,8 @@ User = {
|
|||
cur_group = nil,
|
||||
-- 圈子id,重连时用来标记是否在圈子房间中
|
||||
group_id = 0,
|
||||
--用于标记是否有密码,没有密码则强制调用绑定密码页面,true表示有密码。false表示没有密码
|
||||
bind_pwd = false,
|
||||
|
||||
playback = {},
|
||||
|
||||
|
|
@ -45,15 +47,14 @@ local M = User
|
|||
--- Create a new User
|
||||
function User.new()
|
||||
local self = {}
|
||||
setmetatable(self, {__index = M})
|
||||
setmetatable(self, { __index = M })
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
function M:getGameData(game_id)
|
||||
local game_list = self.games
|
||||
|
||||
for i=1,#game_list do
|
||||
for i = 1, #game_list do
|
||||
local game = game_list[i]
|
||||
if game.game_id == game_id then
|
||||
return game
|
||||
|
|
@ -63,23 +64,22 @@ end
|
|||
|
||||
function M:addGameData(data)
|
||||
local game_list = self.games
|
||||
for i=1,#game_list do
|
||||
for i = 1, #game_list do
|
||||
local game = game_list[i]
|
||||
if game.game_id == data.game_id then
|
||||
game_list[i] = data
|
||||
return
|
||||
end
|
||||
end
|
||||
game_list[#game_list+1] = data
|
||||
game_list[#game_list + 1] = data
|
||||
end
|
||||
|
||||
|
||||
function M:removeGameData(game_id)
|
||||
local game_list = self.games
|
||||
for i=1,#game_list do
|
||||
for i = 1, #game_list do
|
||||
local game = game_list[i]
|
||||
if game.game_id == game_id then
|
||||
table.remove(game_list,i)
|
||||
table.remove(game_list, i)
|
||||
return
|
||||
end
|
||||
end
|
||||
|
|
@ -107,4 +107,3 @@ local GameInfo = {
|
|||
table_data = nil
|
||||
}
|
||||
]]
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,78 @@
|
|||
local IDPasswordAlone = {}
|
||||
|
||||
local M = IDPasswordAlone
|
||||
|
||||
function IDPasswordAlone.new(callback)
|
||||
setmetatable(M, { __index = BaseWindow })
|
||||
local self = setmetatable({}, { __index = M })
|
||||
self.class = "IDPasswordAlone"
|
||||
self._callback = callback
|
||||
self._close_zone = false
|
||||
self._close_destroy = true
|
||||
local url = "ui://Lobby/win_id_password_alone"
|
||||
self:init(url)
|
||||
return self
|
||||
end
|
||||
|
||||
function M:init(url)
|
||||
BaseWindow.init(self, url)
|
||||
|
||||
self._view:GetChild("tex_phone").text = DataManager.SelfUser.account_id
|
||||
|
||||
local btn_ok = self._view:GetChild("btn_ok")
|
||||
btn_ok.onClick:Set(function()
|
||||
self:Bind()
|
||||
end)
|
||||
end
|
||||
|
||||
function M:Destroy()
|
||||
BaseWindow.Destroy(self)
|
||||
end
|
||||
|
||||
--绑定
|
||||
function M:Bind()
|
||||
local tex_passwd = self._view:GetChild("tex_passwd")
|
||||
local password = tex_passwd.text
|
||||
if string.len(password) < 6 then
|
||||
ViewUtil.ShowTips("请输入5位以上的密码")
|
||||
return
|
||||
end
|
||||
local flg_xiaozimu = false
|
||||
local flg_dazimu = false
|
||||
local fla_shuzi = false
|
||||
for i = 1, #password do
|
||||
local oneChar = string.sub(password, i, i)
|
||||
print("lingmeng Bind", oneChar, string.byte(oneChar))
|
||||
if string.byte(oneChar) >= 65 and string.byte(oneChar) <= 90 then
|
||||
flg_dazimu = true
|
||||
elseif string.byte(oneChar) >= 97 and string.byte(oneChar) <= 122 then
|
||||
flg_xiaozimu = true
|
||||
elseif string.byte(oneChar) >= 48 and string.byte(oneChar) <= 57 then
|
||||
fla_shuzi = true
|
||||
end
|
||||
end
|
||||
if not (flg_xiaozimu or flg_dazimu) then
|
||||
ViewUtil.ShowTips("密码必须包含字母")
|
||||
return
|
||||
end
|
||||
|
||||
_data = {}
|
||||
|
||||
ViewUtil.ShowModalWait(self._root_view, "正在提交...")
|
||||
local loddyctr = ControllerManager.GetController(LoddyController)
|
||||
_data.password = password
|
||||
_data.type = 3
|
||||
|
||||
loddyctr:UpdateUserInfo(_data, function(res)
|
||||
ViewUtil.CloseModalWait()
|
||||
if (res.ReturnCode == 0) then
|
||||
DataManager.SelfUser.password = "123"
|
||||
if self._callback then self._callback() end
|
||||
else
|
||||
ViewUtil.ErrorTip(res.ReturnCode, "提交失败")
|
||||
end
|
||||
self:Close()
|
||||
end)
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
@ -11,6 +11,7 @@ local HeadView = import(".Lobby.LobbyHeadView")
|
|||
local PhoneBindView = import(".Lobby.PhoneBindView")
|
||||
local RealAddressView = import(".Lobby.RealAddressView")
|
||||
local LobbyHeadView = import(".Lobby.LobbyHeadView")
|
||||
local IDPasswordAlone = import(".Lobby.IDPasswordAlone")
|
||||
LobbyView = {}
|
||||
|
||||
local M = {}
|
||||
|
|
@ -422,6 +423,11 @@ function M:Show()
|
|||
if self.groupMainView and self.groupMainView._groupInfoView then
|
||||
self.groupMainView._groupInfoView:hidePipei()
|
||||
end
|
||||
|
||||
if not DataManager.SelfUser.bind_pwd then
|
||||
local idPasswordAlone = IDPasswordAlone.new()
|
||||
idPasswordAlone:Show()
|
||||
end
|
||||
end
|
||||
|
||||
function M:GetPlayerInfoData()
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"objectStatus": {
|
||||
"n50_ab5p": {
|
||||
"collapsed": true
|
||||
},
|
||||
"n39_ab5p": {
|
||||
"collapsed": true
|
||||
},
|
||||
"n19_p41o": {
|
||||
"collapsed": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="974,588">
|
||||
<displayList>
|
||||
<component id="n0_svin" name="n0" src="st2l7ijp" fileName="component/Win_BaseWindow_H698.xml" pkg="27vd145b" xy="0,0" size="974,588">
|
||||
<Button icon="ui://2d9xdj6zhz877e2c"/>
|
||||
</component>
|
||||
<component id="n1_svin" name="btn_close" src="vg2c4" fileName="buttons/Btn_close.xml" pkg="27vd145b" xy="898,-17" visible="false" controller="style,0"/>
|
||||
<component id="n2_svin" name="btn_ok" src="ab5pcj5" fileName="component/user_info/btn_ok.xml" xy="396,450">
|
||||
<Button icon="ui://2d9xdj6zab5pcj3"/>
|
||||
</component>
|
||||
<text id="n3_svin" name="n3" xy="228,171" size="164,42" group="n6_svin" font="Microsoft YaHei" fontSize="30" color="#2365bb" align="right" autoSize="none" bold="true" text="账号:"/>
|
||||
<image id="n4_svin" name="n4" src="ab5p1f" fileName="font/images/btn_keyboard/hall_input_bg.png" pkg="27vd145b" xy="405,164" size="320,57" group="n6_svin"/>
|
||||
<text id="n5_svin" name="tex_phone" xy="413,164" size="303,57" group="n6_svin" font="Microsoft YaHei" fontSize="30" color="#ffffff" vAlign="middle" autoSize="shrink" bold="true" singleLine="true" text="123456"/>
|
||||
<group id="n6_svin" name="n6" xy="228,164" size="497,57" advanced="true"/>
|
||||
<text id="n7_svin" name="n7" xy="255,314" size="133,42" group="n11_svin" font="Microsoft YaHei" fontSize="30" color="#2365bb" align="right" autoSize="none" bold="true" text="密码:"/>
|
||||
<image id="n8_svin" name="n8" src="ab5p1f" fileName="font/images/btn_keyboard/hall_input_bg.png" pkg="27vd145b" xy="399,303" size="320,59" group="n10_svin"/>
|
||||
<text id="n9_svin" name="tex_passwd" xy="408,303" size="302,57" group="n10_svin" font="Microsoft YaHei" fontSize="30" color="#ffffff" vAlign="middle" autoSize="shrink" bold="true" singleLine="true" text="" input="true" prompt="请输入密码" maxLength="15" keyboardType="1" password="true"/>
|
||||
<group id="n10_svin" name="n10" xy="399,303" size="320,59" group="n11_svin"/>
|
||||
<group id="n11_svin" name="passwd" xy="255,303" size="464,59"/>
|
||||
</displayList>
|
||||
</component>
|
||||
|
|
@ -686,6 +686,7 @@
|
|||
<image id="hz877e2d" name="shezhi.png" path="/images/new/"/>
|
||||
<image id="hz875k" name="luxiang.png" path="/images/new/"/>
|
||||
<component id="hz877e2e" name="pop_notice(1).xml" path="/component/notice/"/>
|
||||
<component id="svin7e2f" name="win_id_password_alone.xml" path="/component/user_info/" exported="true"/>
|
||||
</resources>
|
||||
<publish name="Lobby" path="..\wb_unity_pro\Assets\ART\base\lobby\ui" packageCount="2">
|
||||
<atlas name="默认" index="0"/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue