New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="RunConfigurationProducerService"> |
| | | <option name="ignoredProducers"> |
| | | <set> |
| | | <option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" /> |
| | | </set> |
| | | </option> |
| | | </component> |
| | | </project> |
| | |
| | | object Apis { |
| | | private var isTest = true |
| | | |
| | | private const val TEST_URL = "http://192.168.110.237:9000/" //周帅内网 |
| | | // private const val TEST_URL = "http://192.168.110.237:9000/" //周帅内网 |
| | | // private const val TEST_URL = "http://221.182.45.100:56666/" //内网穿透 |
| | | // private const val TEST_URL = "http://8.137.22.229:56666/" //外网 |
| | | private const val TEST_URL = "http://1.95.15.237:9000/" //外网 |
| | | private const val LINE_URL = "http://8.137.22.229:56666/" //正式服 |
| | | val BASE_URL = if (isTest) TEST_URL else LINE_URL |
| | | |
| | |
| | | cl_1.clickDelay { |
| | | showDialog("加载题目...") |
| | | HttpManager.listenSelectPicture(season, week, day).requestByF(this){_,data-> |
| | | startActivityForResult<ListenActivity>(1,"data" to data) |
| | | startActivityForResult<ListenActivity>(1,"data" to data,"day" to day,"week" to week) |
| | | } |
| | | } |
| | | } |
| | |
| | | class ListenActivity:TransparentStatusBarActivity() { |
| | | override fun setContentView() = R.layout.activity_listen |
| | | |
| | | private val day by lazy { |
| | | intent.getIntExtra("day",0) |
| | | } |
| | | private val week by lazy { |
| | | intent.getIntExtra("week",0) |
| | | } |
| | | val data by lazy { intent.getParcelableExtra<SubjectBean>("data") } |
| | | private val fragments = arrayListOf<Fragment>() |
| | | |
| | |
| | | tipDialog.arguments = bundleOf("msg" to "未完成全部答题,确认退出吗?") |
| | | tipDialog.setCallback(object :TipDialog.OnClickCallback{ |
| | | override fun onOk() { |
| | | HttpManager.exitLearning() |
| | | HttpManager.exitLearning(day,week,1,data?.data?.id?:"",) |
| | | } |
| | | |
| | | override fun onCancel() { |