Compare commits

..

No commits in common. "35b6f468092c167dda1bed3fc9f1453574b04edc" and "f5527880d9dcdfe1216f6e7c090d9265c97f3c86" have entirely different histories.

344 changed files with 3439 additions and 6930 deletions

View File

@ -42,5 +42,5 @@ BroadcastEvent = {
OnJoinsChange = 'OnJoinsChange',
OnMemberChange = "OnMemberChange",
OnOutFamily = "OnOutFamily",
OnOutFamily2 = "OnOutFamily2",
}

View File

@ -671,12 +671,12 @@ function M:ReturnToRoom()
false,
function(response)
if (response.ReturnCode == -1) then
ViewUtil.CloseModalWait2('join_room')
ViewUtil.CloseModalWait('join_room')
RestartGame()
return
end
ViewManager.ChangeView(ViewManager.View_Main, DataManager.CurrenRoom.game_id)
ViewUtil.CloseModalWait2('join_room')
ViewUtil.CloseModalWait('join_room')
end,
self.tmpGroupID
)

View File

@ -412,9 +412,6 @@ end
-- 邀请在线玩家
function M:FG_InvitePlayer(group_id, tag, player_id, roomid, pid, game_name, callback)
if not self._mgr_client then
return
end
local _data = {}
_data.groupId = group_id
_data.tagId = tag
@ -459,7 +456,12 @@ end
--被邀请玩家收到邀请
function M:FG_ResponseInvited(evt_data)
DispatchEvent(self._dispatcher, GroupMgrEvent.InviteResponse, evt_data)
local invite_id = evt_data.invite_id
local g_name = evt_data.g_name
local roomid = evt_data.roomid
local pid = evt_data.pid
local groupid = evt_data.groupId
DispatchEvent(self._dispatcher, GroupMgrEvent.InviteResponse, invite_id, g_name, roomid, pid, groupid)
end
-- 设置助理,来用给对面刷新界面 tagId=助理
@ -609,9 +611,6 @@ function M:OnMemberOut(evt_data)
local uid = evt_data.uid
local groupId = evt_data.groupId
local group = DataManager.groups:get(groupId)
if not group then
return
end
group:delMember(uid)
DispatchEvent(self._dispatcher, GroupMgrEvent.OnFamilyMemberOut, evt_data)
Broadcast.Send(BroadcastEvent.Reflash)

View File

@ -92,12 +92,9 @@ function M:CreateRoom(game_id, dataInfo, callback)
local room = ExtendManager.GetExtendConfig(game_id):NewRoom()
room.game_id = game_id
room.game_info = game_info
room.room_id = room_id
room.server_host = string.concat(server_ip, ":", server_port)
room.session = _client:getSession()
room._flag_lobby = true
DataManager.CurrenRoom = room
local game_net = nil
@ -177,9 +174,7 @@ function M:PublicJoinRoom(cmd, room_id, callback, group_id, group_layer)
room.server_host = string.concat(server_ip, ":", server_port)
room.session = _client:getSession()
room.group_id = json["groupId"]
room.game_info = game_info
room.play_id = json["pid"]
room._flag_lobby = true
-- 体力值开关
room.hpOnOff = json["hpOnOff"]
-- 体力值倍数
@ -247,7 +242,6 @@ function M:ResetJionRoom(callback)
room.hpOnOff = o_room.hpOnOff
room.owner_id = o_room.owner_id
room.create_time = o_room.create_time
room._flag_lobby = true
room:SetReloadStatus(true)
DataManager.CurrenRoom = room
__ConntectGameServer(Protocol.GAME_JOIN_ROOM, room, room.server_host, j_data, function(res1)
@ -396,14 +390,14 @@ function M:RequestPlayBack(_data, callback, game_info)
end
--获取手机验证码
-- function M:GetPhoneCode(phone, callback)
-- local _client = ControllerManager.WebClient
-- local _data = {}
-- _data["phone"] = phone
-- _client:send(Protocol.WEB_GET_VERIFCATION_CODE, _data, function(res)
-- callback(res)
-- end)
-- end
function M:GetPhoneCode(phone, callback)
local _client = ControllerManager.WebClient
local _data = {}
_data["phone"] = phone
_client:send(Protocol.WEB_GET_VERIFCATION_CODE, _data, function(res)
callback(res)
end)
end
function M:GetUserInfo(callback)
local _client = ControllerManager.WebClient
@ -491,42 +485,3 @@ function M:GetServiceInfo(data, callback)
end
end)
end
--手机验证码
function M:GetPhoneCode(phone, callback)
--不走登录逻辑
local _client = ControllerManager.WebClient
local _data = {}
_data["phone"] = phone
if DataManager.SelfUser.phone and #DataManager.SelfUser.phone then
return
end
_client:send(Protocol.WEB_GET_Phone_Code, _data, function(res)
if (callback ~= nil) then
callback(res)
end
end)
end
--绑定手机验证码
function M:PhoneBind(phone, code, callback)
local _client = ControllerManager.WebClient
local _data = {}
_data["phone"] = phone
_data["code"] = code
_client:send(Protocol.WEB_BIND_Phone, _data, function(res)
if (callback ~= nil) then
callback(res)
end
end)
end
-- 获取亲友圈房卡记录
function M:FG_Get_Diamond_Msg(callback)
local _data = {}
_data.id = DataManager.SelfUser.account_id
local _client = ControllerManager.WebClient
_client:send(Protocol.WEB_Get_Diamond_Mssages, _data, function(res)
callback(res)
end)
end

View File

@ -55,7 +55,6 @@ local function __Login(cmd, _data, callBack)
user.phone = account.phone
user.address = account.address
user.games = FilterGame(data.games)
user.havaPsw = data.havaPassword
if Application.platform == RuntimePlatform.WindowsPlayer or Application.platform == RuntimePlatform.WindowsEditor then
--GameApplication.Instance.printLog = true
else
@ -83,7 +82,7 @@ function M:GetPhoneCode(phone, callback)
local _client = ControllerManager.WebClient
local _data = {}
_data["phone"] = phone
_client:send(Protocol.WEB_GET_Phone_Code, _data, function(res)
_client:send(Protocol.WEB_GET_VERIFCATION_CODE, _data, function(res)
if (callback ~= nil) then
callback(res)
end
@ -94,7 +93,7 @@ function M:PhoneLogin(phone, code, callback)
local _data = {}
_data["phone"] = phone
_data["code"] = code
__Login(Protocol.WEB_LOGIN_Phone, _data, callback)
__Login(Protocol.WEB_PHONE_LOGIN, _data, callback)
end
--手机密码登录
@ -119,13 +118,6 @@ function M:Login(callback)
_data["nick"] = user.nick_name
_data["sex"] = user.sex
_data["portrait"] = user.head_url
local sys_type = 2
if GetPlatform() == "Android" then
sys_type = 0
elseif GetPlatform() == "iOS" then
sys_type = 1
end
_data["sys_type"] = sys_type
__Login(Protocol.WEB_USER_LOGIN, _data, callback)
end

View File

@ -77,7 +77,6 @@ function M:CreateRoom(game_id, _data, callback)
local room = ExtendManager.GetExtendConfig(game_id):NewRoom()
room.game_id = game_id
room.game_info = game_info
room.room_id = room_id
room.server_host = string.concat(server_ip, ":", server_port)
room.session = _client:getSession()
@ -202,7 +201,6 @@ function M:PublicJoinRoom(cmd, roomid, tem, callback, group_id, pid)
room.session = _client:getSession()
-- 圈子信息圈子id和玩法id
room.group_id = json["groupId"]
room.game_info = game_info
-- 圈子禁止文字聊天,禁止语音聊天
--room.ban_chat1 = json["ban_chat1"]
--room.ban_chat2 = json["ban_chat2"]

View File

@ -138,12 +138,10 @@ function M:addPlay(play)
--printlog("添加玩法addPlay===>>>")
--pt(play)
local maxRound = 0
local hpdata = json.decode(play.hpData)
if play.maxRound then
maxRound = play.maxRound
hpdata.maxRound = maxRound
play.hpData = json.encode(hpdata)
else
local hpdata = json.decode(play.hpData)
maxRound = hpdata.maxRound
end

View File

@ -60,8 +60,7 @@ local function __update_check(data, onback, _version_view)
if game_data["size"] then
printlog("lingmeng down", download_size, version_update.Progress, game_data["size"])
onback(
download_size + (version_update.Progress > 1 and 1 or version_update.Progress) * game_data["size"],
false)
download_size + (version_update.Progress > 1 and 1 or version_update.Progress) * game_data["size"], false)
else
onback(version_update.Progress, false)
tex_tip.text = version_update.TextTip
@ -128,7 +127,7 @@ function ExtendHotupdate.UpdateGame(data, callback)
if callback then callback() end
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
NetResetConnectWindow.CloseNetReset()
local _version_view = UIPackage.CreateObjectFromURL("ui://Common/ExtendHotUpdate")
_version_view:GetChild("tex_info").text = "正在检查资源。。。"

View File

@ -41,10 +41,10 @@ end
function M:OnChangeOption(ctype)
self:ShowRoomPrice(ctype)
-- local round = self._config:GetController("round")
-- round.onChanged:Set(function()
-- self:ShowVariablePrice(ctype)
-- end)
local round = self._config:GetController("round")
round.onChanged:Set(function()
self:ShowVariablePrice(ctype)
end)
end
function M:ShowVariablePrice(ctype)

View File

@ -49,14 +49,6 @@ Protocol = {
ACC_GET_DIAMONDRECORD = "acc/get_recharge_diamo_list",
---获取客服信息
WEB_GET_SERVICEINFO = "acc/get_customer_service",
---获取手机验证码
WEB_GET_Phone_Code = "acc/get_verification_code",
---绑定手机号码
WEB_BIND_Phone = "acc/binding_phone",
---手机号码登录
WEB_LOGIN_Phone = "acc/phone_login",
-- 获取自己房卡记录
WEB_Get_Diamond_Mssages = "acc/get_messages",
----index----
-- 获取公告
WEB_UPDATE_NOTICE = "index/get_notice",

View File

@ -63,6 +63,7 @@ function FGAssistView.new(blur_view, group_id, callback)
self.callback = callback
self:init("ui://FGAssist/panel_assist")
print("lingmeng FGAssistView new")
return self
end
@ -190,15 +191,16 @@ end
-- end
function M:GetOnlinePlayers(index)
index = index or 0
print("lingmeng GetOnlinePlayers", self.group_id)
local group = DataManager.groups:get(self.group_id)
local fgCtr = ControllerManager.GetController(NewGroupController)
-- if not group then
if not group then
fgCtr:FG_GroupList(function(res)
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "连接亲友圈失败")
else
fgCtr:FG_EnterGroup(self.group_id, function(res)
ViewUtil:CloseModalWait2()
ViewUtil:CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "连接亲友圈失败")
else
@ -208,9 +210,9 @@ function M:GetOnlinePlayers(index)
end)
end
end)
-- else
-- self:GetOnlinePlayersshow(fgCtr, group, index)
-- end
else
self:GetOnlinePlayersshow(fgCtr, group, index)
end
end
function M:GetOnlinePlayersshow(fgCtr, group, index)

View File

@ -95,7 +95,7 @@ function M:CreatePlay()
-- loddyCtr:CreateRoom(gameId,_data, function (res)
-- self:__OnCreateRoomAction(res)
-- end)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
end
function M:initePlayInfo()

View File

@ -91,9 +91,7 @@ function M:InitTime()
return serverDayValues, serverDayItems
end
function M:ShouRanks(root, groupId)
self._father = root
self.group_id = groupId
function M:ShouRanks()
self._lastTpe = self._father.familyType.selectedIndex
self._father.familyType.selectedIndex = 0
self._view.visible = true
@ -136,7 +134,6 @@ function M:SearchRank()
end
function M:RecursionSearchRank(fgCtr, index, begin_time, end_time)
ViewUtil:ShowModalWait2()
fgCtr:FG_GetMemberRank(self.group_id, 0, index * 2, 2, begin_time, end_time, nil, function(res)
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取排行榜失败")
@ -147,7 +144,6 @@ function M:RecursionSearchRank(fgCtr, index, begin_time, end_time)
self:RankTableInsert(info.ranks)
self:RecursionSearchRank(fgCtr, index + 1, begin_time, end_time)
else
ViewUtil.CloseModalWait2()
table.sort(self.roundRanks, function(a, b)
return a.round > b.round
end)

View File

@ -23,7 +23,7 @@ function M:Reflash(group)
numbers = self._group.members
-- print("==========================res.Data.members")
pt(self._group.members)
ViewUtil:CloseModalWait2()
ViewUtil:CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取成员列表失败")
else
@ -92,9 +92,7 @@ function M:FillList(numbers)
obj.onClick:Set(function()
print("lingmengtextBtn_detail")
ViewUtil.ShowModalWait2()
fgCtr:FG_FindMember(self._group.id, numbers[i].uid, function(res)
ViewUtil.CloseModalWait2()
local familyNumberDetail = FamilyNumberDetail.new(self._group.id, self._group.lev, res)
familyNumberDetail:SetTickCallback(handler(self, self.TickNumberCallback))
familyNumberDetail:SetRefrenCallback(handler(self, self.RefrenMemberCallback))
@ -126,7 +124,7 @@ function M:RefrenMemberCallback()
fgCtr:FG_GroupMembers(self._group.id, 0, self._group.total_member_num, false, 1, function(res)
numbers = self._group.members
-- print("==========================res.Data.members")
ViewUtil:CloseModalWait2()
ViewUtil:CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取成员列表失败")
else

View File

@ -26,7 +26,6 @@ function FamilyAuditNumber.new(root)
self.class = "FamilyAuditNumber"
self._scale = true
self._animation = false
self._close_destroy = true
self:init("ui://Family/com_auditNumber")
return self
end
@ -40,7 +39,7 @@ function FamilyAuditNumber:init(url)
self.list_auditNumberList = self._view:GetChild('list_auditNumberList')
self.btn_close.onClick:Set(function()
self:Destroy()
self:Close()
end)
self.list_auditNumberList.itemRenderer = function(index, obj)
@ -56,9 +55,7 @@ end
function FamilyAuditNumber:Show(group)
self._group = group
local fgCtr = ControllerManager.GetController(NewGroupController)
ViewUtil.ShowModalWait2()
fgCtr:FG_GroupJoins(self._group.id, function(res)
ViewUtil.CloseModalWait2()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取成员列表失败")
return
@ -76,9 +73,7 @@ end
function FamilyAuditNumber:ClickBtn(isAllow, uid, tag)
local fgCtr = ControllerManager.GetController(NewGroupController)
ViewUtil.ShowModalWait2()
fgCtr:FG_GroupVerifyJoin(self._group.id, uid, isAllow == 1, function(res)
ViewUtil.CloseModalWait2()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取成员列表失败")
else
@ -88,8 +83,6 @@ function FamilyAuditNumber:ClickBtn(isAllow, uid, tag)
else
end
fgCtr:FG_GroupMembers12(self._group.id, 0, self._group.total_member_num + 1, 2, 2, function(res)
end)
local group = DataManager.groups:get(self._group.id)
group.joins = group.joins - 1
@ -102,7 +95,6 @@ function FamilyAuditNumber:ClickBtn(isAllow, uid, tag)
self:Reflash()
Broadcast.Send(BroadcastEvent.OnJoinsChange)
Broadcast.Send(BroadcastEvent.OnMemberChange)
--[[
local view = BaseView.FindView("FamilyMainView")

View File

@ -75,10 +75,8 @@ local function AddPlayer(data, self)
players[#players + 1] = number.uid
self.sending = true
local fgCtr = ControllerManager.GetController(NewGroupController)
ViewUtil.ShowModalWait2()
fgCtr:FG_SetBanTable1(self.root._group.id, data.deskId, players, data.deskName, function(res)
self.sending = false
ViewUtil.CloseModalWait2()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(-1, "设置失败")
return
@ -113,10 +111,8 @@ local function DelPalyer(data, uid, self)
self.sending = true
local fgCtr = ControllerManager.GetController(NewGroupController)
ViewUtil.ShowModalWait2()
fgCtr:FG_SetBanTable1(self.root._group.id, data.deskId, players, data.deskName, function(res)
self.sending = false
ViewUtil.CloseModalWait2()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(-1, "删除失败")
return
@ -138,9 +134,7 @@ local function DelDesk(data, self)
self.sending = true
local fgCtr = ControllerManager.GetController(NewGroupController)
ViewUtil.ShowModalWait2()
fgCtr:FG_SetBanTable1(self.root._group.id, data.deskId, {}, data.deskName, function()
ViewUtil.CloseModalWait2()
self.sending = false
self:Reflash()
end)
@ -148,9 +142,7 @@ end
local function ChangeName(deskData, name, self)
local fgCtr = ControllerManager.GetController(NewGroupController)
ViewUtil.ShowModalWait2()
fgCtr:FG_SetBanTable1(self.root._group.id, deskData.deskId, AllUid(deskData.deskList), name, function(res)
ViewUtil.CloseModalWait2()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(-1, "删除失败")
return
@ -323,9 +315,7 @@ function BanDesk:Reflash()
local fgCtr = ControllerManager.GetController(NewGroupController)
local groupId = self.root._group.id
ViewUtil.ShowModalWait2()
fgCtr:FG_GetBanTable1(groupId, function(res)
ViewUtil.CloseModalWait2()
self:GetBanTableCallback(res)
end)
end
@ -348,9 +338,7 @@ function BanDesk:GetBanTableCallback(res)
local fgCtr = ControllerManager.GetController(NewGroupController)
local groupId = self.root._group.id
local banList = {}
ViewUtil.ShowModalWait2()
fgCtr:FG_SetBanTable1(groupId, -1, banList, "新建关系", function()
ViewUtil.CloseModalWait2()
self.sending = false
self:Reflash()
end)

View File

@ -191,7 +191,7 @@ function FamilyChatRoom:Show()
mgr_ctr:FG_ENTER_CHATROOM(self.root._group.id, getData, function(res)
if res.returnCode == 0 then
ViewUtil.ShowModalWait2(self._root_view, "正在加载聊天室......")
ViewUtil.ShowModalWait(self._root_view, "正在加载聊天室......")
end
end)

View File

@ -167,22 +167,20 @@ end
function M:_evtInviteResponse(...)
local arg = { ... }
local evt_data = arg[1]
local invite_id = evt_data.invite_id
local nik = evt_data.nik
local g_name = evt_data.g_name
local roomid = evt_data.roomid
local pid = evt_data.pid
local groupid = evt_data.groupId
local playInfo = evt_data.pinfo
local invite_id = arg[1]
local g_name = arg[2]
local roomid = arg[3]
local pid = arg[4]
local groupid = arg[5]
local roomCtr = ControllerManager.GetController(RoomController)
local gameId = DataManager.groups:get(groupid):getPlay(pid).gameId
UIPackage.AddPackage('base/newgroup/ui/FGAssist')
local imv =
FGInvitedMsgView.new(
self._root_view,
groupid,
playInfo,
nik,
pid,
invite_id,
function()
roomCtr:PublicJoinRoom(
Protocol.WEB_FG_JOIN_ROOM,
@ -201,8 +199,7 @@ function M:_evtInviteResponse(...)
return
else
UpdateBeat:Remove(self.OnUpdate, self)
ViewManager.ChangeView(ViewManager.View_Main, DataManager.CurrenRoom.game_id,
{ _flag_showTip = true })
ViewManager.ChangeView(ViewManager.View_Main, gameId, { _flag_showTip = true })
end
end,
groupid,
@ -227,7 +224,7 @@ function M:_evtChatRoomData(...)
return
end
view.com_FamilyChatRoom:Refalsh()
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
end
function M:_evtOnNewRecord(...)
@ -336,10 +333,6 @@ function M:_evtOnFamilyReflash(...)
group.joins = joins
if not group.joinsData or #group.joinsData < 1 then
return
end
for _, data in pairs(group.joinsData) do
if data.id == uid then
table.remove(group.joinsData, _)
@ -384,34 +377,21 @@ function M:_evtOnFamilyMemberOut(...)
local uid = arg.uid
local groupId = arg.groupId
local name = arg.name
local reflashType = arg.reflashType
local group = DataManager.groups:get(groupId)
local view = ViewManager.GetCurrenView()
if view.class ~= "FamilyMainView" or not group then
if view.class ~= "FamilyMainView" then
return
end
local tips = ""
if name == group.name then
tips = "【%s(%s)】亲友圈已解散"
tips = string.format(tips, group.name, groupId)
else
tips = "成员 【%s(%s)】退出了【%s(%s)】亲友圈"
tips = string.format(tips, DataManager.SelfUser.nick_name, DataManager.SelfUser.account_id, group.name, groupId)
end
if uid == DataManager.SelfUser.account_id then
DataManager.groups:del(groupId)
if #DataManager.groups.groupList == 0 then
if view._group.id == groupId then
view._close_destroy = true
ViewManager.ChangeView(ViewManager.View_Lobby)
else
if view._group.id == groupId then
view:Reflash()
end
end
end
local tips = "成员 【%s(%s)】退出了【%s(%s)】亲友圈"
tips = string.format(tips, name, uid, group.name, groupId)
local win = MsgWindow.new(view._view, tips, MsgWindow.MsgMode.OnlyOk)
win:Show()
end

View File

@ -5,13 +5,11 @@ local FamilyInviteFamilyView = {}
local M = FamilyInviteFamilyView
setmetatable(M, { __index = BaseWindow })
function FamilyInviteFamilyView.new(curGroup)
function FamilyInviteFamilyView.new()
local self = setmetatable({}, { __index = M })
self.class = 'FamilyInviteFamilyView'
self._close_destroy = true
self._close_zone = false
self._new_hide = false
self._curGroup = curGroup
self:init('ui://Family/InviteFamily')
return self
end
@ -20,17 +18,11 @@ function M:init(url)
BaseWindow.init(self, url)
local view = self._view
local tem = self._curGroup
local data = {}
data.title = string.format('亲友圈【%s】,ID【%s】,期待您的加入!', tem.name, tem.id)
data.description = "快来加入趣友麻将吧,妈妈再也不担心我串房间了,和趣友麻将小伙伴们一起玩耍吧"
view:GetChild('btn_wx').onClick:Add(function()
data.type = 0
ViewUtil.__share(data)
ViewUtil.ErrorTip(-1, "该功能还会开放,敬请期待")
end)
view:GetChild('btn_moments').onClick:Add(function()
data.type = 1
ViewUtil.__share(data)
ViewUtil.ErrorTip(-1, "该功能还会开放,敬请期待")
end)
end

View File

@ -4,7 +4,7 @@ local FamilyInvitedMsgView = {}
local M = FamilyInvitedMsgView
setmetatable(M, { __index = BaseWindow })
function FamilyInvitedMsgView.new(blur_view, groupid, pinfo, nik, callback)
function FamilyInvitedMsgView.new(blur_view, groupid, pid, invite_id, callback)
print("lingmeng FGAssistInviteView")
local self = setmetatable({}, { __index = M })
self.class = "FGAssistInviteView"
@ -14,8 +14,8 @@ function FamilyInvitedMsgView.new(blur_view, groupid, pinfo, nik, callback)
self._put_map = false
self._close_destroy = true
self.groupid = groupid
self.pinfo = pinfo
self.nik = nik
self.pid = pid
self.invite_id = invite_id
self.callback = callback
UIPackage.AddPackage('base/newgroup/ui/FGAssist')
self:initView("ui://FGAssist/panel_invited")
@ -35,35 +35,45 @@ function M:initView(url)
self._viewText_playName.emojies = EmojiDitc.EmojiesDitc
self._view:GetChild('btn_no').onClick:Set(function()
print("lingmeng btn_no")
self:Destroy()
end)
print("lingmeng FGAssistInviteView5")
self._view:GetChild('btn_yes').onClick:Set(function()
print("lingmeng btn_yes", self.callback)
if self.callback then
self.callback()
end
self:Destroy()
end)
print("lingmeng FGAssistInviteViewend")
self:FillData()
end
function M:FillData()
local group = DataManager.groups:get(self.groupid)
local play = self.pinfo
local play = group:getPlay(self.pid)
local player = group.memberMap[self.invite_id]
if player == nil then
return
end
--print("lingmeng FillData", self.groupid, self.pid, self.invite_id, type(self.invite_id), type(self.groupid),player)
--pt(group.memberMap)
self._viewText_groupName.text = Utils.TextOmit(group.name, 6, "...")
self._viewText_gameName.text = play.game_name
self._viewText_inviteName.text = ViewUtil.stringEllipsis(self.nik)
self._viewText_inviteName.text = player.nick
self._viewText_playName.text = Utils.TextOmit(play.name, 6, "...")
local config = ExtendManager.GetExtendConfig(play.gameId)
local mode = config:GetGameInfo()
local gamePlay = mode:LoadConfigToDetail(play.config, play.hpData)
self._viewText_playConfig.text = gamePlay
self._viewText_playConfig.text = play.hp_times / 1000 .. "倍," .. gamePlay
end
function M:Destroy()

View File

@ -3,10 +3,8 @@ local tipsWindow = import("..Common.tipsWindow")
local FamilyJoinAndCreate = {}
local function SendJoinRoom(self, roomId, remark)
ViewUtil.ShowModalWait2()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_JoinGroup(tonumber(roomId), function(res)
ViewUtil.CloseModalWait2()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode)
end
@ -45,15 +43,11 @@ function FamilyJoinAndCreate:init(root)
end)
self._view:GetChild('btn_c').onClick:Set(function()
ViewUtil.ShowModalWait2()
fgCtr:FG_GroupList(function(res)
fgCtr:FG_CreateGroup(self.input_name.text, 1, 2, function(res)
ViewUtil.CloseModalWait2()
if res.ReturnCode == 0 then
root.familyType.selectedIndex = 1
Utils.SaveLocalFile("Family_lastID" .. DataManager.SelfUser.account_id, res.Data.info.id)
root:Reflash()
-- root:ConnetFamily(1, DataManager.groups.groupList, true)
root:ConnetFamily(1, DataManager.groups.groupList, true)
else
ViewUtil.ErrorTip(res.ReturnCode, '创建大联盟失败!')
end

View File

@ -3,7 +3,7 @@ local FamilyMsgDiamond = {}
local M = FamilyMsgDiamond
--类型字段1为进入游戏预扣2为结束游戏返还
local TypeTable = { "亲友圈开局游戏预扣", "因游戏结束返还您", "您为亲友圈充值" }
local TypeTable = { "亲友圈开局游戏预扣", "因游戏结束返还您" }
function M.New(data, callback)
setmetatable(M, { __index = BaseWindow })
@ -25,9 +25,7 @@ function M:Init()
end
local fgCtr = ControllerManager.GetController(NewGroupController)
ViewUtil.ShowModalWait2()
fgCtr:FG_Get_Diamond_Msg(self.data.groupId, function(res)
ViewUtil.CloseModalWait2()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取房卡记录失败")
else
@ -38,16 +36,10 @@ function M:Init()
end
function M:msgRenderer(index, obj)
local data = self.msgData[index + 1]
local type = data.diamo_type
obj:GetChild('tex_time').text = os.date("%Y-%m-%d %H:%M:%S", math.floor(data.m_time / 1000))
if type == 2 and data.user_nick and #data.user_nick > 0 then
obj:GetChild('tex_msg').text = string.format("【%s(%s)】用户为亲友圈充值%d房卡剩余%d房卡", data.user_nick, data.uid,
data.diamo_num, data.diamo_cur)
else
obj:GetChild('tex_msg').text = string.format("%s%d房卡剩余%d房卡", TypeTable[data.diamo_type + 1],
data.diamo_num, data.diamo_cur)
end
local data = self.msgData
obj:GetChild('tex_time').text = os.date("%Y-%m-%d %H:%M:%S", math.floor(data[index + 1].m_time / 1000))
obj:GetChild('tex_msg').text = string.format("%s%d房卡剩余%d房卡", TypeTable[data[index + 1].diamo_type + 1],
data[index + 1].diamo_num, data[index + 1].diamo_cur)
end
function M:Show(groupId)

View File

@ -3,9 +3,7 @@ local FamilyMsgRecord = {}
-- m_state : 进入亲友圈(0)退出亲友圈(1),创建亲友圈(2),踢出亲友圈(3)
local function RequestData(self, groupId)
local fgCtr = ControllerManager.GetController(NewGroupController)
ViewUtil.ShowModalWait2()
fgCtr:FG_Get_Msg(groupId, function(res)
ViewUtil.CloseModalWait2()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode)
return

View File

@ -12,10 +12,8 @@ local root = {}
local function ChangeFamilyConfig(data, self)
local fgCtr = ControllerManager.GetController(NewGroupController)
ViewUtil.ShowModalWait2()
fgCtr:FG_UpdateGroupInfo(data,
function(res)
ViewUtil.CloseModalWait2()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "更改失败,请稍后再试")
else
@ -42,7 +40,6 @@ end
local function QuitFamily(self)
local uid = DataManager.SelfUser.account_id
local group = DataManager.groups:get(self.groupId)
local groupName = group.name
local player = group.memberMap[uid]
local tips = "确定退出该亲友圈?"
@ -61,28 +58,12 @@ local function QuitFamily(self)
self.networkSending = true
local fgCtr = ControllerManager.GetController(NewGroupController)
print("发送了退出协议 familyid = ", self.family.id)
ViewUtil.ShowModalWait2()
fgCtr:FG_ExitGroup(self.family.id, function(res)
ViewUtil.CloseModalWait2()
if res.ReturnCode ~= 0 then
return
end
self.networkSending = false
-- if #DataManager.groups.groupList == 0 then
-- local view = ViewManager.GetCurrenView()
-- if view.class == "FamilyMainView" then
-- view._close_destroy = true
-- end
-- ViewManager.ChangeView(ViewManager.View_Lobby)
-- else
if group.lev == 1 then
local win = MsgWindow.new(self._view,
string.format("群主【%s】解散了【%s】亲友圈", DataManager.SelfUser.nick_name, groupName),
MsgWindow.MsgMode.OnlyOk)
win:Show()
end
Broadcast.Send(BroadcastEvent.OnOutFamily2)
-- end
Broadcast.Send(BroadcastEvent.OnOutFamily)
self:Close()
end)
end)
@ -139,11 +120,11 @@ function FamilyMyFamily:Show(groupId)
Broadcast.AddListener(BroadcastEvent.OnJoinsChange, self.ReflashJoinsRedPoint, self)
local fgCtr = ControllerManager.GetController(NewGroupController)
ViewUtil.ShowModalWait2(self._root_view, "正在加载亲友圈数据......")
ViewUtil.ShowModalWait(self._root_view, "正在加载亲友圈数据......")
fgCtr:WEB_FG_GET_GROUP_DETAIL(self.groupId, function(res)
print("收到家族的详细信息")
pt(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode)
end
@ -352,11 +333,9 @@ function FamilyMyFamily:Init()
local fgCtr = ControllerManager.GetController(NewGroupController)
self.networkSending = true
ViewUtil.ShowModalWait2()
fgCtr:FG_SetGroupShow(0, self.family.id, function(res)
print("收到协议M:FG_SetGroupShow")
pt(res)
ViewUtil.CloseModalWait2()
self.networkSending = false
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode)
@ -378,11 +357,9 @@ function FamilyMyFamily:Init()
local fgCtr = ControllerManager.GetController(NewGroupController)
self.networkSending = true
ViewUtil.ShowModalWait2()
fgCtr:FG_SetGroupShow(1, self.family.id, function(res)
print("收到协议M:FG_SetGroupShow")
pt(res)
ViewUtil.CloseModalWait2()
self.networkSending = false
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode)
@ -403,9 +380,7 @@ function FamilyMyFamily:Init()
self.networkSending = true
local fgCtr = ControllerManager.GetController(NewGroupController)
print("发送了退出协议 familyid = ", self.family.id)
ViewUtil.ShowModalWait2()
fgCtr:FG_ExitGroup(self.family.id, function(res)
ViewUtil.CloseModalWait2()
if res.ReturnCode ~= 0 then
return
end

View File

@ -68,7 +68,7 @@ end
function FamilyMyfamilyList:Show()
Broadcast.AddListener(BroadcastEvent.OnJoinsChange, RefalshJoinsRedPoint, self)
Broadcast.AddListener(BroadcastEvent.OnOutFamily2, self.Refalsh, self)
Broadcast.AddListener(BroadcastEvent.OnOutFamily, self.Refalsh, self)
HideMainView(self)
self:Refalsh()
@ -77,7 +77,7 @@ end
function FamilyMyfamilyList:Close()
Broadcast.RemoveListener(BroadcastEvent.OnJoinsChange, RefalshJoinsRedPoint)
Broadcast.RemoveListener(BroadcastEvent.OnOutFamily2, self.Refalsh)
Broadcast.RemoveListener(BroadcastEvent.OnOutFamily, self.Refalsh)
ShowMainView(self)
BaseView.Close(self)

View File

@ -63,9 +63,7 @@ function M:init(url, lev, res)
ViewUtil.ShowOneChooose({ showText = "请输入正确的权限分" })
return
end
ViewUtil.ShowModalWait2()
fgCtr:FG_SetJoinScore(self.groupId, info.uid, tonumber(text) or 0, MJScore, function(res)
ViewUtil.CloseModalWait2()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "修改限制分失败")
else
@ -89,9 +87,7 @@ function M:init(url, lev, res)
ViewUtil.ShowOneChooose({ showText = "请输入正确的权限分" })
return
end
ViewUtil.ShowModalWait2()
fgCtr:FG_SetJoinScore(self.groupId, info.uid, MJScore, tonumber(text) or 0, function(res)
ViewUtil.CloseModalWait2()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "修改限制分失败")
else
@ -120,9 +116,7 @@ function M:init(url, lev, res)
MsgWindow.new(self._root_view, string.format("是否禁止用户(%s)进入房间", info.nick), MsgWindow.MsgMode.OkAndCancel)
_curren_msg.onOk:Add(
function()
ViewUtil.ShowModalWait2()
fgCtr:FG_BanMember(self.groupId, info.uid, 1 - flag_band, 1, function()
ViewUtil.CloseModalWait2()
if res.ReturnCode == 0 then
flag_band = 1 - flag_band
self._view:GetChild('btn_band'):GetController('band').selectedIndex = flag_band
@ -149,9 +143,7 @@ function M:init(url, lev, res)
flag_assistant == 1 and "助理身份" or "设置为助理"), MsgWindow.MsgMode.OkAndCancel)
_curren_msg.onOk:Add(
function()
ViewUtil.ShowModalWait2()
fgCtr:FG_SetManager(self.groupId, info.uid, flag_assistant + 1, function(res)
ViewUtil.CloseModalWait2()
if res.ReturnCode == 0 then
local g = DataManager.groups.groupMap[self.groupId]
local player = g.memberMap[info.uid]

View File

@ -87,9 +87,7 @@ function FamilyNumberRecord.New(root, page)
self._data_leftTime = os.time(timeTable) - index * 86400
self._data_rightTime = os.time(timeTable) - index * 86400 + 86399
self:OnClickSortType()
ViewUtil.ShowModalWait2()
fgCtr:FG_GetConsumeStat(group_id, self._data_leftTime, self._data_rightTime, function(res)
ViewUtil.CloseModalWait2()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取总信息失败")
else
@ -137,9 +135,7 @@ function FamilyNumberRecord.New(root, page)
return
end
--写限制分数
ViewUtil.ShowModalWait2()
fgCtr:FG_SetGroupRecordUpdateDayType(group_id, ctr_limitDay.selectedIndex + 1, function(res)
ViewUtil.CloseModalWait2()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "分数限制分设置失败")
self.ctr_limitDay_isReverting = true
@ -210,9 +206,7 @@ function FamilyNumberRecord.New(root, page)
ViewUtil.ShowOneChooose({ showText = "请输入正确的权限分" })
return
end
ViewUtil.ShowModalWait2()
fgCtr:FG_SetJoinScore(group_id, 0, tonumber(text) or 0, self.MJScore, function(res)
ViewUtil.CloseModalWait2()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "修改限制分失败")
else
@ -242,9 +236,7 @@ function FamilyNumberRecord.New(root, page)
ViewUtil.ShowOneChooose({ showText = "请输入正确的权限分" })
return
end
ViewUtil.ShowModalWait2()
fgCtr:FG_SetJoinScore(group_id, 0, self.MJScore, tonumber(text) or 0, function(res)
ViewUtil.CloseModalWait2()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "修改限制分失败")
else
@ -275,10 +267,8 @@ function FamilyNumberRecord.New(root, page)
local _curren_msg = MsgWindow.new(self._root_view, newReadType == 1 and "确定要将选中的对局设置为未读" or "确定要将选中的对局设置为已读",
MsgWindow.MsgMode.OkAndCancel)
_curren_msg.onOk:Add(function()
ViewUtil.ShowModalWait2()
fgCtr:FG_SetGroupRecordReadStatus(group_id, GetPlatform(), self.military.list, newReadType - 1, self._tagId,
function(res)
ViewUtil.CloseModalWait2()
pt(res)
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "修改战绩阅读状态失败")
@ -332,9 +322,8 @@ function FamilyNumberRecord.New(root, page)
btn_reflash.grayed = false
end)
end)
ViewUtil.ShowModalWait2()
fgCtr:FG_GetConsumeStat(group_id, self._data_leftTime, self._data_rightTime, function(res)
ViewUtil.CloseModalWait2()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取总信息失败")
else
@ -529,8 +518,7 @@ function M:RecordItemDetailRender(round, allDate, rdata, obj)
local btn_play = obj:GetChild("n10")
btn_play.onClick:Set(function()
local group = DataManager.groups:get(self.group_id)
ViewUtil.ShowModalWait2(self._view)
if DataManager.SelfUser.playback[allDate.military_id] ~= nil and DataManager.SelfUser.playback[allDate.military_id][round] ~= nil and tonumber(DataManager.SelfUser.playback[allDate.military_id][round].info.round) == round then
if DataManager.SelfUser.playback[allDate.military_id] ~= nil and DataManager.SelfUser.playback[allDate.military_id][round] ~= nil then
local room = ExtendManager.GetExtendConfig(allDate.game_info.game_id):NewRoom()
DataManager.CurrenRoom = room
room.lev = group.lev
@ -543,15 +531,16 @@ function M:RecordItemDetailRender(round, allDate, rdata, obj)
local main = self:GenaratePlayBack(ViewManager.View_PlayBack, allDate.game_info.game_id)
main._currentId = allDate.military_id
main._currentRound = round
main._totalRound = tonumber(allDate.round)
main._totalRound = tonumber(rdata.round)
main:FillRoomData(DataManager.SelfUser.playback[allDate.military_id][round])
ViewUtil.CloseModalWait2()
else
ViewUtil.ShowModalWait(self._view)
local _data = {}
_data["military_id"] = allDate.military_id
_data["round"] = tostring(round)
local loddyCtr1 = ControllerManager.GetController(LoddyController)
loddyCtr1:RequestPlayBack(_data, function(code, data)
ViewUtil.CloseModalWait()
if code == 0 then
if DataManager.SelfUser.playback[allDate.military_id] ~= nil then
DataManager.SelfUser.playback[allDate.military_id][round] = data
@ -567,10 +556,9 @@ function M:RecordItemDetailRender(round, allDate, rdata, obj)
main._totalRound = tonumber(allDate.round)
main:FillRoomData(data)
main._room.lev = group.lev
ViewUtil.CloseModalWait2()
elseif code == 25 then
ViewUtil.ErrorTip(-1, "回放未找到!")
ViewUtil.CloseModalWait2()
-- btn_play_back.grayed = true
end
end, allDate.game_info)
end
@ -616,11 +604,9 @@ function M:OnClickSortType()
end
function M:RecursionGetNumberRank(fgCtr, index, round, win, cost)
ViewUtil.ShowModalWait2()
fgCtr:FG_GetMemberRank_2(self.group_id, 0, index * 67, 67, self._data_leftTime, self._data_rightTime,
self._data_seletedType, self._data_sortType,
function(res)
ViewUtil.CloseModalWait2()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取排行榜失败")
return

View File

@ -139,10 +139,8 @@ function M:ShowNumberRecord()
end
function M:RecursionRecord(fgCtr, index, uid, leftTime, rightTime)
ViewUtil.ShowModalWait2()
fgCtr:FG_GetGroupRecordSpe2(self.group_id, GetPlatform(), uid, 0, index * 60, 60, leftTime, rightTime, 0,
function(res)
ViewUtil.CloseModalWait2()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "查看个人战绩失败")
self.visible = false
@ -210,8 +208,7 @@ function M:RecordItemDetailRender(round, allDate, rdata, obj)
local btn_play = obj:GetChild("n10")
btn_play.onClick:Set(function()
local group = self.currenGroup
ViewUtil.ShowModalWait2(self._view)
if DataManager.SelfUser.playback[allDate.military_id] ~= nil and DataManager.SelfUser.playback[allDate.military_id][round] ~= nil and tonumber(DataManager.SelfUser.playback[allDate.military_id][round].info.round) == round then
if DataManager.SelfUser.playback[allDate.military_id] ~= nil and DataManager.SelfUser.playback[allDate.military_id][round] ~= nil then
local room = ExtendManager.GetExtendConfig(allDate.game_info.game_id):NewRoom()
DataManager.CurrenRoom = room
room.lev = group.lev
@ -224,15 +221,16 @@ function M:RecordItemDetailRender(round, allDate, rdata, obj)
local main = self:GenaratePlayBack(ViewManager.View_PlayBack, allDate.game_info.game_id)
main._currentId = allDate.military_id
main._currentRound = round
main._totalRound = tonumber(allDate.round)
main._totalRound = tonumber(rdata.round)
main:FillRoomData(DataManager.SelfUser.playback[allDate.military_id][round])
ViewUtil.CloseModalWait2()
else
ViewUtil.ShowModalWait(self._view)
local _data = {}
_data["military_id"] = allDate.military_id
_data["round"] = tostring(round)
local loddyCtr1 = ControllerManager.GetController(LoddyController)
loddyCtr1:RequestPlayBack(_data, function(code, data)
ViewUtil.CloseModalWait()
if code == 0 then
if DataManager.SelfUser.playback[allDate.military_id] ~= nil then
DataManager.SelfUser.playback[allDate.military_id][round] = data
@ -248,10 +246,9 @@ function M:RecordItemDetailRender(round, allDate, rdata, obj)
main._totalRound = tonumber(allDate.round)
main:FillRoomData(data)
main._room.lev = group.lev
ViewUtil.CloseModalWait2()
elseif code == 25 then
ViewUtil.ErrorTip(-1, "回放未找到!")
ViewUtil.CloseModalWait2()
-- btn_play_back.grayed = true
end
end, allDate.game_info)
end

View File

@ -18,9 +18,7 @@ local function charge(num, self)
_curren_msg.onOk:Add(
function()
local fgCtr = ControllerManager.GetController(NewGroupController)
ViewUtil.ShowModalWait2()
fgCtr:FG_Recharge_Diamo(self.groupId, num, function(res)
ViewUtil.CloseModalWait2()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "重置房卡操作失败")
return
@ -69,16 +67,16 @@ function FamilyRoomCard.New()
obj:GetController("cColor").selectedIndex = data[_idx].colorIndex
obj.onClick:Set(function()
-- if Instance.group and Instance.group.lev ~= 1 then
-- local _curren_msg =
-- MsgWindow.new(
-- Instance._root_view,
-- "只有管理员可以充值",
-- MsgWindow.MsgMode.OnlyOk
-- )
-- _curren_msg:Show()
-- return
-- end
if Instance.group and Instance.group.lev ~= 1 then
local _curren_msg =
MsgWindow.new(
Instance._root_view,
"只有管理员可以充值",
MsgWindow.MsgMode.OnlyOk
)
_curren_msg:Show()
return
end
if DataManager.SelfUser.diamo < num then
local _curren_msg =
MsgWindow.new(

View File

@ -76,14 +76,12 @@ function PlayEditView:Init()
obj:GetChild('Label_details'):GetChild('title').text = mode:LoadConfigToDetail(playList[index].config,
playList[index].hpData)
obj:GetChild('text_playName').emojies = EmojiDitc.EmojiesDitc
obj:GetChild('text_playName').text = playList[index].name
obj:GetChild('text_playName').text = Utils.TextOmit(playList[index].name, 6, "...")
obj:GetController('type').selectedIndex = 1
obj:GetChild('btn_del').onClick:Set(function()
ViewUtil.ShowTwoChooose("是否要删除该玩法", function()
local fgCtr = ControllerManager.GetController(NewGroupController)
ViewUtil.ShowModalWait2()
fgCtr:FG_DelPlay(self.groupId, playList[index].id, function(res)
ViewUtil.CloseModalWait2()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "删除玩法操作失败")
return

View File

@ -124,7 +124,6 @@ function FamilyView.new()
local self = setmetatable({}, { __index = M })
self.class = 'FamilyMainView'
self._full = true
self._full_offset = false
-- self._close_destroy = false
self._fristRoom = true
self:init('ui://Family/Main')
@ -134,6 +133,7 @@ end
function M:init(url)
BaseView.InitView(self, url)
-- self._close_destroy = false
self._full_offset = false
local view = self._view
self.lastTime = os.time()
@ -161,7 +161,7 @@ function M:init(url)
self.cChatRoomRedPoint = self.btn_chatRoom:GetController("cRedPoint")
self:InitCloseClick()
self._view:GetController('listFamily').selectedIndex = -1
--[[
fgCtr:FG_GroupList(function(res)
print("获取所有圈信息")
@ -229,20 +229,17 @@ function M:init(url)
local group = DataManager.groups.groupList[j]
obj:GetChild("title").emojies = EmojiDitc.EmojiesDitc
obj.text = Utils.TextOmit(group.name, 6, "...")
obj.onClick:Set(function()
obj.onClick:Add(function()
if self._group ~= nil and group.id == self._group.id then
--ViewUtil.ErrorTip(-1,"已在家族中")
return
end
self._view:GetController('listFamily').selectedIndex = i
self:RefNotice(group.id)
self.curGroupIndex = j
self:ConnetFamily(j, DataManager.groups.groupList)
end)
end
self.familyType.selectedIndex = 1
self._view:GetChild('btn_showALlStartRoom').onClick:Set(function()
@ -271,13 +268,6 @@ function M:init(url)
self._data_falshRoomTime = 20
end)
end
local btn_inviteFriends = self._view:GetChild('btn_inviteFriends')
if btn_inviteFriends then
btn_inviteFriends.onClick:Set(function()
self:ShareWx()
end)
end
end
function M:Reflash()
@ -306,7 +296,6 @@ function M:Reflash()
end
local btn = self.list_family:GetChildAt(chooseIndex - 1)
btn.onClick:Call()
self._view:GetController('listFamily').selectedIndex = chooseIndex - 1
else
self:JoinFamily(true)
self.btn_chatRoom.visible = false
@ -335,7 +324,7 @@ function M:InitCloseClick()
end
function M:ShareWx()
local familyInviteFamilyView = FamilyInviteFamilyView.new(self._group)
local familyInviteFamilyView = FamilyInviteFamilyView.new()
familyInviteFamilyView:Show()
end
@ -473,7 +462,7 @@ function M:ShowAllRank()
self._ViewChild_AllRank = FamilAllRank.New(self, self._group.id)
return
end
self._ViewChild_AllRank:ShouRanks(self, self._group.id)
self._ViewChild_AllRank:ShouRanks()
end
function M:OpenAllNumber(group)
@ -540,7 +529,7 @@ function M:ChangeNumber(fgCtr, group_id, limit, num, minus_only, sort_type)
self.members = SortMembers(self._group.members) --local members = self._group.members
print("FG_GroupMembers12")
pt(self._group.members)
--ViewUtil:CloseModalWait2()
--ViewUtil:CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取成员列表失败")
else
@ -577,6 +566,7 @@ end
function M:EnterGroup(fgCtr, id)
fgCtr:FG_EnterGroup(id, function(res)
ViewUtil:CloseModalWait()
ViewUtil:CloseModalWait2()
if res.ReturnCode ~= 0 then
if res.ReturnCode == 101 then
@ -604,7 +594,10 @@ function M:OnEnterGroupCallBack()
self:UpdateFamilyRoom(fgCtr, self._group.id)
ViewUtil.CloseModalWait2()
--ViewUtil.ShowModalWait(self._root_view, "正在加载亲友圈权限中......")
--self:ChangeOther()
ViewUtil.CloseModalWait()
self:ReflashChatRoomRedPoint()
@ -648,7 +641,7 @@ function M:UpdateFamilyRoom(fgCtr, id)
show_num = #playList + #readyRoom
self._view:GetChild('n364').text = string.format("已开启***桌游戏")
end
self._view:GetChild('btn_showALlStartRoom'):GetController('isOpen').selectedIndex = self._group.isOpenStartRoom or 0
self._view:GetChild('btn_showALlStartRoom'):GetController('isOpen').selectedIndex = self._group.isOpenStartRoom
list_room.itemRenderer = function(index, obj)
if index < #readyRoom then
local newIndex = index + 1
@ -801,7 +794,7 @@ function M:FillSameRoomInfo(obj, type, playInfo)
obj:GetChild('Label_gameRule').title = gamePlay
local roomName = playInfo.name
roomName = roomName
roomName = Utils.TextOmit(roomName, 6, "")
obj:GetChild('game_type').emojies = EmojiDitc.EmojiesDitc
obj:GetChild('game_type').text = string.format(" (%s) %s", playInfo.game_name, roomName)
obj:GetChild('btn_joinGame'):GetController('type').selectedIndex = type
@ -850,7 +843,7 @@ function M:JieSanRomm(groupId, roomId)
)
_curren_msg.onOk:Add(
function()
ViewUtil.ShowModalWait2(self._root_view)
ViewUtil.ShowModalWait(self._root_view)
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_RemoveRoom(
@ -860,7 +853,7 @@ function M:JieSanRomm(groupId, roomId)
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, '删除房间失败!')
return
@ -878,26 +871,42 @@ function M:ReflashFamilyList()
end
function M:ConnetFamily(index, groups)
ViewUtil.ShowModalWait2(self._root_view, "正在加载成员列表中......")
ViewUtil.ShowModalWait(self._root_view, "正在加载成员列表中......")
if self._group then
FamilyOffline(self._group.id, self)
end
UpdateBeat:Remove(self.OnUpdate, self)
ViewUtil:CloseModalWait2()
ViewUtil:CloseModalWait()
self._group = DataManager.groups:get(groups[index].id)
DataManager.CurrenGroup = self._group
self._view:GetChild('text_familyId').text = self._group.id
self._view:GetController('lev').selectedIndex = self._group.lev - 1
print("===================================self._group")
pt(self._group)
self._roomNum = self._group.room_num
local fgCtr = ControllerManager.GetController(NewGroupController)
ViewUtil.ShowModalWait2(self._root_view, "正在进入亲友圈......")
ViewUtil.ShowModalWait(self._root_view, "正在进入亲友圈......")
Utils.SaveLocalFile("Family_lastID" .. DataManager.SelfUser.account_id, self._group.id)
self:EnterGroup(fgCtr, self._group.id)
--[[
ViewUtil.ShowModalWait(self._root_view, "正在加载亲友圈权限中......")
self:ChangeOther(tonumber(self._group.lev) + 1)
allLoad = 1
ViewUtil.ShowModalWait(self._root_view, "正在加载成员列表中......")
allLoad = allLoad +
self:ChangeNumber(fgCtr, self._group.id, 0, self._group.total_member_num, false,
1)
ViewUtil.ShowModalWait(self._root_view, "正在加载房间列表中......")
allLoad = allLoad + self:EnterGroup(fgCtr, self._group.id)
]]
UpdateBeat:Add(self.OnUpdate, self)
if self._group.isOpenChatRoom == 1 then

View File

@ -1,118 +0,0 @@
local IdPasswordLoginView = {}
local M = IdPasswordLoginView
function IdPasswordLoginView.new(type, callback)
setmetatable(M, { __index = BaseWindow })
local self = setmetatable({}, { __index = M })
self.class = "IdPasswordLoginView"
self._callback = callback
self._close_destroy = true
self.codeType = type
self:init("ui://Login/IDLogin")
return self
end
function M:init(url)
BaseWindow.init(self, url)
local btn_login = self._view:GetChild("btn_login")
btn_login.onClick:Add(handler(self, function()
self:login()
end))
end
function M:login()
if self.codeType == 0 then
local uid = self:CheckInputId()
if not uid then
return
end
local loginCtr = ControllerManager.GetController(LoginController)
local passwd = self:CheckInputPasswd()
if not passwd then
return
end
ViewUtil.ShowModalWait2()
loginCtr:IdPasswordLogin(uid, passwd, function(res)
ViewUtil.CloseModalWait2()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "ID或者密码错误")
return
end
self._callback(res)
end)
else
---[[
--直接登入
local loginCtr = ControllerManager.GetController(LoginController)
local phone = self:CheckInputPhone()
if not phone then
return
end
local code = self:CheckInputPhoneCode()
if not code then
return
end
loginCtr:PhoneLogin(phone, code, function(res)
if res.ReturnCode ~= 0 then
local msg_txt = "验证码错误"
if (Table_Error_code_Map[res.ReturnCode] ~= nil) then
msg_txt = Table_Error_code_Map[res.ReturnCode].note
end
local guo_msg = MsgWindow.new(self._root_view, msg_txt, MsgWindow.MsgMode.OnlyOk)
guo_msg._new_hide = false
guo_msg:Show()
return
end
self._callback(res)
self:Destroy()
end)
end
end
function M:Destroy()
getmetatable(M).__index.Destroy(self)
end
function M:CheckInputId()
local uid = self._view:GetChild("phone_input").text
if not (string.len(uid) >= 6) then
ViewUtil.ShowTips("请输入正确的用户ID")
return
end
return uid
end
function M:CheckInputPasswd()
local tex_passwd = self._view:GetChild("tex_passwd").text
if string.len(tex_passwd) < 8 then
ViewUtil.ShowTips("密码最少八位")
return
end
return tex_passwd
end
function M:CheckInputPhone()
local phone = self._view:GetChild("phone_input").text
if not (string.len(phone) == 11) then
ViewUtil.ShowTips("请输入正确的电话号码")
return
end
return phone
end
function M:CheckInputPhoneCode()
local code = self._view:GetChild("code_input").text
if string.len(code) ~= 6 then
ViewUtil.ShowTips("请输入正确的验证码")
return
end
return code
end
return M

View File

@ -185,7 +185,7 @@ function M:OnCreateRoom(mode_data)
end
ViewUtil.ShowModalWait2(self._root_view, "正在创建房间...")
ViewUtil.ShowModalWait(self._root_view, "正在创建房间...")
loddyCtr:CreateRoom(game_id, { _data = _data, hpData = self.hpData, name = name }, function(res)
self:__OnCreateRoomAction(res)
end)
@ -193,7 +193,7 @@ function M:OnCreateRoom(mode_data)
end
function M:__OnCreateRoomAction(response)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if (response.ReturnCode == -2) then
return
end

View File

@ -3,7 +3,7 @@ local DiamondRecord = {}
local M = DiamondRecord
--类型字段1为进入游戏预扣2为结束游戏返还
local TypeTable = { "亲友圈开局游戏预扣", "因游戏结束返还您", "您为亲友圈充值" }
local TypeTable = { "亲友圈开局游戏预扣", "因游戏结束返还您" }
function M.New(data, callback)
setmetatable(M, { __index = BaseWindow })
@ -26,35 +26,13 @@ function M:Init()
end
--大厅的请求
local lobbyCtr = ControllerManager.GetController(LoddyController)
ViewUtil.ShowModalWait2()
lobbyCtr:FG_Get_Diamond_Msg(function(res)
ViewUtil.CloseModalWait2()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取房卡记录失败")
else
self.msgData = res.Data.messages
list_msg.numItems = #self.msgData
end
end)
end
function M:msgRenderer(index, obj)
local data = self.msgData[index + 1]
local type = data.diamo_type
obj:GetChild('tex_time').text = os.date("%Y-%m-%d %H:%M:%S", math.floor(data.m_time / 1000))
if type == 2 and data.user_nick and #data.user_nick > 0 then
obj:GetChild('tex_msg').text = string.format("【%s(%s)】用户为%s亲友圈充值%d房卡剩余%d房卡", data.user_nick, data.uid,
(data.group_name and #data.group_name > 0) and string.format("【%s(%s)】", data.group_name, data.group_id) or
"",
data.diamo_num, data.diamo_cur)
elseif type == 1 and data.group_name and #data.group_name > 0 then
obj:GetChild('tex_msg').text = string.format("您解散了【%s(%s)】亲友圈,返还您%d房卡剩余%d房卡", data.group_name, data.group_id,
data.diamo_num, data.diamo_cur)
else
obj:GetChild('tex_msg').text = string.format("%s%d房卡剩余%d房卡", TypeTable[data.diamo_type + 1],
data.diamo_num, data.diamo_cur)
end
local data = self.msgData
obj:GetChild('tex_time').text = os.date("%Y-%m-%d %H:%M:%S", math.floor(data[index + 1].m_time / 1000))
obj:GetChild('tex_msg').text = string.format("%s%d房卡剩余%d房卡", TypeTable[data[index + 1].diamo_type + 1],
data[index + 1].diamo_num, data[index + 1].diamo_cur)
end
function M:Show(groupId)

View File

@ -28,13 +28,13 @@ function M:init(url)
ViewUtil.ErrorTip(nil, "昵称不能为空")
return
end
ViewUtil.ShowModalWait2(self._root_view, "正在连接服务器")
ViewUtil.ShowModalWait(self._root_view, "正在连接服务器")
local loddyctr = ControllerManager.GetController(LoddyController)
local _data = {}
_data.type = 7
_data.nick = nick
loddyctr:UpdateUserInfo(_data,function( res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if (res.ReturnCode ==0) then
DataManager.SelfUser.nick_name = nick
else

View File

@ -64,10 +64,10 @@ function M:OnNumButtonAction(context)
end
function M:JoinRoom(str)
ViewUtil.ShowModalWait2(self._root_view, "正在加入房间...")
ViewUtil.ShowModalWait(self._root_view, "正在加入房间...")
local boddyCtr = ControllerManager.GetController(LoddyController)
boddyCtr:JoinRoom(str, function(response)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if response.ReturnCode == -2 then
self:JoinRoom(str)
return

View File

@ -83,13 +83,13 @@ function M:fill_user_info()
local ctr_invte = item_invte:GetController("c1")
ctr_invte.selectedIndex = invitation
ctr_invte.onChanged:Set(function ()
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local loddyctr = ControllerManager.GetController(LoddyController)
local _data = {}
_data.type =5
_data.invitation = ctr_invte.selectedIndex
loddyctr:UpdateUserInfo(_data,function( res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if (res.ReturnCode ==0) then
DataManager.SelfUser.invitation = ctr_invte.selectedIndex
else
@ -118,6 +118,7 @@ function M:fill_user_info()
end)
end
function M:ChangeToLogin()
local _curren_msg = MsgWindow.new(self._root_view, '您是否退出当前账号?', MsgWindow.MsgMode.OkAndCancel)
_curren_msg.onOk:Add(function()

View File

@ -1,5 +1,4 @@
--设置窗口对象
local PasswordUpdateView = import(".PasswordUpdateView")
local LobbyPlayerInfoView = {}
@ -12,7 +11,6 @@ function LobbyPlayerInfoView.new(user, callback)
self._close_destroy = true
self.user = user
self._callback = callback
self._loadAll = 0
self:init('ui://Lobby/PlayerInfo')
return self
end
@ -23,6 +21,11 @@ function M:init(url)
local view = self._view
local user = self.user;
-- print("================phone=====================")
for k, v in pairs(user) do
-- print(string.format("k:%s|v:%s", k, v))
end
--show
view:GetChild('name').text = user.nick_name
view:GetChild('phone').text = user.phone
@ -30,25 +33,11 @@ function M:init(url)
view:GetChild('diamo').text = user.diamo
view:GetChild('sex').text = user.sex == 1 and "" or ""
view:GetController('ctr_sex').selectedIndex = user.sex - 1
view:GetChild('ip').text = DataManager.SelfUser.currenIp
ImageLoad.Load(DataManager.SelfUser.head_url, view:GetChild("btn_PlayerHead")._iconObject)
if DataManager.SelfUser.currenIp then
self._loadAll = self._loadAll + 1
else
GameApplication.Instance:GetPublicIP(function(ip)
DataManager.SelfUser.currenIp = ip
view:GetChild('ip').text = DataManager.SelfUser.currenIp
self:CheckAllload()
end)
end
--change
view:GetChild('choose_id').text = user.account_id
view:GetChild('choose_diamo').text = user.diamo
-- if user.phone and #user.phone == 11 then
-- self._view:GetChild('btn_changeInfo').visible = false
-- self._view:GetChild('btn_changeInfo').touchable = false
-- end
self.Lable_name = view:GetChild('Lable_name'):GetChild('text')
self.Lable_name.text = user.nick_name
self.group_sex = view:GetController('group_sex')
@ -56,8 +45,10 @@ function M:init(url)
self.Lable_phone = view:GetChild('Lable_phone'):GetChild('text')
local bind = view:GetController('bind')
if user.phone then
bind.selectedIndex = 1
self.Lable_phone.text = user.phone
else
bind.selectedIndex = 0
self.Lable_phone.text = ""
end
view:GetChild('btn_headChange').onClick:Add(function()
@ -71,6 +62,7 @@ function M:init(url)
view:GetChild('btn_bindPhone').onClick:Add(function()
local guo_msg = MsgWindow.new(self._root_view, "绑定页面正在优化中,请稍后绑定", MsgWindow.MsgMode.OnlyOk)
guo_msg.onOk(function()
bind.selectedIndex = 1
end)
guo_msg:Show()
end)
@ -112,31 +104,6 @@ function M:init(url)
end
end)
end)
local pswType = DataManager.SelfUser.havaPsw and 1 or 0
local btn_changeInfo = self._view:GetChild('btn_changeInfo')
btn_changeInfo:GetController('type').selectedIndex = pswType
btn_changeInfo.onClick:Set(function()
local passwordUpdateView = PasswordUpdateView.new(pswType, function(res)
pswType = DataManager.SelfUser.havaPsw and 1 or 0
btn_changeInfo:GetController('type').selectedIndex = pswType
end)
passwordUpdateView:Show()
end)
local loddyCtr1 = ControllerManager.GetController(LoddyController)
loddyCtr1:GetUserInfo(function(res)
if res.ReturnCode == 0 then
self:CheckAllload()
end
end)
end
function M:CheckAllload()
self._loadAll = self._loadAll + 1
if self._loadAll >= 2 then
self:Show()
end
end
return M

View File

@ -157,7 +157,7 @@ function M:PlayerScoreRenderer(index, obj)
_data["round"] = tostring(round)
local loddyCtr1 = ControllerManager.GetController(LoddyController)
loddyCtr1:RequestPlayBack(_data, function(code, data)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if code == 0 then
if DataManager.SelfUser.playback[allDate.military_id] ~= nil then
DataManager.SelfUser.playback[allDate.military_id][round] = data

View File

@ -20,7 +20,7 @@ function M:init(url)
obj.text = info.service_link
obj:GetChild('text_title').text = string.format("%s", info.service_name)
obj:GetChild('btn_copy').onClick:Set(function()
GameApplication.Instance:CopyToClipboard(info.service_link)
GameApplication.Instance:CopyToClipboard(info.service_link) --湘北
ViewUtil.ErrorTip(-1, "复制成功")
end)
end

View File

@ -73,15 +73,8 @@ function M:init(url)
_btn_logout.onClick:Set(function()
local _curren_msg = MsgWindow.new(self._root_view, '您是否退出当前账号?', MsgWindow.MsgMode.OkAndCancel)
_curren_msg.onOk:Add(function()
-- PlayerPrefs.DeleteKey('session_id')
-- PlayerPrefs.Save()
local phone = "11"
if DataManager.SelfUser.phone and #DataManager.SelfUser.phone == 11 then
phone = DataManager.SelfUser.phone
end
PlayerPrefs.SetString("session_phone", phone)
PlayerPrefs.DeleteKey('session_id')
PlayerPrefs.Save()
print("lingmeng log", phone)
RestartGame()
end)
_curren_msg:Show()

View File

@ -56,16 +56,14 @@ function M:init(url)
-- print(DataManager.SelfUser.diamo)
-- self.UpdateDiamo()
--暂时用这个发送协议
-- local uid = DataManager.SelfUser.account_id
-- fgCtr:FG_SetFamilyDiamond(self.groupID, uid, SHOP_LIST[index + 1].num, function(res)
-- if res.ReturnCode ~= 0 then
-- ViewUtil.ErrorTip(res.ReturnCode, "重置房卡失败")
-- else
local uid = DataManager.SelfUser.account_id
fgCtr:FG_SetFamilyDiamond(self.groupID, uid, SHOP_LIST[index + 1].num, function(res)
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "重置房卡失败")
else
-- end
-- end)
local pay_url = "https://ttfenfa.com/"
UnityEngine.Application.OpenURL(pay_url)
end
end)
end
end)
end

View File

@ -1,157 +0,0 @@
local PasswordUpdateView = {}
local M = PasswordUpdateView
function PasswordUpdateView.new(type, callback)
setmetatable(M, { __index = BaseWindow })
local self = setmetatable({}, { __index = M })
self.class = "PasswordUpdateView"
self._callback = callback
self._close_destroy = true
-- self.codeType = type
self.codeType = 0
self:init("ui://Lobby/PasswordSet")
return self
end
function M:init(url)
BaseWindow.init(self, url)
self.login_type = self._view:GetController("type")
self.login_type.selectedIndex = self.codeType
local btn_login = self._view:GetChild("btn_login")
btn_login.onClick:Add(handler(self, function()
self:Bind()
end))
end
function M:Bind()
if self.codeType == 0 then
local passwd = self:CheckInputPasswd()
if not passwd then
return
end
local loddyctr = ControllerManager.GetController(LoddyController)
local _data = {}
_data.password = passwd
_data.type = 3
ViewUtil.ShowModalWait2()
loddyctr:UpdateUserInfo(_data, function(res)
ViewUtil.CloseModalWait2()
if (res.ReturnCode == 0) then
DataManager.SelfUser.havaPsw = true
self.login_type.selectedIndex = 1
if self._callback then self._callback() end
else
ViewUtil.ErrorTip(res.ReturnCode, "提交失败")
end
self:Close()
end)
else
local myPwd = self:CheckInputPasswd2()
if not myPwd then
return
end
local passwd = self:CheckInputPasswd()
if not passwd then
return
end
local loddyctr = ControllerManager.GetController(LoddyController)
local _data = {}
_data.password = passwd
_data.type = 3
ViewUtil.ShowModalWait2()
loddyctr:UpdateUserInfo(_data, function(res)
ViewUtil.CloseModalWait2()
if (res.ReturnCode == 0) then
DataManager.SelfUser.havaPsw = true
self.login_type.selectedIndex = 1
if self._callback then self._callback() end
else
ViewUtil.ErrorTip(res.ReturnCode, "提交失败")
end
self:Close()
end)
end
end
function M:Destroy()
UpdateBeat:Remove(self.OnUpdate, self)
getmetatable(M).__index.Destroy(self)
end
function M:CheckInputId()
local uid = self._view:GetChild("phone_input").text
if not (string.len(uid) >= 6) then
ViewUtil.ShowTips("请输入正确的用户ID")
return
end
return uid
end
function M:CheckInputPasswd2()
local tex_passwd = self._view:GetChild("my_input").text
if string.len(tex_passwd) < 8 then
ViewUtil.ShowTips("旧密码最少八位")
return
end
return tex_passwd
end
function M:CheckInputPasswd()
local tex_frist_passwd = self._view:GetChild("phone_input").text
local tex_confrim_passwd = self._view:GetChild("code_input").text
if string.len(tex_frist_passwd) < 8 then
ViewUtil.ShowTips("密码最少八位")
return
end
local flg_xiaozimu = false
local flg_dazimu = false
local fla_shuzi = false
for i = 1, #tex_frist_passwd do
local oneChar = string.sub(tex_frist_passwd, 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) and fla_shuzi) then
ViewUtil.ShowTips("密码必须同时包含字母和数字")
return
end
if tex_frist_passwd ~= tex_confrim_passwd then
ViewUtil.ShowTips("确认密码必须和输入密码保持一致")
return
end
return tex_confrim_passwd
end
function M:CheckInputPhone()
local phone = self._view:GetChild("phone_input").text
if not (string.len(phone) == 11) then
ViewUtil.ShowTips("请输入正确的电话号码")
return
end
return phone
end
function M:CheckInputPhoneCode()
local code = self._view:GetChild("code_input").text
if string.len(code) ~= 6 then
ViewUtil.ShowTips("请输入正确的验证码")
return
end
return code
end
return M

View File

@ -80,14 +80,14 @@ function M:Bind()
if not code then
return
end
ViewUtil.ShowModalWait2(self._root_view, "正在提交...")
ViewUtil.ShowModalWait(self._root_view,"正在提交...")
local loddyctr = ControllerManager.GetController(LoddyController)
local _data = {}
_data.type =4
_data.phone = phone
_data.code = code
loddyctr:UpdateUserInfo(_data,function( res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if (res.ReturnCode ==0) then
DataManager.SelfUser.phone = phone
if self._callback then self._callback() end

View File

@ -1,187 +0,0 @@
local PhoneLoginView = {}
local M = PhoneLoginView
function PhoneLoginView.new(type, callback)
setmetatable(M, { __index = BaseWindow })
local self = setmetatable({}, { __index = M })
self.class = "PhoneLoginView"
self._callback = callback
self._close_destroy = true
self.codeType = type
self._new_hide = false
self:init("ui://Lobby/PhnoeLogin")
return self
end
function M:init(url)
BaseWindow.init(self, url)
self.login_type = self._view:GetController("type")
self.login_type.selectedIndex = self.codeType;
self.code = self._view:GetController("code")
local btn_login = self._view:GetChild("btn_login")
btn_login.onClick:Add(handler(self, function()
self:login()
end))
local btn_getCode = self._view:GetChild("btn_code_send")
btn_getCode.onClick:Add(handler(self, function()
self:getCode()
end))
if DataManager.SelfUser._data_codeTiem and DataManager.SelfUser._data_codeTiem - os.time() > 0 then
self._left_time = DataManager.SelfUser._data_codeTiem - os.time()
self._view:GetChild("phone_input").text = DataManager.SelfUser._data_codephone
UpdateBeat:Add(self.OnUpdate, self)
self.code.selectedIndex = 1
end
end
function M:login()
if self.codeType == 0 then
local uid = self:CheckInputId()
if not uid then
return
end
ViewUtil.ShowModalWait(self._root_view, "正在登录游戏...")
local loginCtr = ControllerManager.GetController(LoddyController)
local passwd = self:CheckInputPasswd()
if not passwd then
return
end
loginCtr:IdPasswordLogin(uid, passwd, function(res)
ViewUtil.CloseModalWait2()
if res.ReturnCode ~= 0 then
if res.ReturnCode ~= 0 then
local guo_msg = MsgWindow.new(self._root_view, "验证码已发送", MsgWindow.MsgMode.OnlyOk)
guo_msg._new_hide = false
guo_msg:Show()
return
end
return
end
self._callback(res)
end)
else
---[[
--直接登入
local loginCtr = ControllerManager.GetController(LoddyController)
local phone = self:CheckInputPhone()
if not phone then
return
end
local code = self:CheckInputPhoneCode()
if not code then
return
end
loginCtr:PhoneBind(phone, code, function(res)
if res.ReturnCode ~= 0 then
local msg_txt = "验证码错误"
if (Table_Error_code_Map[res.ReturnCode] ~= nil) then
msg_txt = Table_Error_code_Map[res.ReturnCode].note
end
local guo_msg = MsgWindow.new(self._root_view, msg_txt, MsgWindow.MsgMode.OnlyOk)
guo_msg._new_hide = false
guo_msg:Show()
return
end
self._callback(res)
self:Destroy()
end)
end
end
function M:getCode()
local phone = self:CheckInputPhone()
if not phone then
self.code.selectedIndex = 0
return
end
--发送电话给后端
ViewUtil:ShowModalWait2(0.1)
local loginCtr = ControllerManager.GetController(LoginController)
loginCtr:GetPhoneCode(phone, function(res)
ViewUtil.CloseModalWait2()
if res.ReturnCode == 0 then
self.phone = phone
self._left_time = 60
DataManager.SelfUser._data_codeTiem = os.time() + 60
DataManager.SelfUser._data_codephone = phone
UpdateBeat:Add(self.OnUpdate, self)
else
if res.ReturnCode == 1 then
self._left_time = 15
DataManager.SelfUser._data_codeTiem = os.time() + 15
DataManager.SelfUser._data_codephone = phone
UpdateBeat:Add(self.OnUpdate, self)
ViewUtil.ErrorTip(self._root_view, "验证码还在有效期")
else
self.code.selectedIndex = 0
ViewUtil.ErrorTip(self._root_view, "网络超时,请重新获取验证码")
end
end
end)
end
function M:OnUpdate()
local deltaTime = Time.deltaTime
local _left_time = self._left_time
if (_left_time > 0) then
_left_time = _left_time - deltaTime
_left_time = math.max(0, _left_time)
local leftTime = math.floor(_left_time)
self._view:GetChild("code_send_text").text = tostring(leftTime)
self._left_time = _left_time
else
self.code.selectedIndex = 0
UpdateBeat:Remove(self.OnUpdate, self)
end
end
function M:Destroy()
BaseWindow.Destroy(self)
UpdateBeat:Remove(self.OnUpdate, self)
end
function M:CheckInputId()
local uid = self._view:GetChild("phone_input").text
if not (string.len(uid) >= 6) then
ViewUtil.ShowTips("请输入正确的用户ID")
return
end
return uid
end
function M:CheckInputPasswd()
local tex_passwd = self._view:GetChild("tex_passwd").text
if string.len(tex_passwd) < 6 then
ViewUtil.ShowTips("密码最少六位")
return
end
return tex_passwd
end
function M:CheckInputPhone()
local phone = self._view:GetChild("phone_input").text
if not (string.len(phone) == 11) then
ViewUtil.ShowTips("请输入正确的电话号码")
return
end
return phone
end
function M:CheckInputPhoneCode()
local code = self._view:GetChild("code_input").text
if string.len(code) ~= 6 then
ViewUtil.ShowTips("请输入正确的验证码")
return
end
return code
end
return M

View File

@ -83,13 +83,22 @@ function M:Bind()
end
local _data = {}
ViewUtil.ShowModalWait2(self._root_view, "正在提交...")
-- if self.ctr_update.selectedIndex == 1 then
-- local code = self:CheckInputCode()
-- if not code then
-- return
-- end
-- _data.phone = DataManager.SelfUser.phone
-- _data.code = code
-- end
ViewUtil.ShowModalWait(self._root_view, "正在提交...")
local loddyctr = ControllerManager.GetController(LoddyController)
_data.password = password
_data.type = 3
loddyctr:UpdateUserInfo(_data, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if (res.ReturnCode == 0) then
DataManager.SelfUser.password = "123"
if self._callback then self._callback() end

View File

@ -45,7 +45,7 @@ function M:init(url)
ViewUtil.ShowModalWait(self._root_view)
local loddyCtr1 = ControllerManager.GetController(LoddyController)
loddyCtr1:RequestRecordList(function(result)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if self._is_destroy then
return
end
@ -245,7 +245,7 @@ function M:InitRecord1(recordList, develop_tool)
ShareScreenShotWithOption(function()
result_view:Dispose()
end)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
break
end
coroutine.wait(1)
@ -338,7 +338,7 @@ function M:ShowRecord2(playback_id, room_type, room_id, room_time, item_score, g
_data["round"] = tostring(i)
local loddyCtr1 = ControllerManager.GetController(LoddyController)
loddyCtr1:RequestPlayBack(_data, function(code, data)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if code == 0 then
if DataManager.SelfUser.playback[playback_id] ~= nil then
DataManager.SelfUser.playback[playback_id][i] = data

View File

@ -60,7 +60,6 @@ function M:fill_real()
self.ctr_update.selectedIndex = 0
end
end
function M:SetCallBack(callback)
self._CB = callback
end
@ -71,7 +70,7 @@ function M:real_action()
ViewUtil.ShowTips(str)
return
end
ViewUtil.ShowModalWait2(self._root_view, "正在提交认证...")
ViewUtil.ShowModalWait(self._root_view,"正在提交认证...")
local loddyctr = ControllerManager.GetController(LoddyController)
local _data = {}
_data.type =1
@ -80,7 +79,7 @@ function M:real_action()
real_info.identity = self._view:GetChild("tex_identity").text
_data.real_info = real_info
loddyctr:UpdateUserInfo(_data,function( res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if (res.ReturnCode ==0) then
DataManager.SelfUser.real_info = real_info
if self._callback then self._callback() end
@ -124,13 +123,13 @@ function M:address_action()
ViewUtil.ShowTips("请输入详细地址")
return
end
ViewUtil.ShowModalWait2(self._root_view, "正在提交...")
ViewUtil.ShowModalWait(self._root_view,"正在提交...")
local loddyctr = ControllerManager.GetController(LoddyController)
local _data = {}
_data.type =2
_data.address = tex_address
loddyctr:UpdateUserInfo(_data,function( res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if (res.ReturnCode ==0) then
DataManager.SelfUser.address = _data.address
if self._callback then self._callback() end

View File

@ -20,23 +20,25 @@ function M:init(url)
local btn_ok = self._view:GetChild("btn_ok")
btn_ok.onClick:Set(function ()
ViewUtil.ShowModalWait2(self._root_view, "正在同步数据...")
ViewUtil.ShowModalWait(self._root_view,"正在同步数据...")
GameApplication.Instance:WXLogin(handler(self,self.WXCallBack))
end)
end
function M:WXCallBack(result,data)
if (not result) or result ~= 0 then
if result == 10 then
ViewUtil.ShowModalWait2(self._root_view)
ViewUtil.ShowModalWait(self._root_view)
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
return
end
if not data then
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
return
end
local jd = json.decode(data)
@ -47,7 +49,7 @@ function M:WXCallBack(result, data)
local nickname = jd["nickname"]
if not unionid or string.len(unionid)<1 then
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
return
end
local _data = {}
@ -58,7 +60,7 @@ function M:WXCallBack(result, data)
_data["portrait"] = headurl
local loddyctr = ControllerManager.GetController(LoddyController)
loddyctr:UpdateUserInfo(_data,function( res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if (res.ReturnCode ==0) then
local user = DataManager.SelfUser
user.acc = unionid
@ -73,4 +75,5 @@ function M:WXCallBack(result, data)
end)
end
return M

View File

@ -123,9 +123,9 @@ function M:InitView(url)
-- local btn_more_group = self._view:GetChild("btn_family")
-- btn_more_group.onClick:Set(function()
-- --self.groupMainView._view.visible = true
-- ViewUtil.ShowModalWait2(self._root_view, "请稍等,获取牌友圈中...")
-- ViewUtil.ShowModalWait(self._root_view, "请稍等,获取牌友圈中...")
-- local enterGroupCallBackFunc = function(code)
-- ViewUtil.CloseModalWait2()
-- ViewUtil.CloseModalWait()
-- if code == 0 then
-- self.groupMainView._view.visible = true
-- else
@ -172,7 +172,6 @@ function M:InitView(url)
local btn_invite = self._view:GetChild("btn_invite")
btn_invite.onClick:Add(function()
GameApplication.Instance:CopyToClipboard(DataManager.DownLink or "暂无链接")
local _curren_msg = MsgWindow.new(self._root_view, "下载地址已复制,请到浏览器粘贴", MsgWindow.MsgMode.OnlyOk)
_curren_msg:Show()
end)
@ -182,9 +181,6 @@ function M:InitView(url)
printlog("load Callback")
self._flag_loadImageSucces = true
end)
GameApplication.Instance:GetPublicIP(function(ip)
DataManager.SelfUser.currenIp = ip
end)
btn_head.onClick:Set(function()
-- local headView = HeadView.new(DataManager.SelfUser, nil, function()
-- view:GetChild("tex_name").text = DataManager.SelfUser.nick_name
@ -194,7 +190,7 @@ function M:InitView(url)
local lobbyPlayerInfoView = LobbyPlayerInfoView.new(DataManager.SelfUser, function()
ImageLoad.Load(DataManager.SelfUser.head_url, btn_head._iconObject)
end)
-- lobbyPlayerInfoView:Show()
lobbyPlayerInfoView:Show()
end)
@ -280,9 +276,9 @@ function M:InitView(url)
-- local btn_more_group = self._view:GetChild("btn_more_group")
-- btn_more_group.onClick:Set(function()
-- --self.groupMainView._view.visible = true
-- ViewUtil.ShowModalWait2(self._root_view,"请稍等,获取牌友圈中...")
-- ViewUtil.ShowModalWait(self._root_view,"请稍等,获取牌友圈中...")
-- local enterGroupCallBackFunc=function (code)
-- ViewUtil.CloseModalWait2()
-- ViewUtil.CloseModalWait()
-- if code==0 then
-- self.groupMainView._view.visible = true
-- else

View File

@ -1,5 +1,4 @@
local PhoneLoginView = import(".PhoneLoginView2")
local IdPasswordLoginView = import(".IdPasswordLoginView")
local PhoneLoginView = import(".PhoneLoginView")
LoginView = {}
@ -48,13 +47,13 @@ function M:init()
ViewUtil.ErrorTip(self._root_view, "请勾选同意《用户协议》")
return
end
ViewUtil.ShowModalWait2(self._root_view, "正在登录游戏...")
ViewUtil.ShowModalWait(self._root_view, "正在登录游戏...")
coroutine.start(function()
coroutine.wait(8)
if self.isWXCallBackMark then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
ViewUtil.ErrorTip(10000, "微信登录失败!")
end)
if (not GameApplication.Instance.accountTest) then
@ -91,7 +90,6 @@ function M:init()
-- end)
local btn_phone_code = view:GetChild("btn_phone_code")
if btn_phone_code then
btn_phone_code.onClick:Set(function()
if self.agree.selectedIndex == 0 then
ViewUtil.ErrorTip(self._root_view, "请勾选同意《用户协议》")
@ -101,18 +99,6 @@ function M:init()
end)
end
local btn_id = view:GetChild("btn_id")
if btn_id then
btn_id.onClick:Set(function()
if self.agree.selectedIndex == 0 then
ViewUtil.ErrorTip(self._root_view, "请勾选同意《用户协议》")
return
end
self:IDLogin()
end)
end
end
function M:Destroy()
if self._agreement then
self._agreement:Destroy()
@ -142,7 +128,7 @@ end
local function __join_room(roomid, res)
local loddyctr = ControllerManager.GetController(LoddyController)
loddyctr:JoinRoom(roomid, function(res1)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res1.ReturnCode == -2 then
__join_room(roomid, res)
elseif res1.ReturnCode == 0 then
@ -156,7 +142,7 @@ local function __join_room(roomid, res)
end
local function __login_response(self, response)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
local skey = "session_id"
if (response.ReturnCode == 0) then
local user = DataManager.SelfUser
@ -174,8 +160,8 @@ local function __login_response(self, response)
local roomid = user.room_id
if (string.len(roomid) > 1) then
ViewUtil.ShowModalWait2(self._root_view, "正在加入房间...")
if user.group_id == 0 then
ViewUtil.ShowModalWait(self._root_view, "正在加入房间...")
__join_room(roomid, response)
return
else
@ -199,7 +185,6 @@ local function __login_response(self, response)
end
self._mesList = mesl
DataManager.GameNotice = mesl
DataManager.DownLink = data.share_link
end
end
end)
@ -231,7 +216,7 @@ end
function M:PhoneCodeLogin()
local _phoneCodeView = nil
_phoneCodeView = PhoneLoginView.new(1, self.phone, function(res)
_phoneCodeView = PhoneLoginView.new(1, function(res)
if res.ReturnCode == 0 then
_phoneCodeView:Destroy()
end
@ -243,7 +228,7 @@ end
function M:IDLogin()
local _idView = nil
_idView = IdPasswordLoginView.new(0, function(res)
_idView = IDLoginView.new(function(res)
if res.ReturnCode == 0 then
_idView:Destroy()
end
@ -255,15 +240,9 @@ end
function M:QuickLogin()
if (not GameApplication.Instance.accountTest) then
local session_id = PlayerPrefs.GetString("session_id")
self.phone = PlayerPrefs.GetString("session_phone")
-- print("session_id:" .. session_id)
if session_id and string.len(session_id) > 3 then
PlayerPrefs.DeleteKey('session_phone')
PlayerPrefs.Save()
if self.phone and #self.phone > 0 then
return
end
ViewUtil.ShowModalWait2(self._root_view, "正在登录游戏...")
ViewUtil.ShowModalWait(self._root_view, "正在登录游戏...")
local loginCtr = ControllerManager.GetController(LoginController)
loginCtr:QuickLogin(session_id, function(response)
__login_response(self, response)
@ -279,10 +258,10 @@ function M:LoginCallBack(result, data)
--pt(data)
if (not result) or result ~= 0 then
if result == 10 then
ViewUtil.ShowModalWait2(self._root_view)
ViewUtil.ShowModalWait(self._root_view)
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
return
end
@ -300,7 +279,7 @@ function M:LoginCallBack(result, data)
DataManager.SelfUser.sex = sex
DataManager.SelfUser.head_url = headurl
if not DataManager.SelfUser.acc or string.len(DataManager.SelfUser.acc) < 1 then
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
return
end
end
@ -314,9 +293,8 @@ function M:LoginCallBack(result, data)
end
--在进入前重连房间,如果有
function M:ReconnectRoom(groupId, times)
function M:ReconnectRoom(groupId)
local roomId = DataManager.SelfUser.room_id
local times = times or 0
print("===============================ReconnectRoom", roomId, 1)
if roomId and #roomId > 0 then
local roomCtr = ControllerManager.GetController(RoomController)
@ -326,24 +304,17 @@ function M:ReconnectRoom(groupId, times)
false,
function(response)
if (response.ReturnCode == -1) then
ViewUtil.CloseModalWait2()
ViewUtil.ErrorMsg(self._root_view, response.ReturnCode, 'response.ReturnCode == -1')
RestartGame()
return
end
if response.ReturnCode ~= 0 then
-- if times >= 6 then
-- ViewUtil.ErrorMsg(self._root_view, response.ReturnCode, '进入房间失败')
-- FamilyView.lastId = groupId
-- ViewManager.ChangeView(ViewManager.View_Family)
-- return
-- else
self:ReconnectRoom(groupId, times + 1)
ViewUtil.ErrorMsg(self._root_view, response.ReturnCode, '进入房间失败')
FamilyView.lastId = groupId
ViewManager.ChangeView(ViewManager.View_Family)
return
-- end
else
ViewUtil.CloseModalWait2()
UIPackage.AddPackage("base/lobby/ui/Lobby")
FamilyView.lastId = groupId
DataManager.SelfUser.room_id = ""

View File

@ -6,7 +6,6 @@ local SettingView = import('.SettingView')
local PlayerDistanceView = import('.PlayerDistanceView')
local FGAssistView = import('.FGAssistView')
local MissileSender = import(".MissileSender")
local SharePicture = import('.SharePicture')
local function GetSeat(self, uId)
for _, player in pairs(self._room.player_list) do
@ -410,10 +409,10 @@ function M:InitView(url, isHideIpAdds)
if self._state.selectedIndex > 0 and self._state.selectedIndex < 3 then
ViewUtil.ErrorTip(nil, '房间已开始,无法退出游戏。')
else
ViewUtil.ShowModalWait2(self._root_view)
ViewUtil.ShowModalWait(self._root_view)
self._gamectr:LevelRoom(
function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode == 0 then
ViewManager.ChangeView(ViewManager.View_Lobby)
else
@ -446,10 +445,10 @@ function M:InitView(url, isHideIpAdds)
if self._state.selectedIndex > 0 and self._state.selectedIndex < 3 then
ViewUtil.ErrorTip(nil, '房间已开始,无法退出游戏。')
else
ViewUtil.ShowModalWait2(self._root_view)
ViewUtil.ShowModalWait(self._root_view)
self._gamectr:LevelRoom(
function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode == 0 then
ViewManager.ChangeView(ViewManager.View_Lobby)
else
@ -470,7 +469,7 @@ function M:InitView(url, isHideIpAdds)
if IsRoomOwer() then
self._gamectr:AskDismissRoom(
function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode == 0 then
ViewManager.ChangeView(ViewManager.View_Family)
else
@ -572,22 +571,6 @@ function M:InitView(url, isHideIpAdds)
end
RefalshBtnClose(self)
local config = ExtendManager.GetExtendConfig(_room.game_id)
local mode = config:GetGameInfo()
local gamePlay = mode:LoadConfigToDetail(json.encode(_room.room_config.config),
json.encode(_room.room_config.config.hpData))
local btn_invite = self._view:GetChild('btn_invite')
if btn_invite then
btn_invite.onClick:Set(function()
local data = {}
data.title = string.format('%s,房号:%d(%s%s局)', _room.game_info.name, _room.room_id,
_room.group_id ~= 0 and "亲友圈," or "", _room.room_config.config.hpData.maxRound)
data.description = gamePlay
data.type = 0
self:ShareAndOneChoose(data)
end)
end
------------------------------------------------------------
end
@ -609,10 +592,10 @@ function M:continue_game(continue)
if self._state.selectedIndex > 0 and self._state.selectedIndex < 3 then
ViewUtil.ErrorTip(nil, '房间已开始,无法退出游戏。')
else
ViewUtil.ShowModalWait2(self._root_view)
ViewUtil.ShowModalWait(self._root_view)
self._gamectr:LevelRoom(
function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode == 0 then
ViewManager.ChangeView(ViewManager.View_Lobby)
else
@ -1512,13 +1495,6 @@ function M:GetPlayer(playId)
end
end
function M:ShareAndOneChoose(data)
local sharePicture = SharePicture.new(function()
ViewUtil.__share(data)
end)
sharePicture:Show()
end
-- 托管时关闭一些提示窗口,如起手胡、吃碰提示、海底,由扩展实现
function M:closeTipOnTuoguan()
end
@ -1577,7 +1553,7 @@ function M:Destroy()
ControllerManager.resetJionRoom = false
self._popEvent = false
GRoot.inst:HidePopup()
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
GameApplication.Instance.StopMusic = 0
coroutine.stopAll()
UpdateBeat:Remove(self.OnUpdate, self)

View File

@ -306,7 +306,7 @@ local function __fillRoomItem(self, index, item, room)
)
_curren_msg.onOk:Add(
function()
ViewUtil.ShowModalWait2(self._root_view)
ViewUtil.ShowModalWait(self._root_view)
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_RemoveRoom(
@ -316,7 +316,7 @@ local function __fillRoomItem(self, index, item, room)
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, '删除房间失败!')
return
@ -930,7 +930,7 @@ function M:InitView(url)
-- local delroomid
-- delroomid = (texroomid.text) or 0
-- if texroomid.text == "" then
-- ViewUtil.CloseModalWait2()
-- ViewUtil.CloseModalWait()
-- ViewUtil.ErrorTip(nil, '输入不能为空')
-- return
-- end
@ -943,7 +943,7 @@ function M:InitView(url)
-- _curren_msg.onOk:Add(
-- function()
-- ViewUtil.ShowModalWait2(self._root_view)
-- ViewUtil.ShowModalWait(self._root_view)
-- local fgCtr = ControllerManager.GetController(NewGroupController)
-- fgCtr:FG_RemoveRoom(
-- self.curGroup.id,
@ -952,7 +952,7 @@ function M:InitView(url)
-- if self._is_destroy then
-- return
-- end
-- ViewUtil.CloseModalWait2()
-- ViewUtil.CloseModalWait()
-- if res.ReturnCode ~= 0 then
-- ViewUtil.ErrorTip(res.ReturnCode, '删除房间失败!')
-- return
@ -1313,7 +1313,7 @@ function M:__onUpdate()
end
function M:__joinRoom(room_id)
ViewUtil.ShowModalWait2(self._root_view, '正在加入游戏...', 'join_room')
ViewUtil.ShowModalWait(self._root_view, '正在加入游戏...', 'join_room')
local roomCtr = ControllerManager.GetController(RoomController)
local _gameCtrl = ControllerManager.GetController(GameController)
local _currentCtrl = ControllerManager.GetCurrenController()
@ -1327,7 +1327,7 @@ function M:__joinRoom(room_id)
false,
function(response)
if (response.ReturnCode == -1) then
ViewUtil.CloseModalWait2('join_room')
ViewUtil.CloseModalWait('join_room')
RestartGame()
return
end
@ -1336,7 +1336,7 @@ function M:__joinRoom(room_id)
self:__joinRoom(room_id)
return
elseif response.ReturnCode ~= 0 then
ViewUtil.CloseModalWait2('join_room')
ViewUtil.CloseModalWait('join_room')
ViewUtil.ErrorMsg(self._root_view, response.ReturnCode, '进入房间失败')
return
end
@ -1346,7 +1346,7 @@ function M:__joinRoom(room_id)
self._view.visible = false
ImageLoad.Clear(self.class)
ViewManager.ChangeView(ViewManager.View_Main, DataManager.CurrenRoom.game_id)
ViewUtil.CloseModalWait2('join_room')
ViewUtil.CloseModalWait('join_room')
timer = 0
end,
self.curGroup.id
@ -1364,7 +1364,7 @@ function M:__joinRoom(room_id)
printlog("进入房间返回事件==========》》》")
pt(response)
if (response.ReturnCode == -1) then
ViewUtil.CloseModalWait2('join_room')
ViewUtil.CloseModalWait('join_room')
RestartGame()
return
end
@ -1373,7 +1373,7 @@ function M:__joinRoom(room_id)
self:__joinRoom(room_id)
return
elseif response.ReturnCode ~= 0 then
ViewUtil.CloseModalWait2('join_room')
ViewUtil.CloseModalWait('join_room')
ViewUtil.ErrorMsg(self._root_view, response.ReturnCode, '进入房间失败')
return
end
@ -1383,7 +1383,7 @@ function M:__joinRoom(room_id)
self._view.visible = false
ImageLoad.Clear(self.class)
ViewManager.ChangeView(ViewManager.View_Main, DataManager.CurrenRoom.game_id)
ViewUtil.CloseModalWait2('join_room')
ViewUtil.CloseModalWait('join_room')
timer = 0
end,
self.curGroup.id
@ -1407,7 +1407,7 @@ function M:__joinRoom_match(roomid, pid, is_null, isHidden, callback)
end
end
if isHidden == 1 then
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if not DataManager.SelfUser.location then
DataManager.SelfUser.location = Location.new()
end
@ -1433,7 +1433,7 @@ function M:__joinRoom_match(roomid, pid, is_null, isHidden, callback)
function(response)
if (response.ReturnCode == -1) then
self._view:GetController('pipei').selectedIndex = 0
ViewUtil.CloseModalWait2('join_room')
ViewUtil.CloseModalWait('join_room')
RestartGame()
return
end
@ -1454,7 +1454,7 @@ function M:__joinRoom_match(roomid, pid, is_null, isHidden, callback)
-- ImageLoad.Clear(self.class)
-- ViewManager.ChangeView(ViewManager.View_Main, DataManager.CurrenRoom.game_id)
-- callback(response.ReturnCode)
-- ViewUtil.CloseModalWait2('join_room')
-- ViewUtil.CloseModalWait('join_room')
-- timer = 0
end
end,
@ -1473,7 +1473,7 @@ function M:__joinRoom_match(roomid, pid, is_null, isHidden, callback)
is_null,
function(response)
if (response.ReturnCode == -1) then
ViewUtil.CloseModalWait2('join_room')
ViewUtil.CloseModalWait('join_room')
RestartGame()
return
end
@ -1490,7 +1490,7 @@ function M:__joinRoom_match(roomid, pid, is_null, isHidden, callback)
ImageLoad.Clear(self.class)
ViewManager.ChangeView(ViewManager.View_Main, DataManager.CurrenRoom.game_id)
callback(response.ReturnCode)
ViewUtil.CloseModalWait2('join_room')
ViewUtil.CloseModalWait('join_room')
timer = 0
end
end,
@ -1705,7 +1705,7 @@ function M:__loadGroupData()
curGroup.update_room = false
curGroup.update_info = false
curGroup.update_joins = false
ViewUtil.ShowModalWait2(self._root_view, "正在进入牌友圈,请稍等...")
ViewUtil.ShowModalWait(self._root_view, "正在进入牌友圈,请稍等...")
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_EnterGroup(
curGroup.id,
@ -1713,7 +1713,7 @@ function M:__loadGroupData()
-- if self._is_destroy then
-- return
-- end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
--self._view.visible=false
--ViewUtil.ErrorTip(res.ReturnCode, "获取圈子数据失败")
@ -1863,7 +1863,7 @@ end
-- 匹配游戏
function M:__startGame(roomid, pid, is_null, isHidden, callback)
ViewUtil.ShowModalWait2(self._root_view, '正在加入游戏...', 'join_room')
ViewUtil.ShowModalWait(self._root_view, '正在加入游戏...', 'join_room')
local _gameCtrl = ControllerManager.GetController(GameController)
local _currentCtrl = ControllerManager.GetCurrenController()
if _gameCtrl == _currentCtrl then
@ -1879,7 +1879,7 @@ function M:__startGame(roomid, pid, is_null, isHidden, callback)
self:__startGame(roomid, pid, is_null, isHidden, callback)
elseif code ~= 0 then
ViewUtil.ErrorMsg(self._root_view, code, '进入房间失败')
ViewUtil.CloseModalWait2('join_room')
ViewUtil.CloseModalWait('join_room')
end
if callback then
callback()
@ -1900,7 +1900,7 @@ function M:__startGame(roomid, pid, is_null, isHidden, callback)
self:__startGame(roomid, pid, is_null, isHidden, callback)
elseif code ~= 0 then
ViewUtil.ErrorMsg(self._root_view, code, '进入房间失败')
ViewUtil.CloseModalWait2('join_room')
ViewUtil.CloseModalWait('join_room')
end
if callback then
callback()

View File

@ -31,12 +31,12 @@ local function __fillJoins(self, curGroup, joins)
btn_yes.data = rdata
btn_yes.onClick:Set(function(context)
local _rd = context.sender.data
ViewUtil.ShowModalWait2(self._root_view)
ViewUtil.ShowModalWait(self._root_view)
fgCtr:FG_GroupVerifyJoin(curGroup.id,_rd.id,true,function(res1)
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res1.ReturnCode == 0 then
curGroup.joins = #res1.Data.joins
self.change = true
@ -50,12 +50,12 @@ local function __fillJoins(self, curGroup, joins)
btn_del.data = rdata
btn_del.onClick:Set(function(context)
local _rd = context.sender.data
ViewUtil.ShowModalWait2(self._root_view)
ViewUtil.ShowModalWait(self._root_view)
fgCtr:FG_GroupVerifyJoin(curGroup.id,_rd.id,false,function(res1)
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res1.ReturnCode == 0 then
curGroup.joins = #res1.Data.joins
self.change = true
@ -91,6 +91,7 @@ function M:SetCallback(callback)
self.callback = callback
end
-- 销毁窗口
function M:Destroy(remove_map)
if self.change and self.callback then

View File

@ -41,10 +41,10 @@ function M:FillView()
end
function M:GetMailData(index)
ViewUtil.ShowModalWait2(nil)
ViewUtil.ShowModalWait(nil)
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetMailList(self.curGroup.id, DataManager.SelfUser.account_id, index, 20, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode == 0 then
if #res.Data.mail_list > 0 then
list_concat(self.mail_data, res.Data.mail_list)
@ -57,10 +57,10 @@ function M:GetMailData(index)
end
function M:DelAllMail()
ViewUtil.ShowModalWait2(nil)
ViewUtil.ShowModalWait(nil)
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_DelAllMail(self.curGroup.id, DataManager.SelfUser.account_id, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode == 0 then
self.mail_data = {}
self.lst_mail.numItems = 0
@ -82,12 +82,10 @@ function M:OnRenderItem(index, obj)
local str_lev = data.lev == 3 and "合伙人" or "管理员"
local act = hp >= 0 and "给您增加了" or "扣除了您"
tex_title.text = "消息内容为:"--string.format("%s(%s) %s%s积分", nick, id, act, math.abs(hp))
tex_content.text = string.format("%s [color=#08a446]%s[/color](%s) %s[color=#08a446] %s [/color]积分", str_lev,
nick, id, act, math.abs(hp))
tex_content.text = string.format("%s [color=#08a446]%s[/color](%s) %s[color=#08a446] %s [/color]积分", str_lev, nick, id, act, math.abs(hp))
else
tex_title.text = "消息内容为:"--string.format("%s(%s) 转账给您%s积分", nick, id, math.abs(hp))
tex_content.text = string.format("[color=#08a446]%s[/color](%s) 转账给您[color=#08a446] %s [/color]积分", nick, id,
math.abs(hp))
tex_content.text = string.format("[color=#08a446]%s[/color](%s) 转账给您[color=#08a446] %s [/color]积分", nick, id, math.abs(hp))
end
obj:GetChild("tex_data").text = os.date("%Y-%m-%d %H:%M", data.time)
end
@ -96,6 +94,7 @@ function M:SetCallback(callback)
self.callback = callback
end
-- 销毁窗口
function M:Destroy(remove_map)
if self.callback then

View File

@ -36,9 +36,9 @@ function M:InitView(url)
local cgv = CreateGroupView.new(self._root_view)
cgv:Show()
cgv:SetCallback(function(name, pay_type, fg_type)
ViewUtil.ShowModalWait2(cgv._root_view)
ViewUtil.ShowModalWait(cgv._root_view)
fgCtr:FG_CreateGroup(name, pay_type, fg_type, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if self._is_destroy then
return
end
@ -93,9 +93,9 @@ function M:InitView(url)
local btn_refresh = self._view:GetChild('btn_refresh')
btn_refresh.onClick:Set(function()
ViewUtil.ShowModalWait2(self._root_view)
ViewUtil.ShowModalWait(self._root_view)
fgCtr:FG_GroupList(function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if self._is_destroy then
return
end
@ -239,9 +239,9 @@ function M:FillData()
btn_top.onClick:Set(function(context)
context:StopPropagation()
local fgCtr = ControllerManager.GetController(NewGroupController)
ViewUtil.ShowModalWait2(self._root_view)
ViewUtil.ShowModalWait(self._root_view)
fgCtr:FG_TopGroup(group.id, ctr_select.selectedIndex == 0, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if self._is_destroy then
return
end

View File

@ -25,6 +25,7 @@ function GroupMngFagPackView.new(gid, blur_view, ctrNum, uid)
end
function M:FillView()
self.Ctr=self._view:GetController("ctr")
self.Ctr.selectedIndex=1
@ -73,7 +74,9 @@ function M:FillView()
local btn_cr = self._view:GetChild('btn_qd')
btn_cr.onClick:Set(
function()
local gniv = GroupNumberInputView.new(nil, function(num)
local value = limit
if otype == 1 then
value = value + ad2d(num)
@ -87,10 +90,10 @@ function M:FillView()
ViewUtil.ErrorTip(1,"输入数据异常!")
end
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_SAVEBankInfo(self.group_id, value,self.uid ,function(res1)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
pt(res1)
if (res1.ReturnCode == 0) then
self:SetBank(res1.Data.hp,res1.Data.b_hp)
@ -99,8 +102,11 @@ function M:FillView()
ViewUtil.ErrorTip(res1.ReturnCode,"存取积分失败!")
end
end)
end, 0, nil)
gniv:Show()
end
)
@ -108,7 +114,9 @@ function M:FillView()
local btn_qc = self._view:GetChild('btn_qc')
btn_qc.onClick:Set(
function()
local gniv = GroupNumberInputView.new(nil, function(num)
local value = limit
if otype == 1 then
value = value + ad2d(num)
@ -122,10 +130,10 @@ function M:FillView()
ViewUtil.ErrorTip(1,"输入数据异常!")
end
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_TakeBankInfo(self.group_id, value,self.uid, function(res1)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
pt(res1)
if (res1.ReturnCode == 0) then
self:SetBank(res1.Data.hp,res1.Data.b_hp)
@ -134,8 +142,10 @@ function M:FillView()
ViewUtil.ErrorTip(res1.ReturnCode,"获取积分失败!")
end
end)
end, 0, nil)
gniv:Show()
end
)
@ -177,28 +187,35 @@ function M:FillView()
self.lst_bxx.numItems=self.ctrNum
end
function M:initBankData()
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetBankInfo(self.group_id, self.uid,function(res)
pt(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取银行数据失败")
else
self:SetBank(res.Data.total_hp,res.Data.bank_hp)
self.Ctr.selectedIndex=0
end
end)
end
function M:initShouyiData()
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
self.shouyiData = {}
self._view:GetChild("tex_total").text = 0
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetTakeInfo(self.group_id,self.uid ,function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取保险箱数据失败")
else
@ -218,11 +235,14 @@ function M:SetCallback(callback)
self.callback = callback
end
function M:SetBank(totalHp,bankHp)
self.playerJF.text=totalHp/1000
self.bankJF.text=bankHp/1000
end
function M:fillGameItem(index, item)
if index~=0 then
item.icon="ui://NewGroup/button_cqg"
@ -243,8 +263,22 @@ function M:fillGameItem(index, item)
self:initShouyiData()
end
end
end
-- 销毁窗口
function M:Destroy(remove_map)
if self.callback then

View File

@ -63,7 +63,7 @@ function M:FillView()
ctr_ua.selectedIndex = bit:_and(option, 8) > 0 and 1 or 0
self._view:GetChild("btn_ok").onClick:Set(function()
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local data = {}
data.id = self.group_id
data.name = tex_name.text
@ -104,7 +104,7 @@ function M:FillView()
end
fgCtr:FG_UpdateGroupInfo(data, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "设置大联盟失败。")
else

View File

@ -6,6 +6,7 @@ local GroupRecordView = {}
local M = GroupRecordView
function GroupRecordView.new(curGroup, qid, includeMembers, begin_time, end_time, time_type)
setmetatable(M, {__index = BaseWindow})
local self = setmetatable({}, {__index = M})
self.class = "GroupRecordView"
@ -43,14 +44,15 @@ function M:OnRenderRecordItem(index, obj)
end
function M:GetRecordData(index)
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetGroupRecordSpe(self.curGroup, GetPlatform(), self.qid, self.includeMembers, index, 6, self.begin_time,
self.end_time, self.time_type, function(res)
fgCtr:FG_GetGroupRecordSpe(self.curGroup, GetPlatform(), self.qid, self.includeMembers, index, 6, self.begin_time, self.end_time, self.time_type, function(res)
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取回放数据失败")
@ -65,6 +67,7 @@ function M:GetRecordData(index)
end
function M:FillRecordItem(data, obj)
local game_id = data.game_id
local room_id = data.room_id
local create_time = data.create_time
@ -137,7 +140,7 @@ function M:FillRecordItem(data, obj)
end
function M:OnShareScreenShot(room_id, room_type_str, room_time_str, totalScore, hpOnOff, hpType)
ViewUtil.ShowModalWait2(self._view, "正在分享...")
ViewUtil.ShowModalWait(self._view, "正在分享...")
UIPackage.AddPackage("base/rank/ui/Rank")
local result_view = UIPackage.CreateObjectFromURL("ui://Rank/ResultView")
result_view.visible = false
@ -176,7 +179,7 @@ function M:OnShareScreenShot(room_id, room_type_str, room_time_str, totalScore,
ShareScreenShotWithOption(function()
result_view:Dispose()
end)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
break
end
coroutine.wait(1)
@ -250,13 +253,13 @@ function M:OnShowRecordInfo(rdata)
main._totalRound = tonumber(rdata.round)
main:FillRoomData(DataManager.SelfUser.playback[playback_id][i])
else
ViewUtil.ShowModalWait2(self._view)
ViewUtil.ShowModalWait(self._view)
local _data = {}
_data["military_id"] = playback_id
_data["round"] = tostring(i)
local loddyCtr1 = ControllerManager.GetController(LoddyController)
loddyCtr1:RequestPlayBack(_data,function(code,data)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if code == 0 then
if DataManager.SelfUser.playback[playback_id] ~= nil then
DataManager.SelfUser.playback[playback_id][i] = data
@ -282,6 +285,7 @@ function M:OnShowRecordInfo(rdata)
end
end
function M:GenaratePlayBack(id, game_id, ...)
local tem =nil
local dview_class = nil
@ -299,4 +303,5 @@ function M:GenaratePlayBack(id, game_id, ...)
return tem
end
return M

View File

@ -49,9 +49,9 @@ function M:FillView()
ViewUtil.ErrorTip(nil, "请输入玩家ID")
return
end
ViewUtil.ShowModalWait2(nil)
ViewUtil.ShowModalWait(nil)
fgCtr:FG_RemitFindMember(self.curGroup.id, remite_id, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if self._is_destroy then
return
end
@ -89,9 +89,9 @@ function M:FillView()
ViewUtil.ErrorTip(nil, "请输入转让数量")
return
end
ViewUtil.ShowModalWait2(nil)
ViewUtil.ShowModalWait(nil)
fgCtr:FG_FagRemit(self.curGroup.id, remite_id, ad2d(remite_num), function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if self._is_destroy then
return
end
@ -112,6 +112,7 @@ function M:SetCallback(callback)
self.callback = callback
end
-- 销毁窗口
function M:Destroy(remove_map)
if self.change and self.callback then

View File

@ -59,6 +59,9 @@ function M:FillData(list, index, callbackFill)
MarkSelect.onClick:Set(function()
self:MarkPlay(MarkSelect,tem.id,MarkSelect.selected)
end)
end
local btn_confirm = self._view:GetChild("btn_confirm")
btn_confirm.onClick:Set(function()
@ -67,16 +70,25 @@ function M:FillData(list, index, callbackFill)
end
self:Destroy()
end)
end
function M:MarkPlay(markS,pid,isMark)
--[[local fgCtr = ControllerManager.GetController(NewGroupController)
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
fgCtr:FG_MarkPlay(self.group_id, pid, isMark, function(res)
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode == 0 then
local group = DataManager.groups:get(self.group_id)
group:markPlay(pid, isMark)
@ -104,6 +116,11 @@ function M:MarkPlay(markS, pid, isMark)
if self.callbackFill then
self.callbackFill()
end
end
return M

View File

@ -32,7 +32,7 @@ function M:init(url, member)
]]
self._view:GetChild("btn_ok").onClick:Set(function()
ViewUtil.ShowModalWait2(nil)
ViewUtil.ShowModalWait(nil)
--local score = tonumber(tex_tag.text) or 0
local score = tex_tag.text
local fgCtr = ControllerManager.GetController(NewGroupController)
@ -40,7 +40,7 @@ function M:init(url, member)
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "备注失败")
else

View File

@ -18,17 +18,18 @@ function GroupSettingView.new(blur_view)
return self
end
local function __removeGroup(self,msg,curData)
local fgCtr = ControllerManager.GetController(NewGroupController)
local _curren_msg = MsgWindow.new(self._root_view, msg, MsgWindow.MsgMode.OkAndCancel)
_curren_msg.onOk:Add(function()
ViewUtil.ShowModalWait2(self._root_view)
ViewUtil.ShowModalWait(self._root_view)
local func = curData.owner == DataManager.SelfUser.account_id and fgCtr.FG_RemoveGroup or fgCtr.FG_ExitGroup
func(fgCtr, curData.id, function(res)
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode == 0 then
self.change = true
local groups = DataManager.groups.groupList
@ -43,6 +44,7 @@ local function __removeGroup(self, msg, curData)
end)
end)
_curren_msg:Show()
end
function M:init(url)
@ -68,11 +70,13 @@ function M:init(url)
local option = group.option or 0
if bit:_and(option,2) > 0 then
self._view:GetController("opt").selectedIndex = 1
else
self._view:GetController("opt").selectedIndex = 0
end
end
end)
end
function M:FillData()
@ -108,12 +112,15 @@ function M:FillData()
if #groups == 0 then
self._view:GetController("opt").selectedIndex = 0
end
end
function M:SetCallback(callback)
self.callback = callback
end
-- 销毁窗口
function M:Destroy(remove_map)
if self.change and self.callback then
@ -122,4 +129,5 @@ function M:Destroy(remove_map)
BaseWindow.Destroy(self,remove_map)
end
return M

View File

@ -38,10 +38,10 @@ function M:init(url)
ViewUtil.ErrorTip(-12,"您输入的大联盟ID少于六位")
return
end
ViewUtil.ShowModalWait2(self._root_view)
ViewUtil.ShowModalWait(self._root_view)
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_JoinGroup(tonumber(self._texnum_str),function(response)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if self._is_destroy then
return
end
@ -70,6 +70,7 @@ function M:OnNumButtonAction(context)
self._currenIndex = self._currenIndex + 1
self._texnum_str = self._texnum_str .. typer
self.tex_num.text = self._texnum_str
end
end
end

View File

@ -29,13 +29,13 @@ function M:init(url)
)
self._view:GetChild("btn_qd").onClick:Set(
function()
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_AddMember(
self.group_id,
self.member_id,
function(response)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if (response.ReturnCode == 0) then
ViewUtil.ErrorTip(-1, '添加成功!', 1)
else

View File

@ -62,15 +62,15 @@ function M:init(url)
local fgCtr = ControllerManager.GetController(NewGroupController)
self._view:GetChild("btn_search_member").onClick:Set(function()
ViewUtil.ShowModalWait2(nil)
ViewUtil.ShowModalWait(nil)
local qid = tonumber(self._view:GetChild("tex_find_memb").text)
if not qid then
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
ViewUtil.ErrorTip(nil, "输入ID进行搜索")
return
end
fgCtr:FG_FindMember(self.group_id, qid, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if self._is_destroy then
return
end
@ -118,9 +118,9 @@ function M:init(url)
table.insert(del_list, tem.uid)
end
end
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
fgCtr:FG_SetBanTable(self.group_id, self.member_id, set_list, del_list, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode == 0 then
self:Destroy()
ViewUtil.ErrorTip(-1, "禁止同桌设置成功")
@ -171,10 +171,10 @@ function M:getMemberData(index)
-- if index == 0 then
-- group:clearMember()
-- end
ViewUtil.ShowModalWait2(nil)
ViewUtil.ShowModalWait(nil)
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GroupMembers(self.group_id, index, 10, false, 1, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取成员列表失败")
else

View File

@ -459,7 +459,7 @@ function M:FillFagData()
pt(self.hpData)
local fgCtr = ControllerManager.GetController(NewGroupController)
ViewUtil.ShowModalWait2(self._root_view)
ViewUtil.ShowModalWait(self._root_view)
if not self.play then
-- 新增玩法
fgCtr:FG_AddPlay(self.group_id, game_id, _data, name, self.hpData, hpOnOff, group.type, self.table_color,
@ -467,7 +467,7 @@ function M:FillFagData()
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
---- print("======新增玩法=============")
--pt(res)
if res.ReturnCode == 0 then
@ -508,7 +508,7 @@ function M:FillFagData()
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
---- print("======修改玩法=============")
--pt(res)
if res.ReturnCode == 0 then

View File

@ -4,38 +4,6 @@ local GroupRoomColorView = import(".GroupRoomColorView")
local GameListView = require "Game/View/Lobby/GameListView"
local GroupGameSettingView = {}
-- UTF-8 正则匹配每一个字符(包括 emoji
local function utf8_chars(str)
local chars = {}
for uchar in str:gmatch("[%z\1-\127\194-\244][\128-\191]*") do
table.insert(chars, uchar)
end
return chars
end
-- 截取前 n 个字符(安全处理 Emoji
local function sub(str, start_char, end_char)
local chars = utf8_chars(str)
local sub = {}
for i = start_char or 1, end_char or #chars do
if chars[i] then
table.insert(sub, chars[i])
else
break
end
end
return table.concat(sub)
end
-- 获取 UTF-8 字符个数
local function len(str)
local count = 0
for _ in str:gmatch("[%z\1-\127\194-\244][\128-\191]*") do
count = count + 1
end
return count
end
local M = GroupGameSettingView
function GroupGameSettingView.new(blur_view, gid, pid, room_config, callback)
@ -81,9 +49,6 @@ function M:init(url)
self.btn_closeTimesPage = self._view:GetChild("btn_closeTimesPage")
self._view:GetChild("tex_name").emojies = EmojiDitc.EmojiesDitc
self._view:GetChild("tex_name").onFocusOut:Set(function()
self._view:GetChild("tex_name").text = sub(self._view:GetChild("tex_name").text, 1, 7)
end)
self.cTimesPage = self._view:GetController("cTimesPage")
@ -587,7 +552,7 @@ function M:FillFagData()
pt(self.hpData)
local fgCtr = ControllerManager.GetController(NewGroupController)
ViewUtil.ShowModalWait2(self._root_view)
ViewUtil.ShowModalWait(self._root_view)
if not self.play then
-- 新增玩法
fgCtr:FG_AddPlay(self.group_id, game_id, _data, name, self.hpData, hpOnOff, group.type, self.table_color,
@ -595,7 +560,7 @@ function M:FillFagData()
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
---- print("======新增玩法=============")
--pt(res)
if res.ReturnCode == 0 then
@ -637,7 +602,7 @@ function M:FillFagData()
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
---- print("======修改玩法=============")
--pt(res)
if res.ReturnCode == 0 then
@ -1089,7 +1054,7 @@ function M:FillFagData_jiangxi()
pt(self.hpData)
local fgCtr = ControllerManager.GetController(NewGroupController)
ViewUtil.ShowModalWait2(self._root_view)
ViewUtil.ShowModalWait(self._root_view)
if not self.play then
-- 新增玩法
fgCtr:FG_AddPlay(self.group_id, game_id, _data, name, self.hpData, hpOnOff, group.type, self.table_color,
@ -1097,7 +1062,7 @@ function M:FillFagData_jiangxi()
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
---- print("======新增玩法=============")
--pt(res)
if res.ReturnCode == 0 then
@ -1139,7 +1104,7 @@ function M:FillFagData_jiangxi()
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
---- print("======修改玩法=============")
--pt(res)
if res.ReturnCode == 0 then

View File

@ -148,14 +148,14 @@ end
function M:GetData(index)
local filter = self:GetFilter()
if filter == 0 then return end
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetMemberHpLog(self.group_id, self.member.uid, index, 6, filter, self.begin_time, self.end_time,
function(res)
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取积分详情失败")
else
@ -265,13 +265,13 @@ function M:OnRenderItem(index, obj)
self.lst_fag:RefreshVirtualList()
self.lst_fag:ScrollToView(index)
else
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetHpLogDetail(self.group_id, self.member.uid, data.roomid, data.time, function(res)
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取积分详情失败")
else
@ -292,13 +292,13 @@ end
-- 获取日统计数据
function M:GetDailyData()
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetPlayerDailyHPCount(self.group_id, self.member.uid, function(res)
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取积分详情失败")
else

View File

@ -106,21 +106,21 @@ function M:init(url)
local fgCtr = ControllerManager.GetController(NewGroupController)
self._view:GetChild("btn_deploy").onClick:Set(function()
local gniv = GroupNumberInputView.new(nil, function(num)
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local parent_id = tonumber(num)
fgCtr:FG_FindMember(self.group_id, parent_id, function(res)
if self._is_destroy then
return
end
if res.ReturnCode ~= 0 then
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
ViewUtil.ErrorTip(res.ReturnCode, "找不到成员")
elseif res.Data.partnerLev == 0 then
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
ViewUtil.ErrorTip(res.ReturnCode, "目标不是合伙人")
else
fgCtr:FG_DeployMember(self.group_id, member.uid, parent_id, function(res1)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if (res1.ReturnCode == 0) then
member.parentId = parent_id
self._view:GetChild("tex_superior_id").text = parent_id
@ -146,7 +146,7 @@ function M:init(url)
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res1.ReturnCode == 0 then
member.isvip = selected
self.callBack()
@ -175,12 +175,12 @@ function M:init(url)
end
local _curren_msg = MsgWindow.new(nil, "确定删除该成员吗?", MsgWindow.MsgMode.OkAndCancel)
_curren_msg.onOk:Add(function()
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
fgCtr:FG_GroupRemoveMember(self.group_id, member.uid, function(res1)
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res1.ReturnCode == 0 then
self.callBack(true)
ViewUtil.ErrorTip(-1, "已成功删除玩家")
@ -209,13 +209,13 @@ function M:init(url)
local str = member.ban == 1 and "确定恢复娱乐吗?" or "确定禁止娱乐吗?"
local _curren_msg = MsgWindow.new(nil, str, MsgWindow.MsgMode.OkAndCancel)
_curren_msg.onOk:Add(function()
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local val = 1 - member.ban
fgCtr:FG_BanMember(self.group_id, member.uid, val, 1, function(res1)
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res1.ReturnCode == 0 then
member.ban = val
pic = member.ban == 1 and "mng_del_ban" or "mng_ban"
@ -248,13 +248,13 @@ function M:init(url)
local str = member.group_ban == 1 and "确定恢复该合伙人整组娱乐吗?" or "确定禁止该合伙人整组娱乐吗?"
local _curren_msg = MsgWindow.new(nil, str, MsgWindow.MsgMode.OkAndCancel)
_curren_msg.onOk:Add(function()
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local val = member.group_ban == 1 and 0 or 1
fgCtr:FG_BanMember(self.group_id, member.uid, val, 2, function(res1)
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res1.ReturnCode == 0 then
member.group_ban = val
pic = member.group_ban == 1 and "mng_del_ban_group" or "mng_ban_group"
@ -277,9 +277,9 @@ function M:init(url)
if not CheckPermission(group.lev, perm_array[MngPermissionList.BanSameTable]) then
return
end
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
fgCtr:FG_GetBanTable(self.group_id, member.uid, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode == 0 then
local btv = GroupBanSameTableView.new(self.blur_view, self.group_id, member.uid, res.Data)
btv:Show()
@ -297,9 +297,9 @@ function M:init(url)
btn_set_mng.icon = "ui://NewGroup/zhengzu"
btn_set_mng.onClick:Set(
function()
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
fgCtr:FG_GetBanMemberHB(self.group_id, member.uid, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
--pt(res)
if res.ReturnCode == 0 then
local diaoduView = GroupSetMemberInfoDiaoduView.new(self.group_id, member.uid)
@ -322,13 +322,13 @@ function M:init(url)
local str = member.lev == 3 and "确定设置玩家为副盟主吗?" or "确定取消玩家副盟主身份吗?"
local _curren_msg = MsgWindow.new(nil, str, MsgWindow.MsgMode.OkAndCancel)
_curren_msg.onOk:Add(function()
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local val = 4 - member.lev
fgCtr:FG_SetManager(self.group_id, member.uid, val, function(res1)
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res1.ReturnCode == 0 then
member.lev = val + 1
self.callBack()
@ -356,13 +356,13 @@ function M:init(url)
local str = member.partnerLev == 0 and "确定设置玩家为合伙人吗?" or "确定取消玩家合伙人身份吗?"
local _curren_msg = MsgWindow.new(nil, str, MsgWindow.MsgMode.OkAndCancel)
_curren_msg.onOk:Add(function()
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local val = member.partnerLev > 0 and 2 or 1
fgCtr:FG_SetPartner(self.group_id, member.uid, val, function(res1)
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res1.ReturnCode == 0 then
member.parentId = res1.Data.parentId
member.partnerLev = res1.Data.partnerLev
@ -411,17 +411,17 @@ function M:init(url)
self:MovePartner(parent_id, member, self._view)
return
end
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_FindMember(self.group_id, parent_id, function(res)
if self._is_destroy then
return
end
if res.ReturnCode ~= 0 then
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
ViewUtil.ErrorTip(res.ReturnCode, "找不到成员")
elseif res.Data.partnerLev == 0 then
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
ViewUtil.ErrorTip(res.ReturnCode, "目标不是合伙人")
else
self:MovePartner(parent_id, member, self._view)
@ -460,9 +460,9 @@ function M:init(url)
btn_qiangzhi.onClick:Set(function()
local msg_tip = MsgWindow.new(self._root_view, "确定全部提取吗?", MsgWindow.MsgMode.OnlyOk)
msg_tip.onOk:Add(function(...)
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
fgCtr:FG_TakeHp1(self.group_id, member.uid, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if self._is_destroy then
return
end
@ -486,7 +486,7 @@ end
function M:MovePartner(parent_id, member, obj)
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_MovePartner(self.group_id, member.uid, parent_id, function(res1)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if (res1.ReturnCode == 0) then
member.parentId = parent_id
member.partnerLev = res1.Data.partnerLev

View File

@ -56,10 +56,10 @@ function M:FillView()
return
end
if self._texnum_str == "" then return end
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_AddMember(self.group_id, tonumber(self._texnum_str), function(response)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if (response.ReturnCode == 0) then
ViewUtil.ErrorTip(-1, "添加成功!", 1)
else
@ -86,10 +86,10 @@ end
function M:GetJoinsData()
local group = DataManager.groups:get(self.group_id)
if group.joins > 0 then
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GroupJoins(self.group_id, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if (res.ReturnCode == 0) then
local joins = res.Data.joins
group.joins = #joins
@ -127,10 +127,10 @@ function M:FillJoinList(data)
end
function M:VerifyPlayerJoin(id, allow)
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GroupVerifyJoin(self.group_id, id, allow, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if (res.ReturnCode == 0) then
self:GetJoinsData()
else

View File

@ -16,7 +16,9 @@ function GroupMngAddPartner.new(group_id, member, callback)
return self
end
function M:init(url)
BaseWindow.init(self,url)
local member = self.member
@ -35,7 +37,7 @@ function M:init(url)
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res1.ReturnCode == 0 then
member.parentId = res1.Data.parentId
member.partnerLev = res1.Data.partnerLev
@ -48,4 +50,5 @@ function M:init(url)
end)
end
return M

View File

@ -20,6 +20,7 @@ function GroupMngFagListView.new(group_id)
end
function M:initData()
self.fag_result_data = {}
self.fag_data = {}
@ -35,6 +36,9 @@ function M:initData()
end
function M:FillView()
self._view = UIPackage.CreateObjectFromURL("ui://NewGroup/View_GroupFagList")
local group = DataManager.groups:get(self.group_id)
if group.lev < 3 then
@ -68,6 +72,7 @@ function M:FillView()
self.fag_data = {}
self:GetFagData(0)
else
self.quary_id = 0
self.query_nick = ""
@ -93,8 +98,7 @@ function M:FillView()
self.query_nick = ""
end)
self.time_panel1 = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"),
self._view:GetChild("btn_date2"), -308, 0, function()
self.time_panel1 = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"), -308, 0, function()
self:GetMngFagInfo()
end)
end
@ -112,7 +116,7 @@ function M:GetFagData(index)
self.fag_result_data = {}
end
end
ViewUtil.ShowModalWait2(nil)
ViewUtil.ShowModalWait(nil)
--type1管理员加分2管理员减分3合伙人加分4合伙人减分
local type = self._view:GetController("page").selectedIndex + 1
@ -122,7 +126,7 @@ function M:GetFagData(index)
end
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetMngHpLog(self.group_id, index, num, type, qid, qName, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if self._is_destroy then
return
end
@ -152,10 +156,10 @@ end
-- 获取体力值统计
function M:GetHpStatistic()
-- ViewUtil.ShowModalWait2(nil, "正在获取数据")
-- ViewUtil.ShowModalWait(nil, "正在获取数据")
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetMngHpStatistic(self.group_id, function(res)
-- ViewUtil.CloseModalWait2()
-- ViewUtil.CloseModalWait()
if self._is_destroy then
return
end
@ -172,13 +176,13 @@ end
-- 获取管理员总计/合伙人总计
function M:GetMngFagInfo()
ViewUtil.ShowModalWait2(nil)
ViewUtil.ShowModalWait(nil)
local begin_time, end_time = self.time_panel1:GetDate()
local group = DataManager.groups:get(self.group_id)
local type = group.lev < 3 and 1 or 2
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetMngHpInfo(self.group_id, type, begin_time, end_time, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if self._is_destroy then
return
end

View File

@ -127,12 +127,12 @@ function M:OnRenderItem(index, obj)
local msg_del = MsgWindow.new(nil, "删除该玩法,该玩法的相关数据也会被清除。\r确定要删除吗?", MsgWindow.MsgMode.OkAndCancel)
msg_del.onOk:Add(function(...)
local fgCtr = ControllerManager.GetController(NewGroupController)
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
fgCtr:FG_DelPlay(self.group_id, play.id, function(res)
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode == 0 then
group:delPlay(play.id)
self.lst_play.numItems = #group.playList
@ -170,12 +170,12 @@ end
function M:MarkPlay(markS, pid, isMark)
local fgCtr = ControllerManager.GetController(NewGroupController)
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
fgCtr:FG_MarkPlay(self.group_id, pid, isMark, function(res)
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode == 0 then
local group = DataManager.groups:get(self.group_id)
group:markPlay(pid, isMark)
@ -229,12 +229,12 @@ end
-- 禁止、恢复玩法
function M:BanPlay(pid, ban)
local fgCtr = ControllerManager.GetController(NewGroupController)
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
fgCtr:FG_BanPlay(self.group_id, pid, ban, function(res)
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode == 0 then
local group = DataManager.groups:get(self.group_id)
group:banPlay(pid, ban)

View File

@ -1,3 +1,4 @@
-- 开桌统计
local GroupMngMemberInfoView = {}
@ -16,10 +17,11 @@ function M:initData()
end
function M:ShowPeopleNum()
ViewUtil.ShowModalWait2(nil)
ViewUtil.ShowModalWait(nil)
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetMembersCount(self.group_id,function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode == 0 then
self._view:GetChild('tex_memb_num').text = res.Data.member_num
@ -30,6 +32,10 @@ end
function M:InitView()
self._view = UIPackage.CreateObjectFromURL("ui://NewGroup/View_GroupMemberInfo")
end
return M

View File

@ -75,11 +75,11 @@ function M:FillView()
local ctr_search = self._view:GetController('search')
self._view:GetChild('btn_search').onClick:Set(
function()
ViewUtil.ShowModalWait2(nil)
ViewUtil.ShowModalWait(nil)
local text = self._view:GetChild('tex_id').text
local qid, qnick
if text == "" then
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
ViewUtil.ErrorTip(nil, '输入不能为空')
return
end
@ -90,7 +90,7 @@ function M:FillView()
self.group_id,
qid,
function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if self._is_destroy then
return
end
@ -141,7 +141,7 @@ function M:FillView()
if self._texnum_str == '' then
return
end
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:GetAddMember(
self.group_id,
@ -149,7 +149,7 @@ function M:FillView()
function(response)
printlog("响应获取添加玩家==》》》")
pt(response)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if (response.ReturnCode and response.ReturnCode == 0) then
GroupAddMemberInfoView.new(self.group_id, tonumber(self._texnum_str)):SetAddMember(response.Data)
self:ClearNumTex()
@ -191,7 +191,7 @@ function M:GetMemberData(index)
group:clearMember()
end
ViewUtil.ShowModalWait2(nil)
ViewUtil.ShowModalWait(nil)
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GroupMembers11(
self.group_id,
@ -200,7 +200,7 @@ function M:GetMemberData(index)
false,
1,
function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, '获取成员列表失败')
else
@ -222,14 +222,14 @@ local function __change_fag(gid, pid, is_add, cur_hp, callback)
nil,
function(num)
num = ad2d((is_add and num or -num))
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_ChangeFag(
gid,
pid,
num,
function(res1)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
-- if gniv._is_destroy then
-- return
-- end
@ -397,11 +397,11 @@ function M:FillItem(obj, member, refresh)
obj:GetChild("super_btn").onClick:Set(
function()
ViewUtil.ShowModalWait2(nil)
ViewUtil.ShowModalWait(nil)
local text = member.uid
local qid, qnick
if text == "" then
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
ViewUtil.ErrorTip(nil, '输入不能为空')
return
end
@ -412,7 +412,7 @@ function M:FillItem(obj, member, refresh)
self.group_id,
qid,
function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if self._is_destroy then
return
end
@ -449,12 +449,12 @@ end
function M:GetJoinsData()
local group = DataManager.groups:get(self.group_id)
if group.joins > 0 then
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GroupJoins(
self.group_id,
function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if (res.ReturnCode == 0) then
local joins = res.Data.joins
group.joins = #joins
@ -497,14 +497,14 @@ function M:FillJoinList(data)
end
function M:VerifyPlayerJoin(id, allow)
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GroupVerifyJoin(
self.group_id,
id,
allow,
function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if (res.ReturnCode == 0) then
self:GetJoinsData()
else

View File

@ -94,11 +94,11 @@ function M:FillView()
local ctr_search = self._view:GetController('search')
self._view:GetChild('btn_search').onClick:Set(
function()
ViewUtil.ShowModalWait2(nil)
ViewUtil.ShowModalWait(nil)
local text = self._view:GetChild('tex_id').text
local qid, qnick
if text == "" then
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
ViewUtil.ErrorTip(nil, '输入不能为空')
return
end
@ -109,7 +109,7 @@ function M:FillView()
self.group_id,
qid,
function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if self._is_destroy then
return
end
@ -160,7 +160,7 @@ function M:FillView()
if self._texnum_str == '' then
return
end
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:GetAddMember(
self.group_id,
@ -168,7 +168,7 @@ function M:FillView()
function(response)
printlog("响应获取添加玩家==》》》")
pt(response)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if (response.ReturnCode and response.ReturnCode == 0) then
GroupAddMemberInfoView.new(self.group_id, tonumber(self._texnum_str)):SetAddMember(response.Data)
self:ClearNumTex()
@ -226,7 +226,7 @@ function M:GetMemberData(index)
group:clearMember()
end
ViewUtil.ShowModalWait2(nil)
ViewUtil.ShowModalWait(nil)
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GroupMembers12(
self.group_id,
@ -235,7 +235,7 @@ function M:GetMemberData(index)
self.stype,
self.online,
function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, '获取成员列表失败')
else
@ -257,14 +257,14 @@ local function __change_fag(gid, pid, is_add, cur_hp, callback)
nil,
function(num)
num = ad2d((is_add and num or -num))
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_ChangeFag(
gid,
pid,
num,
function(res1)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
-- if gniv._is_destroy then
-- return
-- end
@ -471,11 +471,11 @@ function M:FillItem(obj, member, refresh)
superBtn.visible = group.lev == 1
obj:GetChild("super_btn").onClick:Set(
function()
ViewUtil.ShowModalWait2(nil)
ViewUtil.ShowModalWait(nil)
local text = member.uid
local qid, qnick
if text == "" then
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
ViewUtil.ErrorTip(nil, '输入不能为空')
return
end
@ -486,7 +486,7 @@ function M:FillItem(obj, member, refresh)
self.group_id,
qid,
function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if self._is_destroy then
return
end
@ -523,12 +523,12 @@ end
function M:GetJoinsData()
local group = DataManager.groups:get(self.group_id)
if group.joins > 0 then
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GroupJoins(
self.group_id,
function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if (res.ReturnCode == 0) then
local joins = res.Data.joins
group.joins = #joins
@ -571,14 +571,14 @@ function M:FillJoinList(data)
end
function M:VerifyPlayerJoin(id, allow)
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GroupVerifyJoin(
self.group_id,
id,
allow,
function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if (res.ReturnCode == 0) then
self:GetJoinsData()
else

View File

@ -34,8 +34,7 @@ function M:InitView()
self:GetRecordData(self.lst_record.numItems)
end)
self.time_panel = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"),
-308, 0)
self.time_panel = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"), -308, 0)
local ctr_page = self._view:GetController("type")
ctr_page.onChanged:Set(function()
@ -54,21 +53,25 @@ function M:InitView()
self.begin_time, self.end_time = self.time_panel:GetDate()
self:GetRecordData(0)
end)
end
-- 获取合伙人数据
function M:GetPartnerData(callback)
ViewUtil.ShowModalWait2(nil)
ViewUtil.ShowModalWait(nil)
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetPartnerList(self.group_id, 1, nil, nil, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
callback(res)
end)
end
function M:GetRecordData(index,init)
if init == nil or init == false then
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
end
quary_id = tonumber(self._view:GetChild("tex_id").text)
@ -83,13 +86,13 @@ function M:GetRecordData(index, init)
end
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetMemberStat(self.group_id, quary_id, partner_id, index, 6, time_type, self.begin_time, self.end_time,
function(res)
fgCtr:FG_GetMemberStat(self.group_id, quary_id,partner_id, index, 6, time_type,self.begin_time,self.end_time,function(res)
if init == nil or init == false then
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
end
if res.ReturnCode == 0 then
local members = res.Data.members
for i = 1, #members do
self.record_data[#self.record_data + 1] = members[i]
@ -100,6 +103,7 @@ function M:GetRecordData(index, init)
end
function M:FillRecordItem(data, obj)
obj:GetChild("tex_name").text = ViewUtil.stringEllipsis(data.nick)
obj:GetChild("tex_round").text = ""..data.round
obj:GetChild("tex_win").text = ""..data.win
@ -121,4 +125,5 @@ function M:OnRenderRecordItem(index, obj)
self:FillRecordItem(data, obj)
end
return M

View File

@ -68,22 +68,24 @@ function M:InitView()
end
local btn_ok = self._view:GetChild("btn_ok")
btn_ok.onClick:Set(function()
ViewUtil.ShowModalWait2(nil)
ViewUtil.ShowModalWait(nil)
local qid = tonumber(self._view:GetChild("tex_num").text)
if not qid then
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
ViewUtil.ErrorTip(nil, "输入ID进行搜索")
return
end
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_FindMember(self.group_id, qid, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if self._is_destroy then
return
end
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "找不到成员!")
else
local member = res.Data
if member.parentId ~= 0 and member.parentId ~= DataManager.SelfUser.account_id then
ViewUtil.ErrorTip(res.ReturnCode, "找不到成员!")
@ -123,23 +125,28 @@ function M:OnNumButtonAction(context)
end
else
if (self._currenIndex < 6) then
self._currenIndex = self._currenIndex + 1
self._texnum_str = self._texnum_str .. typer
self.tex_num.text = self._texnum_str
end
end
end
-- 获取合伙人数据
function M:GetPartnerData(index,callback)
local group = DataManager.groups:get(self.group_id)
if index == 0 then
self.partner_data = {}
end
ViewUtil.ShowModalWait2(nil)
ViewUtil.ShowModalWait(nil)
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetPartnerList(self.group_id, 0, index, 10, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取合伙人列表失败")
else
@ -154,18 +161,21 @@ end
-- 获取合伙人数据
function M:QueryPartnerData(query_id,query_nick)
query_nick = query_nick or ""
query_id = query_id or 0
local group = DataManager.groups:get(self.group_id)
ViewUtil.ShowModalWait2(nil)
ViewUtil.ShowModalWait(nil)
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_QueryPartnerList(self.group_id, query_id, query_nick, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取合伙人列表失败")
else
if res.Data.members ~= nil and #res.Data.members > 0 then
self._view:GetController("search").selectedIndex = 1
local lst_partner_search = self._view:GetChild("lst_partner_search")
@ -201,10 +211,10 @@ end
local function __change_fag(gid, pid, is_add, cur_hp, callback)
local gniv = GroupNumberInputView.new(nil, function(num)
num = ad2d((is_add and num or -num))
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_ChangeFag(gid, pid, num, function(res1)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
-- if gniv._is_destroy then
-- return
-- end
@ -233,6 +243,7 @@ end
-- 填充合伙人对象
function M:FillItem(obj, partner)
local group = DataManager.groups:get(self.group_id)
local perm_array = MngPermission.getPermData(group.permission)
@ -272,6 +283,7 @@ function M:FillItem(obj, partner)
end)
end)
obj:GetChild("btn_fag_minus").onClick:Set(function()
if not CheckPermission(group.lev, perm_array[MngPermissionList.SetFag]) then
return
end
@ -319,8 +331,13 @@ function M:FillItem(obj, partner)
local GroupMngPartnerListView2 = GroupMngPartnerListView2.new(self.group_id,partner.uid)
GroupMngPartnerListView2:Show()
end)
end
-- 列表对象填充
function M:OnRenderItem(index, obj)
local partner = self.partner_data[index + 1]

View File

@ -67,22 +67,24 @@ function M:InitView()
end
local btn_ok = self._view:GetChild("btn_ok")
btn_ok.onClick:Set(function()
ViewUtil.ShowModalWait2(nil)
ViewUtil.ShowModalWait(nil)
local qid = tonumber(self._view:GetChild("tex_num").text)
if not qid then
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
ViewUtil.ErrorTip(nil, "输入ID进行搜索")
return
end
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_FindMember(self.group_id, qid, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if self._is_destroy then
return
end
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "找不到成员!")
else
local member = res.Data
if member.parentId ~= 0 and member.parentId ~= DataManager.SelfUser.account_id then
ViewUtil.ErrorTip(res.ReturnCode, "找不到成员!")
@ -122,23 +124,28 @@ function M:OnNumButtonAction(context)
end
else
if (self._currenIndex < 6) then
self._currenIndex = self._currenIndex + 1
self._texnum_str = self._texnum_str .. typer
self.tex_num.text = self._texnum_str
end
end
end
-- 获取合伙人数据
function M:GetPartnerData(index,callback)
local group = DataManager.groups:get(self.group_id)
if index == 0 then
self.partner_data = {}
end
ViewUtil.ShowModalWait2(nil)
ViewUtil.ShowModalWait(nil)
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GroupTiChu(self.group_id, index, 10, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取踢出列表失败")
else
@ -155,18 +162,21 @@ end
-- 获取合伙人数据
function M:QueryPartnerData(query_id,query_nick)
query_nick = query_nick or ""
query_id = query_id or 0
local group = DataManager.groups:get(self.group_id)
ViewUtil.ShowModalWait2(nil)
ViewUtil.ShowModalWait(nil)
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_QueryPartnerList(self.group_id, query_id, query_nick, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取合伙人列表失败")
else
if res.Data.members ~= nil and #res.Data.members > 0 then
-- self._view:GetController("search").selectedIndex = 1
local lst_partner_search = self._view:GetChild("lst_partner_search")
@ -202,10 +212,10 @@ end
local function __change_fag(gid, pid, is_add, cur_hp, callback)
local gniv = GroupNumberInputView.new(nil, function(num)
num = ad2d((is_add and num or -num))
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_ChangeFag(gid, pid, num, function(res1)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
-- if gniv._is_destroy then
-- return
-- end
@ -234,6 +244,7 @@ end
-- 填充合伙人对象
function M:FillItem(obj, partner)
local group = DataManager.groups:get(self.group_id)
local perm_array = MngPermission.getPermData(group.permission)
@ -274,6 +285,7 @@ function M:FillItem(obj, partner)
end)
end)
obj:GetChild("btn_fag_minus").onClick:Set(function()
if not CheckPermission(group.lev, perm_array[MngPermissionList.SetFag]) then
return
end
@ -319,6 +331,9 @@ function M:FillItem(obj, partner)
end)
end
-- 列表对象填充
function M:OnRenderItem(index, obj)
local partner = self.partner_data[index + 1]

View File

@ -24,6 +24,8 @@ function GroupMngPartnerListView2.new(gid, tagId)
return self
end
function M:InitView()
-- self._view = UIPackage.CreateObjectFromURL("ui://NewGroup/Win_StatMember")
BaseWindow.init(self,"ui://NewGroup/Win_StatMember")
@ -44,16 +46,20 @@ function M:InitView()
self:GetPartnerData(0)
end
-- 获取合伙人数据
function M:GetPartnerData(index,callback)
local group = DataManager.groups:get(self.group_id)
if index == 0 then
self.partner_data = {}
end
ViewUtil.ShowModalWait2(nil)
ViewUtil.ShowModalWait(nil)
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetPartnerList(self.group_id, 0, index, 10, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取合伙人列表失败")
else
@ -69,19 +75,23 @@ end
-- 获取合伙人数据
function M:QueryPartnerData(query_id,query_nick)
query_nick = query_nick or ""
query_id = query_id or 0
local group = DataManager.groups:get(self.group_id)
ViewUtil.ShowModalWait2(nil)
ViewUtil.ShowModalWait(nil)
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_QueryPartnerList(self.group_id, query_id, query_nick, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取合伙人列表失败")
else
if res.Data.members ~= nil and #res.Data.members > 0 then
local lst_partner_search = self._view:GetChild("lst_partner_search")
lst_partner_search:RemoveChildrenToPool()
for i = 1, #res.Data.members do
@ -115,10 +125,10 @@ end
local function __change_fag(gid, pid, is_add, cur_hp, callback)
local gniv = GroupNumberInputView.new(nil, function(num)
num = ad2d((is_add and num or -num))
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_ChangeFag(gid, pid, num, function(res1)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
-- if gniv._is_destroy then
-- return
-- end
@ -147,6 +157,7 @@ end
-- 填充合伙人对象
function M:FillItem(obj, partner)
local group = DataManager.groups:get(self.group_id)
local perm_array = MngPermission.getPermData(group.permission)
@ -181,9 +192,11 @@ function M:FillItem(obj, partner)
end
self.lst_partner.numItems = #self.partner_data
-- 搜索出的玩家显示
end)
end)
obj:GetChild("btn_fag_minus").onClick:Set(function()
if not CheckPermission(group.lev, perm_array[MngPermissionList.SetFag]) then
return
end
@ -199,6 +212,7 @@ function M:FillItem(obj, partner)
end
self.lst_partner.numItems = #self.partner_data
-- 搜索出的玩家显示
end)
end)
@ -239,6 +253,9 @@ function M:FillItem(obj, partner)
)
end
-- 列表对象填充
function M:OnRenderItem(index, obj)
local partner = self.partner_data[index + 1]

View File

@ -261,14 +261,14 @@ function M:GetRewardsData()
local data
if #self.search_partner_data == 0 then
if #self.partner_data == 0 then return end
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
data = self.partner_data[self.lst_partner.selectedIndex + 1]
else
data = self.search_partner_data[1]
end
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetRewards(self.group_id, data.uid, data.partnerLev, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if self._is_destroy then
return
end
@ -296,7 +296,7 @@ function M:GetRewardsLog()
local data
if #self.search_partner_data == 0 then
if #self.partner_data2 == 0 then return end
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
data = self.partner_data2[self.lst_partner2.selectedIndex + 1]
else
data = self.search_partner_data[1]
@ -304,7 +304,7 @@ function M:GetRewardsLog()
local begin_time, end_time = self.time_panel1:GetDate()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetRewardsLog(self.group_id, #self.rewards_log, 6, begin_time, end_time, data.uid, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if self._is_destroy then
return
end
@ -333,13 +333,13 @@ end
-- 获取奖励统计
function M:GetRewardsStatistic()
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local data = self.partner_data2[self.lst_partner2.selectedIndex + 1]
local begin_time, end_time = self.time_panel2:GetDate()
local pid = tonumber(self._view:GetChild("cb_play").value)
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetRewardStatistic(self.group_id, pid, begin_time, end_time, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if self._is_destroy then
return
end
@ -429,9 +429,9 @@ function M:OnRenderRewardsItem(index, obj)
end
local fgCtr = ControllerManager.GetController(NewGroupController)
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
fgCtr:FG_SetRewards(self.group_id, data.pid, pdata.partnerLev, pdata.uid, false, tem, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "设置合伙人奖励失败")
else
@ -453,10 +453,10 @@ function M:OnRenderRewardsItem(index, obj)
pdata = self.search_partner_data[1]
end
local fgCtr = ControllerManager.GetController(NewGroupController)
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
fgCtr:FG_SetRewards(self.group_id, data.pid, pdata.partnerLev, pdata.uid, true, data.cur_value,
function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "设置合伙人奖励失败")
else

View File

@ -31,7 +31,7 @@ end
-- local fgCtr = ControllerManager.GetController(NewGroupController)
-- fgCtr:FG_GetMembersCount(self.group_id,function(res)
-- ViewUtil.CloseModalWait2()
-- ViewUtil.CloseModalWait()
-- if res.ReturnCode == 0 then
-- self._view:GetChild('tex_memb_num').text = res.Data.member_num
@ -97,11 +97,11 @@ function M:InitView()
self._view:GetChild('btn_search').onClick:Set(
function()
--printlog("aaaaaaaaaa1111111111111111111111111111111111111111111111")
ViewUtil.ShowModalWait2(nil)
ViewUtil.ShowModalWait(nil)
local text = self._view:GetChild('tex_id').text
local qid, qnick
if text == "" then
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
ViewUtil.ErrorTip(nil, '输入不能为空')
return
end
@ -118,7 +118,7 @@ function M:InitView()
function(res)
-- printlog("aaaaaaaaaaaaaaaa22222222222222222222222222222")
-- pt(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if self._is_destroy then
return
end
@ -149,7 +149,7 @@ function M:InitView()
end
function M:GetRecordData(index)
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local time_type = self._view:GetController("type").selectedIndex
if self.begin_time ~= nil and self.end_time ~= nil then
@ -158,7 +158,7 @@ function M:GetRecordData(index)
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetPartnerStat(self.group_id, index, 6, time_type, self.begin_time, self.end_time, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode == 0 then
local members = res.Data.members
@ -206,10 +206,10 @@ function M:FillRecordItem(data, obj)
local btn_check_members = obj:GetChild("btn_check_members")
btn_check_members.onClick:Set(function()
ViewUtil.ShowModalWait2(self._root_view)
ViewUtil.ShowModalWait(self._root_view)
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetTotalHp(self.group_id, data.uid, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode == 0 then
local hp = d2ad(res.Data.hp)
tex_total_score.text = hp
@ -261,7 +261,7 @@ function M:FillRecordItem(data, obj)
local gfiv = GroupNumberInputView.new(self._root_view, function(num)
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_SetPartnerThreshold(self.group_id, data.uid, num, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "设置失败")
else

View File

@ -31,8 +31,7 @@ function M:InitView()
self:GetRecordData(self.lst_record.numItems)
end)
self.time_panel = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"),
-308, 0)
self.time_panel = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"), -308, 0)
self.begin_time, self.end_time = self.time_panel:GetDate()
local ctr_page = self._view:GetController("type")
ctr_page.onChanged:Set(function()
@ -53,7 +52,8 @@ function M:InitView()
end
function M:GetRecordData(index)
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local time_type = self._view:GetController("type").selectedIndex
@ -62,12 +62,12 @@ function M:GetRecordData(index)
end
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetGroupPersonRecord(self.group_id, GetPlatform(), DataManager.SelfUser.account_id, time_type,
self.begin_time, self.end_time, index, 6, function(res)
fgCtr:FG_GetGroupPersonRecord(self.group_id, GetPlatform(), DataManager.SelfUser.account_id, time_type, self.begin_time, self.end_time, index, 6, function(res)
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取回放数据失败")
else
@ -77,9 +77,7 @@ function M:GetRecordData(index)
end
self.lst_record.numItems = #self.record_data
printlog("ccccccccccccccccccccccccccccccccccc2222223333333333333333333333333333333", res.Data
.total_round,
" ", res.Data.valid_round)
printlog("ccccccccccccccccccccccccccccccccccc2222223333333333333333333333333333333",res.Data.total_round," ",res.Data.valid_round)
pt(res.Data)
if index == 0 then
--self._view:GetChild("tex_num1").text = ""..res.Data.total
@ -173,8 +171,9 @@ function M:OnRenderRecordItem(index, obj)
self:FillRecordItem(data, obj)
end
function M:OnShareScreenShot(room_id, room_type_str, room_time_str, totalScore, hpOnOff, hpType)
ViewUtil.ShowModalWait2(self._view, "正在分享...")
ViewUtil.ShowModalWait(self._view, "正在分享...")
UIPackage.AddPackage("base/rank/ui/Rank")
local result_view = UIPackage.CreateObjectFromURL("ui://Rank/ResultView")
result_view.visible = false
@ -213,7 +212,7 @@ function M:OnShareScreenShot(room_id, room_type_str, room_time_str, totalScore,
ShareScreenShotWithOption(function()
result_view:Dispose()
end)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
break
end
coroutine.wait(1)
@ -292,13 +291,13 @@ function M:OnShowRecordInfo(rdata, ids)
main._totalRound = tonumber(rdata.round)
main:FillRoomData(DataManager.SelfUser.playback[playback_id][i])
else
ViewUtil.ShowModalWait2(self._view)
ViewUtil.ShowModalWait(self._view)
local _data = {}
_data["military_id"] = playback_id
_data["round"] = tostring(i)
local loddyCtr1 = ControllerManager.GetController(LoddyController)
loddyCtr1:RequestPlayBack(_data,function(code,data)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if code == 0 then
if DataManager.SelfUser.playback[playback_id] ~= nil then
DataManager.SelfUser.playback[playback_id][i] = data

View File

@ -13,6 +13,7 @@ function GroupMngPlayStatView.new(gid)
end
function M:initData()
self:GetConsumeStatData()
end
@ -33,19 +34,18 @@ function M:InitView()
self:GetConsumeStatData()
end)
self.time_panel = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"),
-308, 0)
self.time_panel = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"), -308, 0)
end
function M:GetConsumeStatData()
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local begin_time, end_time = self.time_panel:GetDate()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetConsumeStat(self.group_id,begin_time,end_time, function(res)
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取统计数据失败")
else
@ -62,6 +62,7 @@ function M:GetConsumeStatData()
end
self.lst_consume_stat.numItems = #self.consume_stat
end
end)
end

View File

@ -36,20 +36,19 @@ function M:FillView()
self:GetPropData(self.lst_prop.numItems)
end)
self.time_panel = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"),
-308, 0)
self.time_panel = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"), -308, 0)
end
-- 获取抽水数据
function M:GetPropData(index)
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local begin_time, end_time = self.time_panel:GetDate()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetPropLog(self.group_id, index, 8, begin_time, end_time, function(res)
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取排名信息失败")
else

View File

@ -138,14 +138,12 @@ function M:FillView()
end
end)
self.time_panel = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"),
-308, 0)
self.time_panel1 = TimeSettingPanel.new(self._view, self._view:GetChild("btndate1"), self._view:GetChild("btndate2"),
-308, 0)
self.time_panel = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"), -308, 0)
self.time_panel1 = TimeSettingPanel.new(self._view, self._view:GetChild("btndate1"), self._view:GetChild("btndate2"), -308, 0)
end
function M:GetRankData(index)
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local begin_time, end_time = self.time_panel:GetDate()
local pid = tonumber(self._view:GetChild("cb_play").value)
local fgCtr = ControllerManager.GetController(NewGroupController)
@ -153,7 +151,7 @@ function M:GetRankData(index)
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取排名信息失败")
else
@ -169,7 +167,7 @@ function M:GetRankData(index)
end
function M:GetWinRankData(index)
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local begin_time, end_time = self.time_panel1:GetDate()
local pid = tonumber(self._view:GetChild("cb_play").value)
local fgCtr = ControllerManager.GetController(NewGroupController)
@ -177,7 +175,7 @@ function M:GetWinRankData(index)
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取总输赢排名信息失败")
else
@ -236,14 +234,14 @@ function M:OnRenderWinRankItem(index, obj)
end
function M:GetRoundData()
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local pid = tonumber(self._view:GetChild("cb_play").value)
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetRoundStat(self.group_id, pid, function(res)
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取排名信息失败")
else

View File

@ -1,4 +1,3 @@
local TimeSettingPanel = import(".TimeSettingPanel")
-- 开桌统计
local GroupMngRoomStatView = {}
@ -31,10 +30,6 @@ function M:InitView()
self.player_record_data = {} --指定玩家的回放数据
self.qid = 0 --查询玩家id
self.time_panel = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"),
-308, 0)
self.begin_time, self.end_time = self.time_panel:GetDate()
self.lst_record_find = self._view:GetChild("lst_record_find")
self.lst_record_find:SetVirtual()
self.lst_record_find.itemRenderer = function(index, obj)
@ -57,6 +52,7 @@ function M:InitView()
end
self.lst_player_record.scrollPane.onPullUpRelease:Set(function()
self:GetRecordData(self.lst_player_record.numItems, self.qid)
end)
self._view:GetChild("btn_search").onClick:Set(function()
@ -80,21 +76,21 @@ function M:InitView()
self.player_record_data = {}
self.lst_player_record.numItems = 0
self.isFindCode=false
end)
end
function M:GetRecordData(index, qid)
qid = qid or 0
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetGroupRecordSpe(self.group_id, GetPlatform(), qid, 0, index, 6, self.begin_time, self.end_time, 0,
function(res)
fgCtr:FG_GetGroupRecord(self.group_id, GetPlatform(), qid, index, 6, function(res)
printlog("ccccccccccccccccccccccccccccccccccccc")
pt(res)
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取回放数据失败")
else
@ -209,15 +205,16 @@ function M:OnRenderPlayerRecordItem(index, obj)
self:FillRecordItem(data, obj)
end
function M:GetRecordByRoomid()
local qid = self._view:GetChild("tex_id").text
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetRecordByRoomid(self.group_id, qid, GetPlatform(), function(res)
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取回放数据失败")
else
@ -234,7 +231,7 @@ function M:GetRecordByRoomid()
end
function M:OnShareScreenShot(room_id, room_type_str, room_time_str, totalScore, hpOnOff, hpType)
ViewUtil.ShowModalWait2(self._view, "正在分享...")
ViewUtil.ShowModalWait(self._view, "正在分享...")
UIPackage.AddPackage("base/rank/ui/Rank")
local result_view = UIPackage.CreateObjectFromURL("ui://Rank/ResultView")
result_view.visible = false
@ -273,7 +270,7 @@ function M:OnShareScreenShot(room_id, room_type_str, room_time_str, totalScore,
ShareScreenShotWithOption(function()
result_view:Dispose()
end)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
break
end
coroutine.wait(1)
@ -347,13 +344,13 @@ function M:OnShowRecordInfo(rdata, ids)
main._totalRound = tonumber(rdata.round)
main:FillRoomData(DataManager.SelfUser.playback[playback_id][i])
else
ViewUtil.ShowModalWait2(self._view)
ViewUtil.ShowModalWait(self._view)
local _data = {}
_data["military_id"] = playback_id
_data["round"] = tostring(i)
local loddyCtr1 = ControllerManager.GetController(LoddyController)
loddyCtr1:RequestPlayBack(_data,function(code,data)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if code == 0 then
if DataManager.SelfUser.playback[playback_id] ~= nil then
DataManager.SelfUser.playback[playback_id][i] = data

View File

@ -24,8 +24,11 @@ function M:initData()
self.begin_time = today
self.end_time = today + 86400
self:GetRecordData(0)
end
function M:InitView()
self._view = UIPackage.CreateObjectFromURL("ui://NewGroup/View_GroupXingYunStat")
@ -46,8 +49,7 @@ function M:InitView()
self:GetRecordData(self.lst_record.numItems)
end)
self.time_panel = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"),
-308, 0, nil, true)
self.time_panel = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"), -308, 0, nil, true)
local ctr_page = self._view:GetController("type")
ctr_page.onChanged:Set(function()
@ -76,10 +78,13 @@ function M:InitView()
end)
self.totalwin = self._view:GetChild("tex_alltotal")
end
function M:GetRecordData(index)
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local time_type = self._view:GetController("type").selectedIndex
if self.begin_time ~= nil and self.end_time ~= nil then
@ -88,9 +93,11 @@ function M:GetRecordData(index)
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetXingYunStat(self.group_id, index, 6, time_type,self.begin_time,self.end_time,function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode == 0 then
local members = res.Data.members
self.totalwin.text = d2ad(res.Data.all_total_win)
@ -102,7 +109,9 @@ function M:GetRecordData(index)
end)
end
function M:FillRecordItem(data, obj)
local group = DataManager.groups:get(self.group_id)
obj:GetChild("tex_name").text = ViewUtil.stringEllipsis(data.nick)
@ -110,6 +119,7 @@ function M:FillRecordItem(data, obj)
obj:GetChild("tex_round_total").text = data.total_round
obj:GetChild("tex_total").text = d2ad(data.total_win)
obj:GetChild("tex_round_youxiao").text = data.valid_round / 100
end
function M:OnRenderRecordItem(index, obj)
@ -117,4 +127,5 @@ function M:OnRenderRecordItem(index, obj)
self:FillRecordItem(data, obj)
end
return M

View File

@ -24,8 +24,11 @@ function M:initData()
self.begin_time = today
self.end_time = today + 86400
self:GetRecordData(0)
end
function M:InitView()
self._view = UIPackage.CreateObjectFromURL("ui://NewGroup/View_GroupZuanShi")
@ -49,8 +52,7 @@ function M:InitView()
self:GetRecordData(self.lst_record.numItems)
end)
self.time_panel = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"),
-308, 0, nil, true)
self.time_panel = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"), -308, 0, nil, true)
local ctr_page = self._view:GetController("type")
ctr_page.onChanged:Set(function()
@ -76,11 +78,11 @@ function M:InitView()
self._view:GetChild('btn_search').onClick:Set(
function()
--printlog("aaaaaaaaaa1111111111111111111111111111111111111111111111")
ViewUtil.ShowModalWait2(nil)
ViewUtil.ShowModalWait(nil)
local text = self._view:GetChild('tex_id').text
local qid, qnick
if text == "" then
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
ViewUtil.ErrorTip(nil, '输入不能为空')
return
end
@ -97,7 +99,7 @@ function M:InitView()
function(res)
-- printlog("aaaaaaaaaaaaaaaa22222222222222222222222222222")
-- pt(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if self._is_destroy then
return
end
@ -127,8 +129,10 @@ function M:InitView()
)
end
function M:GetRecordData(index)
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local time_type = self._view:GetController("type").selectedIndex
if self.begin_time ~= nil and self.end_time ~= nil then
@ -137,9 +141,11 @@ function M:GetRecordData(index)
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetZuanShiStat(self.group_id, index, 6, time_type,self.begin_time,self.end_time,function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode == 0 then
local members = res.Data.members
--printlog("aaaaaaaaaaaaaacccccccccccccccccccccccccccccccc")
--pt(res)
@ -167,6 +173,7 @@ local function __showRewardsValue(rtype, cur_value, max_value, mng)
end
function M:FillRecordItem(data, obj)
local group = DataManager.groups:get(self.group_id)
obj:GetChild("tex_name").text = ViewUtil.stringEllipsis(data.nick).."("..data.total..")"
@ -185,6 +192,7 @@ function M:FillRecordItem(data, obj)
local gniv = GroupPartnerZuanShiMember.new(self.group_id,data.uid, 0,self.begin_time,self.end_time)
gniv:Show()
end)
end
function M:OnRenderRecordItem(index, obj)
@ -192,4 +200,5 @@ function M:OnRenderRecordItem(index, obj)
self:FillRecordItem(data, obj)
end
return M

View File

@ -22,6 +22,7 @@ function M:initView(url)
self.lst_allplays = self._view:GetChild("lst_allplays")
self.lst_allplays:SetVirtual()
self.lst_allplays.itemRenderer = function(index, obj)
self:OnRenderAllPlaysItem(index, obj)
end
self:GetBanPlaysData()
@ -31,7 +32,7 @@ end
function M:GetBanPlaysData()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetAllplays(self.group_id,self.uid, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if self._is_destroy then
return
end
@ -47,6 +48,8 @@ function M:GetBanPlaysData()
end)
end
-- 填充奖励设置对象
function M:OnRenderAllPlaysItem(index, obj)
local data = self.allplays_data[index + 1]
@ -61,7 +64,7 @@ function M:OnRenderAllPlaysItem(index, obj)
local bans = data.ban
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_SetBanPlayid(self.group_id,data.pid,data.ban,self.uid, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if self._is_destroy then
return
end
@ -74,6 +77,8 @@ function M:OnRenderAllPlaysItem(index, obj)
end
end)
end)
end
return M

View File

@ -76,10 +76,10 @@ function M:GetMemberData(index, quary_id, callback)
if index == 0 then
self.member_data = {}
end
ViewUtil.ShowModalWait2(nil)
ViewUtil.ShowModalWait(nil)
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetPartnerMembers(self.group_id, self.partner_id[self.top], index, 8, quary_id, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取合伙人成员列表失败")
else
@ -96,8 +96,10 @@ function M:GetMemberData(index, quary_id, callback)
end)
end
-- 填充合伙人成员对象
function M:FillItem(obj, data)
obj:GetChild("tex_id").text = data.uid
obj:GetChild("tex_name").text = ViewUtil.stringEllipsis(data.nick)
@ -119,7 +121,6 @@ function M:FillItem(obj, data)
self:GetMemberData(0)
end)
end
-- 填充列表
function M:OnRenderItem(index, obj)
local data = self.member_data[index + 1]

View File

@ -36,7 +36,7 @@ end
function M:GetRewardsData()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetRewards(self.group_id, self.partner_id, self.partner_lev, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if self._is_destroy then
return
end
@ -120,9 +120,9 @@ function M:OnRenderRewardsItem(index, obj)
end
local fgCtr = ControllerManager.GetController(NewGroupController)
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
fgCtr:FG_SetRewards(self.group_id, data.pid, self.partner_lev, self.partner_id, false, tem, 0, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "设置合伙人奖励失败")
else
@ -141,10 +141,10 @@ function M:OnRenderRewardsItem(index, obj)
msg_win.onOk:Add(function(...)
local single = msg_win.btnCheck.selected and 1 or 0
local fgCtr = ControllerManager.GetController(NewGroupController)
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
fgCtr:FG_SetRewards(self.group_id, data.pid, self.partner_lev, self.partner_id, true, data.cur_value, single,
function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "设置奖励失败")
else
@ -181,9 +181,9 @@ function M:OnRenderRewardsItem(index, obj)
end
local fgCtr = ControllerManager.GetController(NewGroupController)
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
fgCtr:FG_SetXIPAI(self.group_id, data.pid, self.partner_lev, self.partner_id, false, tem, 0, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "设置洗牌奖励失败")
else
@ -203,10 +203,10 @@ function M:OnRenderRewardsItem(index, obj)
local single = 0 --msg_win.btnCheck.selected and 1 or 0
local fgCtr = ControllerManager.GetController(NewGroupController)
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
fgCtr:FG_SetXIPAI(self.group_id, data.pid, self.partner_lev, self.partner_id, true, data.xipai_cur_value,
single, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "设置洗牌失败")
else
@ -245,9 +245,9 @@ function M:OnRenderRewardsItem(index, obj)
end
printlog("jefe btn_set2")
local fgCtr = ControllerManager.GetController(NewGroupController)
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
fgCtr:FG_SetANCHOU(self.group_id, data.pid, self.partner_lev, self.partner_id, false, tem, 0, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "设置管理奖励失败")
else
@ -267,10 +267,10 @@ function M:OnRenderRewardsItem(index, obj)
local single = 0 --msg_win.btnCheck.selected and 1 or 0
local fgCtr = ControllerManager.GetController(NewGroupController)
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
fgCtr:FG_SetANCHOU(self.group_id, data.pid, self.partner_lev, self.partner_id, true, data.anchou_cur_value,
single, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "设置管理失败")
else

View File

@ -18,9 +18,12 @@ function GroupPartnerScoreMgnView.new(group_id, member)
return self
end
-- 修改体力值
local function __change_limit(gid, pid, otype, limit,callback)
local gniv = GroupNumberInputView.new(nil, function(num)
local value = limit
if otype == 1 then
value = value + ad2d(num)
@ -34,10 +37,10 @@ local function __change_limit(gid, pid, otype, limit, callback)
ViewUtil.ErrorTip(1,"更改失败!")
end
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_SetTransHPLimit(gid, pid, value, function(res1)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if (res1.ReturnCode == 0) then
callback(res1.Data)
@ -45,11 +48,13 @@ local function __change_limit(gid, pid, otype, limit, callback)
ViewUtil.ErrorTip(res1.ReturnCode,"更改失败!")
end
end)
end, 0, nil)
gniv:Show()
end
function M:init(url)
BaseWindow.init(self,url)
local member = self.member
@ -69,6 +74,7 @@ function M:init(url)
ImageLoad.Load(member.portrait, self._view:GetChild("btn_head")._iconObject, self.class)
self._view:GetChild("btn_fag_add").onClick:Set(function()
__change_limit(self.group_id, member.uid, 1, self.limit,function(data)
self.limit = data.limit
self._view:GetChild("tex_fag").text = d2ad(self.limit)
@ -76,6 +82,8 @@ function M:init(url)
end)
self._view:GetChild("btn_fag_minus").onClick:Set(function()
__change_limit(self.group_id, member.uid, -1, self.limit,function(data)
self.limit = data.limit
self._view:GetChild("tex_fag").text = d2ad(self.limit)
@ -83,6 +91,8 @@ function M:init(url)
end)
self._view:GetChild("btn_manager").onClick:Set(function()
__change_limit(self.group_id, member.uid, 0, self.limit,function(data)
self.limit = data.limit
self._view:GetChild("tex_fag").text = d2ad(self.limit)
@ -93,14 +103,16 @@ function M:init(url)
end
function M:GetTransHPLimit()
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetTransHPLimit(self.group_id, self.member.uid, function(res)
if self._is_destroy then
return
end
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取数据失败")
@ -112,4 +124,5 @@ function M:GetTransHPLimit()
end)
end
return M

View File

@ -23,6 +23,7 @@ function GroupPartnerStatMember.new(group_id, uid, time_type, begin_time, end_ti
return self
end
function M:init(url)
BaseWindow.init(self,url)
self.members_log = {}
@ -59,11 +60,11 @@ function M:init(url)
self._view:GetChild('btn_search').onClick:Set(
function()
-- printlog("aaaaaaaaaa1111111111111111111111111111111111111111111111")
ViewUtil.ShowModalWait2(nil)
ViewUtil.ShowModalWait(nil)
local text = self._view:GetChild('tex_id').text
local qid, qnick
if text == "" then
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
ViewUtil.ErrorTip(nil, '输入不能为空')
return
end
@ -78,7 +79,7 @@ function M:init(url)
function(res)
-- printlog("aaaaaaaaaaaaaaaa22222222222222222222222222222")
-- pt(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if self._is_destroy then
return
end
@ -109,12 +110,13 @@ function M:init(url)
end
function M:getRewardsLog(index)
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local fgCtr = ControllerManager.GetController(NewGroupController)
local func = self.check_member and fgCtr.FG_GetDirectMemberStat or fgCtr.FG_GetPartnerStatMember
func(fgCtr, self.group_id, self.uids[self.top], self.uids[1], index, 6, self.time_type, self.begin_time,
self.end_time, function(res)
ViewUtil.CloseModalWait2()
func(fgCtr, self.group_id,self.uids[self.top],self.uids[1], index, 6, self.time_type, self.begin_time, self.end_time, function(res)
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取数据失败")
else
@ -149,8 +151,7 @@ function M:OnRenderItem(index, obj)
obj:GetChild("tex_score").text = d2ad(data.total_win)
obj:GetChild("tex_total_round").text = ""..data.total_round
obj:GetChild("tex_perfect_round").text = ""
obj:GetChild("tex_valid_round").text = "" ..
d2ad(data.reward_tongji) --""..d2ad(data.reward_hp)--(data.valid_round / 100)
obj:GetChild("tex_valid_round").text = ""..d2ad(data.reward_tongji)--""..d2ad(data.reward_hp)--(data.valid_round / 100)
local tex_reward = obj:GetChild("tex_reward")
tex_reward.text = d2ad(data.reward_tongji)+d2ad(data.total_win)--d2ad(data.reward_tongji)
@ -191,8 +192,8 @@ function M:OnRenderItem(index, obj)
local btn_zhanji = obj:GetChild("btn_zhanji")
btn_zhanji.onClick:Set(function()
local groupRecordView = GroupRecordView.new(self.group_id, data.uid, data.partnerLev > 0 and 1 or 0,
self.begin_time, self.end_time, self.time_type)
local groupRecordView = GroupRecordView.new(self.group_id,data.uid,data.partnerLev > 0 and 1 or 0, self.begin_time, self.end_time, self.time_type)
groupRecordView:Show()
end)
end
@ -204,8 +205,7 @@ function M:FillRecordItem(data, obj)
obj:GetChild("tex_score").text = d2ad(data.total_win)
obj:GetChild("tex_total_round").text = ""..data.total_round
obj:GetChild("tex_perfect_round").text = ""
obj:GetChild("tex_valid_round").text = "" ..
d2ad(data.reward_tongji) --""..d2ad(data.reward_hp)--(data.valid_round / 100)
obj:GetChild("tex_valid_round").text = ""..d2ad(data.reward_tongji)--""..d2ad(data.reward_hp)--(data.valid_round / 100)
local tex_reward = obj:GetChild("tex_reward")
tex_reward.text = d2ad(data.reward_tongji)+d2ad(data.total_win)--d2ad(data.reward_tongji)
@ -246,8 +246,8 @@ function M:FillRecordItem(data, obj)
local btn_zhanji = obj:GetChild("btn_zhanji")
btn_zhanji.onClick:Set(function()
local groupRecordView = GroupRecordView.new(self.group_id, data.uid, data.partnerLev > 0 and 1 or 0,
self.begin_time, self.end_time, self.time_type)
local groupRecordView = GroupRecordView.new(self.group_id,data.uid,data.partnerLev > 0 and 1 or 0, self.begin_time, self.end_time, self.time_type)
groupRecordView:Show()
end)
end

View File

@ -37,7 +37,7 @@ end
function M:getPartnerRewards(callback)
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetRewards(self.group_id, self.uid, self.partner_lev, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if self._is_destroy then
return
end
@ -55,9 +55,9 @@ function M:getPartnerRewards(callback)
end
function M:getRewardsLog(index)
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_GetPartnerStatPlay(self.group_id, self.uid, self.parent_id, index, 6, self.time_type, self.begin_time,
self.end_time, function(res)
fgCtr:FG_GetPartnerStatPlay(self.group_id,self.uid, self.parent_id, index, 6, self.time_type, self.begin_time, self.end_time, function(res)
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取数据失败")
else
@ -72,6 +72,7 @@ function M:getRewardsLog(index)
end)
end
function M:OnRenderItem(index, obj)
local data = self.members_log[index + 1]
@ -101,6 +102,7 @@ function M:OnRenderItem(index, obj)
end
end
end
end
return M

View File

@ -22,6 +22,7 @@ function GroupPartnerZuanShiMember.new(group_id, uid, time_type, begin_time, end
return self
end
function M:init(url)
BaseWindow.init(self,url)
self.members_log = {}
@ -58,11 +59,11 @@ function M:init(url)
self._view:GetChild('btn_search').onClick:Set(
function()
-- printlog("aaaaaaaaaa1111111111111111111111111111111111111111111111")
ViewUtil.ShowModalWait2(nil)
ViewUtil.ShowModalWait(nil)
local text = self._view:GetChild('tex_id').text
local qid, qnick
if text == "" then
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
ViewUtil.ErrorTip(nil, '输入不能为空')
return
end
@ -77,7 +78,7 @@ function M:init(url)
function(res)
-- printlog("aaaaaaaaaaaaaaaa22222222222222222222222222222")
-- pt(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if self._is_destroy then
return
end
@ -108,12 +109,13 @@ function M:init(url)
end
function M:getRewardsLog(index)
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local fgCtr = ControllerManager.GetController(NewGroupController)
local func = self.check_member and fgCtr.FG_GetDirectZuanShiStat or fgCtr.FG_GetPartnerZuanShiMember
func(fgCtr, self.group_id, self.uids[self.top], self.uids[1], index, 6, self.time_type, self.begin_time,
self.end_time, function(res)
ViewUtil.CloseModalWait2()
func(fgCtr, self.group_id,self.uids[self.top],self.uids[1], index, 6, self.time_type, self.begin_time, self.end_time, function(res)
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取数据失败")
else

View File

@ -31,8 +31,7 @@ function M:init(url)
self:getRewardsLog(self.lst_log.numItems+self.m_index)
end)
self.time_panel = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"),
-308, 0)
self.time_panel = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"), -308, 0)
self._view:GetChild("btn_search").onClick:Set(function()
self.rewards_log = {}
self:getRewardsLog(0)
@ -44,13 +43,14 @@ end
function M:getRewardsLog(index)
local begin_time, end_time = self.time_panel:GetDate()
local fgCtr = ControllerManager.GetController(NewGroupController)
ViewUtil.ShowModalWait2(nil)
ViewUtil.ShowModalWait(nil)
local limit = 6
if self.lev == 1 then
limit = 20
end
fgCtr:FG_GetRewardsLog(self.group_id, index, limit, begin_time, end_time, self.uid, function(res)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if res.ReturnCode ~= 0 then
ViewUtil.ErrorTip(res.ReturnCode, "获取提取详情失败")
else
@ -70,6 +70,7 @@ function M:GuoLv(data)
pt(data)
local tempList={}
if self.lev == 1 then
local m_data = {}
for i=1,#data do
if m_data[data[i].roomid] == nil then

View File

@ -41,14 +41,14 @@ function M:init(url)
self._view:GetChild("btn_qd1").onClick:Set(
function()
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_BanMemberHB(
self.group_id,
self.member_id,
0,
function(response)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if (response.ReturnCode == 0) then
self.currentSelectStateText.text = "整组调动 " .. (response.Data.black + 1)
ViewUtil.ErrorTip(-1, '设置成功!', 1)
@ -63,14 +63,14 @@ function M:init(url)
self._view:GetChild("btn_qd2").onClick:Set(
function()
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_BanMemberHB(
self.group_id,
self.member_id,
1,
function(response)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if (response.ReturnCode == 0) then
self.currentSelectStateText.text = "整组调动 " .. (response.Data.black + 1)
ViewUtil.ErrorTip(-1, '设置成功!', 1)
@ -84,14 +84,14 @@ function M:init(url)
self._view:GetChild("btn_qd3").onClick:Set(
function()
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_BanMemberHB(
self.group_id,
self.member_id,
2,
function(response)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if (response.ReturnCode == 0) then
self.currentSelectStateText.text = "整组调动 " .. (response.Data.black + 1)
ViewUtil.ErrorTip(-1, '设置成功!', 1)
@ -149,7 +149,7 @@ function M:init(url)
self._view:GetChild("btn_ok").onClick:Set(
function()
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local fgCtr = ControllerManager.GetController(NewGroupController)
fgCtr:FG_BanMemberHB(
self.group_id,
@ -158,7 +158,7 @@ function M:init(url)
tonumber(self.txtRate.text),
tonumber(self.txtBlack.text),
function(response)
ViewUtil.CloseModalWait2()
ViewUtil.CloseModalWait()
if (response.ReturnCode == 0) then
self.currentSelectStateText.text = "整组调动 " .. (response.Data.ban + 1)
self.blackList = { { 0, 0 }, { 25, 0 }, { 15, 0 } }

View File

@ -1,3 +1,4 @@
local GroupStatMember = {}
local M = GroupStatMember
@ -15,6 +16,7 @@ function GroupStatMember.new(group_id, uid)
return self
end
function M:init(url)
BaseWindow.init(self,url)
self.members_log = {}
@ -32,13 +34,15 @@ function M:init(url)
self.lst_member.numItems = 0
self:getRewardsLog(0)
end)
end
function M:getRewardsLog(index)
ViewUtil.ShowModalWait2()
ViewUtil.ShowModalWait()
local fgCtr = ControllerManager.GetController(NewGroupController)
end
function M:OnRenderItem(index, obj)
local data = self.members_log[index + 1]
--pt(data)

Some files were not shown because too many files have changed in this diff Show More