diff --git a/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitMainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitMainPanel.lua index d4b5b64b02..f08cf2b116 100644 --- a/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitMainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitMainPanel.lua @@ -24,7 +24,7 @@ function RecruitMainPanel:InitComponent() this.rightBtn = Util.GetGameObject(this.tabbox, "rightAction") this.jiantouyou = Util.GetGameObject(this.tabbox, "jiantouyou") this.jiantouzuo = Util.GetGameObject(this.tabbox, "jiantouzuo") - this.mask1 = Util.GetGameObject(this.tabbox, "mask"):GetComponent("Image") + this.mask1 = Util.GetGameObject(this.tabbox, "mask"):GetComponent("Image") this.mask2 = Util.GetGameObject(this.tabbox, "mask1"):GetComponent("Image") this.select = Util.GetGameObject(this.tabbox, "select") this.selectIma = Util.GetGameObject(this.select, "Image"):GetComponent("Image") @@ -386,10 +386,14 @@ end function this:PageOnChange(isShow) if isShow then - this.select.transform:SetParent(this.itemList[2].go.transform) - this.select.transform:GetComponent("RectTransform").anchoredPosition = Vector3.zero - this.select.gameObject:SetActive(true) - this.selectIma.sprite = this.spLoader:LoadSprite(self.dicData[self.curPage].Icon[2]) + for i = 1,#this.itemList do + if this.itemList[i].pageIndex == self.curPage then + this.select.transform:SetParent(this.itemList[i].go.transform) + this.select.transform:GetComponent("RectTransform").anchoredPosition = Vector3.zero + this.select.gameObject:SetActive(true) + this.selectIma.sprite = this.spLoader:LoadSprite(self.dicData[self.curPage].Icon[2]) + end + end end RecruitManager.CurRecruitId = self.CurRecruitId if subViewList[lastIndex] and subViewList[lastIndex].config and subViewList[lastIndex].sub then