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): 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>>
|
|
@FormUrlEncoded
|
@POST(Apis.queryCourseList)
|
fun queryCourseList(
|
@Field("pageNum") page: Int,
|
@Field("difficulty1") difficulty1: String?,
|
@Field("positionName1") positionName1: String?,
|
@Field("time") time: String?,
|
@Field("typeIds1") typeIds1: String?,
|
@Field("courseName") search: String?,
|
@Field("pageSize") pageSize: Int = 10
|
): Flowable<ResultData<List<Course>>>
|
|
@FormUrlEncoded
|
@POST(Apis.myCourse)
|
fun myCourse(
|
@Field("pageNum") page: Int,
|
@Field("difficulty1") difficulty1: String?,
|
@Field("positionName1") positionName1: String?,
|
@Field("time") time: String?,
|
@Field("typeIds1") typeIds1: String?,
|
@Field("courseName") search: String?,
|
@Field("pageSize") pageSize: Int = 10
|
): Flowable<ResultData<List<Course>>>
|
|
|
@FormUrlEncoded
|
@POST(Apis.queryCourseInfo)
|
fun queryCourseInfo(
|
@Field("courseId") id: String
|
): Flowable<ResultData<CourseDetail>>
|
|
@FormUrlEncoded
|
@POST(Apis.collectCourse)
|
fun collectCourse(
|
@Field("courseId") id: String
|
): Flowable<ResultData<Any>>
|
|
@FormUrlEncoded
|
@POST(Apis.collectedCourse)
|
fun collectedCourse(
|
@Field("pageNum") page: Int,
|
@Field("courseName") search: String?,
|
@Field("positionName1") position: String?,
|
@Field("pageSize") pageSize: Int = 10
|
): Flowable<ResultData<List<Course>>>
|
|
@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.peopleList)
|
fun peopleList(
|
): Flowable<ResultData<ShareInfo>>
|
|
@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>>
|
|
@POST(Apis.getBanner)
|
fun queryBanner(): Flowable<ResultData<ArrayList<Banner>>>
|
|
@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>>>
|
|
@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.cancellation)
|
fun cancellation(): Flowable<ResultData<Any>>
|
|
@FormUrlEncoded
|
@POST(Apis.updateInfo)
|
fun updateInfo(
|
@Field("headImg") headImg: String?,
|
@Field("birthday") birthday: String?,
|
@Field("gender") gender: Int?,
|
@Field("height") height: Int?,
|
@Field("weight") weight: Double?,
|
@Field("waistline") waistline: Int?,
|
@Field("name") name: String?
|
): 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>>>
|
|
@FormUrlEncoded
|
@POST(Apis.report)
|
fun report(
|
@Field("id") id: String,
|
@Field("content") content: String,
|
@Field("type") type: Int
|
): 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>>
|
|
@FormUrlEncoded
|
@POST(Apis.doLike)
|
fun doLike(
|
@Field("id") findId: String,
|
@Field("type") type: Int,
|
@Field("findCommentId") findCommentId: String?
|
): 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>>
|
|
@FormUrlEncoded
|
@POST(Apis.messageList)
|
fun messageList(
|
@Field("pageNum") page: Int,
|
@Field("pageSize") pageSize: Int = Const.PAGE_SIZE): Flowable<ResultData<List<Msg>>>
|
|
@FormUrlEncoded
|
@POST(Apis.deleteFind)
|
fun deleteFind(
|
@Field("findId") findId: String): Flowable<ResultData<Any>>
|
|
@POST(Apis.messageCount)
|
fun messageCount(): Flowable<ResultData<Int>>
|
|
@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(): Flowable<ResultData<UserInfo>>
|
|
@POST(Apis.getNotice)
|
fun getNotice(): Flowable<ResultData<Notice>>
|
}
|