From d1a9e3312387b6c47e6186af506787a8a66369d1 Mon Sep 17 00:00:00 2001 From: lmw <125975490@qq.com> Date: 星期六, 09 十一月 2024 18:40:36 +0800 Subject: [PATCH] fix --- app/src/main/java/com/sinata/xqmuse/network/ApiService.kt | 320 +++++++++++++++++++++++----------------------------- 1 files changed, 141 insertions(+), 179 deletions(-) diff --git a/app/src/main/java/com/sinata/xqmuse/network/ApiService.kt b/app/src/main/java/com/sinata/xqmuse/network/ApiService.kt index a99cd55..a14f8c5 100644 --- a/app/src/main/java/com/sinata/xqmuse/network/ApiService.kt +++ b/app/src/main/java/com/sinata/xqmuse/network/ApiService.kt @@ -16,10 +16,6 @@ fun queryPhysical(@Field("stuID") id: String): Flowable<ResultData<Report>> @FormUrlEncoded - @POST(Apis.startTrain) - fun startTrain(@Field("courseId") id: String): Flowable<ResultData<TrainInfo>> - - @FormUrlEncoded @POST(Apis.exit) fun exit(@Field("courseId") id: String,@Field("courseVideoId") courseVideoId: String,@Field("beforeTime") beforeTime: Long, @Field("realTime") realTime: Int): Flowable<ResultData<Any>> @@ -37,27 +33,16 @@ @Query("pageCurr") page: Int, @Query("cateId") typeId: String?, @Query("courseTitle") search: String?, - @Query("pageSize") pageSize: Int = 10, - @Query("apipost_id") apipost_id: String = "2d6f7f04f99813" + @Query("pageSize") pageSize: Int = 10 ): Flowable<ResultData<CourseListBean>> @POST(Apis.getCoursePageList) - fun getCoursePageList( - @Query("apipost_id") apipost_id: String = "2d2eb9d23993c2" - ): Flowable<ResultData<TeacherBean>> + fun getCoursePageList(): Flowable<ResultData<TeacherBean>> @POST(Apis.getPayCourseInfoById) fun getPayCourseInfoById( @Query("id") id: String, @Query("apipost_id") apipost_id: String = "2d2eb9d23993bd" - ): Flowable<ResultData<CourseDetail>> - - - - @FormUrlEncoded - @POST(Apis.queryCourseInfo) - fun queryCourseInfo( - @Field("courseId") id: String ): Flowable<ResultData<CourseDetail>> @POST(Apis.collectCourse) @@ -66,58 +51,11 @@ @Query("apipost_id") apipost_id: String = "365e099b799885" ): Flowable<ResultData<Any>> - - - @FormUrlEncoded - @POST(Apis.buyCourse) - fun buyCourseInfo( - @Field("courseId") id: String - ): Flowable<ResultData<BuyInfo>> - - @FormUrlEncoded - @POST(Apis.order) - fun order( - @Field("id") id: String?, - @Field("buyType") buyType: Int, - @Field("payType") payType : Int, - @Field("couponId") couponId : String?, - @Field("orderMoney") orderMoney : Double? - ): Flowable<ResultData<Order>> - @FormUrlEncoded @POST(Apis.success) fun success( @Field("orderId") id: String ): Flowable<ResultData<Coupon>> - - @POST(Apis.getProvince) - fun getProvince( - ): Flowable<ResultData<List<City>>> - - @FormUrlEncoded - @POST(Apis.getCity) - fun getCity( - @Field("id") id: String - ): Flowable<ResultData<List<City>>> - - @FormUrlEncoded - @POST(Apis.setAddress) - fun setAddress( - @Field("address") address: String, - @Field("city") city: String, - @Field("cityCode") cityCode: String, - @Field("province") province: String, - @Field("provinceCode") provinceCode: String, - @Field("recipient") recipient: String, - @Field("recipientPhone") recipientPhone: String - ): Flowable<ResultData<Any>> - - @POST(Apis.getAddress) - fun getAddress( - ): Flowable<ResultData<ReceiverBean>> - - @POST(Apis.riskInfo) - fun riskInfo(): Flowable<ResultData<RiskInfo>> @FormUrlEncoded @POST(Apis.pay) @@ -140,32 +78,6 @@ @Field("money") money: Double ): Flowable<ResultData<Any>> - @FormUrlEncoded - @POST(Apis.updateBankCard) - fun updateBankCard( - @Field("accountName") accountName: String, - @Field("bankCard") bankCard: String, - @Field("bankCardImg") bankCardImg: String, - @Field("bankName") bankName: String, - @Field("bankPhone") bankPhone: String - ): Flowable<ResultData<Any>> - - @FormUrlEncoded - @POST(Apis.binding) - fun binding( - @Field("code") code: String - ): Flowable<ResultData<Any>> - - @FormUrlEncoded - @POST(Apis.getBindingUserName) - fun getBindingUserName( - @Field("code") code: String - ): Flowable<ResultData<String>> - - @POST(Apis.getBankInfo) - fun getBankInfo( - ): Flowable<ResultData<BankInfo>> - @POST(Apis.getCommissionRule) fun shareInfo( ): Flowable<ResultData<ShareInfo>> @@ -177,7 +89,7 @@ @Query("pageSize") pageSize: Int, @Query("state") state: Int, @Query("apipost_id") apipost_id: String - ): Flowable<ResultData<CourseListBean>> + ): Flowable<ResultData<List<CourseBean>>> @POST(Apis.getVipPrice) fun getVipPrice( @@ -195,7 +107,7 @@ @Query("apipost_id") apipost_id: String = "2fcbf1daf99704" ): Flowable<ResultData<String>> - @POST(Apis.commonQuestion) + @GET(Apis.commonQuestion) fun commonQuestion( @Query("pageCurr") pageNum: Int, @Query("pageSize") size: Int, @@ -219,6 +131,37 @@ @Query("pageSize") size: Int, @Query("apipost_id") apipost_id: String = "361bdf11b992d0" ): Flowable<ResultData<WalletDetailBean>> + + @POST(Apis.energyDetail) + fun energyDetail( + @Query("pageCurr") pageNum: Int, + @Query("state") state: Int, + @Query("pageSize") size: Int + ): Flowable<ResultData<List<PowerDetail>>> + + @POST(Apis.goodsList) + fun goodsList( + @Query("pageCurr") pageNum: Int, + @Query("pageSize") size: Int + ): Flowable<ResultData<List<Gift>>> + + @POST(Apis.exchangeRecordList) + fun exchangeRecordList( + @Query("pageCurr") pageNum: Int, + @Query("pageSize") size: Int + ): Flowable<ResultData<List<Gift>>> + + @POST(Apis.restart) + fun restart(): Flowable<ResultData<Any>> + + @POST(Apis.exchange) + fun exchange( + @Query("prizeId") prizeId: String + ): Flowable<ResultData<String>> + + @POST(Apis.getTotalEnergyValue) + fun getTotalEnergyValue( + ): Flowable<ResultData<Int>> @POST(Apis.balanceDetail) fun balanceDetail( @@ -264,6 +207,17 @@ @Query("apipost_id") apipost_id: String = "361bdf11f992e7" ): Flowable<ResultData<Any>> + @GET(Apis.studyPage) + fun studyPage(): Flowable<ResultData<StudyBean>> + + @GET(Apis.detailVersion) + fun detailVersion(): Flowable<ResultData<Version>> + + @POST(Apis.bindVx) + fun bindVx( + @Query("openId") openId: String, + @Query("wxName") wxName: String): Flowable<ResultData<Any>> + @FormUrlEncoded @POST(Apis.withdrawalRecord) fun withdrawalRecord( @@ -273,7 +227,7 @@ @Field("pageSize") pageSize : Int = Const.PAGE_SIZE ): Flowable<ResultData<List<Detail>>> - @GET + @POST fun queryString( @Url url: String, @QueryMap map: HashMap<String, Any> @@ -292,6 +246,15 @@ @POST(Apis.saveUserAnswers) fun saveUserAnswers( + @Body body: String + ): Flowable<ResultData<Any>> + + @POST(Apis.getPlan) + fun getPlan(): Flowable<ResultData<String>> + + @POST(Apis.verifyCellPhone) + fun verifyCellPhone( + @Header("Authorization") token: String, @Body body: String ): Flowable<ResultData<Any>> @@ -333,24 +296,16 @@ @Body body: String ): Flowable<ResultData<LoginBean>> - @FormUrlEncoded @POST(Apis.wxLogin) fun wxLogin( - @Field("openId") openid: String?, - @Field("phone") phone: String?, - @Field("nickname") nickname: String?, - @Field("headimgurl") headimgurl: String?, - @Field("sex") sex: Int? + @Body body: String ): Flowable<ResultData<WxLoginBean>> @GET(Apis.getBanner) - fun queryBanner(@Query("apipost_id")apipost_id:String = "2d2eb9d1f993ba"): Flowable<ResultData<ArrayList<Banner>>> + fun queryBanner(): Flowable<ResultData<ArrayList<Banner>>> @GET(Apis.getCourseCategoryList) fun getCourseCategoryList(@Query("apipost_id")apipost_id:String = "2d2eb9d1f993bb"): Flowable<ResultData<ArrayList<CourseType>>> - - @POST(Apis.getList) - fun getList(): Flowable<ResultData<FilterBean>> @POST(Apis.getCategoryListByType) fun getCategoryListByType( @@ -359,9 +314,7 @@ ): Flowable<ResultData<ArrayList<Menu>>> @GET(Apis.getTodayMeditation) - fun getTodayMeditation( - @Query("apipost_id") apipost_id: String = "25c3e3d0b0e15d" - ): Flowable<ResultData<HomeItem>> + fun getTodayMeditation(): Flowable<ResultData<HomeItem>> @GET(Apis.getPersonalityPlan) fun getPersonalityPlan( @@ -388,35 +341,30 @@ @GET(Apis.getMeditationDetails) fun getMeditationDetails( - @Query("id") id: String, - @Query("apipost_id") apipost_id: String = "25c3e3d0b0e158" + @Query("id") id: String ): Flowable<ResultData<VoiceDetail>> @POST(Apis.favorite) fun favorite( - @Query("id") id: String, - @Query("apipost_id") apipost_id: String = "2aa4e14ab0e159" + @Query("id") id: String ): Flowable<ResultData<Any>> @GET(Apis.getMeditationQuestionPage) fun getMeditationQuestionPage( @Query("id") id: String, @Query("pageCurr") pageCurr: Int, - @Query("pageSize") pageSize: Int, - @Query("apipost_id") apipost_id: String = "25c3e3d0b0e15b" + @Query("pageSize") pageSize: Int ): Flowable<ResultData<VoiceCommentBean>> - @GET(Apis.search) + @POST(Apis.search) fun search( @Query("condition") condition: String, @Query("pageCurr") pageCurr: Int, - @Query("pageSize") pageSize: Int, - @Query("apipost_id") apipost_id: String = "25c3e3d0b0e160" + @Query("pageSize") pageSize: Int ): Flowable<ResultData<SearchResult>> @GET(Apis.getHotWordList) fun getHotWordList( - @Query("apipost_id") apipost_id: String = "25c3e3d0b0e156" ): Flowable<ResultData<List<String>>> @FormUrlEncoded @@ -429,40 +377,91 @@ @POST(Apis.getUserByPhone) fun getUserByPhone( - @Query("phone") phone: String, - @Query("apipost_id") apipost_id: String = "2e763463799135" + @Query("phone") phone: String ): Flowable<ResultData<UserInfo>> @POST(Apis.confirmOrder) fun confirmOrder( - @Query("courseId") courseId: String, - @Query("apipost_id") apipost_id: String = "2d2eb9d1f993b9" + @Query("courseId") courseId: String ): Flowable<ResultData<ConfirmOrder>> + + @POST(Apis.confirmOrderVoice) + fun confirmOrderVoice( + @Query("meditationId") meditationId: String + ): Flowable<ResultData<ConfirmOrder>> + + @POST(Apis.saveViewingHistory) + fun saveViewingHistory( + @Query("timeLook") timeLook: Int, + @Query("id") id: String + ): Flowable<ResultData<Any>> + + @POST(Apis.gvieCourse) + fun gvieCourse( + @Query("targetId") courseId: String, + @Query("orderFrom") orderFrom: Int, + @Query("receiverId") receiverId: String?, + @Query("payType") payType: Int = 1 + ): Flowable<ResultData<Any>> + + @POST + fun successOrder( + @Url url: String, + @Query("courseId") courseId: String, + @Query("meditationId") meditationId: String + ): Flowable<ResultData<List<CourseBean>>> + + @POST(Apis.studyPageByChapterId) + fun studyPageByChapterId( + @Query("chapterId") chapterId: String + ): Flowable<ResultData<List<Chapter>>> + + @POST(Apis.saveCourseStudyHistory) + fun saveCourseStudyHistory( + @Query("chapterId") chapterId: String, + @Query("isOver") isOver: Int, + @Query("secondLook") secondLook: Int, + @Query("minuteLook") minuteLook: Int = 0 //用不到分 + ): Flowable<ResultData<Any>> + + @POST(Apis.isFirst) + fun isFirst(): Flowable<ResultData<Boolean>> + + @POST(Apis.getUserTree) + fun getUserTree(): Flowable<ResultData<TreeInfo>> + + @POST(Apis.watering) + fun watering(): Flowable<ResultData<WaterResult>> + + @POST(Apis.sign) + fun sign(): Flowable<ResultData<Any>> @POST(Apis.cancellation) fun cancellation(): Flowable<ResultData<Any>> @POST(Apis.updateInfo) fun updateInfo( - @Query("avatar") headImg: String?, - @Query("birthday") birthday: String?, - @Query("company") company: String?, - @Query("education") education: String?, - @Query("email") email: String?, - @Query("gender") gender: Int?, - @Query("hometown") hometown: String?, - @Query("industry") industry: String?, - @Query("location") location: String?, - @Query("nickname") nickname: String?, - @Query("occupation") occupation: String?, - @Query("signature") signature: String?, - @Query("name") name: String?, - @Query("apipost_id") apipost_id: String = "2fc350e9b99599" + @Body body: String? + ): Flowable<ResultData<Any>> + + @POST(Apis.placeOrder) + fun placeOrder( + @Query("orderFrom") orderFrom: Int, + @Query("payType") payType: Int, + @Query("balanceFlag") balanceFlag: Int, + @Query("amount") amount: Double?, + @Query("receiverId") receiverId: String?, + @Query("targetId") targetId: String?, + @Query("vipType") vipType: Int? + ): Flowable<ResultData<PayInfo>> + + @POST(Apis.updateUserAvatar) + fun updateUserAvatar( + @Query("avatar") avatar: String ): Flowable<ResultData<Any>> @POST(Apis.wallet) fun wallet( - @Query("apipost_id") apipost_id: String = "3518e3f0b99420" ): Flowable<ResultData<WalletBean>> @@ -474,36 +473,10 @@ ): Flowable<ResultData<Any>> @FormUrlEncoded - @POST(Apis.setUnit) - fun setUnit( - @Field("type") type: Int - ): Flowable<ResultData<Any>> - - @FormUrlEncoded - @POST(Apis.updatePhone) - fun updatePhone( - @Field("code") code: String, - @Field("phone") phone: String - ): Flowable<ResultData<Any>> - - @FormUrlEncoded @POST(Apis.useGuide) fun useGuide( @Field("title") search: String? ): Flowable<ResultData<List<Guide>>> - - @POST(Apis.getPhone) - fun getPhone( - ): Flowable<ResultData<String>> - - - @FormUrlEncoded - @POST(Apis.findList) - fun findList( - @Field("pageNum") page: Int, - @Field("userNameOrTitle") search: String?, - @Field("pageSize") pageSize: Int = Const.PAGE_SIZE - ): Flowable<ResultData<List<Dynamic>>> @FormUrlEncoded @POST(Apis.findCommentList) @@ -524,8 +497,13 @@ @POST(Apis.report) fun report( @Query("id") id: String, - @Query("reason") content: String, - @Query("apipost_id") apipost_id: String = "25c3e3d0b0e15e" + @Query("reason") content: String + ): Flowable<ResultData<Any>> + + @POST(Apis.addQuestion) + fun addQuestion( + @Query("meditationId") id: String, + @Query("content") content: String ): Flowable<ResultData<Any>> @FormUrlEncoded @@ -593,25 +571,9 @@ @Field("quesId") quesId: String ): Flowable<ResultData<Notice>> - - @FormUrlEncoded - @POST(Apis.constellation) - fun constellation(@Field("consName") consName: String,@Field("type") type:String): Flowable<ResultData<LuckInfo>> - - @FormUrlEncoded - @POST(Apis.setWeight) - fun setWeight(@Field("type") type: Int,@Field("weight") weight:String): Flowable<ResultData<Any>> - - @FormUrlEncoded - @POST(Apis.changeConstellation) - fun changeConstellation(@Field("consName") consName:String): Flowable<ResultData<Any>> - @POST(Apis.getUserInfo) fun getUserInfo(@Query("apipost_id") apipost_id: String = "300079e039993f"): Flowable<ResultData<MineInfo>> @POST(Apis.getUserDetail) fun getUserDetail(@Query("apipost_id") apipost_id: String = "2fc350e9799588"): Flowable<ResultData<UserInfo>> - - @POST(Apis.getNotice) - fun getNotice(): Flowable<ResultData<Notice>> } \ No newline at end of file -- Gitblit v1.7.1