充值家族房卡协议
parent
b24f5508a9
commit
c3fea3ad73
|
|
@ -45,6 +45,7 @@ function M:FG_GroupList(callback)
|
|||
group.isOpenChatRoom = tem.isOpenChatRoom
|
||||
group.isWatch = tem.isWatch
|
||||
group.wechatId = tem.wechatId
|
||||
group.groupDiamo = tem.groupDiamo
|
||||
l_groups:add(group)
|
||||
end
|
||||
end
|
||||
|
|
@ -1662,3 +1663,14 @@ function M:SetCanWatch(groupId, value, callback)
|
|||
callback(res)
|
||||
end)
|
||||
end
|
||||
|
||||
-- 亲友圈充值房卡
|
||||
function M:FG_Recharge_Diamo(groupId, diamo, callback)
|
||||
local _data = {}
|
||||
_data.id = groupId
|
||||
_data.diamo = diamo
|
||||
local _client = ControllerManager.GroupClient
|
||||
_client:send(Protocol.WEB_FG_RECHARGE_DIAMO, _data, function(res)
|
||||
callback(res)
|
||||
end)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -275,6 +275,9 @@ Protocol = {
|
|||
-- 亲友圈聊天室
|
||||
WEB_FG_GETCHATROOM = "group/get_chat_rooms",
|
||||
|
||||
-- 亲友圈房卡充值
|
||||
WEB_FG_RECHARGE_DIAMO = "group/recharge_diamo",
|
||||
|
||||
-------------- group-log---------------------
|
||||
-- 获取奖励日志
|
||||
WEB_FG_GET_REWARDS_LOG = "group/log/get_reward_log",
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ BaseView = {
|
|||
_is_destroy = false,
|
||||
--关闭摧毁
|
||||
_close_destroy = false,
|
||||
--缩放全屏
|
||||
_scale = false,
|
||||
-- 全屏
|
||||
_full = false,
|
||||
--全屏偏移
|
||||
|
|
@ -53,6 +55,12 @@ function M:Show()
|
|||
self._contentPane.height = GRoot.inst.height
|
||||
self._contentPane.x = offset
|
||||
end
|
||||
|
||||
if self._scale then
|
||||
local scaleY = GRoot.inst.height / self._contentPane.height
|
||||
local scaleX = GRoot.inst.width / self._contentPane.width
|
||||
self._contentPane:SetScale(scaleX, scaleY)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -1,27 +1,41 @@
|
|||
local data = {
|
||||
{num = 50,colorIndex = 0},
|
||||
{num = 200,colorIndex = 1},
|
||||
{num = 1000,colorIndex = 2},
|
||||
{ num = 50, colorIndex = 0 },
|
||||
{ num = 200, colorIndex = 1 },
|
||||
{ num = 1000, colorIndex = 2 },
|
||||
}
|
||||
|
||||
--#region
|
||||
|
||||
local FamilyRoomCard ={}
|
||||
local FamilyRoomCard = {}
|
||||
|
||||
local function charge(num)
|
||||
print('充值',num)
|
||||
local function charge(num, self)
|
||||
local fgCtr = ControllerManager.GetController(NewGroupController)
|
||||
fgCtr:FG_Recharge_Diamo(self.groupId, num, function(res)
|
||||
print("收到充值房卡回调")
|
||||
pt(res)
|
||||
if res.ReturnCode ~= 0 then
|
||||
ViewUtil.ErrorTip(res.ReturnCode, "操作失败")
|
||||
return
|
||||
end
|
||||
local groupDiamo = res.Data.groupDiamo
|
||||
local playerDiamo = res.Data.userDiamo
|
||||
self.tex_curCard.text = "当前帐号房卡:" .. playerDiamo
|
||||
self.tex_famliyCard.text = "亲友圈房卡:" .. groupDiamo
|
||||
self.group.groupDiamo = groupDiamo
|
||||
DataManager.SelfUser.diamo = playerDiamo
|
||||
end)
|
||||
end
|
||||
|
||||
--#endregion
|
||||
|
||||
function FamilyRoomCard:TryShow()
|
||||
function FamilyRoomCard:TryShow(groupId)
|
||||
local Instance = self.New()
|
||||
Instance:Show()
|
||||
Instance:Show(groupId)
|
||||
end
|
||||
|
||||
function FamilyRoomCard.New()
|
||||
setmetatable(FamilyRoomCard, {__index = BaseWindow})
|
||||
local Instance = setmetatable({}, {__index = FamilyRoomCard})
|
||||
setmetatable(FamilyRoomCard, { __index = BaseWindow })
|
||||
local Instance = setmetatable({}, { __index = FamilyRoomCard })
|
||||
BaseWindow.init(Instance, "ui://Family/com_roomCard")
|
||||
|
||||
Instance._close_destroy = true
|
||||
|
|
@ -35,16 +49,14 @@ function FamilyRoomCard.New()
|
|||
end)
|
||||
|
||||
Instance.list_bayCrad.itemRenderer = function(index, obj)
|
||||
local _idx = index +1
|
||||
local _idx = index + 1
|
||||
local num = data[_idx].num
|
||||
|
||||
obj:GetChild("tex_cardNum").text = num
|
||||
obj:GetController("cColor").selectedIndex = data[_idx].colorIndex
|
||||
|
||||
obj.onClick:Set(function()
|
||||
|
||||
charge(num)
|
||||
print('房卡',num)
|
||||
charge(num, Instance)
|
||||
end)
|
||||
end
|
||||
|
||||
|
|
@ -53,13 +65,14 @@ function FamilyRoomCard.New()
|
|||
return Instance
|
||||
end
|
||||
|
||||
function FamilyRoomCard:Show()
|
||||
function FamilyRoomCard:Show(groupId)
|
||||
self.groupId = groupId
|
||||
self.group = DataManager.groups:get(self.groupId)
|
||||
|
||||
self.tex_curCard.text = "当前帐号房卡:" .. DataManager.SelfUser.diamo
|
||||
|
||||
--self.tex_famliyCard.text = "亲友圈房卡:" ..
|
||||
self.tex_famliyCard.text = "亲友圈房卡:" .. self.group.groupDiamo
|
||||
|
||||
BaseWindow.Show(self)
|
||||
end
|
||||
|
||||
return FamilyRoomCard
|
||||
return FamilyRoomCard
|
||||
|
|
|
|||
|
|
@ -249,7 +249,7 @@ function M:ShowShop()
|
|||
--self._child_familyLobbyShopView = LobbyShopView.new(self, self._group.id)
|
||||
--self._child_familyLobbyShopView:Show()
|
||||
|
||||
FamilyRoomCard:TryShow()
|
||||
FamilyRoomCard:TryShow(self._group.id)
|
||||
end
|
||||
|
||||
function M:ShowAllRank()
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
<image id="n1_c8pn" name="n1" src="c8pn7czv" fileName="RoomCrad/Image/Rectangle 41.png" xy="18,36"/>
|
||||
<image id="n2_c8pn" name="n2" src="c8pn7czw" fileName="RoomCrad/Image/title_top.png" xy="0,-9"/>
|
||||
<text id="n3_c8pn" name="n3" xy="371,6" size="530,116" font="Alibaba PuHuiTi 3.0" fontSize="90" color="#ffffff" align="center" vAlign="middle" autoSize="none" bold="true" text="充值房卡"/>
|
||||
<text id="n4_c8pn" name="tex_curCard" xy="159,174" size="401,56" font="Alibaba PuHuiTi 3.0" fontSize="42" color="#666666" align="center" vAlign="middle" autoSize="none" bold="true" text="当前帐号房卡:20"/>
|
||||
<text id="n6_c8pn" name="tex_famliyCard" xy="708,174" size="401,56" font="Alibaba PuHuiTi 3.0" fontSize="42" color="#666666" align="center" vAlign="middle" autoSize="none" bold="true" text="亲友圈房卡:191"/>
|
||||
<text id="n4_c8pn" name="tex_curCard" xy="139,174" size="456,56" font="Alibaba PuHuiTi 3.0" fontSize="42" color="#666666" vAlign="middle" autoSize="none" bold="true" text="当前帐号房卡:999999"/>
|
||||
<text id="n6_c8pn" name="tex_famliyCard" xy="688,174" size="401,56" font="Alibaba PuHuiTi 3.0" fontSize="42" color="#666666" vAlign="middle" autoSize="none" bold="true" text="亲友圈房卡:999999"/>
|
||||
<list id="n8_c8pn" name="list_bayCrad" xy="90,260" size="1092,493" layout="row" overflow="hidden" colGap="33" defaultItem="ui://htcn7v3rc8pn7czy" align="center" autoClearItems="true">
|
||||
<item/>
|
||||
<item/>
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1,109 +1,109 @@
|
|||
[
|
||||
{
|
||||
"lua_path": "/tolua_project,/base_project,/main_project",
|
||||
"ver": "1.0.8",
|
||||
"ver": "1.0.9",
|
||||
"name": "base_script",
|
||||
"check": true,
|
||||
"bundle": "base/base_script",
|
||||
"version": "1.0.8"
|
||||
"version": "1.0.9"
|
||||
},
|
||||
{
|
||||
"ver": "1.0.8",
|
||||
"ver": "1.0.9",
|
||||
"name": "common",
|
||||
"check": true,
|
||||
"bundle": "base/common",
|
||||
"version": "1.0.8"
|
||||
"version": "1.0.9"
|
||||
},
|
||||
{
|
||||
"ver": "1.0.8",
|
||||
"ver": "1.0.9",
|
||||
"name": "login",
|
||||
"check": true,
|
||||
"bundle": "base/login",
|
||||
"version": "1.0.8"
|
||||
"version": "1.0.9"
|
||||
},
|
||||
{
|
||||
"ver": "1.0.8",
|
||||
"ver": "1.0.9",
|
||||
"name": "lobby",
|
||||
"check": true,
|
||||
"bundle": "base/lobby",
|
||||
"version": "1.0.8"
|
||||
"version": "1.0.9"
|
||||
},
|
||||
{
|
||||
"ver": "1.0.8",
|
||||
"ver": "1.0.9",
|
||||
"name": "Family",
|
||||
"check": true,
|
||||
"bundle": "base/Family",
|
||||
"version": "1.0.8"
|
||||
"version": "1.0.9"
|
||||
},
|
||||
{
|
||||
"ver": "1.0.8",
|
||||
"ver": "1.0.9",
|
||||
"name": "chat",
|
||||
"check": true,
|
||||
"bundle": "base/chat",
|
||||
"version": "1.0.8"
|
||||
"version": "1.0.9"
|
||||
},
|
||||
{
|
||||
"ver": "1.0.8",
|
||||
"ver": "1.0.9",
|
||||
"name": "newgroup",
|
||||
"check": true,
|
||||
"bundle": "base/newgroup",
|
||||
"version": "1.0.8"
|
||||
"version": "1.0.9"
|
||||
},
|
||||
{
|
||||
"ver": "1.0.8",
|
||||
"ver": "1.0.9",
|
||||
"name": "rank",
|
||||
"check": true,
|
||||
"version": "1.0.8",
|
||||
"version": "1.0.9",
|
||||
"bundle": "base/rank"
|
||||
},
|
||||
{
|
||||
"ver": "1.0.8",
|
||||
"ver": "1.0.9",
|
||||
"name": "main_majiang",
|
||||
"check": true,
|
||||
"version": "1.0.8",
|
||||
"version": "1.0.9",
|
||||
"bundle": "base/main_majiang"
|
||||
},
|
||||
{
|
||||
"ver": "1.0.8",
|
||||
"ver": "1.0.9",
|
||||
"name": "main_poker",
|
||||
"check": true,
|
||||
"version": "1.0.8",
|
||||
"version": "1.0.9",
|
||||
"bundle": "base/main_poker"
|
||||
},
|
||||
{
|
||||
"ver": "1.0.8",
|
||||
"ver": "1.0.9",
|
||||
"name": "main_zipai",
|
||||
"check": true,
|
||||
"version": "1.0.8",
|
||||
"version": "1.0.9",
|
||||
"bundle": "base/main_zipai"
|
||||
},
|
||||
{
|
||||
"ver": "1.0.8",
|
||||
"ver": "1.0.9",
|
||||
"name": "static",
|
||||
"check": true,
|
||||
"bundle": "base/static",
|
||||
"version": "1.0.8"
|
||||
"version": "1.0.9"
|
||||
},
|
||||
{
|
||||
"ver": "1.0.8",
|
||||
"ver": "1.0.9",
|
||||
"is_res": true,
|
||||
"name": "embed",
|
||||
"check": true,
|
||||
"bundle": "base/embed",
|
||||
"version": "1.0.8"
|
||||
"version": "1.0.9"
|
||||
},
|
||||
{
|
||||
"ver": "1.0.8",
|
||||
"ver": "1.0.9",
|
||||
"name": "main_pokemajiang",
|
||||
"check": true,
|
||||
"version": "1.0.8",
|
||||
"version": "1.0.9",
|
||||
"bundle": "base/main_pokemajiang"
|
||||
},
|
||||
{
|
||||
"ver": "1.0.8",
|
||||
"ver": "1.0.9",
|
||||
"name": "main_zipaimajiang",
|
||||
"check": true,
|
||||
"version": "1.0.8",
|
||||
"version": "1.0.9",
|
||||
"bundle": "base/main_zipaimajiang"
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -581,7 +581,7 @@ Camera:
|
|||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 2
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844}
|
||||
m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0.019607844}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
|
|
@ -598,7 +598,7 @@ Camera:
|
|||
far clip plane: 30
|
||||
field of view: 60
|
||||
orthographic: 1
|
||||
orthographic size: 10.8
|
||||
orthographic size: 10
|
||||
m_Depth: 1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
|
|
@ -622,7 +622,7 @@ Transform:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2064634016}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 22.44, y: -10.8, z: 0}
|
||||
m_LocalPosition: {x: 30, y: -10, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ GraphicsSettings:
|
|||
- {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 16003, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_PreloadedShaders: []
|
||||
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
|
||||
type: 0}
|
||||
|
|
|
|||
Loading…
Reference in New Issue