local page = class("pageTaskSubmit", G_UIPageBase)

function page:bind()
  return {
    moduleSubtask = {
      moduleName = "pages/task/moduleSubtaskBox"
    },
    isTask = false
  }
end

function page:methods()
  return {
    onClickClose = function(self)
      L_UI:close(self.pageName, {
        backName = "pageMainCity"
      })
      if self.callBack then
        self.callBack()
      end
    end
  }
end

function page:preOpen(options)
  self.super.preOpen(self, options)
  self.entityId = options.entityId
  self.taskId = options.taskId
  self.nodeId = options.nodeId
  self:initModule()
end

function page:escHandle()
  L_UI:close(self.pageName)
end

function page:close()
end

function page:initModule()
  local subItemData = L_TaskManager:getNeedSubItem(self.entityId, self.taskId, self.nodeId)
  self.bind.isItems = false
  self.bind.isTask = true
  self.modules.moduleSubtask:initData(self.taskId, self.nodeId, subItemData)
end

function page:loadVirtualCamera()
  printf("\229\164\167\228\184\150\231\149\140", "npc\233\128\187\232\190\145\229\136\160\233\153\164\239\188\140\232\175\183\228\188\152\229\140\150\230\173\164\228\187\163\231\160\129\233\128\187\232\190\145")
end

function page:unloadVirtualCamera()
  L_PlayerManager:showOrHideAllPlayer(true)
  L_CameraManager:revertCamController()
end

return page
