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.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>>
|
|
@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,
|
@Query("apipost_id") apipost_id: String = "2d6f7f04f99813"
|
): Flowable<ResultData<CourseListBean>>
|
|
@POST(Apis.getCoursePageList)
|
fun getCoursePageList(
|
@Query("apipost_id") apipost_id: String = "2d2eb9d23993c2"
|
): 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)
|
fun collectCourse(
|
@Query("id") id: String,
|
@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)
|
fun pay(
|
@Field("id") id: String,
|
@Field("payType") payType : Int,
|
@Field("buyType") buyType: Int
|
): Flowable<ResultData<PayInfo>>
|
|
@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>>
|
|
@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>>
|
|
@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<CourseListBean>>
|
|
@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>>
|
|
@POST(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>>
|
|
@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>>>
|
|
@GET
|
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>>
|
|
@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>>
|
|
@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?
|
): Flowable<ResultData<WxLoginBean>>
|
|
@GET(Apis.getBanner)
|
fun queryBanner(@Query("apipost_id")apipost_id:String = "2d2eb9d1f993ba"): 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(
|
@Query("type") type: Int,
|
@Query("apipost_id") apipost_id: String = "25c3e3d070e154"
|
): Flowable<ResultData<ArrayList<Menu>>>
|
|
@GET(Apis.getTodayMeditation)
|
fun getTodayMeditation(
|
@Query("apipost_id") apipost_id: String = "25c3e3d0b0e15d"
|
): 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,
|
@Query("apipost_id") apipost_id: String = "25c3e3d0b0e158"
|
): Flowable<ResultData<VoiceDetail>>
|
|
@POST(Apis.favorite)
|
fun favorite(
|
@Query("id") id: String,
|
@Query("apipost_id") apipost_id: String = "2aa4e14ab0e159"
|
): 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"
|
): Flowable<ResultData<VoiceCommentBean>>
|
|
@GET(Apis.search)
|
fun search(
|
@Query("condition") condition: String,
|
@Query("pageCurr") pageCurr: Int,
|
@Query("pageSize") pageSize: Int,
|
@Query("apipost_id") apipost_id: String = "25c3e3d0b0e160"
|
): Flowable<ResultData<SearchResult>>
|
|
@GET(Apis.getHotWordList)
|
fun getHotWordList(
|
@Query("apipost_id") apipost_id: String = "25c3e3d0b0e156"
|
): 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,
|
@Query("apipost_id") apipost_id: String = "2e763463799135"
|
): Flowable<ResultData<UserInfo>>
|
|
@POST(Apis.confirmOrder)
|
fun confirmOrder(
|
@Query("courseId") courseId: String,
|
@Query("apipost_id") apipost_id: String = "2d2eb9d1f993b9"
|
): Flowable<ResultData<ConfirmOrder>>
|
|
@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"
|
): Flowable<ResultData<Any>>
|
|
@FormUrlEncoded
|
@POST(Apis.wallet)
|
fun wallet(
|
@Field("pageNum") pageNum: Int,
|
@Field("month") month: Int?,
|
@Field("year") year: Int?,
|
@Field("pageSize") pageSize : Int = Const.PAGE_SIZE
|
): Flowable<ResultData<WalletBean>>
|
|
|
@FormUrlEncoded
|
@POST(Apis.feedBack)
|
fun feedBack(
|
@Field("content") content : String,
|
@Field("img") img: String?
|
): 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)
|
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,
|
@Query("apipost_id") apipost_id: String = "25c3e3d0b0e15e"
|
): 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>>
|
|
|
@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>>
|
}
|