Merge branch 'china/dev-c' of http://60.1.1.230/gaoxin/JL_Client into china/dev-c

dev_chengFeng
gaoxin 2021-04-27 18:02:56 +08:00
commit 8be0dd71f0
13 changed files with 68 additions and 26 deletions

View File

@ -38851,7 +38851,7 @@ MonoBehaviour:
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text:
LanguageIndex: 0

View File

@ -24319,7 +24319,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!224 &7076300033625331926
RectTransform:
m_ObjectHideFlags: 0
@ -43880,7 +43880,7 @@ MonoBehaviour:
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 4
m_Spacing: -52.62
m_Spacing: -110
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 1
m_ChildControlWidth: 0

View File

@ -116,7 +116,7 @@ function CommonActPage:ShowSingleData(item,sdata,index)
return
end
item.gameObject:SetActive(true)
self.ItemList[item]:SetData(sdata,self,self.sortingOrder,self.ActData.activityId)
self.ItemList[item]:SetData(sdata,self,self.sortingOrder,self.ActData,self.actConfig)
end
function CommonActPage:RefreshTime()
@ -146,6 +146,10 @@ function CommonActPage:OnClose()
end
function CommonActPage:OnDestroy()
if self.localTimer then
self.localTimer:Stop()
self.localTimer = nil
end
for k,v in pairs(self.ItemList) do
SubUIManager.Close(v)
end

View File

@ -141,6 +141,9 @@ function this.GetExpertData(indexType,actType)
curData.rewards[i].otherData.state = 0
end
curData.rewards[i].otherData.info = string.format("%s/%s",curData.rewards[i].progress,curData.rewards[i].otherData.Values)
if curData.rewards[i].progress > curData.rewards[i].otherData.Values then
curData.rewards[i].otherData.info = string.format("%s/%s",curData.rewards[i].otherData.Values,curData.rewards[i].otherData.Values)
end
elseif indexType == 2 then
-- LogPink("curData.value:"..tostring(curData.value).." "..tostring(curData.rewards[i].otherData.Values))
if curData.value < curData.rewards[i].otherData.Values then
@ -149,6 +152,9 @@ function this.GetExpertData(indexType,actType)
curData.rewards[i].otherData.state = 0
end
curData.rewards[i].otherData.info = string.format("%s/%s",curData.value,curData.rewards[i].otherData.Values)
if curData.value > curData.rewards[i].otherData.Values then
curData.rewards[i].otherData.info = string.format("%s/%s",curData.rewards[i].otherData.Values,curData.rewards[i].otherData.Values)
end
end
end
end

View File

@ -131,7 +131,7 @@ function ConRechargePage:ShowSingleData(item,sdata,index)
return
end
item.gameObject:SetActive(true)
self.ItemList[item]:SetData(sdata,self,self.sortingOrder,self.ActData.activityId)
self.ItemList[item]:SetData(sdata,self,self.sortingOrder,self.ActData,self.actConfig)
end
function ConRechargePage:OnClose()

View File

@ -74,7 +74,7 @@ end
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
function ExChangePage:OnShow(_sortingOrder)
self.gameObject:SetActive(true)
self.cursortingOrder = _sortingOrder or self.self.cursortingOrder
self.cursortingOrder = _sortingOrder or self.cursortingOrder
self:ExChangeShow()
end

View File

@ -108,9 +108,13 @@ function ExpertPage:OnShow(_sortingOrder)
--拿取数据
self:RefreshData(true,true)
self:RefreshBtns()--刷新上方两个按钮
self.effect:SetActive(false)
if self.actConfig.ActiveType == ActivityTypeDef.AccumulativeRechargeExper then
self.effect:SetActive(true)
Util.AddParticleSortLayer( self.effect, _sortingOrder - self.sortingOrder)
self.sortingOrder = _sortingOrder
end
end
function ExpertPage:RefreshBtns()
if not self.actConfig.ShopData or self.actConfig.ShopData == "" then
@ -160,7 +164,7 @@ function ExpertPage:ShowSingleData(item,sdata,index)
return
end
item.gameObject:SetActive(true)
self.ItemList[item]:SetData(sdata,self,self.sortingOrder,self.ActData.activityId,self.ActData.value,self.actConfig)
self.ItemList[item]:SetData(sdata,self,self.sortingOrder,self.ActData,self.actConfig)
end
function ExpertPage:RefreshTime()
@ -195,6 +199,10 @@ function ExpertPage:OnClose()
end
function ExpertPage:OnDestroy()
if self.localTimer then
self.localTimer:Stop()
self.localTimer = nil
end
for k,v in pairs(self.ItemList) do
SubUIManager.Close(v)
end

View File

@ -11,7 +11,7 @@ end
local BtnState = {
[0] = {Img = "s_slbz_1anniuongse", isRed = true, isGray = false, Text = Language[11948],},
[1] = {Img = "s_slbz_1anniuhuangse", isRed = false, isGray = false, Text = Language[10556]},
[2] = {Img = "s_slbz_1anniuongse", isRed = false, isGray = true, Text = Language[11948]},
[2] = {Img = "s_slbz_1anniuongse", isRed = false, isGray = true, Text = Language[10101]},
}
--初始化组件(用于子类重写)
@ -39,11 +39,12 @@ end
function ExpertPre:OnOpen()
end
function ExpertPre:SetData(_data,_parent,_sortingOrder,_activityId)
function ExpertPre:SetData(_data,_parent,_sortingOrder,_actData,_actConfig)
self.data = _data
self.parent = _parent
self.sortingOrder = _sortingOrder
self.activityId = _activityId
self.actData = _actData
self.actConfig = _actConfig
self:Refresh()
end
@ -71,10 +72,15 @@ function ExpertPre:SetButton()
self.redPoint:SetActive(btnData.isRed)
self.btnText.text = btnData.Text
self.info.text = self.data.otherData.info
if self.actConfig.ActiveType == ActivityTypeDef.ContinuityRecharge then
local bool = self:IsCurrentSortEnable(self.data.otherData.Sort)
self.btnGet:GetComponent("Button").interactable = bool
Util.SetGray(self.btnGet, not bool)
end
Util.AddOnceClick(self.btnGet, function()
if self.data.otherData.state == 0 then
NetManager.GetActivityRewardRequest(self.data.missionId, self.activityId, function(drop)
NetManager.GetActivityRewardRequest(self.data.missionId, self.actData.activityId, function(drop)
UIManager.OpenPanel(UIName.RewardItemPopup,drop,1,function()
self.parent:RefreshData(true,false)
CheckRedPointStatus(RedPointType.Expert_FastExplore)
@ -95,4 +101,11 @@ function ExpertPre:OnClose()
end
end
--积天豪礼是否轮到当天可充了
function ExpertPre:IsCurrentSortEnable(sort)
local activityInfo = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.ContinuityRecharge)
return activityInfo.value + 1 == sort
end
return ExpertPre

View File

@ -39,7 +39,7 @@ function ItemUpstarPre:BindEvent()
return
end
local cost = ConfigManager.GetConfigData(ConfigName.ComposeBook,self.data.otherData.selectId).NeedCost
NetManager.EquipUpLevelRequest(self.activityId,self.data.otherData.selectId,cost[1][1],cost[1][2],function (msg)
NetManager.EquipUpLevelRequest(self.actData.activityId,self.data.otherData.selectId,cost[1][1],cost[1][2],function (msg)
UIManager.OpenPanel(UIName.RewardItemPopup, msg.drop, 1,function()
self.parent:RefreshData(true,true,false)
end)
@ -58,11 +58,12 @@ end
function ItemUpstarPre:OnOpen()
end
function ItemUpstarPre:SetData(_data,_parent,_sortingOrder,_activityId)
function ItemUpstarPre:SetData(_data,_parent,_sortingOrder,_actData,_actConfig)
self.data = _data
self.parent = _parent
self.sortingOrder = _sortingOrder
self.activityId = _activityId
self.actData = _actData
self.actConfig = _actConfig
self:Refresh()
end

View File

@ -72,11 +72,11 @@ end
--绑定事件(用于子类重写)
function UpperMonthCard:BindEvent()
Util.AddClick(self.btnPreview, function()
Util.AddOnceClick(self.btnPreview, function()
UIManager.OpenPanel(UIName.MonthRewardPreviewPopup, self.baseType, self.chargerBaseType)
end)
Util.AddClick(self.btnBuy, function()
Util.AddOnceClick(self.btnBuy, function()
local isActive = VipManager.GetMonthCardOpenState()
if not isActive then
MsgPanel.ShowTwo(Language[11387], function()

View File

@ -270,15 +270,19 @@ function RewardItemPopup:SelectCanPopUpBagMaxMessage()
end
function RewardItemPopup:OnSortingOrderChange()
if not itemDataList then
if not itemDataList or #itemDataList < 0 then
return
end
if #itemListPrefab > 0 then
for i = 1, #itemListPrefab do
if itemListPrefab[i] and itemDataList[i] then
local view = itemListPrefab[i]
local curItemData=itemDataList[i]
view:OnOpen(true,curItemData,1.15,true,true,false,self.sortingOrder)
end
end
end
end
-- 根据物品列表数据显示物品
function RewardItemPopup:SetItemShow(drop)
BagManager.OnShowTipDropNumZero(drop)

View File

@ -121,6 +121,7 @@ function EveryDayGift:OnShow(_sortingOrder)
self.titleTip.gameObject:SetActive(true)
else
self.titleTip.gameObject:SetActive(false)
end
if self.actConfig.Id == 63 then
@ -163,6 +164,7 @@ function EveryDayGift:RefreshGiftData(isTop,isAni)
if self.shopData[i].DataType == DynamicActivityManager.selectIndex.dataType then
for j = 1 , #DynamicActivityManager.selectIndex.goodsId do
if (self.shopData[i].data.shopData.id or self.shopData[i].data.shopData.goodsId) == DynamicActivityManager.selectIndex.goodsId[j] then
DynamicActivityManager.SetSelectIndex(0,{})
curindex = i
break
end
@ -172,10 +174,13 @@ function EveryDayGift:RefreshGiftData(isTop,isAni)
break
end
end
if curindex ~= 0 then
--LogGreen("curindex:"..curindex)
self.scrollView:SetIndex(curindex)
end
end
function EveryDayGift:isBought()
for i = 1, #self.shopData do
if self.shopData[i].data.boughtNum > 0 then

View File

@ -322,9 +322,10 @@ function this:SetData(dataList, updateFunc, noTop, noAnim)
-- 判断是否回到顶部,否则保持不动
if noTop then
local oldPosY = self.dragGOTran.anchoredPosition.y
local oldPosX = self.dragGOTran.anchoredPosition.x
local showIndex = self:CalShowIndex()
self:SetShow(showIndex)
self.dragGOTran.anchoredPosition = Vector2.New(0, oldPosY)
self.dragGOTran.anchoredPosition = Vector2.New(oldPosX, oldPosY)
else
self:SetShow(1)
end