无法进入亲友圈可能报错地方提示错误,并且关闭等待页面

master
罗家炜 2025-06-23 18:53:11 +08:00
parent 095b2079fe
commit 41cc0821f7
3 changed files with 57 additions and 49 deletions

View File

@ -16,8 +16,12 @@ end
--获取圈列表 --获取圈列表
function M:FG_GroupList(callback) function M:FG_GroupList(callback)
local _client = ControllerManager.GroupClient local _client = ControllerManager.GroupClient
printlog("aaaaaaaaaaaaaaaaawwwwwwwwwwwwww") if not _client or not _client.send then
--pt(_client) ViewUtil.ShowBannerOnScreenCenter("无法进入亲友圈服务")
ViewUtil.CloseModalWait()
end
printlog("aaaaaaaaaaaaaaaaawwwwwwwwwwwwww", _client)
-- pt(_client)
_client:send(Protocol.WEB_FG_GROUP_LIST, nil, function(res) _client:send(Protocol.WEB_FG_GROUP_LIST, nil, function(res)
printlog("aaaaaaaaaaaaaaaaawwwwwwwwwwwwww1111111111111") printlog("aaaaaaaaaaaaaaaaawwwwwwwwwwwwww1111111111111")
pt(res) pt(res)

View File

@ -8,9 +8,9 @@ local GroupMainView = {}
local M = GroupMainView local M = GroupMainView
function GroupMainView.new(main_view, root_view,par_veiw) function GroupMainView.new(main_view, root_view, par_veiw)
--print(debug.traceback()) --print(debug.traceback())
local self = setmetatable({}, {__index = M}) local self = setmetatable({}, { __index = M })
self.class = 'GroupMainView' self.class = 'GroupMainView'
UIPackage.AddPackage('base/newgroup/ui/NewGroup') UIPackage.AddPackage('base/newgroup/ui/NewGroup')
self._view = main_view self._view = main_view
@ -21,7 +21,7 @@ function GroupMainView.new(main_view, root_view,par_veiw)
end end
function M:InitView(url) function M:InitView(url)
--print(url) --print(url)
-- BlurView(self._view:GetChild("bg"),true) -- BlurView(self._view:GetChild("bg"),true)
if DataManager.SelfUser.agent > 0 then if DataManager.SelfUser.agent > 0 then
self._view:GetController('agent').selectedIndex = 1 self._view:GetController('agent').selectedIndex = 1
@ -37,7 +37,7 @@ function M:InitView(url)
cgv:Show() cgv:Show()
cgv:SetCallback(function(name, pay_type, fg_type) cgv:SetCallback(function(name, pay_type, fg_type)
ViewUtil.ShowModalWait(cgv._root_view) ViewUtil.ShowModalWait(cgv._root_view)
fgCtr:FG_CreateGroup(name,pay_type,fg_type,function(res) fgCtr:FG_CreateGroup(name, pay_type, fg_type, function(res)
ViewUtil.CloseModalWait() ViewUtil.CloseModalWait()
if self._is_destroy then if self._is_destroy then
return return
@ -53,7 +53,7 @@ function M:InitView(url)
end) end)
self.btn_joingroup = self._par_veiw:GetChild('btn_join_group') self.btn_joingroup = self._par_veiw:GetChild('btn_join_group')
self.btn_joingroup.displayObject.gameObject:SetActive(false) self.btn_joingroup.displayObject.gameObject:SetActive(false)
--[[self.btn_joingroup.onClick:Set(function() --[[self.btn_joingroup.onClick:Set(function()
local groups = DataManager.groups.groupList local groups = DataManager.groups.groupList
if #groups == 0 then if #groups == 0 then
@ -131,23 +131,22 @@ end
function M:DEnterGroup() function M:DEnterGroup()
local groups = DataManager.groups.groupList local groups = DataManager.groups.groupList
if #groups == 0 then if #groups == 0 then
--local jgv = JoinGroupView.new(self._root_view) --local jgv = JoinGroupView.new(self._root_view)
--jgv:Show() --jgv:Show()
else else
local info = GroupInfoView.new(groups[1], self.fg_info) local info = GroupInfoView.new(groups[1], self.fg_info)
self._groupInfoView = info self._groupInfoView = info
info:SetCallBack(function() info:SetCallBack(function()
self._groupInfoView = nil self._groupInfoView = nil
self:Show() self:Show()
self._view.visible = true self._view.visible = true
end) end)
--info:Show() --info:Show()
--self._view.visible = false --self._view.visible = false
end end
end end
local function SortGroups(a, b) local function SortGroups(a, b)
local sort_a = 0 local sort_a = 0
local sort_b = 0 local sort_b = 0
@ -157,13 +156,13 @@ local function SortGroups(a, b)
return sort_a > sort_b return sort_a > sort_b
end end
function M:__fill_item(item,group) function M:__fill_item(item, group)
item:GetChild('tex_name').text = group.name item:GetChild('tex_name').text = group.name
item:GetChild('tex_id').text = "ID:".. group.id item:GetChild('tex_id').text = "ID:" .. group.id
local p_num = group.total_member_num local p_num = group.total_member_num
item:GetChild('tex_p_num').text = p_num > 99 and '99+' or p_num item:GetChild('tex_p_num').text = p_num > 99 and '99+' or p_num
if group.lev < 3 then if group.lev < 3 then
if group.lev == 1 then if group.lev == 1 then
item:GetChild('tex_room_num').text = group.room_num item:GetChild('tex_room_num').text = group.room_num
else else
@ -171,7 +170,7 @@ function M:__fill_item(item,group)
end end
else else
if group.show_num > 0 and group.room_num > group.show_num then if group.show_num > 0 and group.room_num > group.show_num then
item:GetChild('tex_room_num').text = group.show_num > 99 and '99+' or group.show_num--group.show_num item:GetChild('tex_room_num').text = group.show_num > 99 and '99+' or group.show_num --group.show_num
else else
item:GetChild('tex_room_num').text = group.room_num > 99 and '99+' or group.room_num item:GetChild('tex_room_num').text = group.room_num > 99 and '99+' or group.room_num
end end
@ -192,7 +191,7 @@ function M:FillData()
local new_info = {} local new_info = {}
for i = 1, #groups do for i = 1, #groups do
local key = tostring(groups[i].id) local key = tostring(groups[i].id)
local key1 = tostring(groups[i].id).."vip" local key1 = tostring(groups[i].id) .. "vip"
if not fg_info[key] then if not fg_info[key] then
new_info[key] = 0 new_info[key] = 0
if not fg_info_changed then if not fg_info_changed then
@ -220,7 +219,7 @@ function M:FillData()
else else
self.btn_joingroup:GetController("info").selectedIndex = 1 self.btn_joingroup:GetController("info").selectedIndex = 1
ctr_empty_group.selectedIndex = 0 ctr_empty_group.selectedIndex = 0
self:__fill_item(self.btn_joingroup,groups[1]) self:__fill_item(self.btn_joingroup, groups[1])
end end
local lst_group = self._view:GetChild('lst_group') local lst_group = self._view:GetChild('lst_group')
@ -230,7 +229,7 @@ function M:FillData()
local item = lst_group:AddItemFromPool() local item = lst_group:AddItemFromPool()
item.data = group item.data = group
self:__fill_item(item,group) self:__fill_item(item, group)
local btn_top = item:GetChild('btn_top') local btn_top = item:GetChild('btn_top')
local ctr_select = btn_top:GetController('select') local ctr_select = btn_top:GetController('select')
@ -240,7 +239,7 @@ function M:FillData()
context:StopPropagation() context:StopPropagation()
local fgCtr = ControllerManager.GetController(NewGroupController) local fgCtr = ControllerManager.GetController(NewGroupController)
ViewUtil.ShowModalWait(self._root_view) ViewUtil.ShowModalWait(self._root_view)
fgCtr:FG_TopGroup(group.id,ctr_select.selectedIndex == 0,function(res) fgCtr:FG_TopGroup(group.id, ctr_select.selectedIndex == 0, function(res)
ViewUtil.CloseModalWait() ViewUtil.CloseModalWait()
if self._is_destroy then if self._is_destroy then
return return
@ -274,27 +273,28 @@ function M:EnterGroup(fg_id)
--self._view.visible = false --self._view.visible = false
end end
function M:Show(fg_id,callback) function M:Show(fg_id, callback)
local fgCtr1 = ControllerManager.GetController(NewGroupController) local fgCtr1 = ControllerManager.GetController(NewGroupController)
fgCtr1:FG_GroupList(function(res) fgCtr1:FG_GroupList(function(res)
if self._is_destroy then if self._is_destroy then
ViewUtil.ShowBannerOnScreenCenter("亲友圈热更问题有问题")
ViewUtil.CloseModalWait()
return return
end end
if res.ReturnCode == 0 then if res.ReturnCode == 0 then
self:FillData() self:FillData()
if fg_id then if fg_id then
self:EnterGroup(fg_id) self:EnterGroup(fg_id)
else else
if callback then if callback then
callback(0) callback(0)
end end
end
else
if callback then
callback(-1)
end end
else
if callback then
callback(-1)
end
end end
end) end)
end end

View File

@ -1,5 +1,5 @@
{ {
"libview.firstColumnWidth": 297, "libview.firstColumnWidth": 522,
"expanded_nodes": [ "expanded_nodes": [
"27vd145b", "27vd145b",
"/", "/",
@ -9,8 +9,14 @@
"libview.iconScale": 0, "libview.iconScale": 0,
"doc.openedDocs": [ "doc.openedDocs": [
"ui://2d9xdj6zfn7fao", "ui://2d9xdj6zfn7fao",
"ui://m7iejg4610snh5j",
"ui://m7iejg46jiu8hef",
"ui://m7iejg46kwi0hma", "ui://m7iejg46kwi0hma",
"ui://v6yvqp7wf55qwa", "ui://v6yvqp7wf55qwa",
"ui://v6yvqp7wf55qw5",
"ui://v6yvqp7wf55qvx",
"ui://m7iejg46kwi0hm5",
"ui://v6yvqp7wf55qw4",
"ui://2d9xdj6zm16m7dqt", "ui://2d9xdj6zm16m7dqt",
"ui://ppu1wv76j4mf9j", "ui://ppu1wv76j4mf9j",
"ui://ppu1wv76j4mf9k", "ui://ppu1wv76j4mf9k",
@ -22,15 +28,13 @@
"test.device": "720p Phone", "test.device": "720p Phone",
"canvasColor": 10066329, "canvasColor": 10066329,
"auxline2": true, "auxline2": true,
"doc.activeDoc": "ui://v6yvqp7wf55qwa", "doc.activeDoc": "ui://2d9xdj6zfn7fao",
"libview.twoColumn": false, "libview.twoColumn": false,
"libview.expandedNodes": [ "libview.expandedNodes": [
"v6yvqp7w", "2d9xdj6z",
"/", "/",
"v6yvqp7w", "m7iejg46",
"/component/", "/"
"v6yvqp7w",
"/component/Main/"
], ],
"auxline1": true, "auxline1": true,
"snapToGrid": true, "snapToGrid": true,