package com.sinata.xqmuse.network
|
|
import cn.sinata.xldutils.data.ResultData
|
import com.sinata.xqmuse.network.entity.*
|
import com.sinata.xqmuse.utils.Const
|
import com.sinata.xqmuse.utils.pay.PayInfo
|
import io.reactivex.Flowable
|
import retrofit2.http.*
|
|
interface ApiService {
|
@GET(Apis.H5_URL)
|
fun getH5(@Query("key") type: Int,@Query("apipost_id") apipost_id: String = "2478a330b0e0e3"): Flowable<ResultData<H5Bean>>
|
|
@FormUrlEncoded
|
@POST(Apis.queryPhysical)
|
fun queryPhysical(@Field("stuID") id: String): Flowable<ResultData<Report>>
|
|
@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>>
|
|
@FormUrlEncoded
|
@POST(Apis.clockIn)
|
fun clockIn(@Field("courseId") id: String): Flowable<ResultData<FinishBean>>
|
|
@FormUrlEncoded
|
@POST(Apis.completeInfo)
|
fun completeInfo(@Field("courseId") id: String): Flowable<ResultData<FinishBean>>
|
|
@POST(Apis.queryCourseList)
|
fun queryCourseList(
|
@Query("pageCurr") page: Int,
|
@Query("cateId") typeId: String?,
|
@Query("courseTitle") search: String?,
|
@Query("pageSize") pageSize: Int = 10
|
): Flowable<ResultData<CourseListBean>>
|
|
@POST(Apis.getCoursePageList)
|
fun getCoursePageList(): Flowable<ResultData<TeacherBean>>
|
|
@POST(Apis.getPayCourseInfoById)
|
fun getPayCourseInfoById(
|
@Query("id") id: String,
|
@Query("apipost_id") apipost_id: String = "2d2eb9d23993bd"
|
): Flowable<ResultData<CourseDetail>>
|
|
@POST(Apis.collectCourse)
|
fun collectCourse(
|
@Query("id") id: String,
|
@Query("apipost_id") apipost_id: String = "365e099b799885"
|
): Flowable<ResultData<Any>>
|
|
@FormUrlEncoded
|
@POST(Apis.success)
|
fun success(
|
@Field("orderId") id: String
|
): Flowable<ResultData<Coupon>>
|
|
@FormUrlEncoded
|
@POST(Apis.myFind)
|
fun myFind(
|
@Field("pageNum") pageNum: Int,
|
@Field("pageSize") pageSize: Int = Const.PAGE_SIZE
|
): Flowable<ResultData<ArrayList<Dynamic>>>
|
|
@FormUrlEncoded
|
@POST(Apis.withdrawal)
|
fun withdrawal(
|
@Field("money") money: Double
|
): Flowable<ResultData<Any>>
|
|
@POST(Apis.getCommissionRule)
|
fun shareInfo(
|
): Flowable<ResultData<ShareInfo>>
|
|
@POST
|
fun lookHistory(
|
@Url url: String,
|
@Query("pageCurr") pageCurr: Int,
|
@Query("pageSize") pageSize: Int,
|
@Query("state") state: Int,
|
@Query("apipost_id") apipost_id: String
|
): Flowable<ResultData<List<CourseBean>>>
|
|
@POST(Apis.getVipPrice)
|
fun getVipPrice(
|
@Query("apipost_id") apipost_id: String = "2fcbf1db399709"
|
): Flowable<ResultData<VipPriceBean>>
|
|
@POST(Apis.getVipContent)
|
fun getVipContent(
|
@Query("type") type: Int,
|
@Query("apipost_id") apipost_id: String = "2fcbf1db399709"
|
): Flowable<ResultData<String>>
|
|
@POST(Apis.getQrCode)
|
fun getQrCode(
|
@Query("apipost_id") apipost_id: String = "2fcbf1daf99704"
|
): Flowable<ResultData<String>>
|
|
@GET(Apis.commonQuestion)
|
fun commonQuestion(
|
@Query("pageCurr") pageNum: Int,
|
@Query("pageSize") size: Int,
|
@Query("apipost_id") apipost_id: String = "36618045f991c4"
|
): Flowable<ResultData<QABean>>
|
|
@POST(Apis.healingLevel)
|
fun healingLevel(
|
@Query("apipost_id") apipost_id: String = "34d924b4b991f0"
|
): Flowable<ResultData<LevelBean>>
|
|
@POST(Apis.queryNotice)
|
fun queryNotice(
|
@Query("apipost_id") apipost_id: String = "37771d0cf0e312"
|
): Flowable<ResultData<Boolean>>
|
|
@POST(Apis.balanceList)
|
fun balanceList(
|
@Query("pageCurr") pageNum: Int,
|
@Query("state") state: Int,
|
@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(
|
@Query("id") id: String,
|
@Query("apipost_id") apipost_id: String = "361bdf11b992cf"
|
): Flowable<ResultData<BalanceDetail>>
|
|
@POST(Apis.bankList)
|
fun bankList(
|
@Query("apipost_id") apipost_id: String = "361bdf11f992d2"
|
): Flowable<ResultData<List<BankInfo>>>
|
|
@POST(Apis.addBank)
|
fun addBank(
|
@Body body:String
|
): Flowable<ResultData<Any>>
|
|
@POST(Apis.deleteBank)
|
fun deleteBank(
|
@Query("id") id: String
|
): Flowable<ResultData<Any>>
|
|
@POST(Apis.withdraw)
|
fun withdraw(
|
@Query("bankId") id: String,
|
@Query("money") money: Double
|
): Flowable<ResultData<Any>>
|
|
@POST(Apis.noticeDetail)
|
fun noticeDetail(
|
@Query("id") id: String,
|
@Query("apipost_id") apipost_id: String = "361bdf123992f8"
|
): Flowable<ResultData<MsgDetail>>
|
|
@POST(Apis.changePhone)
|
fun changePhone(
|
@Query("code") code: String,
|
@Query("phone") phone: String
|
): Flowable<ResultData<Any>>
|
|
@POST(Apis.deleteUser)
|
fun deleteUser(
|
@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(
|
@Field("pageNum") pageNum: Int,
|
@Field("month") month: Int?,
|
@Field("year") year: Int?,
|
@Field("pageSize") pageSize : Int = Const.PAGE_SIZE
|
): Flowable<ResultData<List<Detail>>>
|
|
@POST
|
fun queryString(
|
@Url url: String,
|
@QueryMap map: HashMap<String, Any>
|
): Flowable<ResultData<String>>
|
|
@GET(Apis.getCode)
|
fun getCode(
|
@Query("cellPhone") phone: String,
|
@Query("type") type: Int
|
): Flowable<ResultData<Any>>
|
|
@POST(Apis.verifyPhone)
|
fun verifyPhone(
|
@Body body: String
|
): Flowable<ResultData<VerifyBean>>
|
|
@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>>
|
|
@GET(Apis.getTagList)
|
fun getTagList(): Flowable<ResultData<ArrayList<TagBean>>>
|
|
@POST(Apis.forgetPassword)
|
fun forgetPassword(
|
@Body body: String
|
): Flowable<ResultData<Any>>
|
|
@POST
|
fun register(
|
@Url url: String,
|
@Body body: String
|
): Flowable<ResultData<LoginBean>>
|
|
@FormUrlEncoded
|
@POST(Apis.bindWx)
|
fun bindPhone(
|
@Field("phone") phone: String, @Field("code") code: String, @Field("invitationCode") invitationCode: String?): Flowable<ResultData<String>>
|
|
@Headers("Content-Type: application/json;charset=UTF-8")
|
@POST(Apis.userLogin)
|
fun userLogin(
|
@Body body:String
|
): Flowable<ResultData<LoginBean>>
|
|
@FormUrlEncoded
|
@POST(Apis.updatePassword)
|
fun updatePassword(
|
@Field("password") password: String,
|
@Field("newPassword") newPassword: String,
|
@Field("code") code: String
|
): Flowable<ResultData<Any>>
|
|
@POST(Apis.captchaLogin)
|
fun captchaLogin(
|
@Body body: String
|
): Flowable<ResultData<LoginBean>>
|
|
@POST(Apis.wxLogin)
|
fun wxLogin(
|
@Body body: String
|
): Flowable<ResultData<WxLoginBean>>
|
|
@GET(Apis.getBanner)
|
fun queryBanner(): Flowable<ResultData<ArrayList<Banner>>>
|
|
@GET(Apis.getCourseCategoryList)
|
fun getCourseCategoryList(@Query("apipost_id")apipost_id:String = "2d2eb9d1f993bb"): Flowable<ResultData<ArrayList<CourseType>>>
|
|
@POST(Apis.getCategoryListByType)
|
fun getCategoryListByType(
|
@Query("type") type: Int,
|
@Query("apipost_id") apipost_id: String = "25c3e3d070e154"
|
): Flowable<ResultData<ArrayList<Menu>>>
|
|
@GET(Apis.getTodayMeditation)
|
fun getTodayMeditation(): Flowable<ResultData<HomeItem>>
|
|
@GET(Apis.getPersonalityPlan)
|
fun getPersonalityPlan(
|
@Query("apipost_id") apipost_id: String = "25c3e3d0b0e15c"
|
): Flowable<ResultData<List<CommonItemBean>>>
|
|
@GET(Apis.getMeditationAndCateList)
|
fun getMeditationAndCateList(
|
@Query("apipost_id") apipost_id: String = "25c3e3d0b0e157"
|
): Flowable<ResultData<List<HomeListBean>>>
|
|
@GET(Apis.getHomeBackgroun)
|
fun getHomeBackgroun(
|
@Query("apipost_id") apipost_id: String = "25c3e3d0b0e155"
|
): Flowable<ResultData<List<BGMBean>>>
|
|
@POST(Apis.getMeditationPageByCateId)
|
fun getMeditationPageByCateId(
|
@Query("cateId") cateId: String,
|
@Query("pageCurr") pageCurr: Int,
|
@Query("pageSize") pageSize: Int,
|
@Query("apipost_id") apipost_id: String = "25c3e3d0b0e15a"
|
): Flowable<ResultData<SearchResult>>
|
|
@GET(Apis.getMeditationDetails)
|
fun getMeditationDetails(
|
@Query("id") id: String
|
): Flowable<ResultData<VoiceDetail>>
|
|
@POST(Apis.favorite)
|
fun favorite(
|
@Query("id") id: String
|
): Flowable<ResultData<Any>>
|
|
@GET(Apis.getMeditationQuestionPage)
|
fun getMeditationQuestionPage(
|
@Query("id") id: String,
|
@Query("pageCurr") pageCurr: Int,
|
@Query("pageSize") pageSize: Int
|
): Flowable<ResultData<VoiceCommentBean>>
|
|
@POST(Apis.search)
|
fun search(
|
@Query("condition") condition: String,
|
@Query("pageCurr") pageCurr: Int,
|
@Query("pageSize") pageSize: Int
|
): Flowable<ResultData<SearchResult>>
|
|
@GET(Apis.getHotWordList)
|
fun getHotWordList(
|
): Flowable<ResultData<List<String>>>
|
|
@FormUrlEncoded
|
@POST(Apis.queryCouponPackage)
|
fun queryCouponPackage(
|
@Field("type") couponType: Int,
|
@Field("pageNum") pageNum: Int,
|
@Field("pageSize") pageSize: Int = Const.PAGE_SIZE
|
): Flowable<ResultData<List<Coupon>>>
|
|
@POST(Apis.getUserByPhone)
|
fun getUserByPhone(
|
@Query("phone") phone: String
|
): Flowable<ResultData<UserInfo>>
|
|
@POST(Apis.confirmOrder)
|
fun confirmOrder(
|
@Query("courseId") courseId: String
|
): Flowable<ResultData<ConfirmOrder>>
|
|
@POST(Apis.payOrder)
|
fun payOrder(
|
@Query("id") orderId: String,
|
@Query("type") type: Int = 1
|
): Flowable<ResultData<ConfirmOrder>>
|
|
@GET(Apis.cancel)
|
fun cancel(
|
@Query("uid") orderId: String
|
): Flowable<ResultData<Any>>
|
|
@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.queryPayment)
|
fun queryPayment(
|
@Query("orderId") orderId: String
|
): Flowable<ResultData<String>>
|
|
@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(
|
@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?,
|
@Query("orderId") orderId: String?
|
): Flowable<ResultData<ThirdPayInfo>>
|
|
@POST(Apis.updateUserAvatar)
|
fun updateUserAvatar(
|
@Query("avatar") avatar: String
|
): Flowable<ResultData<Any>>
|
|
@POST(Apis.wallet)
|
fun wallet(
|
): Flowable<ResultData<WalletBean>>
|
|
|
@FormUrlEncoded
|
@POST(Apis.feedBack)
|
fun feedBack(
|
@Field("content") content : String,
|
@Field("img") img: String?
|
): Flowable<ResultData<Any>>
|
|
@FormUrlEncoded
|
@POST(Apis.useGuide)
|
fun useGuide(
|
@Field("title") search: String?
|
): Flowable<ResultData<List<Guide>>>
|
|
@FormUrlEncoded
|
@POST(Apis.findCommentList)
|
fun findCommentList(
|
@Field("id") id: String,
|
@Field("pageNum") page: Int,
|
@Field("pageSize") pageSize: Int = Const.PAGE_SIZE
|
): Flowable<ResultData<List<Comment>>>
|
|
@FormUrlEncoded
|
@POST(Apis.findCommentListOne)
|
fun findCommentListOne(
|
@Field("id") id: String,
|
@Field("pageNum") page: Int,
|
@Field("pageSize") pageSize: Int = Const.PAGE_SIZE
|
): Flowable<ResultData<List<ReplyComment>>>
|
|
@POST(Apis.report)
|
fun report(
|
@Query("id") id: String,
|
@Query("reason") content: String
|
): Flowable<ResultData<Any>>
|
|
@POST(Apis.addQuestion)
|
fun addQuestion(
|
@Query("meditationId") id: String,
|
@Query("content") content: String
|
): Flowable<ResultData<Any>>
|
|
@FormUrlEncoded
|
@POST(Apis.addComment)
|
fun addComment(
|
@Field("findId") findId: String,
|
@Field("content") content: String,
|
@Field("pid") pid: String,
|
@Field("replyCommentId") replyCommentId: String?,
|
@Field("replyUserId") replyUserId: String?
|
): Flowable<ResultData<Any>>
|
|
@POST(Apis.doLike)
|
fun doLike(
|
@Query("id") findId: String,
|
@Query("apipost_id") apipost_id: String = "2aa4e14b30e165"
|
): Flowable<ResultData<Any>>
|
|
@FormUrlEncoded
|
@POST(Apis.addFind)
|
fun addFind(
|
@Field("title") title: String,
|
@Field("content") content: String,
|
@Field("img") img: String?,
|
@Field("coverImage") coverImage: String?,
|
@Field("video") video: String?
|
): Flowable<ResultData<Any>>
|
|
@FormUrlEncoded
|
@POST(Apis.findDetail)
|
fun findDetail(
|
@Field("id") id: String
|
): Flowable<ResultData<Dynamic>>
|
|
@POST(Apis.messageList)
|
fun messageList(
|
@Query("pageCurr") pageCurr: Int,
|
@Query("pageSize") pageSize: Int,
|
@Query("apipost_id") apipost_id: String = "361bdf123992f9"): Flowable<ResultData<MsgListBean>>
|
|
@FormUrlEncoded
|
@POST(Apis.deleteFind)
|
fun deleteFind(
|
@Field("findId") findId: String): Flowable<ResultData<Any>>
|
|
@GET(Apis.getMeditationPage)
|
fun getMeditationPage(
|
@Query("name") name: String?,
|
@Query("lat") lat: Double?,
|
@Query("lon") lon: Double?,
|
@Query("pageCurr") pageCurr: Int,
|
@Query("pageSize") pageSize: Int,
|
@Query("apipost_id") apipost_id: String = "2d2eb5e7f991ab"): Flowable<ResultData<PlaceListBean>>
|
|
@GET(Apis.getMeditationInfo)
|
fun getMeditationInfo(
|
@Query("id") id: String,
|
@Query("apipost_id") apipost_id: String = "2d2eb5e7b991aa"): Flowable<ResultData<Place>>
|
|
@FormUrlEncoded
|
@POST
|
fun noticeDetail(
|
@Url url: String,
|
@Field("noId") noId: String,
|
@Field("quesId") quesId: String
|
): Flowable<ResultData<Notice>>
|
|
@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>>
|
}
|