   componentDidMount: ->
     window.addEventListener 'game.response', @handleResponse
     window.addEventListener 'task.info', @handleTaskInfo
-    interval = setInterval @refreshDay, 30000
+    @interval = setInterval @refreshDay, 30000
   componentWillUnmount: ->
     window.removeEventListener 'game.response', @handleResponse
     window.removeEventListener 'task.info', @handleTaskInfo
-    clearInterval interval
+    clearInterval @interval
   render: ->
     <Panel header="任务" bsStyle="success">
       <Table>

{ROOT, layout, _, $, $$, React, ReactBootstrap} = window
{Panel, Table, Label, OverlayTrigger, Tooltip} = ReactBootstrap

prevHours = (new Date()).getUTCHours()
interval = null

getType = (api_category) ->
  switch api_category

        detail:
          tasks: tasks
      window.dispatchEvent event
    prevDay = curDay
  handleTaskInfo: (e) ->
    {tasks} = e.detail
    @setState
