| | |
| | | import com.dollearn.student.R |
| | | import com.dollearn.student.network.HttpManager |
| | | import com.dollearn.student.network.requestByF |
| | | import com.dollearn.student.utils.Const |
| | | import com.dollearn.student.utils.event.EmptyEvent |
| | | import kotlinx.android.synthetic.main.fragment_weekend.* |
| | | import org.greenrobot.eventbus.EventBus |
| | | import org.jetbrains.anko.support.v4.startActivity |
| | | |
| | | class WeekendFragment : BaseFragment() { |
| | |
| | | showDialog("加载题目...") |
| | | HttpManager.lookPictureDbu(season, week).requestByF(this){_,data-> |
| | | startActivity<LookImgActivity>("data" to data,"week" to week,"season" to season) |
| | | EventBus.getDefault().post(EmptyEvent(Const.EventCode.START_TIMER)) |
| | | } |
| | | } |
| | | cl_2.setOnClickListener { |
| | | showDialog("加载题目...") |
| | | HttpManager.frameworkMemory(season, week).requestByF(this){_,data-> |
| | | startActivity<ListenStoryActivity>("data" to data,"week" to week,"season" to season) |
| | | EventBus.getDefault().post(EmptyEvent(Const.EventCode.START_TIMER)) |
| | | |
| | | } |
| | | } |
| | | } |
| | | if (day == 6){ |
| | | cl_1.setOnClickListener { |
| | | startActivity<SuperListenActivity>("week" to week,"season" to season) |
| | | HttpManager.userGameDifficulty(week).requestByF(this){_,data-> |
| | | startActivity<SuperListenActivity>("week" to week,"season" to season,"level" to (data?:0)) |
| | | EventBus.getDefault().post(EmptyEvent(Const.EventCode.START_TIMER)) |
| | | } |
| | | } |
| | | cl_2.setOnClickListener { |
| | | showDialog("加载题目...") |
| | | HttpManager.gameMemory(season, week).requestByF(this){_,data-> |
| | | startActivity<MemoryActivity>("data" to data,"week" to week,"season" to season) |
| | | EventBus.getDefault().post(EmptyEvent(Const.EventCode.START_TIMER)) |
| | | |
| | | } |
| | | } |
| | | } |