diff --git a/lua_probject/base_project/Game/Controller/LoddyController.lua b/lua_probject/base_project/Game/Controller/LoddyController.lua index 2c6730c8..bc284997 100644 --- a/lua_probject/base_project/Game/Controller/LoddyController.lua +++ b/lua_probject/base_project/Game/Controller/LoddyController.lua @@ -434,3 +434,17 @@ function M:SetInvited(on, callback) callback(res) end) end + +--赠送房卡 +function M:GiftDiamond(data, callback) + --不走登录逻辑 + local _client = ControllerManager.WebClient + local _data = {} + _data.tagId = data.tagId or 0 + _data.diamo = data.diamo or 0 + _client:send(Protocol.WEB_RECHARGE_DIAMO, _data, function(res) + if (callback ~= nil) then + callback(res) + end + end) +end diff --git a/lua_probject/base_project/Game/Controller/LoginController.lua b/lua_probject/base_project/Game/Controller/LoginController.lua index e22d6862..c225a192 100644 --- a/lua_probject/base_project/Game/Controller/LoginController.lua +++ b/lua_probject/base_project/Game/Controller/LoginController.lua @@ -48,7 +48,7 @@ local function __Login(cmd, _data, callBack) user.head_url = account["portrait"] user.room_id = account["roomid"] user.group_id = account["groupId"] - user.type = account["type"] + user.type = account["type"] --为1的时候是代理,为0的时候是普通玩家 user.agent = account["mng"] user.real_info = account.real_info diff --git a/lua_probject/base_project/Game/Protocol.lua b/lua_probject/base_project/Game/Protocol.lua index 1abfaa02..c3b5dbe1 100644 --- a/lua_probject/base_project/Game/Protocol.lua +++ b/lua_probject/base_project/Game/Protocol.lua @@ -39,6 +39,8 @@ Protocol = { WEB_GET_AGENT_SECRET = "acc/agent_secret", -- 设置被邀请开关 WEB_SET_GROUP_INVITATED = "acc/set_group_invitation", + ---赠送房卡 + WEB_RECHARGE_DIAMO = "acc/recharge_diamo", ----index---- -- 获取公告 WEB_UPDATE_NOTICE = "index/get_notice", diff --git a/lua_probject/base_project/Game/View/Lobby/CreateRoomView.lua b/lua_probject/base_project/Game/View/Lobby/CreateRoomView.lua index 1943472b..e629e3a6 100644 --- a/lua_probject/base_project/Game/View/Lobby/CreateRoomView.lua +++ b/lua_probject/base_project/Game/View/Lobby/CreateRoomView.lua @@ -9,7 +9,8 @@ function CreateRoomView.new(index) local self = setmetatable({}, { __index = M }) self.class = "CreateRoomView" self._animation = false - self._full = true + --self._full = true + self._scale = true self._full_offset = false self._modeMap = {} self.selectedIndex = index diff --git a/lua_probject/base_project/Game/View/Lobby/LobbyGiftDiamond.lua b/lua_probject/base_project/Game/View/Lobby/LobbyGiftDiamond.lua new file mode 100644 index 00000000..00143b05 --- /dev/null +++ b/lua_probject/base_project/Game/View/Lobby/LobbyGiftDiamond.lua @@ -0,0 +1,33 @@ +local LobbyGiftDiamond = {} + +local M = LobbyGiftDiamond + +function M.new() + setmetatable(M, { __index = BaseWindow }) + local self = setmetatable({}, { __index = M }) + self.class = "LobbyGiftDiamond" + self._close_destroy = true + self:init("ui://Lobby/GiftDiamond") + return self +end + +function M:init(url) + BaseWindow.init(self, url) + + self._view:GetChild('btn_center').onClick:Set(function() + local text_id = self._view:GetChild('input_id').text + local text_num = self._view:GetChild('input_num').text + + local lobbyCtr = ControllerManager.GetController(LoddyController) + lobbyCtr:GiftDiamond({ tagId = tonumber(text_id), diamo = tonumber(text_num) }, function(res) + if res.ReturnCode == 0 then + self:Destroy() + ViewUtil.ErrorTip(-1, "赠送房卡成功") + else + ViewUtil.ErrorTip(res.ReturnCode, "赠送房卡失败") + end + end) + end) +end + +return M diff --git a/lua_probject/base_project/Game/View/LobbyView.lua b/lua_probject/base_project/Game/View/LobbyView.lua index 2eba4231..d5485cc4 100644 --- a/lua_probject/base_project/Game/View/LobbyView.lua +++ b/lua_probject/base_project/Game/View/LobbyView.lua @@ -19,6 +19,7 @@ local HeadView = import(".Lobby.LobbyHeadView") local PhoneBindView = import(".Lobby.PhoneBindView") local RealAddressView = import(".Lobby.RealAddressView") local LobbyHeadView = import(".Lobby.LobbyHeadView") +local LobbyGiftDiamond = import(".Lobby.LobbyGiftDiamond") LobbyView = {} @@ -150,9 +151,12 @@ function M:InitView(url) end) local btn_diamo = self._view:GetChild("btn_diamo") - -- btn_diamo.onClick:Add(function() - -- ViewUtil.ErrorTip(self._view, string.format("当前房卡一共%s张", DataManager.SelfUser.diamo)) - -- end) + btn_diamo.onClick:Add(function() + if DataManager.SelfUser.type == 1 then + local lobbyGiftDiamond = LobbyGiftDiamond.new() + lobbyGiftDiamond:Show() + end + end) local btn_customerService = self._view:GetChild("btn_customerService") btn_customerService.onClick:Add(function() @@ -204,7 +208,7 @@ function M:InitView(url) view:GetChild("tex_name").emojies = EmojiDitc.EmojiesDitc view:GetChild("tex_name").text = Utils.TextOmit(DataManager.SelfUser.nick_name, 6, "...") - view:GetChild("tex_id").text = tostring(DataManager.SelfUser.account_id) + view:GetChild("tex_id").text = string.format("ID:%s", tostring(DataManager.SelfUser.account_id)) view:GetChild("btn_diamo").text = tostring(DataManager.SelfUser.diamo) diff --git a/lua_probject/base_project/Game/View/PlayerInfoView2.lua b/lua_probject/base_project/Game/View/PlayerInfoView2.lua index a773d3d2..dbd0b58a 100644 --- a/lua_probject/base_project/Game/View/PlayerInfoView2.lua +++ b/lua_probject/base_project/Game/View/PlayerInfoView2.lua @@ -169,7 +169,7 @@ function M:FillData(player) self._tex_player_id.text = "" end else - self._tex_player_name.text = player.self_user.nick_name + self._tex_player_name.text = Utils.TextOmit(player.self_user.nick_name, 6, "...") if self._tex_player_id then self._tex_player_id.text = "ID:" .. player.self_user.account_id end diff --git a/lua_probject/extend_project/extend/poker/runfast/ExtendConfig.lua b/lua_probject/extend_project/extend/poker/runfast/ExtendConfig.lua index 4f0331aa..311ec39b 100644 --- a/lua_probject/extend_project/extend/poker/runfast/ExtendConfig.lua +++ b/lua_probject/extend_project/extend/poker/runfast/ExtendConfig.lua @@ -92,7 +92,8 @@ function M:FillRoomData(s2croom) if room.curren_round == 0 and reload then room.curren_round = 1 end - + room.witness_player_list = _tableInfo["playerSpectatorData"] + room._flag_updateWitness = true local playerList = _tableInfo["playerData"] for i = 1, #playerList do local _jp = playerList[i] @@ -271,6 +272,7 @@ function M:FillWitnessData(pd_data) room.curren_round = _tableInfo["round"] + room.witness_player_list = _tableInfo["playerSpectatorData"] local playerList = _tableInfo["playerData"] for i = 1, #playerList do local _jp = playerList[i] diff --git a/wb_new_ui/assets/Extend_Poker_RunFastNew/Main_New/PlayerHead_1.xml b/wb_new_ui/assets/Extend_Poker_RunFastNew/Main_New/PlayerHead_1.xml index 1f86ed65..3007e3e4 100644 --- a/wb_new_ui/assets/Extend_Poker_RunFastNew/Main_New/PlayerHead_1.xml +++ b/wb_new_ui/assets/Extend_Poker_RunFastNew/Main_New/PlayerHead_1.xml @@ -38,7 +38,7 @@ - + diff --git a/wb_new_ui/assets/FGAssist/invite/component/invite/item_invite.xml b/wb_new_ui/assets/FGAssist/invite/component/invite/item_invite.xml index 29373bf3..09f14288 100644 --- a/wb_new_ui/assets/FGAssist/invite/component/invite/item_invite.xml +++ b/wb_new_ui/assets/FGAssist/invite/component/invite/item_invite.xml @@ -5,7 +5,7 @@ - + @@ -19,7 +19,7 @@ - + diff --git a/wb_new_ui/assets/Family/NumberRecord/Component/comp_numberRecordDetailResultChild.xml b/wb_new_ui/assets/Family/NumberRecord/Component/comp_numberRecordDetailResultChild.xml index 6ea1765d..e15e64b3 100644 --- a/wb_new_ui/assets/Family/NumberRecord/Component/comp_numberRecordDetailResultChild.xml +++ b/wb_new_ui/assets/Family/NumberRecord/Component/comp_numberRecordDetailResultChild.xml @@ -4,7 +4,7 @@ - + diff --git a/wb_new_ui/assets/Lobby/CreatePlay.xml b/wb_new_ui/assets/Lobby/CreatePlay.xml index b5d302e8..737534d1 100644 --- a/wb_new_ui/assets/Lobby/CreatePlay.xml +++ b/wb_new_ui/assets/Lobby/CreatePlay.xml @@ -3,6 +3,9 @@ + + + @@ -20,6 +23,7 @@ + diff --git a/wb_new_ui/assets/Lobby/Main_New.xml b/wb_new_ui/assets/Lobby/Main_New.xml index 710545d6..e26a0657 100644 --- a/wb_new_ui/assets/Lobby/Main_New.xml +++ b/wb_new_ui/assets/Lobby/Main_New.xml @@ -7,19 +7,19 @@ - + - + - + - + - + diff --git a/wb_new_ui/assets/Lobby/component/GiftDiamond/Component/GiftDiamond.xml b/wb_new_ui/assets/Lobby/component/GiftDiamond/Component/GiftDiamond.xml new file mode 100644 index 00000000..61ebdbde --- /dev/null +++ b/wb_new_ui/assets/Lobby/component/GiftDiamond/Component/GiftDiamond.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + +