56个文件已修改
124个文件已删除
1个文件已添加
| | |
| | | <set> |
| | | <option value="$PROJECT_DIR$" /> |
| | | <option value="$PROJECT_DIR$/app" /> |
| | | <option value="$PROJECT_DIR$/rxnetty" /> |
| | | <option value="$PROJECT_DIR$/umeng_sdk" /> |
| | | <option value="$PROJECT_DIR$/xldutils-kotlin" /> |
| | | <option value="$PROJECT_DIR$/zxinglibrary" /> |
| | |
| | | androidTestImplementation 'androidx.test.ext:junit:1.1.1' |
| | | androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' |
| | | implementation project(path: ':xldutils-kotlin') |
| | | implementation project(path: ':rxnetty') |
| | | implementation 'com.google.android.material:material:1.2.1' |
| | | implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0' |
| | | implementation 'com.youth.banner:banner:2.0.11' |
| | |
| | | android:label="登录" |
| | | android:launchMode="singleTask" |
| | | android:screenOrientation="landscape"/> |
| | | <activity android:name=".ui.login.RegisterActivity" /> |
| | | <activity android:name=".ui.home.SearchActivity" /> |
| | | <activity |
| | | android:name=".ui.course.CourseActivity" |
| | | android:label="运动营列表" /> |
| | | <activity |
| | | android:name=".ui.course.CourseDetailActivity" |
| | | android:label="运动营详情" /> |
| | | <activity |
| | | android:name=".ui.mine.RechargeActivity" |
| | | android:label="充值中心" |
| | | android:launchMode="singleTask" /> |
| | | <activity android:name=".ui.GuideActivity" /> |
| | | <activity |
| | | android:name=".ui.home.JoinVipActivity" |
| | | android:label="成为会员" /> |
| | | <activity android:name=".ui.home.PayResultActivity" |
| | | android:screenOrientation="landscape" /> |
| | | <activity |
| | | android:name=".ui.home.AddStudentActivity" |
| | | android:label="添加运动营成员" android:windowSoftInputMode="adjustPan" /> |
| | | <activity |
| | | android:name=".ui.home.MatchActivity" |
| | | android:label="自主学习5-音图相配" |
| | | android:screenOrientation="landscape" /> |
| | | <activity |
| | | android:name=".ui.home.MatchDetailActivity" |
| | | android:label="活动详情" /> |
| | | <activity |
| | | android:name=".ui.home.JoinMatchActivity" |
| | | android:label="活动详情" /> |
| | | <activity |
| | | android:name=".ui.home.ChooseUserActivity" |
| | | android:label="选择人员" /> |
| | | <activity |
| | | android:name=".ui.home.MyMatchActivity" |
| | | android:label="我的报名" /> |
| | | <activity |
| | | android:name=".ui.home.MyMatchDetailActivity" |
| | | android:label="活动详情" /> |
| | | <activity |
| | | android:name=".ui.home.FieldActivity" |
| | | android:label="预约场地" /> |
| | | <activity |
| | | android:name=".ui.home.PlaceDetailActivity" |
| | | android:label="预约场地" |
| | | android:windowSoftInputMode="adjustPan" /> |
| | | <activity |
| | | android:name=".ui.home.MyPlaceActivity" |
| | | android:label="我的预约" /> |
| | | <activity android:name=".ui.home.VideoHomeActivity" /> |
| | | <activity android:name=".ui.home.VideoListActivity" /> |
| | | <activity |
| | | android:name=".ui.home.VideoDetailActivity" |
| | | android:configChanges="orientation|screenSize|keyboardHidden" |
| | | android:screenOrientation="portrait" /> |
| | | <activity |
| | | android:name=".ui.course.WelfareActivity" |
| | | android:label="本周福利" /> |
| | | <activity |
| | | android:name=".ui.course.WelfareDetailActivity" |
| | | android:label="运动营详情" /> |
| | | <activity |
| | | android:name=".ui.course.SwitchStudentActivity" |
| | | android:label="切换运动营成员" /> |
| | | <activity |
| | | android:name=".ui.course.MyCourseDetailActivity" |
| | | android:label="课时详情" |
| | | android:launchMode="singleTask" /> |
| | | <activity |
| | | android:name=".ui.discovery.ShopDetailActivity" |
| | | android:label="门店详情" /> |
| | | <activity |
| | | android:name=".ui.course.MedalActivity" |
| | | android:label="运动营成员徽章" /> |
| | | <activity |
| | | android:name=".ui.course.EvaluationActivity" |
| | | android:label="运动营成员评语" /> |
| | | <activity |
| | | android:name=".ui.course.PracticeListActivity" |
| | | android:label="课后练习" /> |
| | | <activity |
| | | android:name=".ui.discovery.EvaluateShopActivity" |
| | | android:label="门店评价" /> |
| | | <activity |
| | | android:name=".ui.discovery.ServiceActivity" |
| | | android:label="客服" /> |
| | | <activity |
| | | android:name=".ui.discovery.NoticeDetailActivity" |
| | | android:label="公告详情" /> |
| | | <activity |
| | | android:name=".ui.course.MyCourseActivity" |
| | | android:label="已报名运动营" /> |
| | | <activity |
| | | android:name=".ui.course.JoinedCourseDetailActivity" |
| | | android:label="运动营详情" /> |
| | |
| | | android:name=".ui.course.ReportActivity" |
| | | android:label="测试报告" /> |
| | | <activity |
| | | android:name=".ui.welfare.UserInfoActivity" |
| | | android:label="个人信息" /> |
| | | <activity |
| | | android:name=".ui.welfare.RechargeRecordActivity" |
| | | android:label="充值明细" |
| | | android:launchMode="singleTask" /> |
| | | <activity |
| | | android:name=".ui.welfare.CoinRecordActivity" |
| | | android:label="账单" /> |
| | | <activity |
| | | android:name=".ui.welfare.GoodsDetailActivity" |
| | | android:label="商品详情" /> |
| | | <activity |
| | | android:name=".ui.welfare.CourseGoodsDetailActivity" |
| | | android:label="商品详情" /> |
| | | <activity |
| | | android:name=".ui.welfare.ExchangeRecordActivity" |
| | |
| | | android:name=".ui.welfare.ExchangeDetailActivity" |
| | | android:label="商品详情" /> |
| | | |
| | | <activity |
| | | android:name=".ui.home.ScannerActivity" |
| | | android:label="扫一扫" /> |
| | | <activity |
| | | android:name=".ui.course.MyReservationActivity" |
| | | android:label="我的预约" /> |
| | | <activity |
| | | android:name=".ui.course.ExperienceCourseActivity" |
| | | android:label="体验购课" /> |
| | | <activity |
| | | android:name=".ui.game.GameActivity" |
| | | android:label="智慧球场" |
| | | android:configChanges="orientation|screenSize|keyboardHidden" |
| | | android:screenOrientation="portrait" /> |
| | | <activity android:name=".ui.welfare.OnlineShopActivity" |
| | | android:screenOrientation="landscape"/> |
| | | <activity android:name=".ui.game.MyDataActivity" android:label="我的数据" |
| | | android:screenOrientation="landscape"/> |
| | | <activity android:name=".ui.home.PlatformActivity" |
| | | android:screenOrientation="landscape"/> |
| | | <activity android:name=".ui.worldcup.WorldCupListActivity" android:label="社区世界杯" |
| | | android:screenOrientation="landscape"/> |
| | | <activity android:name=".ui.worldcup.WorldCupDetailActivity" android:label="社区世界杯" |
| | | android:screenOrientation="landscape"/> |
| | | <activity android:name=".ui.worldcup.JoinWCActivity" android:label="社区世界杯" |
| | | android:screenOrientation="landscape"/> |
| | | <activity android:name=".ui.worldcup.RefereeWorldListActivity" android:label="社区世界杯" |
| | | android:screenOrientation="landscape"/> |
| | | <activity android:name=".ui.worldcup.StartWorldActivity" |
| | | android:screenOrientation="landscape" /> |
| | | <activity android:name=".ui.home.WeekSelectActivity" android:label="第一年学习周目选择" |
| | | android:screenOrientation="landscape"> |
| | | <!-- <intent-filter>--> |
| | |
| | | <activity android:name=".ui.home.SuperListenActivity" android:label="自主游戏1—超级听力" |
| | | android:screenOrientation="landscape"/> |
| | | |
| | | <meta-data |
| | | android:name="com.amap.api.v2.apikey" |
| | | android:value="ff828b49ed8ab9b5d2aaf789ea254e82" /> |
| | | </application> |
| | | |
| | | </manifest> |
| | |
| | | import android.app.Activity |
| | | import android.app.Application |
| | | import android.os.Bundle |
| | | import cn.sinata.rxnetty.NettyClient |
| | | import cn.sinata.xldutils.application.BaseApplication |
| | | import cn.sinata.xldutils.utils.SPUtils |
| | | import com.dollearn.student.network.Apis |
| | |
| | | UMConfigure.setLogEnabled(true) |
| | | PlatformConfig.setWeixin(Const.WX_APP_ID, Const.WX_SECRET) |
| | | PlatformConfig.setQQZone(Const.QQ_APP_ID, Const.QQ_SECRET) |
| | | initNetty() |
| | | } |
| | | |
| | | private fun initNetty() { |
| | | NettyClient.getInstance().init(this, Apis.SOCKET_SERVER, Apis.SOCKET_PORT, false) |
| | | NettyClient.getInstance().addOnMessageListener { message -> |
| | | try { |
| | | val json = JSONObject(message) |
| | | val method = json.optString("method") |
| | | val code = json.optString("code") |
| | | if (code == "200"){ |
| | | when (method) { |
| | | Const.Method.PING_RECEIVE -> {//心跳 |
| | | //延时发送心跳 |
| | | if (heartSubscribe != null && !heartSubscribe?.isDisposed!!) { |
| | | heartSubscribe?.dispose() |
| | | } |
| | | heartSubscribe = |
| | | Flowable.just("").delay(5000, TimeUnit.MILLISECONDS).subscribe { |
| | | sendHeart() |
| | | } |
| | | } |
| | | |
| | | // Const.Method.OFFLINE -> {//强制下线 |
| | | // val topAct = activities[activities.lastIndex] |
| | | // SPUtils.instance().remove(Const.User.TOKEN).remove(Const.User.USER_ID).remove(Const.User.NO_PHONE).apply() |
| | | // val tipDialog = TipDialog() |
| | | // tipDialog.arguments = bundleOf("msg" to "您的账号已在其他地方登陆,请重新登陆","isAlert" to true) |
| | | // tipDialog.setDismissCallback(object :TipDialog.OnDismiss{ |
| | | // override fun onDismiss() { |
| | | // exit() |
| | | // topAct.startActivity<LoginActivity>() |
| | | // } |
| | | // }) |
| | | // tipDialog.show((topAct as BaseActivity).supportFragmentManager,"logout") |
| | | // } |
| | | } |
| | | } |
| | | }catch (e: Exception){ |
| | | e.printStackTrace() |
| | | } |
| | | } |
| | | NettyClient.getInstance().setOnConnectListener { |
| | | //连接成功,发送一次心跳 |
| | | sendHeart() |
| | | } |
| | | } |
| | | |
| | | private fun sendHeart() { |
| | | val userId = SPUtils.instance().getString(Const.User.USER_ID) |
| | | val token = SPUtils.instance().getString(Const.User.TOKEN) |
| | | if (token.isNotEmpty()) { |
| | | NettyClient.getInstance() |
| | | .sendMessage("{\"data\":{\"userId\":$userId,\"token\":\"$token\",\"type\":1},\"method\":\"PING\",\"code\":200,\"msg\":\"SUCCESS\"}") |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 关闭所有页面 |
| | |
| | | var homeData: UserBean? = null //个人信息 |
| | | var score = 0 |
| | | private var handler: Handler? = null |
| | | var mins = 0 |
| | | |
| | | override fun initClick() { |
| | | } |
| | |
| | | } |
| | | |
| | | private fun getScoreConfig() { |
| | | HttpManager.onlineDuration().request(this,false,{_,data-> |
| | | SPUtils.instance().put(Const.SCORE_DURATION,(data?:"0").toInt()).apply() |
| | | startTimer() |
| | | }){_,_-> |
| | | startTimer() |
| | | HttpManager.onlineDuration().request(this,false) { _, data -> |
| | | SPUtils.instance().put(Const.SCORE_DURATION, (data ?: "0").toInt()).apply() |
| | | } |
| | | } |
| | | |
| | | private fun startTimer() { |
| | | val duration = SPUtils.instance().getInt(Const.SCORE_DURATION,30)//单位分钟 |
| | | var mins = 0 |
| | | handler = object :Handler(Looper.myLooper()!!){ |
| | | override fun handleMessage(msg: Message) { |
| | | super.handleMessage(msg) |
| | | if (msg.what == 0){ |
| | | mins++ |
| | | Log.e("mmp","当前已在线${mins}分钟") |
| | | if (mins > duration){ |
| | | HttpManager.giveIntegral().request(this@MainActivity,false,{_,_-> |
| | | mins = 0 |
| | | if (handler == null) |
| | | handler = object :Handler(Looper.myLooper()!!){ |
| | | override fun handleMessage(msg: Message) { |
| | | super.handleMessage(msg) |
| | | if (msg.what == 0){ |
| | | mins++ |
| | | Log.e("mmp","当前已听${mins}分钟") |
| | | if (mins >= duration){ |
| | | HttpManager.giveIntegral().request(this@MainActivity,false,{_,_-> |
| | | mins = 0 |
| | | handler?.sendEmptyMessageDelayed(0,1000*60) |
| | | }){_,_-> |
| | | handler?.sendEmptyMessageDelayed(0,1000*60) |
| | | } |
| | | }else |
| | | handler?.sendEmptyMessageDelayed(0,1000*60) |
| | | }){_,_-> |
| | | handler?.sendEmptyMessageDelayed(0,1000*60) |
| | | } |
| | | }else |
| | | handler?.sendEmptyMessageDelayed(0,1000*60) |
| | | } |
| | | } |
| | | } |
| | | if (handler?.hasMessages(0) == false){ |
| | | mins = 0 |
| | | handler?.sendEmptyMessageDelayed(0,1000*60) |
| | | } |
| | | handler?.sendEmptyMessageDelayed(0,1000*60) |
| | | } |
| | | |
| | | private fun getVoiceUrl() { |
| | |
| | | |
| | | @Subscribe |
| | | fun onSwitch(e:EmptyEvent){ |
| | | if (e.code == Const.EventCode.CLICK_GAME_ITEM){ |
| | | switchHome() |
| | | }else if(e.code == Const.EventCode.CHANGE_WELFARE){ |
| | | tab_bar.currentTab = 2 |
| | | onTabSelect(2) |
| | | }else if(e.code == Const.EventCode.CHANGE_EXPLORE){ |
| | | tab_bar.currentTab = 3 |
| | | onTabSelect(3) |
| | | when (e.code) { |
| | | Const.EventCode.CLICK_GAME_ITEM -> { |
| | | switchHome() |
| | | } |
| | | Const.EventCode.REFRESH_USER -> getData() |
| | | Const.EventCode.SCORE_CHANGED -> getScore() |
| | | Const.EventCode.START_TIMER ->{ |
| | | Log.e("mmp","开始学习") |
| | | startTimer() |
| | | } |
| | | Const.EventCode.STOP_TIMER ->{ |
| | | Log.e("mmp","结束学习") |
| | | handler?.removeMessages(0) |
| | | mins = 0 |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Subscribe |
| | | fun refreshUser(e:EmptyEvent){ |
| | | if (e.code == Const.EventCode.REFRESH_USER) |
| | | getData() |
| | | if (e.code == Const.EventCode.SCORE_CHANGED) |
| | | getScore() |
| | | } |
| | | |
| | | private fun getData() { |
| | |
| | | var callback:StringCallback? = null |
| | | |
| | | override fun initView() { |
| | | tv_title.text = "查询时间" |
| | | val years = arrayListOf<String>() |
| | | val currentYear = System.currentTimeMillis().toTime("yyyy").toInt() |
| | | years.addAll((currentYear-3..currentYear).map { it.toString() }) |
| | |
| | | fun getH5(@Field("type") type: Int): Flowable<ResultData<String>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.queryProvinceAndCity) |
| | | fun queryProvinceAndCity(@Field("pcode") code: String?): Flowable<ResultData<ArrayList<CommonData>>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.queryStoreByCityCode) |
| | | fun queryStoreByCityCode(@Field("cityCode") code: String,@Field("provinceCode") provinceCode: String): Flowable<ResultData<ArrayList<CommonData>>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.addVipPayment) |
| | | fun addVipPayment(@Field("payType") payType: Int): Flowable<ResultData<PayInfo>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.paymentCourse) |
| | | fun paymentCourse( |
| | | @Field("payType") payType: Int, |
| | | @Field("id") id: String, |
| | | @Field("coursePackagePaymentConfigId") coursePackagePaymentConfigId: String, |
| | | @Field("price") price: Double, |
| | | @Field("studentIds") studentIds: String, |
| | | @Field("couponId") couponId: Long, |
| | | @Field("orderId") orderId: String? |
| | | ): Flowable<ResultData<PayInfo>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.payment) |
| | | fun payment( |
| | | @Field("payType") payType: Int, |
| | | @Field("lessonId") id: String, |
| | | @Field("coursePayId") coursePayId: String, |
| | | @Field("courseHoursNum") courseHoursNum: Int, |
| | | @Field("stuId") studentIds: String, |
| | | @Field("useConpon") useConpon: Int, |
| | | @Field("conponId") couponId: Long |
| | | ): Flowable<ResultData<PayInfo>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.paymentCompetition) |
| | | fun paymentCompetition( |
| | | @Field("payType") payType: Int, |
| | | @Field("id") id: String, |
| | | @Field("ids") ids: String, |
| | | @Field("coursePaymentId") coursePaymentId: String? |
| | | ): Flowable<ResultData<PayInfo>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.queryPhysical) |
| | | fun queryPhysical(@Field("stuID") id: String): Flowable<ResultData<Report>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.stuAppointList) |
| | | fun stuAppointList( |
| | | @Field("stuId") stuId: String, |
| | | @Field("appointStatus") appointStatus: Int, |
| | | @Field("timeType") timeType: Int?, |
| | | @Field("search") search: String?, |
| | | @Field("pageNum") pageNum: Int, |
| | | @Field("size") size: Int = Const.PAGE_SIZE |
| | | ): Flowable<ResultData<List<ReserveRecord>>> |
| | | |
| | | @GET(Apis.userDetails) |
| | | fun userDetails(): Flowable<ResultData<UserBean>> |
| | |
| | | @GET(Apis.studyRecord) |
| | | fun studyRecord(): Flowable<ResultData<StudyRecord>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.uploadImage) |
| | | fun uploadImage(@Field("userImage") userImage: String): Flowable<ResultData<Any>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.queryClassificationBenefitsVideosList) |
| | | fun queryClassificationBenefitsVideosList( |
| | | @Field("position") type: Int, |
| | | @Field("search") search: String? |
| | | ): Flowable<ResultData<List<VideoTypeBean>>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.queryBenefitsVideosList) |
| | | fun queryBenefitsVideosList( |
| | | @Field("classificationId") classificationId: String, |
| | | @Field("pageNo") page: Int, |
| | | @Field("pageSize") pageSize: Int, |
| | | @Field("search") search: String? |
| | | ): Flowable<ResultData<List<VideoBean>>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.queryBenefitsVideosInfo) |
| | | fun queryBenefitsVideosInfo(@Field("id") id: String): Flowable<ResultData<VideoBean>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.afterSourceDetail) |
| | | fun afterSourceDetail( |
| | | @Field("videoId") id: String, |
| | | @Field("scId") scId: String, |
| | | @Field("coursePackageId") coursePackageId: String |
| | | ): Flowable<ResultData<Practice>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.receiveAward) |
| | | fun receiveAward(@Field("id") id: String): Flowable<ResultData<Any>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.updateVideoStatus) |
| | | fun updateVideoStatus(@Field("videoId") videoId: String,@Field("coursePackageId") coursePackageId: String, |
| | | @Field("scId") scId: String?,@Field("isOver") isOver: Int = 1): Flowable<ResultData<Any>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.querySiteList) |
| | | fun querySiteList( |
| | | @Field("pageNum") page: Int, |
| | | @Field("pageSize") pageSize: Int, |
| | | @Field("lat") lat: Double?, |
| | | @Field("lon") lon: Double?, |
| | | @Field("cityCode") cityCode: String?, |
| | | @Field("startTime") startTime: String?, |
| | | @Field("endTime") endTime: String?, |
| | | @Field("siteTypeId") siteTypeId: Int?, |
| | | @Field("storeId") storeId: String?, |
| | | @Field("search") search: String? |
| | | ): Flowable<ResultData<List<Place>>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.queryMySite) |
| | | fun queryMySite( |
| | | @Field("pageNo") page: Int, |
| | | @Field("pageSize") pageSize: Int, |
| | | @Field("status") status: Int? |
| | | ): Flowable<ResultData<List<Place>>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.cancelMySite) |
| | | fun cancelMySite(@Field("id") id: String): Flowable<ResultData<Any>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.queryMyCompetitionList) |
| | | fun queryMyCompetitionList( |
| | | @Field("type") type: Int, |
| | | @Field("pageNo") page: Int, |
| | | @Field("pageSize") pageSize: Int |
| | | ): Flowable<ResultData<List<Match>>> |
| | | |
| | | @POST(Apis.querySiteType) |
| | | fun querySiteType(): Flowable<ResultData<List<CommonData>>> |
| | | |
| | | @POST(Apis.weeksOfGetHours) |
| | | fun weeksOfGetHours(): Flowable<ResultData<Int>> |
| | | |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.weeksOfAddHours) |
| | | fun weeksOfAddHours(@Field("packetId") id: Long): Flowable<ResultData<Any>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.queryMySiteById) |
| | | fun queryMySiteById(@Field("id") id: String): Flowable<ResultData<MySite>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.payCourseInfo) |
| | | fun payCourseInfo(@Field("courseId") id: Int): Flowable<ResultData<PayCoursInfo>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.payCourse) |
| | | fun payCourse(@FieldMap hashMap: HashMap<String,Any>,@Field("time") id: List<String>): Flowable<ResultData<Any>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.getMyCourseList) |
| | | fun getMyCourseList(@Field("storeId") id: Int=storeId.toInt()): Flowable<ResultData<List<MyCourseList>>> |
| | | |
| | | @POST(Apis.queryArrangeCourseList) |
| | | fun queryArrangeCourseList(): Flowable<ResultData<List<CommonData>>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.registeredCourses) |
| | | fun registeredCourses( |
| | | @Field("courseTypeId") courseTypeId: Int?, |
| | | @Field("search") search: String? |
| | | ): Flowable<ResultData<List<JoinedCourse>>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.continuePaymentMySite) |
| | | fun continuePaymentMySite( |
| | | @Field("id") id: String, |
| | | @Field("payType") payType: Int |
| | | ): Flowable<ResultData<PayInfo>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.queryCompetitionInfo) |
| | | fun queryCompetitionInfo( |
| | | @Field("id") id: String, |
| | | @Field("lat") lat: Double?, |
| | | @Field("lon") lon: Double? |
| | | ): Flowable<ResultData<Match>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.queryMyCompetitionInfo) |
| | | fun queryMyCompetitionInfo(@Field("id") id: String): Flowable<ResultData<Match>> |
| | | |
| | | @POST(Apis.queryAllCity) |
| | | fun queryAllCity(): Flowable<ResultData<List<CommonData>>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.queryCourseList) |
| | | fun queryCourseList( |
| | | @Field("storeId") storeId: String, |
| | | @Field("lat") lat: Double?, |
| | | @Field("lon") lon: Double?, |
| | | @Field("coursePackageTypeId") coursePackageTypeId: Int?, |
| | | @Field("distanceSort") distanceSort: String?, |
| | | @Field("salesRanking") salesRanking: String?, |
| | | @Field("search") search: String? |
| | | ): Flowable<ResultData<List<Course>>> |
| | | |
| | | @POST(Apis.queryCoursePackageType) |
| | | fun queryCoursePackageType(): Flowable<ResultData<List<CommonData>>> |
| | | |
| | | @POST(Apis.getCourseAppUserDetails) |
| | | fun getCourseAppUserDetails(): Flowable<ResultData<List<CommonData>>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.queryStoreLists) |
| | | fun queryStoreLists( |
| | | @Field("lat") lat: Double?, |
| | | @Field("lon") lon: Double?, |
| | | @Field("cityCode") cityCode: String? |
| | | ): Flowable<ResultData<List<CommonData>>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.queryCourseInfo) |
| | | fun queryCourseInfo( |
| | | @Field("id") id: String, |
| | | @Field("stuId") stuId: String?, |
| | | @Field("lat") lat: Double?, |
| | | @Field("lon") lon: Double? |
| | | ): Flowable<ResultData<Course>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.discountCourseDatas) |
| | | fun discountCourseDatas( |
| | | @Field("coursePackageDiscountId") id: String, |
| | | @Field("lat") lat: Double?, |
| | | @Field("lon") lon: Double? |
| | | ): Flowable<ResultData<WelfareDetail>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.queryStudentData) |
| | | fun queryStudentData(@Field("stuId") id: String?): Flowable<ResultData<CourseHomeData>> |
| | | |
| | | @POST(Apis.voucherCenter) |
| | | fun voucherCenter(): Flowable<ResultData<List<RechargeItem>>> |
| | | |
| | | @POST(Apis.rechargeDescription) |
| | | fun rechargeDescription(): Flowable<ResultData<String>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.stuGoog) |
| | | fun stuGoog( |
| | | @Field("stuId") stuId: String |
| | | ): Flowable<ResultData<ArrayList<Medal>>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.stuMedal) |
| | | fun stuMedal( |
| | | @Field("stuId") stuId: String |
| | | ): Flowable<ResultData<ArrayList<Medal>>> |
| | | |
| | | @FormUrlEncoded |
| | | @FormUrlEncoded |
| | | @POST(Apis.stuComment) |
| | | fun stuComment( |
| | | @Field("stuId") stuId: String |
| | | ): Flowable<ResultData<ArrayList<Evaluation>>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.afterSourceList) |
| | | fun afterSourceList( |
| | | @Field("stuId") stuId: String, |
| | | @Field("courseTypeId") courseTypeId: Int?, |
| | | @Field("search") search: String? |
| | | ): Flowable<ResultData<ArrayList<Practice>>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.weeksOfCourseDetails) |
| | | fun weeksOfCourseDetails( |
| | | @Field("stuId") stuId: String, @Field("storeId") storeId: String, @Field("time") time: String, |
| | | @Field("latitude") lat: Double?, @Field("longitude") lon: Double? |
| | | ): Flowable<ResultData<WeeksOfCourseDetails>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.lessonDetails) |
| | |
| | | @GET(Apis.promptVoice) |
| | | fun promptVoice(): Flowable<ResultData<ConfigBean>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST |
| | | fun register( |
| | | @Url url: String, |
| | | @Field("phone") phone: String, @Field("password") password: String, |
| | | @Field("code") code: String, @Field("invitePhone") invitePhone: String?, |
| | | @Field("openId") openId: String?, @Field("lat") lat: Double?, @Field("lon") lon: Double? |
| | | ): Flowable<ResultData<Any>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.bindWx) |
| | | fun bindPhone( |
| | | @Field("phone") phone: String, @Field("code") code: String, @Field("invitePhone") invitePhone: String?, |
| | | @Field("openId") openId: String?, @Field("lat") lat: Double?, @Field("lon") lon: Double? |
| | | ): Flowable<ResultData<JsonObject>> |
| | | |
| | | @POST(Apis.captchaLogin) |
| | | fun captchaLogin( |
| | | @Body phoneRequest : String |
| | |
| | | fun giveIntegral(): Flowable<ResultData<Boolean>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.queryBanner) |
| | | fun queryBanner(@Field("position") type: Int): Flowable<ResultData<ArrayList<Banner>>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.querySearchCourseList) |
| | | fun querySearchCourseList( |
| | | @Field("conditions") conditions: String?, |
| | | @Field("current") current: Int, |
| | | @Field("gradeId") gradeId: Int, |
| | | @Field("subjectsId") subjectsId: String?, |
| | | @Field("size") size: Int = Const.PAGE_SIZE |
| | | ): Flowable<ResultData<ArrayList<Course>>> |
| | | |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.recharge) |
| | | fun recharge( |
| | | @Field("amount") money: Double, |
| | | @Field("payType") type: Int |
| | | ): Flowable<ResultData<PayInfo>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST |
| | | fun voucherDetail( |
| | | @Url url: String, |
| | | @Field("yearMonth") yearMonth: String, |
| | | @Field("pageNum") pageNum: Int, |
| | | @Field("pageSize") pageSize: Int, |
| | | @Field("recordId") type: Int? |
| | | ): Flowable<ResultData<List<CoinRecord>>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.userBilling) |
| | | fun userBilling( |
| | | @Field("yearMonth") yearMonth: String, |
| | | @Field("recordId") type: Int? |
| | | ): Flowable<ResultData<List<CoinRecord>>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.queryCouponPackage) |
| | | fun queryCouponPackage( |
| | | @Field("couponType") couponType: Int?, |
| | | @Field("useStatus") useStatus: Int? |
| | | ): Flowable<ResultData<List<Coupon>>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.integralMallList) |
| | | fun integralMallList( |
| | | @Field("goodsType") goodsType: Int?, |
| | | @Field("rank") rank: Int?, |
| | | @Field("pageNum") pageNum: Int, |
| | | @Field("pageSize") pageSize: Int, |
| | | @Field("lat") lat: Double?, |
| | | @Field("lon") lon: Double?, |
| | | @Field("search") search: String?, |
| | | @Field("shopId") shopId: String? |
| | | |
| | | ): Flowable<ResultData<List<Goods>>> |
| | | @FormUrlEncoded |
| | | @POST(Apis.redemptionDetails) |
| | | fun redemptionDetails( |
| | | @Field("detailsId") goodId: String |
| | |
| | | |
| | | @POST(Apis.cancellation) |
| | | fun cancellation(): Flowable<ResultData<Any>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.queryStoreFreeBenefit) |
| | | fun queryStoreFreeBenefit( |
| | | @Field("id") id: String |
| | | ): Flowable<ResultData<JsonObject>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST |
| | | fun addStudent( |
| | | @Url url: String, |
| | | @Field("birthday") birthday: String, |
| | | @Field("headImg") headImg: String, |
| | | @Field("height") height: Double, |
| | | @Field("weight") weight: Double, |
| | | @Field("sex") sex: Int, |
| | | @Field("name") name: String, |
| | | @Field("phone") phone: String?, |
| | | @Field("idCard") idCard: String?, |
| | | @Field("stuId") stuId: String?, |
| | | @Field("id") id: String? |
| | | ): Flowable<ResultData<Any>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.addParticipant) |
| | | fun addParticipant( |
| | | @Field("headImg") avatar: String, |
| | | @Field("birthday") birthday: String, |
| | | @Field("height") height: Double, |
| | | @Field("weight") weight: Double, |
| | | @Field("gender") sex: Int, |
| | | @Field("name") name: String, |
| | | @Field("phone") phone: String?, |
| | | @Field("idcard") idCard: String? |
| | | ): Flowable<ResultData<Any>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.editParticipant) |
| | | fun editParticipant( |
| | | @Field("headImg") avatar: String, |
| | | @Field("id") id: String, |
| | | @Field("height") height: Int?, |
| | | @Field("weight") weight: Double?, |
| | | @Field("phone") phone: String?, |
| | | @Field("birthday") birthday: String?, |
| | | @Field("name") name: String?, |
| | | @Field("gender") gender: Int?, |
| | | @Field("idcard") idcard: String? |
| | | ): Flowable<ResultData<Any>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.delParticipant) |
| | | fun delParticipant( |
| | | @Field("id") id: String, |
| | | @Field("isStudent") isStudent: Int? |
| | | ): Flowable<ResultData<Any>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.cancelMyCompetition) |
| | | fun cancelMyCompetition( |
| | | @Field("id") id: String |
| | | ): Flowable<ResultData<Any>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.paymentCompetitionCourseList) |
| | | fun paymentCompetitionCourseList(@Field("id") id: String): Flowable<ResultData<List<PayCourse>>> |
| | | |
| | | @POST(Apis.exitLearning) |
| | | fun exitLearning(@Body body: String): Flowable<ResultData<Any>> |
| | |
| | | @GET(Apis.teamSchedule) |
| | | fun teamSchedule(@Query("day") day:Int,@Query("type") type:Int,@Query("week") week:Int): Flowable<ResultData<ProgressBean>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST |
| | | fun listOfStu(@Url url: String,@Field("isPre") isPre: Int?): Flowable<ResultData<List<Student>>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.weekLimitedBenefit) |
| | | fun weekLimitedBenefit( |
| | | @Field("discountType") discountType: Int, |
| | | @Field("lat") lat: Double?, |
| | | @Field("lon") lon: Double? |
| | | ): Flowable<ResultData<ArrayList<Welfare>>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.queryAvailableCouponList) |
| | | fun queryAvailableCouponList( |
| | | @Field("coursePackageId") coursePackageId: String, |
| | | @Field("price") price: Double, |
| | | @Field("lat") lat: Double?, |
| | | @Field("lon") lon: Double? |
| | | ): Flowable<ResultData<ArrayList<Coupon>>> |
| | | |
| | | @GET(Apis.goodTypeStudy) |
| | | fun goodTypeStudy(): Flowable<ResultData<ArrayList<GoodsType>>> |
| | |
| | | @Body phoneRequest : String |
| | | ): Flowable<ResultData<Any>> |
| | | |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.updateInfo) |
| | | fun updateInfo( |
| | | @Field("birthday") birthday: String?, |
| | | @Field("gender") gender: Int?, |
| | | @Field("name") name: String? |
| | | ): Flowable<ResultData<Any>> |
| | | |
| | | @POST(Apis.goodListStudy) |
| | | fun goodListStudy( |
| | | @Body body:String |
| | |
| | | @GET(Apis.exchangeRecord) |
| | | fun exchangeRecord(@Query("pageNumber") page:Int,@Query("pageSize") pageSize: Int = 30): Flowable<ResultData<ExchangeRecordBean>> |
| | | |
| | | @Headers("notapp:true") |
| | | @FormUrlEncoded |
| | | @POST(Apis.gameRecord) |
| | | fun gameRecord( |
| | | @Field("uid") uid: String, |
| | | @Field("page") page: Int, |
| | | @Field("limit") limit: Int = 10, |
| | | @Field("sign") storeId: String = "0DB011836143EEE2C2E072967C9F4E4B" |
| | | ): Flowable<ResultData<List<GameRecordBean>>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.registeredData) |
| | | fun registeredData( |
| | |
| | | @Field("coursePayId") coursePayId: String, |
| | | @Field("orderId") orderId: String |
| | | ): Flowable<ResultData<JoinedCourse>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.storeList) |
| | | fun storeList( |
| | | @Field("latitude") lat: Double?, |
| | | @Field("longitude") lon: Double?, |
| | | @Field("cityCode") cityCode: String?, |
| | | @Field("space") space: Int?, |
| | | @Field("search") search: String? |
| | | ): Flowable<ResultData<List<ShopListBean>>> |
| | | |
| | | @POST(Apis.noticeList) |
| | | fun noticeList(): Flowable<ResultData<List<Notice>>> |
| | | |
| | | @POST(Apis.exceptionList) |
| | | fun exceptionList(): Flowable<ResultData<List<Notice>>> |
| | | |
| | | @POST(Apis.customerList) |
| | | fun customerList(): Flowable<ResultData<List<String>>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST |
| | |
| | | @Field("noId") noId: String, |
| | | @Field("quesId") quesId: String |
| | | ): Flowable<ResultData<Notice>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.storeDetail) |
| | | fun storeDetail(@Field("storeId") storeId: String): Flowable<ResultData<ShopDetail>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.saveEvaluation) |
| | | fun saveEvaluation( |
| | | @Field("storeId") storeId: String, |
| | | @Field("content") content: String?, |
| | | @Field("imgs") imgs: String?, |
| | | @Field("score") score: Double |
| | | ): Flowable<ResultData<Any>> |
| | | |
| | | @POST(Apis.getHomeModule) |
| | | fun getHomeModule(): Flowable<ResultData<Banner>> |
| | | |
| | | @POST(Apis.getCompletedWorldCupTips) |
| | | fun getCompletedWorldCupTips(): Flowable<ResultData<Int>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.getWorldCupList) |
| | | fun getWorldCupList( |
| | | @Field("id") id: String, |
| | | @Field("lat") lat: Double?, |
| | | @Field("lon") lon: Double?, |
| | | @Field("gender") gender: Int?, |
| | | @Field("sort") sort: Int?, |
| | | @Field("storeId") storeId: Int?, |
| | | @Field("content") search: String? |
| | | ): Flowable<ResultData<List<WorldCupBean>>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.getWorldCupListCoach) |
| | | fun getWorldCupListCoach( |
| | | @Field("lat") lat: Double?, |
| | | @Field("lon") lon: Double?, |
| | | @Field("storeId") storeId: Int?, |
| | | @Field("content") search: String? |
| | | ): Flowable<ResultData<List<WorldCupBean>>> |
| | | |
| | | @POST(Apis.getWorldCupStore) |
| | | fun getWorldCupStore(): Flowable<ResultData<List<CommonData>>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.getWorldCupInfo) |
| | | fun getWorldCupInfo(@Field("id") id: String, |
| | | @Field("lat") lat: Double?, |
| | | @Field("lon") lon: Double?): Flowable<ResultData<WorldCupBean>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.paymentWorldCup) |
| | | fun paymentWorldCup(@Field("id") id: String,@Field("ids") ids: String,@Field("payType") payType: Int): Flowable<ResultData<PayInfo>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.getEntrantRank) |
| | | fun getEntrantRank(@Field("id") id: String,@Field("isStudent") isStudent: Int): Flowable<ResultData<Rank>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.getMyWorldCupList) |
| | | fun getMyWorldCupList(@Field("id") id: String,@Field("isStudent") isStudent: Int, |
| | | @Field("state") state: Int, @Field("pageNo") page: Int, |
| | | @Field("pageSize") limit: Int = 10): Flowable<ResultData<List<WorldCupBean>>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.getWorldCupMatchRecord) |
| | | fun getWorldCupMatchRecord(@Field("id") id: String,@Field("isStudent") isStudent: Int, @Field("pageNo") page: Int, |
| | | @Field("pageSize") limit: Int = 20): Flowable<ResultData<WorldCupRecord>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.getWorldCupRank) |
| | | fun getWorldCupRank(@Field("id") id: String,@Field("isStudent") isStudent: Int, @Field("radius") radius: Int, |
| | | @Field("sort") sort: Int,@Field("year") year: Int?): Flowable<ResultData<List<WorldRank>>> |
| | | |
| | | @POST(Apis.getParticipant) |
| | | fun getParticipant(): Flowable<ResultData<List<Student>>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.getMyWorldCupInfo) |
| | | fun getMyWorldCupInfo(@Field("id") id: String,@Field("lat") lat: Double?, |
| | | @Field("lon") lon: Double?): Flowable<ResultData<WorldCupBean>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.cancelMyWorldCup) |
| | | fun cancelMyWorldCup(@Field("id") id: String): Flowable<ResultData<Any>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.getWorldCupPeople) |
| | | fun getWorldCupPeople(@Field("code") code: String,@Field("worldCupId") worldCupId: String): Flowable<ResultData<CodeResultUser>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.getDeviceInformation) |
| | | fun getDeviceInformation(@Field("code") code: String): Flowable<ResultData<DeviceBean>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.startWorldCup) |
| | | fun startWorldCup(@Field("code") code: String,@Field("people") people: String,@Field("worldCupId") worldCupId: String): Flowable<ResultData<Any>> |
| | | } |
| | |
| | | private const val LINE_URL = "http://8.137.22.229:56666/" //正式服 |
| | | val BASE_URL = if (isTest) TEST_URL else LINE_URL |
| | | |
| | | // private const val TEST_IP = "192.168.110.22"//内 |
| | | private const val TEST_IP = "8.137.22.229"//外测 |
| | | private const val LINE_IP = "8.137.22.229"//线上 |
| | | private const val LINE_PORT = 8888 //线上 |
| | | private const val TEST_PORT = 8888 //测试外 |
| | | val SOCKET_SERVER = if (isTest) TEST_IP else LINE_IP |
| | | val SOCKET_PORT = if (isTest) TEST_PORT else LINE_PORT |
| | | |
| | | const val gameRecord ="https://port.daowepark.com/v7/user_api/general/gameRecord" //正式 |
| | | // const val gameRecord ="https://try.daowepark.com/v7/user_api/general/gameRecord" //测试 |
| | | |
| | | /**公共接口*/ |
| | | val SHARE_URL = "https://dollearn.com/" //分享链接 官网 |
| | |
| | | const val getCode = "study/base/user/sendPhoneCode" |
| | | const val promptVoice = "study/base/study/promptVoice" |
| | | const val querySystemImg = "study/base/user/studyPage" |
| | | const val queryProvinceAndCity = "other/base/store/queryProvinceAndCity" |
| | | const val queryStoreByCityCode = "other/base/store/queryStoreByCityCode" |
| | | |
| | | /** |
| | | * 登录注册 |
| | | */ |
| | | const val register = "account/base/appUser/addAppUser" |
| | | const val updatePassword = "account/base/appUser/updatePassword" |
| | | const val captchaLogin = "study/base/user/studyLogin" |
| | | const val forgetPassword = "account/base/appUser/forgetPassword" |
| | | const val bindWx = "account/base/appUser/bind" |
| | | |
| | | /** |
| | | * 首页 |
| | |
| | | const val studySchedule = "study/base/study/studySchedule" |
| | | const val onlineDuration = "study/base/study/onlineDuration" |
| | | const val giveIntegral = "study/base/study/giveIntegral" |
| | | |
| | | const val queryBanner = "other/base/banner/queryBannerList" |
| | | const val querySearchCourseList = "api/app/course/querySearchCourseList" |
| | | const val addStudent = "account/api/startCource/addData" |
| | | const val commitEditStu = "account/api/startCource/commitEditStu" |
| | | const val listOfStu = "account/api/startCource/listOfStu" |
| | | const val queryAvailableCouponList = "activity/api/coupon/queryAvailableCouponList" |
| | | |
| | | /** |
| | | * 学习 |
| | |
| | | const val addressTree = "goods/base/goods/addressTree" |
| | | const val addressDelete = "goods/base/goods/addressDelete" |
| | | const val integralDetail = "study/base/study/integralDetail" |
| | | const val updateInfo = "account/api/appUser/updateInfo" |
| | | |
| | | /** |
| | | * 加入玩派 |
| | | */ |
| | | const val addVipPayment = "account/api/appUser/addVipPayment" |
| | | const val paymentCourse = "course/api/course/paymentCourse" |
| | | const val queryStoreLists = "other/base/store/queryStoreLists" |
| | | const val voucherCenter = "account/api/useBenefit/voucherCenter" |
| | | const val rechargeDescription = "other/base/stored/rechargeDescription" |
| | | const val recharge = "account/api/useBenefit/payment" |
| | | const val queryStoreFreeBenefit = "other/base/store/queryStoreFreeBenefit" |
| | | |
| | | /** |
| | | * 运动营 |
| | | */ |
| | | const val queryCourseList = "course/api/course/queryCourseList" |
| | | const val queryCoursePackageType = "course/api/course/queryCoursePackageType" |
| | | const val queryCourseInfo = "course/api/course/queryCourseInfo" |
| | | const val weekLimitedBenefit = "course/api/useBenefit/weekLimitedBenefit" |
| | | const val discountCourseDatas = "course/api/useBenefit/discountCourseDatas" |
| | | const val queryStudentData = "account/api/startCource/queryStudentData" |
| | | const val stuGoog = "account/api/startCource/stuGoog" |
| | | const val weeksOfCourseDetails = "account/api/startCource/weeksOfCourseDetailsList" |
| | | const val lessonDetails = "account/api/startCource/lessonDetails" |
| | | const val editDefault = "account/api/startCource/editDefault" |
| | | const val recordDetails = "account/api/startCource/recordDetails" |
| | | const val stuMedal = "account/api/startCource/stuMedal" |
| | | const val stuComment = "account/api/startCource/stuComment" |
| | | const val afterSourceList = "course/api/startCource/afterSourceList" |
| | | const val queryArrangeCourseList = "course/api/course/queryArrangeCourseList" |
| | | const val registeredCourses = "course/api/startCource/registeredCourses" |
| | | const val getCourseAppUserDetails = "course/api/course/getCourseAppUserDetails" |
| | | const val registeredData = "course/api/startCource/RegisteredData" |
| | | const val payment = "course/api/startCource/payment" |
| | | const val queryPhysical = "account/api/startCource/queryPhysical" |
| | | const val stuAppointList = "account/api/startCource/stuAppointList" |
| | | const val weeksOfGetHours = "account/api/startCource/weeksOfGetHours" |
| | | const val weeksOfAddHours = "account/api/startCource/weeksOfAddHours" |
| | | |
| | | const val queryMySiteById = "other/api/site/queryMySiteById" |
| | | const val payCourseInfo = "course/api/startCource/payCourseInfo" |
| | | const val getMyCourseList = "course/api/startCource/getMyCourseList" |
| | | const val payCourse = "course/api/startCource/payCourse" |
| | | const val updateVideoStatus = "course/api/startCource/updateVideoStatus" |
| | | |
| | | |
| | | /** |
| | | * 福利 |
| | | */ |
| | | const val uploadImage = "account/api/useBenefit/uploadImage" |
| | | const val voucherDetail = "account/api/useBenefit/voucherDetail" |
| | | const val integralDetails = "account/api/useBenefit/integralDetails" |
| | | const val userBilling = "account/api/useBenefit/userBilling" |
| | | const val queryCouponPackage = "activity/api/coupon/queryCouponPackage" |
| | | const val integralMallList = "account/api/useBenefit/integralMallList" |
| | | const val cancellation = "account/api/useBenefit/cancellation" |
| | | const val redemptionDetails = "account/api/useBenefit/redemptionDetails" |
| | | |
| | | /** |
| | | * 视频 |
| | | */ |
| | | const val queryClassificationBenefitsVideosList = "activity/api/benefitsVideo/queryClassificationBenefitsVideosList" |
| | | const val queryBenefitsVideosList = "activity/api/benefitsVideo/queryBenefitsVideosList" |
| | | const val queryBenefitsVideosInfo = "activity/api/benefitsVideo/queryBenefitsVideosInfo" |
| | | const val afterSourceDetail = "course/api/startCource/afterSourceDetail" |
| | | const val receiveAward = "activity/api/benefitsVideo/receiveAward" |
| | | |
| | | /** |
| | | * 场地 |
| | | */ |
| | | const val querySiteList = "other/base/site/querySiteList" |
| | | const val querySiteType = "other/base/site/querySiteType" |
| | | const val queryMySite = "other/api/site/queryMySite" |
| | | const val cancelMySite = "other/api/site/cancelMySite" |
| | | const val continuePaymentMySite = "other/api/site/continuePaymentMySite" |
| | | |
| | | /** |
| | | * 赛事 |
| | | */ |
| | | const val queryAllCity = "other/base/store/queryAllCity" |
| | | const val queryCompetitionInfo = "competition/base/competition/queryCompetitionInfo" |
| | | const val queryParticipantList = "competition/api/participant/queryParticipantList" |
| | | const val addParticipant = "competition/api/participant/addParticipant" |
| | | const val delParticipant = "competition/api/participant/delParticipant" |
| | | const val editParticipant = "competition/api/participant/editParticipant" |
| | | const val paymentCompetition = "competition/api/competition/paymentCompetition" |
| | | const val queryMyCompetitionList = "competition/api/competition/queryMyCompetitionList" |
| | | const val queryMyCompetitionInfo = "competition/api/competition/queryMyCompetitionInfo" |
| | | const val cancelMyCompetition = "competition/api/competition/cancelMyCompetition" |
| | | const val paymentCompetitionCourseList = "competition/api/competition/paymentCompetitionCourseList" |
| | | |
| | | /** |
| | | * 探索玩湃 |
| | | */ |
| | | const val storeList = "account/base/exploreWP/storeList" |
| | | const val storeDetail = "account/base/exploreWP/storeDetail" |
| | | const val saveEvaluation = "other/base/storeEvaluation/saveEvaluation" |
| | | const val noticeList = "account/base/exploreWP/noticeList" |
| | | const val customerList = "account/base/exploreWP/customerList" |
| | | const val noticeDetail = "account/base/exploreWP/noticeDetail" |
| | | const val exceptionDetail = "account/base/exploreWP/exceptionDetail" |
| | | const val exceptionList = "account/base/exploreWP/exceptionList" |
| | | |
| | | /** |
| | | * 世界杯 |
| | | */ |
| | | const val getHomeModule ="other/base/homeModule/getHomeModule" |
| | | const val getCompletedWorldCupTips ="communityWorldCup/api/worldCup/getCompletedWorldCupTips" |
| | | const val getWorldCupList ="communityWorldCup/api/worldCup/getWorldCupList" |
| | | const val getWorldCupStore ="communityWorldCup/api/worldCup/getWorldCupStore" //社区世界杯赛点列表【2.0】 |
| | | const val getWorldCupInfo ="communityWorldCup/api/worldCup/getWorldCupInfo" //获取世界杯详情【2.0】 |
| | | const val paymentWorldCup ="communityWorldCup/api/worldCup/paymentWorldCup" //世界杯报名【2.0】 |
| | | const val getEntrantRank ="communityWorldCup/api/worldCup/getEntrantRank" //世界杯排名【2.0】 |
| | | const val getMyWorldCupList ="communityWorldCup/api/worldCup/getMyWorldCupList" //获取报名的世界杯列表【2.0】 |
| | | const val getMyWorldCupInfo ="communityWorldCup/api/worldCup/getMyWorldCupInfo" //获取报名的世界杯详情【2.0】 |
| | | const val cancelMyWorldCup ="communityWorldCup/api/worldCup/cancelMyWorldCup" //取消报名的世界杯【2.0】 |
| | | const val getWorldCupMatchRecord ="communityWorldCup/api/worldCup/getWorldCupMatchRecord" //获取比赛记录【2.0】 |
| | | const val getWorldCupRank ="communityWorldCup/api/worldCup/getWorldCupRank" //获取比赛排名【2.0】 |
| | | const val getWorldCupListCoach ="communityWorldCup/api/worldCup/getWorldCupListCoach" //裁判获取世界杯列表【2.0】 |
| | | const val getWorldCupPeople ="communityWorldCup/api/worldCup/getWorldCupPeople" //裁判扫码获取参赛人信息【2.0】 |
| | | const val getDeviceInformation ="communityWorldCup/api/worldCup/getDeviceInformation" //裁判扫码获取设备信息【2.0】 |
| | | const val startWorldCup ="communityWorldCup/api/worldCup/startWorldCup" //裁判开始比赛【2.0】 |
| | | const val getParticipant ="communityWorldCup/api/worldCup/getParticipant" //获取已报名的参赛人员【2.0】 |
| | | } |
| | |
| | | override fun isShowToast() = showToast |
| | | |
| | | override fun onError(code: Int, msg: String) { |
| | | if (code == 700||code == 600){//token无效 |
| | | error(code,"登录已失效") |
| | | if (code == 700||code == 600||code == 505||code == 401){//token无效 |
| | | error(code,"登录已失效,请重新登录") |
| | | SPUtils.instance().remove(Const.User.TOKEN).remove(Const.User.USER_ID).apply() |
| | | (activity.application as DollearnApplication).exit() |
| | | activity.startActivity<LoginActivity>() |
| | |
| | | override fun isShowToast() = showToast |
| | | |
| | | override fun onError(code: Int, msg: String) { |
| | | if (code == 700||code == 600){//token无效 |
| | | error(code,"登录已失效") |
| | | if (code == 700||code == 600||code == 505||code == 401){//token无效 |
| | | error(code,"登录已失效,请重新登录") |
| | | SPUtils.instance().remove(Const.User.TOKEN).remove(Const.User.USER_ID).apply() |
| | | (fragment.activity!!.application as DollearnApplication).exit() |
| | | fragment.startActivity<LoginActivity>() |
| | |
| | | import cn.sinata.xldutils.data.ResultData |
| | | import com.google.gson.JsonObject |
| | | import com.dollearn.student.DollearnApplication |
| | | import com.dollearn.student.dialog.ChooseStudentDialog |
| | | import com.dollearn.student.network.entity.* |
| | | import com.dollearn.student.utils.pay.PayInfo |
| | | import com.google.gson.Gson |
| | |
| | | |
| | | |
| | | /** |
| | | * 获取城市 |
| | | */ |
| | | fun queryProvinceAndCity(code: String?): Flowable<ResultData<ArrayList<CommonData>>> { |
| | | return request().queryProvinceAndCity(code) |
| | | } |
| | | |
| | | /** |
| | | * 获取门店 |
| | | */ |
| | | fun queryStoreByCityCode(code: String,provinceCode:String): Flowable<ResultData<ArrayList<CommonData>>> { |
| | | return request().queryStoreByCityCode(code,provinceCode) |
| | | } |
| | | |
| | | /** |
| | | * 买会员 |
| | | */ |
| | | fun addVipPayment(payType: Int): Flowable<ResultData<PayInfo>> { |
| | | return request().addVipPayment(payType) |
| | | } |
| | | |
| | | /** |
| | | * 买运动营 |
| | | */ |
| | | fun paymentCourse( |
| | | payType: Int, |
| | | id: String, |
| | | courseId: String, |
| | | price: Double, |
| | | students: String, |
| | | coupon: Long, |
| | | orderId: String? |
| | | ): Flowable<ResultData<PayInfo>> { |
| | | return request().paymentCourse(payType, id, courseId, price, students, coupon,orderId) |
| | | } |
| | | |
| | | /** |
| | | * 已报运动营支付 |
| | | */ |
| | | fun payment( |
| | | payType: Int, |
| | | id: String, |
| | | courseId: String, |
| | | courseCount: Int, |
| | | students: String, |
| | | useCoupon: Int, |
| | | coupon: Long |
| | | ): Flowable<ResultData<PayInfo>> { |
| | | return request().payment(payType, id, courseId, courseCount, students, useCoupon, coupon) |
| | | } |
| | | |
| | | /** |
| | | * 赛事报名 |
| | | */ |
| | | fun paymentCompetition(payType: Int, id: String, ids: String,coursePaymentId:String? = null): Flowable<ResultData<PayInfo>> { |
| | | return request().paymentCompetition(payType, id, ids,coursePaymentId) |
| | | } |
| | | |
| | | /** |
| | | * 体检报告 |
| | | */ |
| | | fun queryPhysical(id: String): Flowable<ResultData<Report>> { |
| | | return request().queryPhysical(id) |
| | | } |
| | | |
| | | /** |
| | | * 预约记录 |
| | | */ |
| | | fun stuAppointList( |
| | | page: Int, |
| | | id: String, |
| | | type: Int, |
| | | timeType: Int?, |
| | | search: String? |
| | | ): Flowable<ResultData<List<ReserveRecord>>> { |
| | | return request().stuAppointList(id, type, timeType, search,page) |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 用户信息 |
| | |
| | | return request().studyRecord() |
| | | } |
| | | |
| | | /** |
| | | * 修改头像 |
| | | */ |
| | | fun uploadImage(userImage: String): Flowable<ResultData<Any>> { |
| | | return request().uploadImage(userImage) |
| | | } |
| | | |
| | | /** |
| | | * 视频列表 |
| | | */ |
| | | fun queryClassificationBenefitsVideosList( |
| | | type: Int, |
| | | search: String? |
| | | ): Flowable<ResultData<List<VideoTypeBean>>> { |
| | | return request().queryClassificationBenefitsVideosList(type, search) |
| | | } |
| | | |
| | | /** |
| | | * 视频列表 |
| | | */ |
| | | fun queryBenefitsVideosList( |
| | | type: String, |
| | | page: Int, |
| | | search: String? |
| | | ): Flowable<ResultData<List<VideoBean>>> { |
| | | return request().queryBenefitsVideosList(type, page, PAGE_SIZE, search) |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 视频详情 |
| | | */ |
| | | fun queryBenefitsVideosInfo(id: String): Flowable<ResultData<VideoBean>> { |
| | | return request().queryBenefitsVideosInfo(id) |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 课后练习视频详情 |
| | | */ |
| | | fun afterSourceDetail(id: String, courseId: String,scId:String): Flowable<ResultData<Practice>> { |
| | | return request().afterSourceDetail(id, scId,courseId) |
| | | } |
| | | |
| | | /** |
| | | * 视频奖励 |
| | | */ |
| | | fun receiveAward(id: String): Flowable<ResultData<Any>> { |
| | | return request().receiveAward(id) |
| | | } |
| | | |
| | | /** |
| | | * 课后练习完成观看 |
| | | */ |
| | | fun updateVideoStatus(id: String,courseId: String,scId: String): Flowable<ResultData<Any>> { |
| | | return request().updateVideoStatus(id,courseId,scId) |
| | | } |
| | | |
| | | /** |
| | | * 赛事列表 |
| | | */ |
| | | fun querySiteList( |
| | | page: Int, |
| | | cityCode: String?, |
| | | startTime: String?, |
| | | endTime: String?, |
| | | siteType: Int?, |
| | | shopId: String?, |
| | | search: String? |
| | | ): Flowable<ResultData<List<Place>>> { |
| | | return request().querySiteList( |
| | | page, |
| | | PAGE_SIZE, |
| | | DollearnApplication.lat, |
| | | DollearnApplication.lon, |
| | | cityCode, |
| | | startTime, |
| | | endTime, |
| | | siteType, |
| | | shopId, |
| | | search |
| | | ) |
| | | } |
| | | |
| | | /** |
| | | * 我的场地列表 |
| | | */ |
| | | fun queryMySite(page: Int, state: Int?): Flowable<ResultData<List<Place>>> { |
| | | return request().queryMySite(page, PAGE_SIZE, state) |
| | | } |
| | | |
| | | /** |
| | | * 取消场地 |
| | | */ |
| | | fun cancelMySite(id: String): Flowable<ResultData<Any>> { |
| | | return request().cancelMySite(id) |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 我的赛事列表 |
| | | */ |
| | | fun queryMyCompetitionList(type: Int, page: Int): Flowable<ResultData<List<Match>>> { |
| | | return request().queryMyCompetitionList(type, page, PAGE_SIZE) |
| | | } |
| | | |
| | | /** |
| | | * 场地类型 |
| | | */ |
| | | fun querySiteType(): Flowable<ResultData<List<CommonData>>> { |
| | | return request().querySiteType() |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询预约详情 |
| | | */ |
| | | fun queryMySiteById(id: String): Flowable<ResultData<MySite>> { |
| | | return request().queryMySiteById(id) |
| | | } |
| | | |
| | | /** |
| | | * 课后练习-购课详情(用于购课) |
| | | */ |
| | | fun payCourseInfo(id: Int): Flowable<ResultData<PayCoursInfo>> { |
| | | return request().payCourseInfo(id) |
| | | } |
| | | |
| | | /** |
| | | * 课后练习-购课(用于购课) |
| | | */ |
| | | fun payCourse(map: HashMap<String, Any>, time: List<String>): Flowable<ResultData<Any>> { |
| | | return request().payCourse(map, time) |
| | | } |
| | | |
| | | /** |
| | | * 课后练习-可支付运动营列表(用于购课) |
| | | */ |
| | | fun getMyCourseList(): Flowable<ResultData<List<MyCourseList>>> { |
| | | return request().getMyCourseList() |
| | | } |
| | | |
| | | /** |
| | | * 课后练习类型 |
| | | */ |
| | | fun queryArrangeCourseList(): Flowable<ResultData<List<CommonData>>> { |
| | | return request().queryArrangeCourseList() |
| | | } |
| | | |
| | | /** |
| | | * 已报名运动营 |
| | | */ |
| | | fun registeredCourses(type: Int?, search: String?): Flowable<ResultData<List<JoinedCourse>>> { |
| | | return request().registeredCourses(type, search) |
| | | } |
| | | |
| | | /** |
| | | * 场地支付 |
| | | */ |
| | | fun continuePaymentMySite(id: String, payType: Int): Flowable<ResultData<PayInfo>> { |
| | | return request().continuePaymentMySite(id, payType) |
| | | } |
| | | |
| | | /** |
| | | * 赛事详情 |
| | | */ |
| | | fun queryCompetitionInfo(id: String, lat: Double?, lon: Double?): Flowable<ResultData<Match>> { |
| | | return request().queryCompetitionInfo(id, lat, lon) |
| | | } |
| | | |
| | | /** |
| | | * 赛事详情 |
| | | */ |
| | | fun queryMyCompetitionInfo(id: String): Flowable<ResultData<Match>> { |
| | | return request().queryMyCompetitionInfo(id) |
| | | } |
| | | |
| | | /** |
| | | * 赛事城市 |
| | | */ |
| | | fun queryAllCity(): Flowable<ResultData<List<CommonData>>> { |
| | | return request().queryAllCity() |
| | | } |
| | | |
| | | /** |
| | | * 运动营列表 |
| | | */ |
| | | fun queryCourseList( |
| | | shopId: String, |
| | | lat: Double?, |
| | | lon: Double?, |
| | | type: Int?, |
| | | distanceSort: String?, |
| | | salesSort: String?, |
| | | search: String? |
| | | ): Flowable<ResultData<List<Course>>> { |
| | | return request().queryCourseList(shopId, lat, lon, type, distanceSort, salesSort, search) |
| | | } |
| | | |
| | | /** |
| | | * 运动营详情 |
| | | */ |
| | | fun queryCourseInfo(id: String, lat: Double?, lon: Double?,stuId:String? = null): Flowable<ResultData<Course>> { |
| | | return request().queryCourseInfo(id,stuId, lat, lon) |
| | | } |
| | | |
| | | /** |
| | | * 福利详情 |
| | | */ |
| | | fun discountCourseDatas( |
| | | id: String, |
| | | lat: Double?, |
| | | lon: Double? |
| | | ): Flowable<ResultData<WelfareDetail>> { |
| | | return request().discountCourseDatas(id, lat, lon) |
| | | } |
| | | |
| | | /** |
| | | * 上课首页 |
| | | */ |
| | | fun queryStudentData(stuId: String?): Flowable<ResultData<CourseHomeData>> { |
| | | return request().queryStudentData(stuId) |
| | | } |
| | | |
| | | /** |
| | | * 充值选择列表 |
| | | */ |
| | | fun voucherCenter(): Flowable<ResultData<List<RechargeItem>>> { |
| | | return request().voucherCenter() |
| | | } |
| | | |
| | | /** |
| | | * 储值说明 |
| | | */ |
| | | fun rechargeDescription(): Flowable<ResultData<String>> { |
| | | return request().rechargeDescription() |
| | | } |
| | | |
| | | /** |
| | | * 运动营类型列表 |
| | | */ |
| | | fun queryCoursePackageType(): Flowable<ResultData<List<CommonData>>> { |
| | | return request().queryCoursePackageType() |
| | | } |
| | | |
| | | /** |
| | | * 已报名运动营类型列表 |
| | | */ |
| | | fun getCourseAppUserDetails(): Flowable<ResultData<List<CommonData>>> { |
| | | return request().getCourseAppUserDetails() |
| | | } |
| | | |
| | | /** |
| | | * 门店列表 |
| | | */ |
| | | fun queryStoreLists(lat: Double?, lon: Double?, cityCode: String? = null): Flowable<ResultData<List<CommonData>>> { |
| | | return request().queryStoreLists(lat, lon,cityCode) |
| | | } |
| | | |
| | | /** |
| | | * 获取课时记录 |
| | |
| | | return request().recordDetails(stuId, courseId, time, type) |
| | | } |
| | | |
| | | /** |
| | | * 获取奖章 |
| | | */ |
| | | fun stuGoog(id: String): Flowable<ResultData<ArrayList<Medal>>> { |
| | | return request().stuGoog(id) |
| | | } |
| | | |
| | | /** |
| | | * 获取奖章详细 |
| | | */ |
| | | fun stuMedal(id: String): Flowable<ResultData<ArrayList<Medal>>> { |
| | | return request().stuMedal(id) |
| | | } |
| | | |
| | | /** |
| | | * 评语 |
| | |
| | | return request().stuComment(id) |
| | | } |
| | | |
| | | /** |
| | | * 获取课后练习 |
| | | */ |
| | | fun afterSourceList(stuId: String,id: Int?, search: String?): Flowable<ResultData<ArrayList<Practice>>> { |
| | | return request().afterSourceList(stuId,id, search) |
| | | } |
| | | |
| | | /** |
| | | * 获取运动营排班 |
| | | */ |
| | | fun weeksOfCourseDetails( |
| | | id: String, |
| | | storeID: String, |
| | | time: String |
| | | ): Flowable<ResultData<WeeksOfCourseDetails>> { |
| | | return request().weeksOfCourseDetails( |
| | | id, |
| | | storeID, |
| | | time, |
| | | DollearnApplication.lat, |
| | | DollearnApplication.lon |
| | | ) |
| | | } |
| | | |
| | | /** |
| | | * 课时详情 |
| | |
| | | */ |
| | | fun promptVoice(): Flowable<ResultData<ConfigBean>> { |
| | | return request().promptVoice() |
| | | } |
| | | |
| | | /** |
| | | * 注册/忘记密码/修改密码 |
| | | * @param type 2:注册,3:修改密码,4:忘记密码,5:绑手机 |
| | | */ |
| | | fun register(type: Int, phone: String, pwd: String, code: String, invitePhone: String?, openId: String?,lat: Double?,lon: Double?): Flowable<ResultData<Any>> { |
| | | val url = when (type) { |
| | | 3 -> Apis.updatePassword |
| | | 4 -> Apis.forgetPassword |
| | | 5 -> Apis.bindWx |
| | | else -> Apis.register |
| | | } |
| | | return request().register(url, phone, pwd, code,invitePhone,openId,lat,lon) |
| | | } |
| | | |
| | | /** |
| | | * 注册/忘记密码/修改密码 |
| | | * @param type 2:注册,3:修改密码,4:忘记密码,5:绑手机 |
| | | */ |
| | | fun bindPhone(phone: String, code: String, invitePhone: String?, openId: String,lat: Double?,lon: Double?): Flowable<ResultData<JsonObject>> { |
| | | return request().bindPhone(phone, code,invitePhone,openId,lat,lon) |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * 轮播 |
| | | * @param type 1=首页,2=首页底部,3=线上课得积分,4=看视频得奖励,5=常见问题 |
| | | */ |
| | | fun queryBanner(type: Int = 1): Flowable<ResultData<ArrayList<Banner>>> { |
| | | return request().queryBanner(type) |
| | | } |
| | | |
| | | /** |
| | | * 搜索运动营 |
| | | */ |
| | | fun querySearchCourseList( |
| | | key: String?, |
| | | page: Int, |
| | | gradeId: Int, |
| | | subjectId: String? |
| | | ): Flowable<ResultData<ArrayList<Course>>> { |
| | | return request().querySearchCourseList(key, page, gradeId, subjectId) |
| | | } |
| | | |
| | | /** |
| | | * 获取String类型通用接口 |
| | | */ |
| | | fun queryString(url: String, map: HashMap<String, Any>): Flowable<ResultData<String>> { |
| | | return request().queryString(url, map) |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 充值支付 |
| | | */ |
| | | fun recharge(money: Double, payType: Int): Flowable<ResultData<PayInfo>> { |
| | | return request().recharge(money, payType) |
| | | } |
| | | |
| | | /** |
| | | * 添加运动营成员 |
| | | */ |
| | | fun addStudent( |
| | | name: String, |
| | | birthday: String, |
| | | sex: Int, |
| | | avatar: String, |
| | | height: Double, |
| | | weight: Double, |
| | | idCard: String?, |
| | | phone: String?, |
| | | stuId: String? |
| | | ): Flowable<ResultData<Any>> { |
| | | return request().addStudent( |
| | | if (stuId.isNullOrEmpty()) Apis.addStudent else Apis.commitEditStu, |
| | | birthday, |
| | | avatar, |
| | | height, |
| | | weight, |
| | | sex, |
| | | name, |
| | | phone, |
| | | idCard, |
| | | stuId, |
| | | stuId |
| | | ) |
| | | } |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | fun addParticipant( |
| | | avatar: String, |
| | | name: String, |
| | | birthday: String, |
| | | sex: Int, |
| | | height: Double, |
| | | weight: Double, |
| | | idCard: String?, |
| | | phone: String? |
| | | ): Flowable<ResultData<Any>> { |
| | | return request().addParticipant(avatar,birthday, height, weight, sex, name, phone, idCard) |
| | | } |
| | | |
| | | /** |
| | | * 改人员 |
| | | */ |
| | | fun editParticipant( |
| | | avatar: String, |
| | | id: String, |
| | | height: Int?, |
| | | weight: Double?, |
| | | phone: String?, |
| | | name: String?, |
| | | idCard: String?, |
| | | sex: Int?, |
| | | birthday: String? |
| | | ): Flowable<ResultData<Any>> { |
| | | return request().editParticipant(avatar,id, height, weight, phone, birthday, name, sex, idCard) |
| | | } |
| | | |
| | | /** |
| | | * 删除人员 |
| | | */ |
| | | fun delParticipant(id: String,isStudent:Int?): Flowable<ResultData<Any>> { |
| | | return request().delParticipant(id,isStudent) |
| | | } |
| | | |
| | | /** |
| | | * 取消赛事报名 |
| | | */ |
| | | fun cancelMyCompetition(id: String): Flowable<ResultData<Any>> { |
| | | return request().cancelMyCompetition(id) |
| | | } |
| | | |
| | | /** |
| | | * 可用课时列表 |
| | | */ |
| | | fun paymentCompetitionCourseList(id: String): Flowable<ResultData<List<PayCourse>>> { |
| | | return request().paymentCompetitionCourseList(id) |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * 运动营成员列表 |
| | | * |
| | | */ |
| | | fun listOfStu(type: Int = ChooseStudentDialog.TYPE_COURSE,isPre:Int? = null): Flowable<ResultData<List<Student>>> { |
| | | val url = when (type) { |
| | | ChooseStudentDialog.TYPE_MATCH,ChooseStudentDialog.TYPE_WORLD -> Apis.queryParticipantList |
| | | else -> Apis.listOfStu |
| | | } |
| | | return request().listOfStu(url,isPre) |
| | | } |
| | | |
| | | /** |
| | | * 充值明细 |
| | | */ |
| | | fun voucherDetail( |
| | | date: String, |
| | | typeId: Int?, |
| | | page: Int, |
| | | type: Int |
| | | ): Flowable<ResultData<List<CoinRecord>>> { |
| | | return request().voucherDetail( |
| | | if (type == 1) Apis.voucherDetail else Apis.integralDetails, |
| | | date, |
| | | page, |
| | | PAGE_SIZE, |
| | | typeId |
| | | ) |
| | | } |
| | | |
| | | /** |
| | | * 账单 |
| | | */ |
| | | fun userBilling(date: String, type: Int?): Flowable<ResultData<List<CoinRecord>>> { |
| | | return request().userBilling(date, type) |
| | | } |
| | | |
| | | /** |
| | | * 券包列表 |
| | | */ |
| | | fun queryCouponPackage(state: Int?, type: Int?): Flowable<ResultData<List<Coupon>>> { |
| | | return request().queryCouponPackage(type, state) |
| | | } |
| | | |
| | | /** |
| | | * 商品 |
| | | */ |
| | | fun integralMallList( |
| | | type: Int?, |
| | | page: Int, |
| | | sort: Int?, |
| | | search: String?, |
| | | shopId: String? |
| | | ): Flowable<ResultData<List<Goods>>> { |
| | | return request().integralMallList( |
| | | type, |
| | | sort, |
| | | page, |
| | | PAGE_SIZE, |
| | | DollearnApplication.lat, |
| | | DollearnApplication.lon, |
| | | search, |
| | | shopId |
| | | ) |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 兑换详情 |
| | | */ |
| | | fun redemptionDetails(id: String): Flowable<ResultData<ExchangeDetail>> { |
| | |
| | | */ |
| | | fun cancellation(): Flowable<ResultData<Any>> { |
| | | return request().cancellation() |
| | | } |
| | | |
| | | /** |
| | | * 查询免费福利 |
| | | */ |
| | | fun queryStoreFreeBenefit(id: String): Flowable<ResultData<JsonObject>> { |
| | | return request().queryStoreFreeBenefit(id) |
| | | } |
| | | |
| | | /** |
| | | * 福利 |
| | | */ |
| | | fun weekLimitedBenefit(type: Int): Flowable<ResultData<ArrayList<Welfare>>> { |
| | | return request().weekLimitedBenefit(type, DollearnApplication.lat, DollearnApplication.lon) |
| | | } |
| | | |
| | | /** |
| | | * 优惠券列表 |
| | | */ |
| | | fun queryAvailableCouponList( |
| | | coursePackageId: String, |
| | | price: Double, |
| | | lat: Double?, |
| | | lon: Double? |
| | | ): Flowable<ResultData<ArrayList<Coupon>>> { |
| | | return request().queryAvailableCouponList(coursePackageId, price, lat, lon) |
| | | } |
| | | |
| | | /** |
| | |
| | | return request().registeredData(DollearnApplication.lat,DollearnApplication.lon,id,orderId) |
| | | } |
| | | |
| | | /** |
| | | * 玩家记录 |
| | | */ |
| | | fun gameRecord(userId: String,page:Int): Flowable<ResultData<List<GameRecordBean>>> { |
| | | return request().gameRecord(userId,page) |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 门店列表 |
| | | */ |
| | | fun storeList(cityCode: String?, distanceSort: Int?,search: String?): Flowable<ResultData<List<ShopListBean>>> { |
| | | return request().storeList( |
| | | DollearnApplication.lat, |
| | | DollearnApplication.lon, |
| | | cityCode, |
| | | distanceSort, |
| | | search) |
| | | } |
| | | |
| | | /** |
| | | * 公告列表 |
| | | */ |
| | | fun noticeList(): Flowable<ResultData<List<Notice>>> { |
| | | return request().noticeList() |
| | | } |
| | | |
| | | /** |
| | | * 问题列表 |
| | | */ |
| | | fun exceptionList(): Flowable<ResultData<List<Notice>>> { |
| | | return request().exceptionList() |
| | | } |
| | | |
| | | /** |
| | |
| | | id, |
| | | id |
| | | ) |
| | | } |
| | | |
| | | /** |
| | | * 客服电话列表 |
| | | */ |
| | | fun customerList(): Flowable<ResultData<List<String>>> { |
| | | return request().customerList() |
| | | } |
| | | |
| | | /** |
| | | * 门店详情 |
| | | */ |
| | | fun storeDetail(id: String): Flowable<ResultData<ShopDetail>> { |
| | | return request().storeDetail(id) |
| | | } |
| | | |
| | | /** |
| | | * 店铺评价 |
| | | */ |
| | | fun saveEvaluation( |
| | | id: String, |
| | | img: String?, |
| | | content: String?, |
| | | score: Double |
| | | ): Flowable<ResultData<Any>> { |
| | | return request().saveEvaluation(id, content, img, score) |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取未分配课时的数量 |
| | | */ |
| | | fun weeksOfGetHours(): Flowable<ResultData<Int>> { |
| | | return request().weeksOfGetHours() |
| | | } |
| | | |
| | | /** |
| | | * 分配课时 |
| | | */ |
| | | fun weeksOfAddHours(id: Long): Flowable<ResultData<Any>> { |
| | | return request().weeksOfAddHours(id) |
| | | } |
| | | |
| | | /** |
| | | * 更新用户信息 |
| | | */ |
| | | fun updateInfo(name: String?,gender:Int?,birthday: String?): Flowable<ResultData<Any>> { |
| | | return request().updateInfo(birthday,gender,name) |
| | | } |
| | | |
| | | /** |
| | | *获取平台配置模块详情【2.0】 |
| | | */ |
| | | fun getHomeModule(): Flowable<ResultData<Banner>> { |
| | | return request().getHomeModule() |
| | | } |
| | | |
| | | /** |
| | | * 首页获取完成比赛的提示 |
| | | */ |
| | | fun getCompletedWorldCupTips(): Flowable<ResultData<Int>> { |
| | | return request().getCompletedWorldCupTips() |
| | | } |
| | | |
| | | /** |
| | | * 世界杯列表 |
| | | */ |
| | | fun getWorldCupList(id: String,lat: Double?,lon: Double?,sort: Int?,gender: Int?,storeId: Int?,search: String?): Flowable<ResultData<List<WorldCupBean>>> { |
| | | return request().getWorldCupList(id,lat,lon,gender,sort,storeId,search) |
| | | } |
| | | |
| | | /** |
| | | * 裁判世界杯列表 |
| | | */ |
| | | fun getWorldCupListCoach(storeId: Int?,search: String?): Flowable<ResultData<List<WorldCupBean>>> { |
| | | return request().getWorldCupListCoach(DollearnApplication.lat,DollearnApplication.lon,storeId,search) |
| | | } |
| | | |
| | | /** |
| | | * 世界杯赛点列表 |
| | | */ |
| | | fun getWorldCupStore(): Flowable<ResultData<List<CommonData>>> { |
| | | return request().getWorldCupStore() |
| | | } |
| | | |
| | | /** |
| | | * 世界杯详情 |
| | | */ |
| | | fun getWorldCupInfo(id: String): Flowable<ResultData<WorldCupBean>> { |
| | | return request().getWorldCupInfo(id,DollearnApplication.lat, DollearnApplication.lon) |
| | | } |
| | | |
| | | /** |
| | | * 世界杯报名 |
| | | */ |
| | | fun paymentWorldCup(id: String,ids: String,type: Int): Flowable<ResultData<PayInfo>> { |
| | | return request().paymentWorldCup(id,ids,type) |
| | | } |
| | | |
| | | /** |
| | | * 世界杯报名 |
| | | */ |
| | | fun getEntrantRank(id: String,isStudent: Int): Flowable<ResultData<Rank>> { |
| | | return request().getEntrantRank(id,isStudent) |
| | | } |
| | | |
| | | /** |
| | | * 世界杯报名列表 |
| | | */ |
| | | fun getMyWorldCupList(id: String,isStudent: Int,state: Int,page: Int): Flowable<ResultData<List<WorldCupBean>>> { |
| | | return request().getMyWorldCupList(id,isStudent,state, page) |
| | | } |
| | | |
| | | /** |
| | | * 世界杯比赛记录 |
| | | */ |
| | | fun getWorldCupMatchRecord(id: String,isStudent: Int,page: Int): Flowable<ResultData<WorldCupRecord>> { |
| | | return request().getWorldCupMatchRecord(id,isStudent, page) |
| | | } |
| | | |
| | | /** |
| | | * 世界杯比赛排名 |
| | | */ |
| | | fun getWorldCupRank(id: String,isStudent: Int,radius: Int,sort:Int,year:Int?): Flowable<ResultData<List<WorldRank>>> { |
| | | return request().getWorldCupRank(id,isStudent, radius, sort, year) |
| | | } |
| | | |
| | | /** |
| | | * 世界杯我的已报名人员 |
| | | */ |
| | | fun getParticipant(): Flowable<ResultData<List<Student>>> { |
| | | return request().getParticipant() |
| | | } |
| | | |
| | | /** |
| | | * 世界杯报名详情 |
| | | */ |
| | | fun getMyWorldCupInfo(id: String): Flowable<ResultData<WorldCupBean>> { |
| | | return request().getMyWorldCupInfo(id,DollearnApplication.lat, DollearnApplication.lon) |
| | | } |
| | | |
| | | /** |
| | | * 世界杯报名取消 |
| | | */ |
| | | fun cancelMyWorldCup(id: String): Flowable<ResultData<Any>> { |
| | | return request().cancelMyWorldCup(id) |
| | | } |
| | | |
| | | /** |
| | | * 裁判扫码获取参赛人信息【2.0】 |
| | | */ |
| | | fun getWorldCupPeople(id: String,code: String): Flowable<ResultData<CodeResultUser>> { |
| | | return request().getWorldCupPeople(code,id) |
| | | } |
| | | |
| | | /** |
| | | * 裁判扫码获取设备信息【2.0】 |
| | | */ |
| | | fun getDeviceInformation(code: String): Flowable<ResultData<DeviceBean>> { |
| | | return request().getDeviceInformation(code) |
| | | } |
| | | |
| | | /** |
| | | * 裁判开始【2.0】 |
| | | */ |
| | | fun startWorldCup(code: String,people:String,id: String): Flowable<ResultData<Any>> { |
| | | return request().startWorldCup(code,people,id) |
| | | } |
| | | } |
| | |
| | | package com.dollearn.student.network.entity |
| | | |
| | | import android.content.Context |
| | | import com.google.gson.annotations.SerializedName |
| | | import com.dollearn.student.MainActivity |
| | | import com.dollearn.student.ui.course.* |
| | | import com.dollearn.student.ui.discovery.NoticeDetailActivity |
| | | import com.dollearn.student.ui.discovery.ServiceActivity |
| | | import com.dollearn.student.ui.home.* |
| | | import com.dollearn.student.ui.mine.RechargeActivity |
| | | import com.dollearn.student.ui.welfare.GoodsDetailActivity |
| | | import com.dollearn.student.ui.worldcup.WorldCupDetailActivity |
| | | import com.dollearn.student.ui.worldcup.WorldCupListActivity |
| | | import com.dollearn.student.utils.Const |
| | | import com.dollearn.student.utils.event.EmptyEvent |
| | | import org.greenrobot.eventbus.EventBus |
| | | import org.jetbrains.anko.startActivity |
| | | |
| | | data class Banner( |
| | | val id: Int = 0, |
| | |
| | | @SerializedName("img") |
| | | val url: String = "", |
| | | val backgroundImage: String = "" |
| | | ){ |
| | | fun jumpPage(context: Context){ |
| | | when(name){ |
| | | "不跳转"->{ |
| | | //无事件 |
| | | } |
| | | "加入玩湃"->{ |
| | | when(page){ |
| | | "主页"->{ |
| | | EventBus.getDefault().post(EmptyEvent(Const.EventCode.CLICK_GAME_ITEM)) |
| | | context.startActivity<MainActivity>() |
| | | } |
| | | "课程列表"->{ |
| | | when(type){ |
| | | "列表"-> context.startActivity<CourseActivity>() |
| | | "详情"-> context.startActivity<CourseDetailActivity>("id" to turnId) |
| | | } |
| | | } |
| | | "赛事活动列表"->{ |
| | | when(type){ |
| | | "列表"-> context.startActivity<MatchActivity>() |
| | | "详情"-> context.startActivity<MatchDetailActivity>("id" to turnId) |
| | | } |
| | | } |
| | | "预约场地"->{ |
| | | when(type){ |
| | | "列表"-> context.startActivity<FieldActivity>() |
| | | "详情"-> context.startActivity<PlaceDetailActivity>("id" to turnId) |
| | | } |
| | | } |
| | | "线上课得积分"->{ |
| | | when(type){ |
| | | "主页"-> context.startActivity<VideoHomeActivity>("type" to VideoHomeActivity.TYPE_COURSE) |
| | | "列表"-> context.startActivity<VideoListActivity>("id" to turnId,"type" to VideoHomeActivity.TYPE_COURSE) |
| | | "详情"-> context.startActivity<VideoDetailActivity>("id" to turnId,"type" to VideoHomeActivity.TYPE_COURSE) |
| | | } |
| | | } |
| | | "看视频得奖励"->{ |
| | | when(type){ |
| | | "主页"-> context.startActivity<VideoHomeActivity>("type" to VideoHomeActivity.TYPE_VIDEO) |
| | | "列表"-> context.startActivity<VideoListActivity>("id" to turnId,"type" to VideoHomeActivity.TYPE_VIDEO) |
| | | "详情"-> context.startActivity<VideoDetailActivity>("id" to turnId,"type" to VideoHomeActivity.TYPE_VIDEO) |
| | | } |
| | | } |
| | | "智慧球场"-> context.startActivity<SmartStadiumActivity>() |
| | | "成为会员"-> context.startActivity<JoinVipActivity>() |
| | | "社区世界杯"-> { |
| | | when(type){ |
| | | "列表"-> context.startActivity<WorldCupListActivity>() |
| | | "详情"-> context.startActivity<WorldCupDetailActivity>("id" to turnId) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | "使用福利"-> { |
| | | when(page) { |
| | | "主页"->{ |
| | | EventBus.getDefault().post(EmptyEvent(Const.EventCode.CHANGE_WELFARE)) |
| | | context.startActivity<MainActivity>() |
| | | } |
| | | "充值中心"-> context.startActivity<RechargeActivity>() |
| | | "积分商城"-> { |
| | | when(type){ |
| | | "指定商品"-> context.startActivity<GoodsDetailActivity>("id" to turnId) |
| | | } |
| | | } |
| | | "本周福利"-> { |
| | | when(type){ |
| | | "限时折扣(主页)"-> context.startActivity<WelfareActivity>() |
| | | "赠送课时(主页)"-> context.startActivity<WelfareActivity>("index" to 1) |
| | | "指定折扣"-> context.startActivity<WelfareDetailActivity>("id" to turnId) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | "探索玩湃"-> { |
| | | when(page) { |
| | | "常见问题"-> { |
| | | when(type){ |
| | | "列表"-> context.startActivity<ServiceActivity>("index" to 1) |
| | | "详情"-> context.startActivity<NoticeDetailActivity>("id" to turnId,"type" to NoticeDetailActivity.TYPE_QUESTION) |
| | | } |
| | | } |
| | | "公告发布"-> { |
| | | when(type){ |
| | | "列表"-> context.startActivity<ServiceActivity>() |
| | | "详情"-> context.startActivity<NoticeDetailActivity>("id" to turnId) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | ) |
| | |
| | | val inventory: Int?, |
| | | val isDelete: Int, |
| | | val name: String, |
| | | val price: Double, |
| | | val price: Double?, |
| | | val surplus: Int, |
| | | val total: Int, |
| | | val type: Int?, |
| | |
| | | data class ScoreRecord( |
| | | val createTime: String, |
| | | val gameId: Int, |
| | | val id: Int, |
| | | val integral: String, |
| | | val method: String, |
| | | val storyId: Int, |
| | |
| | | import android.view.WindowManager |
| | | import cn.sinata.xldutils.activity.BaseActivity |
| | | import cn.sinata.xldutils.utils.SPUtils |
| | | import com.amap.api.maps.MapsInitializer |
| | | import com.dollearn.student.MainActivity |
| | | import com.dollearn.student.R |
| | | import com.dollearn.student.DollearnApplication |
| | |
| | | setContentView(R.layout.activity_splash) |
| | | getImg() |
| | | if (SPUtils.instance().getBoolean(Const.User.IS_AGREE)){ |
| | | MapsInitializer.updatePrivacyShow(this@SplashActivity,true,true) |
| | | MapsInitializer.updatePrivacyAgree(this@SplashActivity,true) |
| | | startNext() |
| | | }else{ |
| | | val ruleDialog = RuleDialog() |
| | | ruleDialog.setCallback(object :RuleDialog.OnClickCallback{ |
| | | override fun onOk() { |
| | | MapsInitializer.updatePrivacyAgree(this@SplashActivity,true) |
| | | startNext() |
| | | } |
| | | }) |
| | | MapsInitializer.updatePrivacyShow(this@SplashActivity,true,true) |
| | | iv_img.postDelayed({ |
| | | ruleDialog.show(supportFragmentManager,"rule") |
| | | },500) |
| | |
| | | package com.dollearn.student.ui.home |
| | | |
| | | import android.app.Activity |
| | | import android.content.Intent |
| | | import android.net.Uri |
| | | import android.os.Build |
| | | import android.os.Environment |
| | | import android.provider.Settings |
| | | import android.view.View |
| | | import cn.sinata.xldutils.activity.SelectPhotoDialog |
| | | import cn.sinata.xldutils.gone |
| | | import cn.sinata.xldutils.utils.isValidIdCard |
| | | import cn.sinata.xldutils.utils.isValidPhone |
| | | import cn.sinata.xldutils.utils.myToast |
| | | import com.dollearn.student.R |
| | | import com.dollearn.student.dialog.ChooseBirthDialog |
| | | import com.dollearn.student.dialog.SexDialog |
| | | import com.dollearn.student.network.HttpManager |
| | | import com.dollearn.student.network.entity.Student |
| | | import com.dollearn.student.network.request |
| | | import com.dollearn.student.ui.TransparentStatusBarActivity |
| | | import com.dollearn.student.utils.Const |
| | | import com.dollearn.student.utils.extention.clickDelay |
| | | import com.dollearn.student.utils.extention.uploadWithCompress |
| | | import com.dollearn.student.utils.interfaces.StringCallback |
| | | import kotlinx.android.synthetic.main.activity_add_student.* |
| | | import org.greenrobot.eventbus.EventBus |
| | | import org.jetbrains.anko.startActivityForResult |
| | | import java.lang.Exception |
| | | |
| | | class AddStudentActivity:TransparentStatusBarActivity() { |
| | | override fun setContentView() = R.layout.activity_add_student |
| | | |
| | | private val type by lazy { intent.getIntExtra("type", TYPE_COURSE) } |
| | | private val user by lazy { intent.getParcelableExtra<Student>("user") } |
| | | private var isRefused = false |
| | | |
| | | private var avatar = "" |
| | | override fun setContentView() = 0 |
| | | |
| | | override fun initClick() { |
| | | iv_avatar.clickDelay { |
| | | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { |
| | | if (Environment.isExternalStorageManager()) |
| | | startActivityForResult<SelectPhotoDialog>(2) |
| | | else if (!isRefused) { |
| | | try { |
| | | val intent = Intent(Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION) |
| | | intent.data = Uri.parse("package:${packageName}") |
| | | startActivityForResult(intent, 1024) |
| | | } catch (e: Exception) { |
| | | val intent = Intent() |
| | | intent.action = Settings.ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION |
| | | startActivityForResult(intent, 1024) |
| | | } |
| | | |
| | | } else { |
| | | myToast("缺少文件权限") |
| | | } |
| | | } else |
| | | startActivityForResult<SelectPhotoDialog>(1) |
| | | } |
| | | tv_birth.clickDelay { |
| | | val chooseBirthDialog = ChooseBirthDialog() |
| | | chooseBirthDialog.setCallback(object : ChooseBirthDialog.Callback { |
| | | override fun onOk(s: String) { |
| | | tv_birth.text = s |
| | | } |
| | | }) |
| | | chooseBirthDialog.show(supportFragmentManager, "birth") |
| | | } |
| | | tv_sex.clickDelay { |
| | | SexDialog.show(supportFragmentManager,object :StringCallback{ |
| | | override fun onResult(rst: String) { |
| | | tv_sex.text = rst |
| | | } |
| | | }) |
| | | } |
| | | tv_action.clickDelay { |
| | | if (iv_avatar.visibility == View.VISIBLE && avatar.isEmpty()){ |
| | | myToast("请上传头像") |
| | | return@clickDelay |
| | | } |
| | | val name = et_name.text.toString() |
| | | if (name.isNullOrEmpty()){ |
| | | myToast("请输入成员姓名") |
| | | return@clickDelay |
| | | } |
| | | var birth = tv_birth.text.toString() |
| | | if (birth.isNullOrEmpty()){ |
| | | myToast("请选择生日") |
| | | return@clickDelay |
| | | } |
| | | val sex = tv_sex.text.toString() |
| | | if (sex.isNullOrEmpty()){ |
| | | myToast("请选择性别") |
| | | return@clickDelay |
| | | } |
| | | val height = et_height.text.toString() |
| | | if (type!= TYPE_EDIT_MATCH&&type!= TYPE_EDIT_WORLD&&height.isNullOrEmpty()){ |
| | | myToast("请填写身高") |
| | | return@clickDelay |
| | | } |
| | | var heightD = 0.0 |
| | | if (type!= TYPE_EDIT_MATCH&&type!= TYPE_EDIT_WORLD){ |
| | | try { |
| | | heightD = height.toDouble() |
| | | }catch (e:Exception){ |
| | | myToast("身高输入有误") |
| | | return@clickDelay |
| | | } |
| | | } |
| | | val weight = et_weight.text.toString() |
| | | if (type!= TYPE_EDIT_MATCH&&type!= TYPE_EDIT_WORLD&&weight.isNullOrEmpty()){ |
| | | myToast("请填写体重") |
| | | return@clickDelay |
| | | } |
| | | var weightD = 0.0 |
| | | if (type!= TYPE_EDIT_MATCH&&type!= TYPE_EDIT_WORLD){ |
| | | try { |
| | | weightD = weight.toDouble() |
| | | }catch (e:Exception){ |
| | | myToast("体重输入有误") |
| | | return@clickDelay |
| | | } |
| | | } |
| | | val idCard = et_id_card.text.toString() |
| | | val phone = et_phone.text.toString() |
| | | when(type){ |
| | | TYPE_ADD_MATCH ->{ |
| | | if (phone.isNotEmpty()&&!phone.isValidPhone()){ |
| | | myToast("请输入正确的手机号") |
| | | return@clickDelay |
| | | } |
| | | if (idCard.isValidIdCard()) |
| | | birth = "${idCard.substring(6,10)}-${idCard.substring(10,12)}-${idCard.substring(12,14)}" |
| | | HttpManager.addParticipant(avatar,name,birth,if (sex == "男") 1 else 2,heightD,weightD, |
| | | if (idCard.isNullOrEmpty()) null else idCard,if (phone.isNullOrEmpty()) null else phone) |
| | | .request(this){_,data-> |
| | | myToast("添加成功") |
| | | setResult(Activity.RESULT_OK) |
| | | finish() |
| | | } |
| | | } |
| | | TYPE_ADD_WORLD->{ |
| | | if (!phone.isValidPhone()){ |
| | | myToast("请输入正确的手机号") |
| | | return@clickDelay |
| | | } |
| | | if (!idCard.isValidIdCard()){ |
| | | myToast("请输入正确的身份证号") |
| | | return@clickDelay |
| | | } |
| | | birth = "${idCard.substring(6,10)}-${idCard.substring(10,12)}-${idCard.substring(12,14)}" |
| | | HttpManager.addParticipant(avatar,name,birth,if (sex == "男") 1 else 2,heightD,weightD, |
| | | if (idCard.isNullOrEmpty()) null else idCard,if (phone.isNullOrEmpty()) null else phone) |
| | | .request(this){_,data-> |
| | | myToast("添加成功") |
| | | setResult(Activity.RESULT_OK) |
| | | finish() |
| | | } |
| | | } |
| | | TYPE_EDIT_MATCH, TYPE_EDIT_WORLD->{ |
| | | if (!idCard.isValidIdCard()){ |
| | | myToast("请输入正确的身份证号") |
| | | return@clickDelay |
| | | } |
| | | birth = "${idCard.substring(6,10)}-${idCard.substring(10,12)}-${idCard.substring(12,14)}" |
| | | HttpManager.editParticipant(user?.avatar?:"",user?.id?:"",null,null,null,name,idCard,if (sex == "男") 1 else 2,birth) |
| | | .request(this){_,data-> |
| | | myToast("修改成功") |
| | | setResult(Activity.RESULT_OK) |
| | | finish() |
| | | } |
| | | } |
| | | else->{ |
| | | if (!idCard.isValidIdCard()){ |
| | | myToast("请输入正确的身份证号") |
| | | return@clickDelay |
| | | } |
| | | birth = "${idCard.substring(6,10)}-${idCard.substring(10,12)}-${idCard.substring(12,14)}" |
| | | HttpManager.addStudent(name,birth,if (sex == "男") 1 else 2,avatar,heightD,weightD, if (idCard.isNullOrEmpty()) null else idCard,if (phone.isNullOrEmpty()) null else phone,if (type == TYPE_EDIT_STUDENT) user?.stuId else null).request(this){_,data-> |
| | | myToast(if (type == TYPE_EDIT_STUDENT) "修改成功" else "添加成功") |
| | | EventBus.getDefault().post(Const.EventCode.CHANGE_COURSDATA) |
| | | setResult(Activity.RESULT_OK) |
| | | finish() |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | override fun initView() { |
| | | when (type) { |
| | | TYPE_COURSE ->{ |
| | | tv_id_title.setCompoundDrawablesRelativeWithIntrinsicBounds(R.mipmap.ic_must,0,0,0) |
| | | } |
| | | TYPE_ADD_MATCH -> { |
| | | title = "添加人员" |
| | | tv_birth.setCompoundDrawablesRelativeWithIntrinsicBounds(0,0,R.mipmap.calender,0) |
| | | // tv_2.setCompoundDrawablesRelativeWithIntrinsicBounds(R.mipmap.ic_must,0,0,0) |
| | | } |
| | | TYPE_ADD_WORLD -> { |
| | | title = "添加人员" |
| | | tv_birth.setCompoundDrawablesRelativeWithIntrinsicBounds(0,0,R.mipmap.calender,0) |
| | | tv_2.setCompoundDrawablesRelativeWithIntrinsicBounds(R.mipmap.ic_must,0,0,0) |
| | | tv_id_title.setCompoundDrawablesRelativeWithIntrinsicBounds(R.mipmap.ic_must,0,0,0) |
| | | } |
| | | TYPE_EDIT_MATCH -> { |
| | | title = "选择人员" |
| | | iv_avatar.gone() |
| | | cl_add.gone() |
| | | tv_birth.setCompoundDrawablesRelativeWithIntrinsicBounds(0,0,R.mipmap.calender,0) |
| | | et_name.setText(user?.name) |
| | | tv_birth.text = user?.birthday |
| | | tv_sex.text = if (user?.gender == 1) "男" else "女" |
| | | } |
| | | TYPE_EDIT_WORLD -> { |
| | | title = "人员管理" |
| | | iv_avatar.gone() |
| | | cl_add.gone() |
| | | tv_birth.setCompoundDrawablesRelativeWithIntrinsicBounds(0,0,R.mipmap.calender,0) |
| | | tv_id_title.setCompoundDrawablesRelativeWithIntrinsicBounds(R.mipmap.ic_must,0,0,0) |
| | | et_name.setText(user?.name) |
| | | tv_birth.text = user?.birthday |
| | | tv_sex.text = if (user?.gender == 1) "男" else "女" |
| | | et_name.isEnabled = false |
| | | tv_birth.isEnabled = false |
| | | tv_sex.isEnabled = false |
| | | } |
| | | TYPE_EDIT_STUDENT -> { |
| | | tv_id_title.setCompoundDrawablesRelativeWithIntrinsicBounds(R.mipmap.ic_must,0,0,0) |
| | | title = "修改运动营成员信息" |
| | | avatar = user?.stuHeadImg?:"" |
| | | iv_avatar.setImageURI(avatar) |
| | | et_name.setText(user?.stuName) |
| | | tv_birth.text = user?.birthday |
| | | tv_sex.text = if (user?.sex == 1) "男" else "女" |
| | | et_height.setText(user?.stuHeight.toString()) |
| | | et_weight.setText(user?.stuWeight.toString()) |
| | | et_phone.setText(user?.stuPhone) |
| | | et_id_card.setText(user?.idCard) |
| | | } |
| | | } |
| | | } |
| | | |
| | | override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { |
| | | super.onActivityResult(requestCode, resultCode, data) |
| | | if (resultCode == Activity.RESULT_OK && requestCode == 1024 && Build.VERSION.SDK_INT >= Build.VERSION_CODES.R){ |
| | | isRefused = !Environment.isExternalStorageManager() |
| | | }else if (resultCode == Activity.RESULT_OK&&data!=null){ |
| | | data.getStringExtra("path")!!.uploadWithCompress(this, object : |
| | | StringCallback { |
| | | override fun onResult(rst: String) { |
| | | avatar = rst |
| | | iv_avatar.setImageURI(avatar) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | |
| | | companion object{ |
| | | const val TYPE_COURSE = 1//添加运动营成员 |
| | | const val TYPE_ADD_MATCH = 2//添加参赛人员 //1.23:人员管理也是赛事人员同流程和判断条件,因此复用type |
| | | const val TYPE_ADD_WORLD = 5//添加世界杯人员 |
| | | const val TYPE_EDIT_WORLD = 6//编辑世界杯人员 |
| | | const val TYPE_EDIT_MATCH = 3//修改参赛人员 |
| | | const val TYPE_EDIT_STUDENT = 4//修改运动营成员信息 |
| | | } |
| | |
| | | import com.dollearn.student.network.entity.SubjectBean |
| | | import com.dollearn.student.network.request |
| | | import com.dollearn.student.ui.TransparentStatusBarActivity |
| | | import com.dollearn.student.utils.Const |
| | | import com.dollearn.student.utils.event.EmptyEvent |
| | | import kotlinx.android.synthetic.main.activity_listen.* |
| | | import org.greenrobot.eventbus.EventBus |
| | | |
| | | class ChooseVoiceActivity:TransparentStatusBarActivity() { |
| | | override fun setContentView() = R.layout.activity_listen |
| | |
| | | tipDialog.arguments = bundleOf("msg" to "未完成全部答题,确认退出吗?") |
| | | tipDialog.setCallback(object :TipDialog.OnClickCallback{ |
| | | override fun onOk() { |
| | | if (view_pager.currentItem == 0) |
| | | val list = (data?.subjectList?: arrayListOf()).subList(0,view_pager.currentItem).flatMap { it } |
| | | HttpManager.exitLearning(view_pager.currentItem,season,time,totalCount,rightCount,day,week,2,data?.data?.id?:"", list.joinToString(",") { it.id }).request(this@ChooseVoiceActivity){ _, _-> |
| | | finish() |
| | | else{ |
| | | val list = (data?.subjectList?: arrayListOf()).subList(0,view_pager.currentItem).flatMap { it } |
| | | HttpManager.exitLearning(view_pager.currentItem,season,time,totalCount,rightCount,day,week,2,data?.data?.id?:"", list.joinToString(",") { it.id }).request(this@ChooseVoiceActivity){ _, _-> |
| | | finish() |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | override fun onDestroy() { |
| | | super.onDestroy() |
| | | EventBus.getDefault().post(EmptyEvent(Const.EventCode.STOP_TIMER)) |
| | | handler?.removeMessages(0) |
| | | handler = null |
| | | } |
| | |
| | | import com.dollearn.student.network.Apis |
| | | 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 com.dollearn.student.utils.extention.clickDelay |
| | | import com.dollearn.student.utils.extention.formatToChinese |
| | | import kotlinx.android.synthetic.main.fragment_daily.* |
| | | import org.greenrobot.eventbus.EventBus |
| | | import org.jetbrains.anko.backgroundResource |
| | | import org.jetbrains.anko.support.v4.browse |
| | | import org.jetbrains.anko.support.v4.startActivityForResult |
| | |
| | | showDialog("加载题目...") |
| | | HttpManager.listenSelectPicture(season, week, day).requestByF(this,false, {_,data-> |
| | | startActivityForResult<ListenActivity>(1,"data" to data,"day" to day,"week" to week,"season" to season) |
| | | EventBus.getDefault().post(EmptyEvent(Const.EventCode.START_TIMER)) |
| | | }){_,msg-> |
| | | handleError(msg) |
| | | } |
| | |
| | | showDialog("加载题目...") |
| | | HttpManager.pictureSelectVoice(season, week, day).requestByF(this,false, {_,data-> |
| | | startActivityForResult<ChooseVoiceActivity>(1,"data" to data,"day" to day,"week" to week,"season" to season) |
| | | EventBus.getDefault().post(EmptyEvent(Const.EventCode.START_TIMER)) |
| | | |
| | | }){_,msg-> |
| | | handleError(msg) |
| | | } |
| | |
| | | showDialog("加载题目...") |
| | | HttpManager.induceExclude(season, week, day).requestByF(this,false, {_,data-> |
| | | startActivityForResult<IncludeActivity>(1,"data" to data,"day" to day,"week" to week,"season" to season) |
| | | EventBus.getDefault().post(EmptyEvent(Const.EventCode.START_TIMER)) |
| | | |
| | | }){_,msg-> |
| | | handleError(msg) |
| | | } |
| | |
| | | showDialog("加载题目...") |
| | | HttpManager.questionsAndAnswers(season, week, day).requestByF(this,false, {_,data-> |
| | | startActivityForResult<QAActivity>(1,"data" to data,"day" to day,"week" to week,"season" to season) |
| | | EventBus.getDefault().post(EmptyEvent(Const.EventCode.START_TIMER)) |
| | | |
| | | }){_,msg-> |
| | | handleError(msg) |
| | | } |
| | |
| | | showDialog("加载题目...") |
| | | HttpManager.pictureMateVoice(season, week, day).requestByF(this,false,{_,data-> |
| | | startActivityForResult<MatchActivity>(1,"data" to data,"day" to day,"week" to week,"season" to season) |
| | | EventBus.getDefault().post(EmptyEvent(Const.EventCode.START_TIMER)) |
| | | |
| | | }){_,msg-> |
| | | handleError(msg) |
| | | } |
| | |
| | | private fun getProgress(){ |
| | | HttpManager.studySchedule(week,day).requestByF(this){ _, data-> |
| | | data?.apply { |
| | | tv_current.text = "当前周目:${week}周目" |
| | | tv_current.text = "当前周目:${week.formatToChinese()}周目" |
| | | tv_progress.text = "${computeSchedule}%" |
| | | tv_total.text = "${totalStudy}小时" |
| | | tv_today.text = "${todayStudy}小时" |
| | |
| | | import com.dollearn.student.network.entity.SubjectBean |
| | | import com.dollearn.student.network.request |
| | | import com.dollearn.student.ui.TransparentStatusBarActivity |
| | | import com.dollearn.student.utils.Const |
| | | import com.dollearn.student.utils.event.EmptyEvent |
| | | import kotlinx.android.synthetic.main.activity_listen.* |
| | | import org.greenrobot.eventbus.EventBus |
| | | |
| | | class IncludeActivity:TransparentStatusBarActivity() { |
| | | override fun setContentView() = R.layout.activity_listen |
| | |
| | | tipDialog.arguments = bundleOf("msg" to "未完成全部答题,确认退出吗?") |
| | | tipDialog.setCallback(object :TipDialog.OnClickCallback{ |
| | | override fun onOk() { |
| | | if (view_pager.currentItem == 0) |
| | | finish() |
| | | else{ |
| | | val list = (data?.subjectList?.subList(0,view_pager.currentItem)) |
| | | val arrayListOf = arrayListOf<Subject>() |
| | | list?.forEach { it -> |
| | | it.forEachIndexed { index, subject -> |
| | | if (index == 2||index == 4||index == 5){ |
| | | arrayListOf.add(subject) |
| | | } |
| | | val list = (data?.subjectList?.subList(0,view_pager.currentItem)) |
| | | val arrayListOf = arrayListOf<Subject>() |
| | | list?.forEach { it -> |
| | | it.forEachIndexed { index, subject -> |
| | | if (index == 2||index == 4||index == 5){ |
| | | arrayListOf.add(subject) |
| | | } |
| | | } |
| | | HttpManager.exitLearning(view_pager.currentItem,season,time,totalCount,rightCount,day,week,3,data?.data?.id?:"", arrayListOf.joinToString(",") { it.id }).request(this@IncludeActivity){ _, _-> |
| | | finish() |
| | | } |
| | | } |
| | | HttpManager.exitLearning(view_pager.currentItem,season,time,totalCount,rightCount,day,week,3,data?.data?.id?:"", arrayListOf.joinToString(",") { it.id }).request(this@IncludeActivity){ _, _-> |
| | | finish() |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | override fun onDestroy() { |
| | | super.onDestroy() |
| | | EventBus.getDefault().post(EmptyEvent(Const.EventCode.STOP_TIMER)) |
| | | handler?.removeMessages(0) |
| | | handler = null |
| | | } |
| | |
| | | import com.dollearn.student.network.entity.SubjectBean |
| | | import com.dollearn.student.network.request |
| | | import com.dollearn.student.ui.TransparentStatusBarActivity |
| | | import com.dollearn.student.utils.Const |
| | | import com.dollearn.student.utils.event.EmptyEvent |
| | | import kotlinx.android.synthetic.main.activity_listen.* |
| | | import org.greenrobot.eventbus.EventBus |
| | | |
| | | class ListenActivity:TransparentStatusBarActivity() { |
| | | override fun setContentView() = R.layout.activity_listen |
| | |
| | | tipDialog.arguments = bundleOf("msg" to "未完成全部答题,确认退出吗?") |
| | | tipDialog.setCallback(object :TipDialog.OnClickCallback{ |
| | | override fun onOk() { |
| | | if (view_pager.currentItem == 0) |
| | | val list = (data?.subjectList?: arrayListOf()).flatMap { it }.subList(0,view_pager.currentItem) |
| | | HttpManager.exitLearning(view_pager.currentItem,season,time,totalCount,rightCount,day,week,1,data?.data?.id?:"", list.joinToString(",") { it.id }).request(this@ListenActivity){_,_-> |
| | | finish() |
| | | else{ |
| | | val list = (data?.subjectList?: arrayListOf()).flatMap { it }.subList(0,view_pager.currentItem) |
| | | HttpManager.exitLearning(view_pager.currentItem,season,time,totalCount,rightCount,day,week,1,data?.data?.id?:"", list.joinToString(",") { it.id }).request(this@ListenActivity){_,_-> |
| | | finish() |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | super.onDestroy() |
| | | handler?.removeMessages(0) |
| | | handler = null |
| | | EventBus.getDefault().post(EmptyEvent(Const.EventCode.STOP_TIMER)) |
| | | } |
| | | } |
| | |
| | | import com.dollearn.student.network.entity.StoryBean |
| | | import com.dollearn.student.network.request |
| | | import com.dollearn.student.ui.TransparentStatusBarActivity |
| | | import com.dollearn.student.utils.Const |
| | | import com.dollearn.student.utils.event.EmptyEvent |
| | | import kotlinx.android.synthetic.main.activity_listen_stroy.* |
| | | import org.greenrobot.eventbus.EventBus |
| | | import org.jetbrains.anko.startActivity |
| | | |
| | | class ListenStoryActivity:TransparentStatusBarActivity() { |
| | |
| | | super.onDestroy() |
| | | handler?.removeMessages(0) |
| | | handler = null |
| | | EventBus.getDefault().post(EmptyEvent(Const.EventCode.STOP_TIMER)) |
| | | } |
| | | } |
| | |
| | | import com.dollearn.student.network.entity.SubjectBean |
| | | import com.dollearn.student.network.request |
| | | import com.dollearn.student.ui.TransparentStatusBarActivity |
| | | import com.dollearn.student.utils.Const |
| | | import com.dollearn.student.utils.event.EmptyEvent |
| | | import kotlinx.android.synthetic.main.activity_listen.* |
| | | import org.greenrobot.eventbus.EventBus |
| | | |
| | | class LookImgActivity:TransparentStatusBarActivity() { |
| | | override fun setContentView() = R.layout.activity_listen |
| | |
| | | super.onDestroy() |
| | | handler?.removeMessages(0) |
| | | handler = null |
| | | EventBus.getDefault().post(EmptyEvent(Const.EventCode.STOP_TIMER)) |
| | | } |
| | | } |
| | |
| | | import com.dollearn.student.network.entity.SubjectBean |
| | | import com.dollearn.student.network.request |
| | | import com.dollearn.student.ui.TransparentStatusBarActivity |
| | | import com.dollearn.student.utils.Const |
| | | import com.dollearn.student.utils.event.EmptyEvent |
| | | import kotlinx.android.synthetic.main.activity_listen.* |
| | | import org.greenrobot.eventbus.EventBus |
| | | |
| | | class MatchActivity:TransparentStatusBarActivity() { |
| | | override fun setContentView() = R.layout.activity_listen |
| | |
| | | tipDialog.arguments = bundleOf("msg" to "未完成全部答题,确认退出吗?") |
| | | tipDialog.setCallback(object :TipDialog.OnClickCallback{ |
| | | override fun onOk() { |
| | | if (view_pager.currentItem == 0) |
| | | val list = (data?.subjectList?: arrayListOf()).flatMap { it }.subList(0,view_pager.currentItem) |
| | | HttpManager.exitLearning(view_pager.currentItem,season,time,totalCount,rightCount,day,week,5,data?.data?.id?:"", list.joinToString(",") { it.id }).request(this@MatchActivity){ _, _-> |
| | | finish() |
| | | else{ |
| | | val list = (data?.subjectList?: arrayListOf()).flatMap { it }.subList(0,view_pager.currentItem) |
| | | HttpManager.exitLearning(view_pager.currentItem,season,time,totalCount,rightCount,day,week,5,data?.data?.id?:"", list.joinToString(",") { it.id }).request(this@MatchActivity){ _, _-> |
| | | finish() |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | super.onDestroy() |
| | | handler?.removeMessages(0) |
| | | handler = null |
| | | EventBus.getDefault().post(EmptyEvent(Const.EventCode.STOP_TIMER)) |
| | | } |
| | | } |
| | |
| | | import com.dollearn.student.ui.home.adapter.CardAdapter |
| | | import com.dollearn.student.utils.AudioUtils |
| | | import com.dollearn.student.utils.Const |
| | | import com.dollearn.student.utils.event.EmptyEvent |
| | | import kotlinx.android.synthetic.main.activity_memory.* |
| | | import org.greenrobot.eventbus.EventBus |
| | | |
| | | class MemoryActivity : TransparentStatusBarActivity(), AudioUtils.OnAudioStatusUpdateListener { |
| | | override fun setContentView() = R.layout.activity_memory |
| | |
| | | handler?.removeMessages(PLAY_VOICE) |
| | | handler?.removeMessages(STUDY_TIME) |
| | | handler = null |
| | | EventBus.getDefault().post(EmptyEvent(Const.EventCode.STOP_TIMER)) |
| | | } |
| | | |
| | | override fun onPause() { |
| | |
| | | import com.dollearn.student.network.entity.SubjectBean |
| | | import com.dollearn.student.network.request |
| | | import com.dollearn.student.ui.TransparentStatusBarActivity |
| | | import com.dollearn.student.utils.Const |
| | | import com.dollearn.student.utils.event.EmptyEvent |
| | | import kotlinx.android.synthetic.main.activity_listen.* |
| | | import org.greenrobot.eventbus.EventBus |
| | | |
| | | class QAActivity:TransparentStatusBarActivity() { |
| | | override fun setContentView() = R.layout.activity_listen |
| | |
| | | tipDialog.arguments = bundleOf("msg" to "未完成全部答题,确认退出吗?") |
| | | tipDialog.setCallback(object :TipDialog.OnClickCallback{ |
| | | override fun onOk() { |
| | | if (view_pager.currentItem == 0) |
| | | val list = (data?.subjectList?: arrayListOf()).flatMap { it }.subList(0,view_pager.currentItem) |
| | | HttpManager.exitLearning(view_pager.currentItem,season,time,totalCount,rightCount,day,week,4,data?.data?.id?:"", list.joinToString(",") { it.id }).request(this@QAActivity){ _, _-> |
| | | finish() |
| | | else{ |
| | | val list = (data?.subjectList?: arrayListOf()).flatMap { it }.subList(0,view_pager.currentItem) |
| | | HttpManager.exitLearning(view_pager.currentItem,season,time,totalCount,rightCount,day,week,4,data?.data?.id?:"", list.joinToString(",") { it.id }).request(this@QAActivity){ _, _-> |
| | | finish() |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | super.onDestroy() |
| | | handler?.removeMessages(0) |
| | | handler = null |
| | | EventBus.getDefault().post(EmptyEvent(Const.EventCode.STOP_TIMER)) |
| | | } |
| | | } |
| | |
| | | act.rightCount++ |
| | | Log.e(TAG,"选择正确") |
| | | transAnimation(cl_answer_2,voiceViews[questionIndex]) |
| | | resultViews[questionIndex].visible() |
| | | resultViews[questionIndex].postDelayed({ |
| | | resultViews[questionIndex].gone() |
| | | },3000) |
| | | nowVoiceView = voiceViews[questionIndex] |
| | | handler?.sendEmptyMessage(PLAY_RIGHT) |
| | | }else{ |
| | |
| | | act.rightCount++ |
| | | Log.e(TAG,"选择正确") |
| | | transAnimation(cl_answer_3,voiceViews[questionIndex]) |
| | | resultViews[questionIndex].visible() |
| | | resultViews[questionIndex].postDelayed({ |
| | | resultViews[questionIndex].gone() |
| | | },3000) |
| | | nowVoiceView = voiceViews[questionIndex] |
| | | handler?.sendEmptyMessage(PLAY_RIGHT) |
| | | }else{ |
| | |
| | | import com.dollearn.student.ui.TransparentStatusBarActivity |
| | | import kotlinx.android.synthetic.main.activity_finish_remember.* |
| | | import kotlinx.android.synthetic.main.activity_finish_remember.tv_back |
| | | import kotlinx.android.synthetic.main.activity_result.* |
| | | import org.jetbrains.anko.startActivity |
| | | |
| | | class RememberFinishActivity:TransparentStatusBarActivity() { |
| | |
| | | handler?.sendEmptyMessageDelayed(PLAY_VOICE,2000) |
| | | } |
| | | |
| | | /** |
| | | * 翻页调用 |
| | | */ |
| | | fun stopVoice(){ |
| | | handler?.removeMessages(PLAY_VOICE) |
| | | player.stopPlayMusic() |
| | | } |
| | | |
| | | companion object{ |
| | | /** |
| | | * @param index 题组号 |
| | |
| | | import com.dollearn.student.network.request |
| | | import com.dollearn.student.ui.TransparentStatusBarActivity |
| | | import com.dollearn.student.utils.Const |
| | | import com.dollearn.student.utils.event.EmptyEvent |
| | | import com.dollearn.student.utils.event.IntEvent |
| | | import com.dollearn.student.utils.extention.clickDelay |
| | | import kotlinx.android.synthetic.main.activity_result.* |
| | |
| | | tv_last.invisible() |
| | | tv_exit.invisible() |
| | | HttpManager.gameAchievement(rate,difficulty,id?:"","超级听力",time).request(this){_,data-> |
| | | tv_score.text = "恭喜你,已完成全部答题!获得${data?:0}积分!" |
| | | tv_score.text = "恭喜你,已完成全部答题!获得${data?:0}积分!" |
| | | |
| | | } |
| | | } |
| | | 7->{ |
| | | title = "超级记忆" |
| | | tv_score.text = "恭喜你,已完成游戏!获得${score}积分!" |
| | | tv_score.text = "恭喜你,已完成游戏!获得${score}积分!" |
| | | tv_back.visible() |
| | | tv_last.invisible() |
| | | tv_exit.invisible() |
| | | HttpManager.gameAchievement(rate,difficulty,id?:"","超级记忆",time).request(this){_,data-> |
| | | tv_score.text = "恭喜你,已完成全部答题!获得${data?:0}积分!" |
| | | tv_score.text = "恭喜你,已完成全部答题!获得${data?:0}积分!" |
| | | } |
| | | } |
| | | 8->{ |
| | |
| | | tv_last.invisible() |
| | | tv_exit.invisible() |
| | | HttpManager.completeStory(rate,1,id?:"",time).request(this){_,data-> |
| | | tv_score.text = "恭喜你,已完成全部答题!获得${data?:0}积分!" |
| | | |
| | | tv_score.text = "恭喜你,已完成全部答题!获得${data?:0}积分!" |
| | | } |
| | | } |
| | | else->{ |
| | |
| | | tv_exit.invisible() |
| | | } |
| | | HttpManager.completeLearning(rate,time,day,week,season,type,id?:"").request(this){_,data-> |
| | | tv_score.text = "恭喜你,已完成全部答题!获得${data?:0}积分!" |
| | | tv_score.text = "恭喜你,已完成全部答题!获得${data?:0}积分!" |
| | | } |
| | | } |
| | | } |
| | |
| | | import com.dollearn.student.ui.home.adapter.GameAdapter |
| | | import com.dollearn.student.utils.AudioUtils |
| | | import com.dollearn.student.utils.Const |
| | | import com.dollearn.student.utils.event.EmptyEvent |
| | | import com.dollearn.student.utils.interfaces.StringCallback |
| | | import kotlinx.android.synthetic.main.activity_super_listen.* |
| | | import kotlinx.android.synthetic.main.fragmetn_look_img.* |
| | | import org.greenrobot.eventbus.EventBus |
| | | |
| | | class SuperListenActivity : TransparentStatusBarActivity(), AudioUtils.OnAudioStatusUpdateListener { |
| | | override fun setContentView() = R.layout.activity_super_listen |
| | |
| | | private var TIME = 10 //每题答题时间 |
| | | private var countTime = 0 //倒计时计数 |
| | | |
| | | var totalCount = 0 //总答题次数 |
| | | var rightCount = 0 //正确答题次数 |
| | | var time = 0 //学习秒数 |
| | | |
| | |
| | | override fun initClick() { |
| | | tv_exit.setOnClickListener { |
| | | if (tv_exit.text == "提交"){ |
| | | ResultActivity.startResult(this,0,0,0,6,totalCount,rightCount,list.filter { it.right }.sumBy { 1 },time,data!!.data.id,difficulty) |
| | | ResultActivity.startResult(this,0,0,0,6,list.size,rightCount,list.filter { it.right }.sumBy { 1 },time,data!!.data.id,difficulty) |
| | | finish() |
| | | }else |
| | | onBackPressed() |
| | |
| | | } |
| | | |
| | | private fun refreshUi() { |
| | | cl_voice.visible() |
| | | tv_sort.visible() |
| | | tv_exit.visible() |
| | | tv_tip.text = "准备听题" |
| | | rv_list.layoutManager = GridLayoutManager(this,5) |
| | | list.clear() |
| | | list.addAll(data?.subjectList?: arrayListOf()) |
| | |
| | | countTime = TIME //重置答题时间 |
| | | tv_tip.text = "准备听题" |
| | | state = 0 |
| | | handler?.sendEmptyMessageDelayed(PLAY_VOICE,3000) |
| | | handler?.sendEmptyMessageDelayed(PLAY_VOICE,if (index == 0) 200 else 3000) |
| | | }else{ |
| | | tv_sort.visibility = View.INVISIBLE |
| | | tv_tip.text = "" |
| | |
| | | override fun onDestroy() { |
| | | super.onDestroy() |
| | | handler?.removeCallbacksAndMessages(null) |
| | | EventBus.getDefault().post(EmptyEvent(Const.EventCode.STOP_TIMER)) |
| | | } |
| | | |
| | | override fun onPause() { |
| | |
| | | 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) |
| | | 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)) |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | val subject = act.data!!.subjectList[act.data!!.subjectList.map { it.correct }.indexOf(act.voiceList[act.index])] //当前音频对应题目 |
| | | Log.e(act.TAG,"正确答案:${subject.name}") |
| | | |
| | | act.totalCount++ |
| | | |
| | | act.handler?.removeMessages(act.COUNT_DOWN) //选择答案后,停止倒计时 |
| | | if (data.id == subject.id){ |
| | | ivResult.setImageResource(R.mipmap.successs) |
| | |
| | | import com.dollearn.student.ui.TransparentStatusBarActivity |
| | | import com.dollearn.student.utils.Const |
| | | import com.dollearn.student.utils.extention.clickDelay |
| | | import kotlinx.android.synthetic.main.activity_field.* |
| | | import kotlinx.android.synthetic.main.activity_login.* |
| | | import org.jetbrains.anko.sdk27.coroutines.onClick |
| | | import org.jetbrains.anko.startActivity |
| | |
| | | import com.dollearn.student.ui.welfare.* |
| | | import com.dollearn.student.utils.Const |
| | | import com.dollearn.student.utils.event.EmptyEvent |
| | | import com.dollearn.student.utils.extention.clickDelay |
| | | import com.dollearn.student.utils.extention.formatToChinese |
| | | import com.dollearn.student.utils.interfaces.StringCallback |
| | | import com.share.utils.ShareUtils |
| | | import com.umeng.socialize.UMShareListener |
| | |
| | | |
| | | override fun onFirstVisibleToUser() { |
| | | EventBus.getDefault().register(this) |
| | | iv_avatar.clickDelay { startActivity<UserInfoActivity>() } |
| | | tv_name.clickDelay { startActivity<UserInfoActivity>() } |
| | | // tv_coin.clickDelay { startActivityForResult<RechargeRecordActivity>(1) } |
| | | tv_record.clickDelay { startActivity<CoinRecordActivity>() } |
| | | showInfo() |
| | | tv_logout.setOnClickListener { |
| | | val tipDialog = TipDialog() |
| | |
| | | homeData?.apply { |
| | | iv_avatar.setImageURI(user.headImg) |
| | | tv_name.text = user.name |
| | | tv_record.text = "剩余积分:%d|学习进度:周目%d|学习总时长:%d小时".format(user.integral,userStudy.week,userStudy.totalStudy) |
| | | tv_record.text = "剩余积分:%d|学习进度:周目%s|学习总时长:%d小时".format(user.integral,userStudy.week.formatToChinese(),userStudy.totalStudy) |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | private fun formatDuration(second:Int):String{ |
| | | if (second<60) //不足一分钟显示1分钟 |
| | | return "1分钟" |
| | | return "${second}秒" |
| | | val minutes = second / 60 |
| | | if (minutes<60)//不足一小时,只显示分钟 |
| | | return "${minutes}分钟" |
| | | return "${minutes/60}小时${minutes%60}分钟" |
| | | return "${minutes}分钟${second%60}秒" |
| | | return "${minutes/60}小时${if (minutes%60 == 0) "" else "${minutes%60}分钟"}" |
| | | } |
| | | } |
| | |
| | | package com.dollearn.student.ui.shop.adapter |
| | | |
| | | import android.graphics.Paint |
| | | import android.widget.TextView |
| | | import cn.sinata.xldutils.adapter.HFRecyclerAdapter |
| | | import cn.sinata.xldutils.adapter.util.ViewHolder |
| | | import com.dollearn.student.R |
| | |
| | | holder.bind<SimpleDraweeView>(R.id.iv_goods).setImageURI(data.coverImg) |
| | | holder.setText(R.id.tv_name,data.name) |
| | | holder.setText(R.id.tv_price,"${data.integral}积分") |
| | | holder.setText(R.id.tv_origin_price,if (data.price!=null&&data.price!=0.0) "¥%.2f".format(data.price) else "") |
| | | holder.bind<TextView>(R.id.tv_origin_price).paintFlags = holder.bind<TextView>(R.id.tv_origin_price).paintFlags or Paint.STRIKE_THRU_TEXT_FLAG |
| | | } |
| | | |
| | | } |
| | |
| | | bannerAdapter.notifyDataSetChanged() |
| | | banner.currentItem = 1 |
| | | tv_price.text = good.integral.toString() |
| | | tv_value.text = "¥%.2f".format(good.price) |
| | | tv_value.text = if (good.price!=null&&good.price!=0.0) "¥%.2f".format(good.price) else "" |
| | | tv_value.paintFlags = tv_value.paintFlags or Paint.STRIKE_THRU_TEXT_FLAG |
| | | tv_name.text = good.name |
| | | tv_category.text = goodTypes?.joinToString ("|"){ it.name } |
| | |
| | | const val CHANGE_COURSDATA = 0x08 //刷新开始上课的数据 |
| | | const val SHOW_CHANGE_SHOP_DIALOG = 0x09 //显示门店切换弹窗 |
| | | |
| | | const val CHANGE_WELFARE = 0x0A //首页跳转到使用福利 |
| | | const val GAME_PAUSE = 0x0B //游戏页面整页pause,通知弹窗停止视频播放 |
| | | const val CHANGE_EXPLORE = 0x0C //首页跳转到探索玩湃 |
| | | |
| | | const val REFRESH_SCORE = 0x0D //刷新积分 |
| | | |
| | | const val REFRESH_USER_INFO = 0x0E //刷新个人信息 |
| | | |
| | | const val START_TIMER = 0x0F //开始学习,计算时间 |
| | | const val STOP_TIMER = 0x11 //结束学习,计时停止 |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import com.dollearn.student.utils.extention.ViewClickDelay.lastClickTime |
| | | import com.dollearn.student.utils.glide.GlideUtil |
| | | import com.dollearn.student.utils.interfaces.StringCallback |
| | | import com.github.promeg.pinyinhelper.Pinyin |
| | | import kotlinx.android.synthetic.main.activity_course_deatil.* |
| | | import org.jetbrains.anko.toast |
| | | import top.zibin.luban.Luban |
| | | import top.zibin.luban.OnCompressListener |
| | | import java.io.File |
| | | |
| | | fun String.getInitial():String = if (startsWith("重庆")) "C" else Pinyin.toPinyin(this[0])[0].toString() |
| | | |
| | | fun String.uploadWithCompress(act: BaseActivity, callback: StringCallback){ |
| | | Luban.with(act).load(File(this)) |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <selector xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <item android:color="@color/colorBGDisable" android:state_enabled="false"/> |
| | | <item android:color="@color/colorDeepBlue" android:state_enabled="true"/> |
| | | <item android:color="@color/colorDeepBlue"/> |
| | | <item android:color="@color/colorPrimary" android:state_enabled="true"/> |
| | | <item android:color="@color/colorPrimary"/> |
| | | </selector> |
| | |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_action" |
| | | style="@style/style_btn_action" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="30dp" |
| | | android:layout_marginHorizontal="350dp" |
| | | android:text="保存"/> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | |
| | | android:layout_marginTop="22dp" |
| | | android:layout_marginStart="10dp" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="130dp" |
| | | android:layout_marginBottom="120dp" |
| | | android:button="@drawable/selector_check_radio" |
| | | app:layout_constraintStart_toStartOf="parent"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_action" |
| | | style="@style/style_btn_action" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="30dp" |
| | | android:layout_marginHorizontal="350dp" |
| | | android:text="保存"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | |
| | | app:layout_constraintTop_toBottomOf="@id/cl_address" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:layout_margin="14dp" |
| | | app:roundedCornerRadius="3dp" |
| | | app:placeholderImage="@color/page_bg" |
| | | app:actualImageScaleType="centerCrop" |
| | | android:id="@+id/iv_goods"/> |
| | |
| | | android:id="@+id/tv_order_num" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_2" |
| | | app:layout_constraintEnd_toEndOf="@id/tv_name" |
| | | android:textColor="@color/textColor" |
| | | android:textColor="@color/textColor66" |
| | | android:textStyle="bold" |
| | | android:layout_marginTop="12dp" |
| | | android:textSize="12sp"/> |
| | |
| | | android:id="@+id/tv_goods_count" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_order_num" |
| | | app:layout_constraintEnd_toEndOf="@id/tv_name" |
| | | android:textColor="@color/textColor" |
| | | android:textColor="@color/textColor66" |
| | | android:textStyle="bold" |
| | | android:layout_marginTop="12dp" |
| | | android:textSize="12sp"/> |
| | |
| | | android:id="@+id/tv_total_score" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_goods_count" |
| | | app:layout_constraintEnd_toEndOf="@id/tv_name" |
| | | android:textColor="@color/textColor" |
| | | android:textColor="@color/textColor66" |
| | | android:textStyle="bold" |
| | | android:layout_marginTop="12dp" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | |
| | | |
| | | <TextView |
| | | app:layout_constraintTop_toBottomOf="@id/tv_tip" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:id="@+id/tv_back" |
| | | android:layout_marginTop="110dp" |
| | | style="@style/style_btn_cancel" |
| | | android:layout_width="wrap_content" |
| | | android:paddingHorizontal="34dp" |
| | |
| | | <EditText |
| | | android:id="@+id/et_phone" |
| | | style="@style/style_et_focus" |
| | | android:layout_width="match_parent" |
| | | android:layout_width="316dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginHorizontal="380dp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:layout_marginTop="27dp" |
| | | android:hint="请输入手机号" |
| | | android:inputType="number" |
| | |
| | | <EditText |
| | | android:id="@+id/et_code" |
| | | style="@style/style_et_focus" |
| | | android:layout_width="match_parent" |
| | | android:layout_width="0dp" |
| | | app:layout_constraintStart_toStartOf="@id/et_phone" |
| | | app:layout_constraintEnd_toEndOf="@id/et_phone" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginHorizontal="380dp" |
| | | android:layout_marginTop="20dp" |
| | | android:drawableStart="@mipmap/v_code" |
| | | android:hint="请输入验证码" |
| | |
| | | <TextView |
| | | android:id="@+id/tv_login_code" |
| | | style="@style/style_btn_action" |
| | | android:layout_width="match_parent" |
| | | android:layout_width="316dp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="132dp" |
| | | android:layout_marginHorizontal="380dp" |
| | | android:text="登录" |
| | | app:layout_constraintTop_toBottomOf="@id/et_code" /> |
| | | |
| | |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="12dp" |
| | | android:textStyle="bold" /> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | <ScrollView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | android:layout_marginHorizontal="230dp" |
| | | android:layout_marginVertical="26dp" |
| | | android:scrollbars="none" |
| | | android:background="@drawable/bg_white_8dp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintBottom_toTopOf="@id/tv_last"> |
| | | <TextView |
| | | android:id="@+id/tv_score" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:textSize="18sp" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/textColor" |
| | | android:drawableTop="@mipmap/successs" |
| | | android:drawablePadding="25dp" |
| | | android:layout_marginTop="25dp" |
| | | android:text="恭喜你,已完成全部答题!获得0积分!"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_count" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_score" |
| | | app:layout_constraintEnd_toEndOf="@id/tv_score" |
| | | android:text="0次" |
| | | android:layout_marginTop="24dp" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="16sp"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_count" |
| | | app:layout_constraintStart_toStartOf="@id/tv_score" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="16sp" |
| | | android:text="答题次数:"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_right" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_count" |
| | | app:layout_constraintEnd_toEndOf="@id/tv_score" |
| | | android:text="0次" |
| | | android:layout_marginTop="12dp" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="16sp"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_right" |
| | | app:layout_constraintStart_toStartOf="@id/tv_score" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="16sp" |
| | | android:text="正确次数:"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_fault" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_right" |
| | | app:layout_constraintEnd_toEndOf="@id/tv_score" |
| | | android:text="0次" |
| | | android:layout_marginTop="12dp" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="16sp"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_fault" |
| | | app:layout_constraintStart_toStartOf="@id/tv_score" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="16sp" |
| | | android:text="错误次数:"/> |
| | | <TextView |
| | | android:id="@+id/tv_rate" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_fault" |
| | | android:textSize="24sp" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/color_text_price" |
| | | android:layout_marginTop="50dp" |
| | | android:text="正确率:0%"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"> |
| | | <TextView |
| | | android:id="@+id/tv_score" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:textSize="18sp" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/textColor" |
| | | android:drawableTop="@mipmap/successs" |
| | | android:drawablePadding="25dp" |
| | | android:layout_marginTop="25dp" |
| | | android:text="恭喜你,已完成全部答题!获得0积分!"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_count" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_score" |
| | | app:layout_constraintEnd_toEndOf="@id/tv_score" |
| | | android:text="0次" |
| | | android:layout_marginTop="24dp" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="16sp"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_count" |
| | | app:layout_constraintStart_toStartOf="@id/tv_score" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="16sp" |
| | | android:text="答题次数:"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_right" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_count" |
| | | app:layout_constraintEnd_toEndOf="@id/tv_score" |
| | | android:text="0次" |
| | | android:layout_marginTop="12dp" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="16sp"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_right" |
| | | app:layout_constraintStart_toStartOf="@id/tv_score" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="16sp" |
| | | android:text="正确次数:"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_fault" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_right" |
| | | app:layout_constraintEnd_toEndOf="@id/tv_score" |
| | | android:text="0次" |
| | | android:layout_marginTop="12dp" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="16sp"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_fault" |
| | | app:layout_constraintStart_toStartOf="@id/tv_score" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="16sp" |
| | | android:text="错误次数:"/> |
| | | <TextView |
| | | android:id="@+id/tv_rate" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_fault" |
| | | android:textSize="24sp" |
| | | android:textStyle="bold" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="10dp" |
| | | android:textColor="@color/color_text_price" |
| | | android:layout_marginTop="50dp" |
| | | android:text="正确率:0%"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | |
| | | </ScrollView> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | app:layoutDescription="@xml/activity_memory_scene"> |
| | | <TextView |
| | | android:layout_width="32dp" |
| | | android:layout_height="32dp" |
| | | android:id="@+id/tv_sort" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:layout_marginStart="40dp" |
| | | android:layout_marginTop="39dp" |
| | | android:textColor="@color/white" |
| | | android:text="1" |
| | | android:gravity="center" |
| | | android:textSize="16sp" |
| | | android:textStyle="bold" |
| | | android:background="@drawable/bg_yellow_circle"/> |
| | | |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="159dp" |
| | | android:layout_height="52dp" |
| | | app:layout_constraintStart_toEndOf="@id/tv_sort" |
| | | app:layout_constraintTop_toTopOf="@id/tv_sort" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_sort" |
| | | android:layout_marginStart="12dp" |
| | | android:elevation="2dp" |
| | | android:id="@+id/cl_voice" |
| | | android:background="@drawable/bg_blue_8dp"> |
| | | <ImageView |
| | | android:id="@+id/iv1" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@mipmap/yuyin" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/cl_top"> |
| | | <TextView |
| | | android:layout_width="32dp" |
| | | android:layout_height="32dp" |
| | | android:id="@+id/tv_sort" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:layout_marginStart="25dp"/> |
| | | <ImageView |
| | | android:id="@+id/iv2" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@mipmap/play" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:layout_marginEnd="23dp"/> |
| | | <ImageView |
| | | android:id="@+id/iv_playing" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="40dp" |
| | | android:layout_marginTop="39dp" |
| | | android:textColor="@color/white" |
| | | android:visibility="gone" |
| | | android:src="@mipmap/bofangzhong" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" /> |
| | | android:text="1" |
| | | android:gravity="center" |
| | | android:textSize="16sp" |
| | | android:textStyle="bold" |
| | | android:background="@drawable/bg_yellow_circle"/> |
| | | |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="159dp" |
| | | android:layout_height="52dp" |
| | | app:layout_constraintStart_toEndOf="@id/tv_sort" |
| | | app:layout_constraintTop_toTopOf="@id/tv_sort" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_sort" |
| | | android:layout_marginStart="12dp" |
| | | android:elevation="2dp" |
| | | android:id="@+id/cl_voice" |
| | | android:visibility="gone" |
| | | android:background="@drawable/bg_blue_8dp"> |
| | | <ImageView |
| | | android:id="@+id/iv1" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@mipmap/yuyin" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:layout_marginStart="25dp"/> |
| | | <ImageView |
| | | android:id="@+id/iv2" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@mipmap/play" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:layout_marginEnd="23dp"/> |
| | | <ImageView |
| | | android:id="@+id/iv_playing" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:visibility="gone" |
| | | android:src="@mipmap/bofangzhong" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" /> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_sort" |
| | | app:layout_constraintStart_toEndOf="@id/tv_sort" |
| | | android:layout_marginStart="194dp" |
| | | android:textColor="@color/colorRed" |
| | | android:id="@+id/tv_tip" |
| | | android:textSize="14sp" |
| | | android:textStyle="bold" |
| | | android:text=""/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_sort" |
| | | app:layout_constraintStart_toEndOf="@id/tv_sort" |
| | | android:layout_marginStart="194dp" |
| | | android:textColor="@color/colorRed" |
| | | android:id="@+id/tv_tip" |
| | | android:textSize="14sp" |
| | | android:textStyle="bold" |
| | | android:text="准备听题"/> |
| | | |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | |
| | | android:textSize="16sp" |
| | | android:textStyle="bold" |
| | | android:text=""/> |
| | | <TextView |
| | | android:id="@+id/tv_exit" |
| | | android:layout_width="124dp" |
| | | android:layout_height="wrap_content" |
| | | android:textSize="14sp" |
| | | android:textColor="@color/white" |
| | | android:background="@drawable/bg_blue_4dp" |
| | | android:text="退出" |
| | | android:paddingVertical="10dp" |
| | | app:layout_goneMarginStart="0dp" |
| | | android:gravity="center" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:id="@+id/cl_bottom" |
| | | android:layout_width="match_parent" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="25dp" |
| | | android:textStyle="bold" /> |
| | | android:layout_height="wrap_content"> |
| | | <TextView |
| | | android:id="@+id/tv_exit" |
| | | android:layout_width="124dp" |
| | | android:layout_height="wrap_content" |
| | | android:textSize="14sp" |
| | | android:textColor="@color/white" |
| | | android:background="@drawable/bg_blue_4dp" |
| | | android:text="退出" |
| | | android:paddingVertical="10dp" |
| | | app:layout_goneMarginStart="0dp" |
| | | android:visibility="invisible" |
| | | android:gravity="center" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="25dp" |
| | | android:textStyle="bold" /> |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:layout_width="match_parent" |
| | |
| | | android:id="@+id/rv_list" |
| | | android:layout_marginHorizontal="30dp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintBottom_toTopOf="@id/tv_exit" |
| | | app:layout_constraintBottom_toTopOf="@id/cl_bottom" |
| | | android:layout_marginTop="100dp"/> |
| | | |
| | | </androidx.constraintlayout.motion.widget.MotionLayout> |
| | |
| | | android:id="@+id/tv_msg" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="47dp" |
| | | android:layout_marginStart="37dp" |
| | | android:layout_marginTop="43dp" |
| | | android:layout_marginEnd="14dp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:gravity="center" |
| | | android:text="请选择难度:" |
| | | android:textColor="@color/textColor" |
| | | android:textColor="@color/textColor66" |
| | | android:textStyle="bold" |
| | | android:textSize="16sp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_title" /> |
| | |
| | | app:layout_constraintTop_toTopOf="@id/tv_msg" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_msg" |
| | | app:layout_constraintStart_toEndOf="@id/tv_msg" |
| | | android:layout_marginEnd="40dp" |
| | | android:layout_marginEnd="35dp" |
| | | android:layout_marginStart="8dp" |
| | | app:layout_constraintEnd_toEndOf="parent"> |
| | | <RadioButton |
| | |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_weight="1" |
| | | android:textColor="@color/textColor66" |
| | | android:singleLine="true" |
| | | android:checked="true" |
| | | android:button="@drawable/selector_check_radio" |
| | | android:text="入门级"/> |
| | |
| | | android:layout_height="wrap_content" |
| | | android:layout_weight="1" |
| | | android:button="@drawable/selector_check_radio" |
| | | android:textColor="@color/textColor66" |
| | | android:text="中级"/> |
| | | <RadioButton |
| | | android:id="@+id/rb_2" |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:button="@drawable/selector_check_radio" |
| | | android:textColor="@color/textColor66" |
| | | android:layout_weight="1" |
| | | android:text="高级"/> |
| | | </RadioGroup> |
| | |
| | | android:textSize="16sp" |
| | | android:textStyle="bold" |
| | | android:layout_marginStart="37dp" |
| | | android:textColor="@color/textColor" |
| | | android:textColor="@color/textColor66" |
| | | android:layout_marginTop="18dp"/> |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:layout_width="match_parent" |
| | |
| | | android:layout_marginEnd="14dp" |
| | | android:gravity="center" |
| | | android:text="是否确定取消订单?" |
| | | android:textColor="@color/textColor" |
| | | android:textColor="@color/textColor66" |
| | | android:textStyle="bold" |
| | | android:textSize="16sp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_title" /> |
| | |
| | | android:background="@color/page_bg" |
| | | android:id="@+id/tv_1" |
| | | android:gravity="center" |
| | | android:singleLine="true" |
| | | android:ellipsize="end" |
| | | android:textColor="@color/white" |
| | | android:textSize="15sp" |
| | | app:layout_constraintTop_toTopOf="parent"/> |
| | |
| | | android:background="@color/page_bg" |
| | | android:id="@+id/tv_2" |
| | | android:gravity="center" |
| | | android:singleLine="true" |
| | | android:ellipsize="end" |
| | | android:textColor="@color/white" |
| | | android:textSize="15sp" |
| | | app:layout_constraintTop_toTopOf="parent"/> |
| | |
| | | android:background="@color/page_bg" |
| | | android:id="@+id/tv_3" |
| | | android:gravity="center" |
| | | android:singleLine="true" |
| | | android:ellipsize="end" |
| | | android:textColor="@color/white" |
| | | android:textSize="15sp" |
| | | app:layout_constraintTop_toTopOf="parent"/> |
| | |
| | | android:background="@color/page_bg" |
| | | android:id="@+id/tv_4" |
| | | android:gravity="center" |
| | | android:singleLine="true" |
| | | android:ellipsize="end" |
| | | android:textColor="@color/white" |
| | | android:textSize="15sp" |
| | | app:layout_constraintTop_toTopOf="parent"/> |
| | |
| | | android:layout_width="0dp" |
| | | android:layout_height="88dp" |
| | | android:id="@+id/cl_listen" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | app:layout_constraintStart_toEndOf="@id/guide1" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | app:layout_constraintVertical_bias="0.45" |
| | | android:layout_marginStart="33dp" |
| | | android:layout_marginEnd="55dp" |
| | | android:layout_marginBottom="38dp" |
| | | app:layout_constraintEnd_toStartOf="@id/guide2"> |
| | | <RelativeLayout |
| | | android:layout_width="99dp" |
| | |
| | | android:layout_height="match_parent"/> |
| | | </LinearLayout> |
| | | <ImageView |
| | | android:id="@+id/iv_2" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@mipmap/arrow_up" |
| | | app:layout_constraintBottom_toTopOf="@id/cl_listen" |
| | | app:layout_constraintStart_toStartOf="@id/cl_listen" |
| | | android:layout_marginBottom="8dp" |
| | | android:layout_marginStart="40dp"/> |
| | | android:src="@mipmap/home_stu" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | app:layout_constraintEnd_toStartOf="@id/guide2"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:textStyle="bold" |
| | | android:textSize="16sp" |
| | | app:layout_constraintHorizontal_chainStyle="spread_inside" |
| | | android:layout_marginStart="36dp" |
| | | android:textColor="@color/textColor" |
| | | app:layout_constraintEnd_toStartOf="@id/tv_score_record" |
| | | android:layout_marginBottom="44dp" |
| | |
| | | android:text="分享好友" |
| | | android:textStyle="bold" |
| | | android:textSize="16sp" |
| | | android:layout_marginEnd="36dp" |
| | | android:textColor="@color/textColor" |
| | | android:drawablePadding="11dp" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_address" |
| | |
| | | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| | | <com.facebook.drawee.view.SimpleDraweeView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="243dp" |
| | | android:layout_height="0dp" |
| | | android:id="@+id/iv_goods" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginHorizontal="22dp" |
| | | app:roundedCornerRadius="8dp" |
| | | app:layout_constraintDimensionRatio="210:273" |
| | | app:roundedCornerRadius="6dp" |
| | | android:elevation="2dp" |
| | | app:placeholderImage="@color/page_bg" |
| | | app:actualImageScaleType="centerCrop"/> |
| | |
| | | android:layout_marginTop="9dp" |
| | | android:textSize="16sp" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/textColor"/> |
| | | android:textColor="@color/textColor66"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | |
| | | app:layout_constraintEnd_toEndOf="@id/tv_name" |
| | | android:textColor="@color/color_text_price" |
| | | android:textStyle="bold"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_origin_price" |
| | | android:textSize="14sp" |
| | | app:layout_constraintEnd_toEndOf="@id/tv_name" |
| | | android:textColor="@color/textColor99" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_price" |
| | | app:layout_constraintEnd_toStartOf="@id/tv_price" |
| | | android:layout_marginEnd="8dp" |
| | | android:textStyle="bold"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | |
| | | include ':rxnetty' |
| | | include ':umeng_sdk' |
| | | rootProject.name='DophinEnglish' |
| | | include ':app', ':xldutils-kotlin', ':umeng_sdk',':zxinglibrary' |