无法进入亲友圈可能报错地方提示错误,并且关闭等待页面
parent
095b2079fe
commit
41cc0821f7
|
|
@ -16,8 +16,12 @@ end
|
|||
--获取圈列表
|
||||
function M:FG_GroupList(callback)
|
||||
local _client = ControllerManager.GroupClient
|
||||
printlog("aaaaaaaaaaaaaaaaawwwwwwwwwwwwww")
|
||||
--pt(_client)
|
||||
if not _client or not _client.send then
|
||||
ViewUtil.ShowBannerOnScreenCenter("无法进入亲友圈服务")
|
||||
ViewUtil.CloseModalWait()
|
||||
end
|
||||
printlog("aaaaaaaaaaaaaaaaawwwwwwwwwwwwww", _client)
|
||||
-- pt(_client)
|
||||
_client:send(Protocol.WEB_FG_GROUP_LIST, nil, function(res)
|
||||
printlog("aaaaaaaaaaaaaaaaawwwwwwwwwwwwww1111111111111")
|
||||
pt(res)
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ local GroupMainView = {}
|
|||
|
||||
local M = GroupMainView
|
||||
|
||||
function GroupMainView.new(main_view, root_view,par_veiw)
|
||||
--print(debug.traceback())
|
||||
local self = setmetatable({}, {__index = M})
|
||||
function GroupMainView.new(main_view, root_view, par_veiw)
|
||||
--print(debug.traceback())
|
||||
local self = setmetatable({}, { __index = M })
|
||||
self.class = 'GroupMainView'
|
||||
UIPackage.AddPackage('base/newgroup/ui/NewGroup')
|
||||
self._view = main_view
|
||||
|
|
@ -21,7 +21,7 @@ function GroupMainView.new(main_view, root_view,par_veiw)
|
|||
end
|
||||
|
||||
function M:InitView(url)
|
||||
--print(url)
|
||||
--print(url)
|
||||
-- BlurView(self._view:GetChild("bg"),true)
|
||||
if DataManager.SelfUser.agent > 0 then
|
||||
self._view:GetController('agent').selectedIndex = 1
|
||||
|
|
@ -37,7 +37,7 @@ function M:InitView(url)
|
|||
cgv:Show()
|
||||
cgv:SetCallback(function(name, pay_type, fg_type)
|
||||
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()
|
||||
if self._is_destroy then
|
||||
return
|
||||
|
|
@ -53,7 +53,7 @@ function M:InitView(url)
|
|||
end)
|
||||
|
||||
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()
|
||||
local groups = DataManager.groups.groupList
|
||||
if #groups == 0 then
|
||||
|
|
@ -131,23 +131,22 @@ end
|
|||
|
||||
function M:DEnterGroup()
|
||||
local groups = DataManager.groups.groupList
|
||||
if #groups == 0 then
|
||||
--local jgv = JoinGroupView.new(self._root_view)
|
||||
--jgv:Show()
|
||||
else
|
||||
local info = GroupInfoView.new(groups[1], self.fg_info)
|
||||
self._groupInfoView = info
|
||||
info:SetCallBack(function()
|
||||
self._groupInfoView = nil
|
||||
self:Show()
|
||||
self._view.visible = true
|
||||
end)
|
||||
--info:Show()
|
||||
--self._view.visible = false
|
||||
end
|
||||
if #groups == 0 then
|
||||
--local jgv = JoinGroupView.new(self._root_view)
|
||||
--jgv:Show()
|
||||
else
|
||||
local info = GroupInfoView.new(groups[1], self.fg_info)
|
||||
self._groupInfoView = info
|
||||
info:SetCallBack(function()
|
||||
self._groupInfoView = nil
|
||||
self:Show()
|
||||
self._view.visible = true
|
||||
end)
|
||||
--info:Show()
|
||||
--self._view.visible = false
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local function SortGroups(a, b)
|
||||
local sort_a = 0
|
||||
local sort_b = 0
|
||||
|
|
@ -157,13 +156,13 @@ local function SortGroups(a, b)
|
|||
return sort_a > sort_b
|
||||
end
|
||||
|
||||
function M:__fill_item(item,group)
|
||||
function M:__fill_item(item, group)
|
||||
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
|
||||
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
|
||||
item:GetChild('tex_room_num').text = group.room_num
|
||||
else
|
||||
|
|
@ -171,12 +170,12 @@ function M:__fill_item(item,group)
|
|||
end
|
||||
else
|
||||
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
|
||||
item:GetChild('tex_room_num').text = group.room_num > 99 and '99+' or group.room_num
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local btn_head = item:GetChild('btn_head')
|
||||
btn_head.icon = 'ui://Common/Head0'
|
||||
ImageLoad.Load(group.o_portrait, btn_head._iconObject, self.class)
|
||||
|
|
@ -192,7 +191,7 @@ function M:FillData()
|
|||
local new_info = {}
|
||||
for i = 1, #groups do
|
||||
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
|
||||
new_info[key] = 0
|
||||
if not fg_info_changed then
|
||||
|
|
@ -220,7 +219,7 @@ function M:FillData()
|
|||
else
|
||||
self.btn_joingroup:GetController("info").selectedIndex = 1
|
||||
ctr_empty_group.selectedIndex = 0
|
||||
self:__fill_item(self.btn_joingroup,groups[1])
|
||||
self:__fill_item(self.btn_joingroup, groups[1])
|
||||
end
|
||||
|
||||
local lst_group = self._view:GetChild('lst_group')
|
||||
|
|
@ -230,7 +229,7 @@ function M:FillData()
|
|||
|
||||
local item = lst_group:AddItemFromPool()
|
||||
item.data = group
|
||||
self:__fill_item(item,group)
|
||||
self:__fill_item(item, group)
|
||||
|
||||
local btn_top = item:GetChild('btn_top')
|
||||
local ctr_select = btn_top:GetController('select')
|
||||
|
|
@ -240,7 +239,7 @@ function M:FillData()
|
|||
context:StopPropagation()
|
||||
local fgCtr = ControllerManager.GetController(NewGroupController)
|
||||
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()
|
||||
if self._is_destroy then
|
||||
return
|
||||
|
|
@ -274,27 +273,28 @@ function M:EnterGroup(fg_id)
|
|||
--self._view.visible = false
|
||||
end
|
||||
|
||||
function M:Show(fg_id,callback)
|
||||
function M:Show(fg_id, callback)
|
||||
local fgCtr1 = ControllerManager.GetController(NewGroupController)
|
||||
fgCtr1:FG_GroupList(function(res)
|
||||
if self._is_destroy then
|
||||
ViewUtil.ShowBannerOnScreenCenter("亲友圈热更问题有问题")
|
||||
ViewUtil.CloseModalWait()
|
||||
return
|
||||
end
|
||||
if res.ReturnCode == 0 then
|
||||
self:FillData()
|
||||
if fg_id then
|
||||
self:EnterGroup(fg_id)
|
||||
else
|
||||
if callback then
|
||||
callback(0)
|
||||
end
|
||||
else
|
||||
if callback then
|
||||
callback(0)
|
||||
end
|
||||
end
|
||||
else
|
||||
if callback then
|
||||
callback(-1)
|
||||
end
|
||||
else
|
||||
if callback then
|
||||
callback(-1)
|
||||
end
|
||||
end
|
||||
|
||||
end)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"libview.firstColumnWidth": 297,
|
||||
"libview.firstColumnWidth": 522,
|
||||
"expanded_nodes": [
|
||||
"27vd145b",
|
||||
"/",
|
||||
|
|
@ -9,8 +9,14 @@
|
|||
"libview.iconScale": 0,
|
||||
"doc.openedDocs": [
|
||||
"ui://2d9xdj6zfn7fao",
|
||||
"ui://m7iejg4610snh5j",
|
||||
"ui://m7iejg46jiu8hef",
|
||||
"ui://m7iejg46kwi0hma",
|
||||
"ui://v6yvqp7wf55qwa",
|
||||
"ui://v6yvqp7wf55qw5",
|
||||
"ui://v6yvqp7wf55qvx",
|
||||
"ui://m7iejg46kwi0hm5",
|
||||
"ui://v6yvqp7wf55qw4",
|
||||
"ui://2d9xdj6zm16m7dqt",
|
||||
"ui://ppu1wv76j4mf9j",
|
||||
"ui://ppu1wv76j4mf9k",
|
||||
|
|
@ -22,15 +28,13 @@
|
|||
"test.device": "720p Phone",
|
||||
"canvasColor": 10066329,
|
||||
"auxline2": true,
|
||||
"doc.activeDoc": "ui://v6yvqp7wf55qwa",
|
||||
"doc.activeDoc": "ui://2d9xdj6zfn7fao",
|
||||
"libview.twoColumn": false,
|
||||
"libview.expandedNodes": [
|
||||
"v6yvqp7w",
|
||||
"2d9xdj6z",
|
||||
"/",
|
||||
"v6yvqp7w",
|
||||
"/component/",
|
||||
"v6yvqp7w",
|
||||
"/component/Main/"
|
||||
"m7iejg46",
|
||||
"/"
|
||||
],
|
||||
"auxline1": true,
|
||||
"snapToGrid": true,
|
||||
|
|
|
|||
Loading…
Reference in New Issue