| | |
| | | getData() |
| | | getVoiceUrl() |
| | | getScoreConfig() |
| | | getIsText2() |
| | | } |
| | | |
| | | private fun getIsText2() { |
| | | HttpManager.getIsOpen().request(this){_,data-> |
| | | SPUtils.instance().put(Const.IS_SHOW_TEXT,data?:true).apply() |
| | | } |
| | | } |
| | | |
| | | private fun getScoreConfig() { |
| | |
| | | @GET(Apis.userGameDifficulty) |
| | | fun userGameDifficulty(@Query("week") week: Int): Flowable<ResultData<Int?>> |
| | | |
| | | @GET(Apis.getIsOpen) |
| | | fun getIsOpen(): Flowable<ResultData<Boolean>> |
| | | |
| | | @GET(Apis.teamSchedule) |
| | | fun teamSchedule(@Query("day") day:Int,@Query("type") type:Int,@Query("week") week:Int): Flowable<ResultData<ProgressBean>> |
| | | |
| | |
| | | object Apis { |
| | | private var isTest = true |
| | | |
| | | // private const val TEST_URL = "http://192.168.110.237:9000/" //周帅内网 |
| | | private const val TEST_URL = "http://1.95.15.237:9000/" //外网 |
| | | private const val TEST_URL = "http://192.168.110.64:9000/" //周帅内网 |
| | | // 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 |
| | | |
| | |
| | | const val gameMemory = "study/base/study/gameMemory" |
| | | const val gameAchievement = "study/base/study/gameAchievement" |
| | | const val userGameDifficulty = "study/base/study/userGameDifficulty" |
| | | const val getIsOpen = "management/tSysSet/getIsOpen" |
| | | |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * 题目二是否展示文字 |
| | | */ |
| | | fun getIsOpen(): Flowable<ResultData<Boolean>> { |
| | | return request().getIsOpen() |
| | | } |
| | | |
| | | /** |
| | | * 回复进度 |
| | | */ |
| | | fun teamSchedule(day: Int,week: Int,type: Int): Flowable<ResultData<ProgressBean>> { |
| | |
| | | |
| | | private var nowVoiceView:View? = null |
| | | |
| | | private val isShowText by lazy { SPUtils.instance().getBoolean(Const.IS_SHOW_TEXT,true) } |
| | | |
| | | override fun onFirstVisibleToUser() { |
| | | player.setOnAudioStatusUpdateListener(this) |
| | | player.stopPlayMusic() |
| | |
| | | val shuffledList = list.shuffled() |
| | | voiceList.clear() |
| | | voiceList.addAll(shuffledList) |
| | | if (isShowText) |
| | | nameViews.forEachIndexed { index, textView -> |
| | | if (index == currentIndex){ |
| | | textView.text = originList[index].name |
| | |
| | | const val RV = "rightVoice" |
| | | const val EV = "errorVoice" |
| | | const val SCORE_DURATION = "score_duration" |
| | | const val IS_SHOW_TEXT = "isShowText" |
| | | |
| | | object Permission{ |
| | | const val CAMERA_REFUSE = "CAMERA_REFUSE" |