| | |
| | | import com.sinata.xqmuse.network.entity.* |
| | | import com.sinata.xqmuse.network.entity.req.ReqAnswer |
| | | import com.sinata.xqmuse.network.entity.req.ReqRegister |
| | | import com.sinata.xqmuse.ui.mine.WatchHisActivity |
| | | import com.sinata.xqmuse.utils.Const |
| | | import com.sinata.xqmuse.utils.pay.PayInfo |
| | | import io.reactivex.Flowable |
| | | import retrofit2.http.Field |
| | | |
| | | object HttpManager { |
| | | |
| | |
| | | |
| | | /** |
| | | * 获取h5 |
| | | * @param type 1=用户协议,2=隐私协议 |
| | | * @param type 1=用户协议,2=隐私协议 3=关于心泉 4=新手冥想指南 5=课程/冥想音频购买协议 |
| | | */ |
| | | fun getH5(type: Int): Flowable<ResultData<H5Bean>> { |
| | | return request().getH5(type) |
| | |
| | | */ |
| | | fun queryCourseList( |
| | | page: Int, |
| | | diff: String?, |
| | | positions: String?, |
| | | time: String?, |
| | | types: String?, |
| | | search: String? |
| | | ): Flowable<ResultData<List<Course>>> { |
| | | return request().queryCourseList(page,diff,positions,time, types,search) |
| | | type: String? = null, |
| | | search: String? = null |
| | | ): Flowable<ResultData<CourseListBean>> { |
| | | return request().queryCourseList(page,type,search) |
| | | } |
| | | |
| | | /** |
| | | * 我的课程列表 |
| | | * 导师 |
| | | */ |
| | | fun myCourse( |
| | | page: Int, |
| | | diff: String?, |
| | | positions: String?, |
| | | time: String?, |
| | | types: String?, |
| | | search: String? |
| | | ): Flowable<ResultData<List<Course>>> { |
| | | return request().myCourse(page,diff,positions,time, types,search) |
| | | fun getCoursePageList(): Flowable<ResultData<TeacherBean>> { |
| | | return request().getCoursePageList() |
| | | } |
| | | |
| | | /** |
| | | * 我的收藏课程列表 |
| | | * 课程详情 |
| | | */ |
| | | fun collectedCourse( |
| | | page: Int, |
| | | positionName1: String?, |
| | | search: String? |
| | | ): Flowable<ResultData<List<Course>>> { |
| | | return request().collectedCourse(page,search,positionName1) |
| | | fun getPayCourseInfoById(id: String): Flowable<ResultData<CourseDetail>> { |
| | | return request().getPayCourseInfoById(id) |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 课程详情 |
| | |
| | | /** |
| | | * 推广信息 |
| | | */ |
| | | fun peopleList(): Flowable<ResultData<ShareInfo>> { |
| | | return request().peopleList() |
| | | fun shareInfo(): Flowable<ResultData<ShareInfo>> { |
| | | return request().shareInfo() |
| | | } |
| | | |
| | | /** |
| | | * 我的课程列表 |
| | | */ |
| | | fun lookHistory(type: Int,page: Int,state:Int): Flowable<ResultData<CourseListBean>> { |
| | | val url = if (type == WatchHisActivity.WATCH_HIS) Apis.lookHistory else if (type == WatchHisActivity.COLLECTED) Apis.myCollect else Apis.myOrderCourse |
| | | val id = if (type == WatchHisActivity.WATCH_HIS) "361bdf123992fb" else if (type == WatchHisActivity.COLLECTED) "365e099bb9988b" else "365f4fc1b99030" |
| | | return request().lookHistory(url,page,10,state,id) |
| | | } |
| | | |
| | | fun getVipPrice(): Flowable<ResultData<VipPriceBean>> { |
| | | return request().getVipPrice() |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @param type 1=会员权益介绍 2=会员用户协议 3=续费管理说明 |
| | | */ |
| | | fun getVipContent(type: Int): Flowable<ResultData<String>> { |
| | | return request().getVipContent(type) |
| | | } |
| | | |
| | | fun getQrCode(): Flowable<ResultData<String>> { |
| | | return request().getQrCode() |
| | | } |
| | | |
| | | fun commonQuestion(page: Int): Flowable<ResultData<QABean>> { |
| | | return request().commonQuestion(page,10) |
| | | } |
| | | |
| | | fun healingLevel(): Flowable<ResultData<LevelBean>> { |
| | | return request().healingLevel() |
| | | } |
| | | |
| | | fun queryNotice(): Flowable<ResultData<Boolean>> { |
| | | return request().queryNotice() |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * 轮播 |
| | | */ |
| | | fun getCourseCategoryList(): Flowable<ResultData<ArrayList<CourseType>>> { |
| | | return request().getCourseCategoryList() |
| | | } |
| | | |
| | | /** |
| | | * 筛选项 |
| | | */ |
| | | fun getList(): Flowable<ResultData<FilterBean>> { |
| | |
| | | } |
| | | |
| | | /** |
| | | * bgm |
| | | */ |
| | | fun getHomeBackgroun(): Flowable<ResultData<List<BGMBean>>> { |
| | | return request().getHomeBackgroun() |
| | | } |
| | | |
| | | /** |
| | | * 分类列表 |
| | | */ |
| | | fun getMeditationPageByCateId(typeId:String,page: Int): Flowable<ResultData<SearchResult>> { |
| | | return request().getMeditationPageByCateId(typeId,page,Const.PAGE_SIZE) |
| | | } |
| | | |
| | | /** |
| | | * 音频详情 |
| | | */ |
| | | fun getMeditationDetails(id: String): Flowable<ResultData<VoiceDetail>> { |
| | | return request().getMeditationDetails(id) |
| | | } |
| | | |
| | | /** |
| | | * 音频收藏 |
| | | */ |
| | | fun favorite(id: String): Flowable<ResultData<Any>> { |
| | | return request().favorite(id) |
| | | } |
| | | |
| | | /** |
| | | * 评论列表 |
| | | */ |
| | | fun getMeditationQuestionPage(id: String,page: Int): Flowable<ResultData<VoiceCommentBean>> { |
| | | return request().getMeditationQuestionPage(id,page,Const.PAGE_SIZE) |
| | | } |
| | | |
| | | /** |
| | | * 搜索 |
| | | */ |
| | | fun search(key:String,page: Int,size: Int): Flowable<ResultData<SearchResult>> { |
| | | return request().search(key,page,size) |
| | | } |
| | | |
| | | /** |
| | | * 热搜列表 |
| | | */ |
| | | fun getHotWordList(): Flowable<ResultData<List<String>>> { |
| | | return request().getHotWordList() |
| | | } |
| | | |
| | | /** |
| | | * 获取String类型通用接口 |
| | | */ |
| | | fun queryString(url: String, map: HashMap<String, Any>): Flowable<ResultData<String>> { |
| | |
| | | */ |
| | | fun queryCouponPackage(type: Int,page: Int): Flowable<ResultData<List<Coupon>>> { |
| | | return request().queryCouponPackage(type, page) |
| | | } |
| | | |
| | | /** |
| | | * 用户查询 |
| | | */ |
| | | fun getUserByPhone(phone: String): Flowable<ResultData<UserInfo>> { |
| | | return request().getUserByPhone(phone) |
| | | } |
| | | |
| | | /** |
| | | * 确认订单 |
| | | */ |
| | | fun confirmOrder(id: String): Flowable<ResultData<ConfirmOrder>> { |
| | | return request().confirmOrder(id) |
| | | } |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 消息列表 |
| | | */ |
| | | fun messageList(page: Int): Flowable<ResultData<List<Msg>>> { |
| | | return request().messageList(page) |
| | | fun messageList(page: Int): Flowable<ResultData<MsgListBean>> { |
| | | return request().messageList(page,Const.PAGE_SIZE) |
| | | } |
| | | |
| | | /** |
| | |
| | | return request().deleteFind(id) |
| | | } |
| | | |
| | | /** |
| | | * 疗愈馆 |
| | | */ |
| | | fun getMeditationPage(page: Int,name: String?,lat:Double?,lon:Double?): Flowable<ResultData<PlaceListBean>> { |
| | | return request().getMeditationPage(name,lat,lon,page,10) |
| | | } |
| | | |
| | | /** |
| | | * 未读数 |
| | | * 疗愈馆 |
| | | */ |
| | | fun messageCount(): Flowable<ResultData<Int>> { |
| | | return request().messageCount() |
| | | fun getMeditationInfo(id: String): Flowable<ResultData<Place>> { |
| | | return request().getMeditationInfo(id) |
| | | } |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 更新用户信息 |
| | | */ |
| | | fun updateInfo(name: String?,gender:Int?,birthday: String?,weight: Double?,waistline: Int?,height: Int?,avatar: String?): Flowable<ResultData<Any>> { |
| | | return request().updateInfo(avatar,birthday, gender, height, weight, waistline,name) |
| | | fun updateInfo(headImg: String?, birthday: String?, company: String?,education: String?,email: String?,gender: Int?,hometown: String?,industry: String?, |
| | | location: String?,nickname: String?,occupation: String?, signature: String?,name: String?): Flowable<ResultData<Any>> { |
| | | return request().updateInfo(headImg, birthday, company, education, email, gender, hometown, industry, location, nickname, occupation, signature, name) |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | /** |
| | | * 举报 |
| | | * @param type 类型 1 = 举报动态 2 = 举报评论 |
| | | */ |
| | | fun report(type: Int,id: String,content: String): Flowable<ResultData<Any>> { |
| | | return request().report(id, content, type) |
| | | fun report(id: String,content: String): Flowable<ResultData<Any>> { |
| | | return request().report(id, content) |
| | | } |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 點贊 |
| | | */ |
| | | fun doLike(findId: String,type: Int,id:String?): Flowable<ResultData<Any>> { |
| | | return request().doLike(findId,type,id) |
| | | fun doLike(id:String): Flowable<ResultData<Any>> { |
| | | return request().doLike(id) |
| | | } |
| | | |
| | | /** |
| | |
| | | /** |
| | | *用户信息 |
| | | */ |
| | | fun getUserInfo(): Flowable<ResultData<UserInfo>> { |
| | | fun getUserInfo(): Flowable<ResultData<MineInfo>> { |
| | | return request().getUserInfo() |
| | | } |
| | | |
| | | /** |
| | | *资料 |
| | | */ |
| | | fun getUserDetail(): Flowable<ResultData<UserInfo>> { |
| | | return request().getUserDetail() |
| | | } |
| | | |
| | | /** |
| | | *公告消息 |
| | | */ |
| | | fun getNotice(): Flowable<ResultData<Notice>> { |