| | |
| | | import com.google.gson.Gson |
| | | import com.google.gson.JsonObject |
| | | 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.network.entity.req.* |
| | | 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 payCourse( |
| | | id: String?, |
| | | payType: Int, |
| | | buyType: Int, |
| | | couponId:String?, |
| | | orderMoney:Double? = null |
| | | ): Flowable<ResultData<Order>> { |
| | | return request().order(id, buyType,payType, couponId,orderMoney) |
| | | } |
| | | |
| | | /** |
| | | * 支付 |
| | | */ |
| | | fun pay( |
| | | id: String, |
| | | payType: Int, |
| | | buyType: Int |
| | | ): Flowable<ResultData<PayInfo>> { |
| | | return request().pay(id,payType, buyType) |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * 省市 |
| | | */ |
| | | fun getCity(id:String?): Flowable<ResultData<List<City>>> { |
| | | return if (id.isNullOrEmpty()) request().getProvince() else request().getCity(id) |
| | | } |
| | | |
| | | /** |
| | | * 收件地址 |
| | | */ |
| | | fun setAddress(address:String,provinceCode: String,province:String,cityCode: String,city:String,phone: String,name: String): Flowable<ResultData<Any>> { |
| | | return request().setAddress(address,city,cityCode,province,provinceCode,name,phone) |
| | | } |
| | | |
| | | /** |
| | | * 收件地址 |
| | | */ |
| | | fun getAddress(): Flowable<ResultData<ReceiverBean>> { |
| | | return request().getAddress() |
| | | } |
| | | |
| | | /** |
| | | * 风险提示 |
| | | */ |
| | | fun riskInfo(): Flowable<ResultData<RiskInfo>> { |
| | | return request().riskInfo() |
| | | } |
| | | |
| | | /** |
| | | * 体检报告 |
| | | */ |
| | | fun queryPhysical(id: String): Flowable<ResultData<Report>> { |
| | | return request().queryPhysical(id) |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 开始训练 |
| | | */ |
| | | fun startTrain(id: String): Flowable<ResultData<TrainInfo>> { |
| | | return request().startTrain(id) |
| | | } |
| | | |
| | | /** |
| | | * 暂停训练 |
| | | */ |
| | | fun exit(courseId: String,videoId:String,seekTo:Long,realTime:Int): Flowable<ResultData<Any>> { |
| | | return request().exit(courseId,videoId,seekTo,realTime) |
| | | } |
| | | |
| | | /** |
| | | * 打卡 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 完成训练 |
| | | */ |
| | | fun completeInfo(courseId: String): Flowable<ResultData<FinishBean>> { |
| | | return request().completeInfo(courseId) |
| | | } |
| | | |
| | | /** |
| | | * 课程列表 |
| | | */ |
| | | 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 collectedCourse( |
| | | page: Int, |
| | | positionName1: String?, |
| | | search: String? |
| | | ): Flowable<ResultData<List<Course>>> { |
| | | return request().collectedCourse(page,search,positionName1) |
| | | fun getCoursePageList(): Flowable<ResultData<TeacherBean>> { |
| | | return request().getCoursePageList() |
| | | } |
| | | |
| | | /** |
| | | * 课程详情 |
| | | */ |
| | | fun queryCourseInfo(id: String): Flowable<ResultData<CourseDetail>> { |
| | | return request().queryCourseInfo(id) |
| | | fun getPayCourseInfoById(id: String): Flowable<ResultData<CourseDetail>> { |
| | | return request().getPayCourseInfoById(id) |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 课程收藏 |
| | |
| | | |
| | | |
| | | /** |
| | | * 课程套餐详情 |
| | | */ |
| | | fun buyCourseInfo(id: String): Flowable<ResultData<BuyInfo>> { |
| | | return request().buyCourseInfo(id) |
| | | } |
| | | |
| | | /** |
| | | * 我的动态 |
| | | */ |
| | | fun myFind(page: Int): Flowable<ResultData<ArrayList<Dynamic>>> { |
| | |
| | | } |
| | | |
| | | /** |
| | | * 绑卡 |
| | | */ |
| | | fun updateBankCard(name: String,phone: String,num: String,bank:String,photo:String): Flowable<ResultData<Any>> { |
| | | return request().updateBankCard(name,num,photo,bank,phone) |
| | | } |
| | | |
| | | /** |
| | | * 绑邀请人 |
| | | */ |
| | | fun binding(code: String): Flowable<ResultData<Any>> { |
| | | return request().binding(code) |
| | | } |
| | | |
| | | /** |
| | | * 绑邀请人 |
| | | */ |
| | | fun getBindingUserName(code: String): Flowable<ResultData<String>> { |
| | | return request().getBindingUserName(code) |
| | | } |
| | | |
| | | /** |
| | | * 绑卡 |
| | | */ |
| | | fun getBankInfo(): Flowable<ResultData<BankInfo>> { |
| | | return request().getBankInfo() |
| | | } |
| | | |
| | | /** |
| | | * 推广信息 |
| | | */ |
| | | 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<List<CourseBean>>> { |
| | | 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 balanceList(page: Int,state: Int): Flowable<ResultData<WalletDetailBean>> { |
| | | return request().balanceList(page,state,Const.PAGE_SIZE) |
| | | } |
| | | |
| | | fun energyDetail(page: Int,state: Int): Flowable<ResultData<List<PowerDetail>>> { |
| | | return request().energyDetail(page,state,Const.PAGE_SIZE) |
| | | } |
| | | |
| | | fun goodsList(page: Int): Flowable<ResultData<List<Gift>>> { |
| | | return request().goodsList(page,Const.PAGE_SIZE) |
| | | } |
| | | |
| | | fun exchangeRecordList(page: Int): Flowable<ResultData<List<Gift>>> { |
| | | return request().exchangeRecordList(page,Const.PAGE_SIZE) |
| | | } |
| | | |
| | | fun restart(): Flowable<ResultData<Any>> { |
| | | return request().restart() |
| | | } |
| | | |
| | | fun getTotalEnergyValue(): Flowable<ResultData<Int>> { |
| | | return request().getTotalEnergyValue() |
| | | } |
| | | |
| | | fun exchange(id: String): Flowable<ResultData<String>> { |
| | | return request().exchange(id) |
| | | } |
| | | |
| | | fun balanceDetail(id: String): Flowable<ResultData<BalanceDetail>> { |
| | | return request().balanceDetail(id) |
| | | } |
| | | |
| | | fun bankList(): Flowable<ResultData<List<BankInfo>>> { |
| | | return request().bankList() |
| | | } |
| | | |
| | | fun addBank(bank: String,name: String,phone: String,idCard:String,num: String,code: String): Flowable<ResultData<Any>> { |
| | | return request().addBank(Gson().toJson(BankInfo(bank,num,name,phone,idCard,code))) |
| | | } |
| | | |
| | | fun deleteBank(id: String): Flowable<ResultData<Any>> { |
| | | return request().deleteBank(id) |
| | | } |
| | | |
| | | fun withdraw(id: String,money: Double): Flowable<ResultData<Any>> { |
| | | return request().withdraw(id,money) |
| | | } |
| | | |
| | | fun noticeDetail(id: String): Flowable<ResultData<MsgDetail>> { |
| | | return request().noticeDetail(id) |
| | | } |
| | | |
| | | fun changePhone(code: String,phone: String): Flowable<ResultData<Any>> { |
| | | return request().changePhone(code, phone) |
| | | } |
| | | |
| | | fun deleteUser(): Flowable<ResultData<Any>> { |
| | | return request().deleteUser() |
| | | } |
| | | |
| | | fun studyPage(): Flowable<ResultData<StudyBean>> { |
| | | return request().studyPage() |
| | | } |
| | | |
| | | fun detailVersion(): Flowable<ResultData<Version>> { |
| | | return request().detailVersion() |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | fun withdrawal(money: Double): Flowable<ResultData<Any>> { |
| | | return request().withdrawal(money) |
| | | } |
| | | |
| | | fun bindVx(openid: String,wxName:String): Flowable<ResultData<Any>> { |
| | | return request().bindVx(openid,wxName) |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | fun saveUserAnswers(answer: ReqAnswer): Flowable<ResultData<Any>> { |
| | | return request().saveUserAnswers(Gson().toJson(answer)) |
| | | } |
| | | |
| | | /** |
| | | * 引导音乐 |
| | | */ |
| | | fun getPlan(): Flowable<ResultData<String>> { |
| | | return request().getPlan() |
| | | } |
| | | |
| | | /** |
| | | * 微信登录-绑定手机号 |
| | | */ |
| | | fun verifyCellPhone(token:String,phone: String,code: String,openid: String): Flowable<ResultData<LoginBean>> { |
| | | return request().verifyCellPhone(" $token",Gson().toJson(ReqBindWxPhone(code,phone,openid))) |
| | | } |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 验证码登录 |
| | | */ |
| | | fun captchaLogin(code: String, phone: String): Flowable<ResultData<LoginBean>> { |
| | | return request().captchaLogin("{\"cellPhone\":\"${phone}\",\"captcha\":\"${code}\"}") |
| | | fun captchaLogin(device: String, code: String, phone: String): Flowable<ResultData<LoginBean>> { |
| | | return request().captchaLogin("{\"device\":\"${device}\",\"cellPhone\":\"${phone}\",\"captcha\":\"${code}\"}") |
| | | } |
| | | |
| | | /** |
| | | * wx登录 |
| | | */ |
| | | fun wxLogin(openid: String?, phone: String?,name: String?,sex: Int?,avatar: String?): Flowable<ResultData<WxLoginBean>> { |
| | | return request().wxLogin(openid, phone,name,avatar,sex) |
| | | fun wxLogin(device: String, openid: String?, name: String?,sex: Int?,avatar: String?): Flowable<ResultData<WxLoginBean>> { |
| | | return request().wxLogin(Gson().toJson(ReqWxLogin(device,avatar,name,sex,openid))) |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * 筛选项 |
| | | * 轮播 |
| | | */ |
| | | fun getList(): Flowable<ResultData<FilterBean>> { |
| | | return request().getList() |
| | | fun getCourseCategoryList(): Flowable<ResultData<ArrayList<CourseType>>> { |
| | | return request().getCourseCategoryList() |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * 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 payOrder(id: String): Flowable<ResultData<ConfirmOrder>> { |
| | | return request().payOrder(id) |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 取消订单 |
| | | */ |
| | | fun cancel(id: String): Flowable<ResultData<Any>> { |
| | | return request().cancel(id) |
| | | } |
| | | |
| | | /** |
| | | * 确认订单 |
| | | */ |
| | | fun confirmOrderVoice(id: String): Flowable<ResultData<ConfirmOrder>> { |
| | | return request().confirmOrderVoice(id) |
| | | } |
| | | |
| | | /** |
| | | * 余额支付订单 |
| | | */ |
| | | fun gvieCourse(id: String,type: Int,receiveId:String? = null): Flowable<ResultData<Any>> { |
| | | return request().gvieCourse(id,type,receiveId) |
| | | } |
| | | |
| | | fun saveViewingHistory(id: String,time: Int): Flowable<ResultData<Any>> { |
| | | return request().saveViewingHistory(time,id) |
| | | } |
| | | |
| | | fun saveUserHomeBackgroundMusic(id: String): Flowable<ResultData<Any>> { |
| | | return request().saveUserHomeBackgroundMusic(id) |
| | | } |
| | | |
| | | fun getHomeBackgroundMusicByUserId(): Flowable<ResultData<BGMBean>> { |
| | | return request().getHomeBackgroundMusicByUserId() |
| | | } |
| | | |
| | | /** |
| | | * 支付成功 |
| | | */ |
| | | fun successOrder(id: String,isVoice:Boolean): Flowable<ResultData<List<CourseBean>>> { |
| | | return request().successOrder(if (isVoice) Apis.successOrderVoice else Apis.successOrder, id,id) |
| | | } |
| | | |
| | | /** |
| | | * 课程学习 |
| | | */ |
| | | fun studyPageByChapterId(id: String): Flowable<ResultData<List<Chapter>>> { |
| | | return request().studyPageByChapterId(id) |
| | | } |
| | | |
| | | /** |
| | | * 记录视频观看 |
| | | */ |
| | | fun saveCourseStudyHistory(id: String,isOver:Int,secondLook:Int): Flowable<ResultData<Any>> { |
| | | return request().saveCourseStudyHistory(id,isOver,secondLook) |
| | | } |
| | | |
| | | /** |
| | | * 查询支付状态 |
| | | */ |
| | | fun queryPayment(id: String): Flowable<ResultData<String>> { |
| | | return request().queryPayment(id) |
| | | } |
| | | |
| | | fun isFirst(): Flowable<ResultData<Boolean>> { |
| | | return request().isFirst() |
| | | } |
| | | |
| | | fun getUserTree(): Flowable<ResultData<TreeInfo>> { |
| | | return request().getUserTree() |
| | | } |
| | | |
| | | fun watering(): Flowable<ResultData<WaterResult>> { |
| | | return request().watering() |
| | | } |
| | | |
| | | fun sign(): Flowable<ResultData<Any>> { |
| | | return request().sign() |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * 设置单位 |
| | | */ |
| | | fun setUnit(type: Int): Flowable<ResultData<Any>> { |
| | | return request().setUnit(type) |
| | | } |
| | | |
| | | /** |
| | | * 设置手机 |
| | | */ |
| | | fun updatePhone(phone: String,code: String): Flowable<ResultData<Any>> { |
| | | return request().updatePhone(code, phone) |
| | | } |
| | | |
| | | /** |
| | | * 常见问题 |
| | | */ |
| | | fun useGuide(search: String?): Flowable<ResultData<List<Guide>>> { |
| | |
| | | } |
| | | |
| | | /** |
| | | * 联系 |
| | | */ |
| | | fun getPhone(): Flowable<ResultData<String>> { |
| | | return request().getPhone() |
| | | } |
| | | |
| | | /** |
| | | * 消息列表 |
| | | */ |
| | | 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(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>> { |
| | | val req = ReqUpdateUser(birthday,company,education,email,gender,hometown,industry,location,nickname,occupation,name,signature) |
| | | return request().updateInfo(Gson().toJson(req)) |
| | | } |
| | | |
| | | /** |
| | | * 支付 |
| | | */ |
| | | fun placeOrder(orderFrom:Int,payType:Int,balanceFlag:Int,amount:Double?,receiverId:String?,targetId:String?,vipType:Int?,orderId:String? = null): Flowable<ResultData<ThirdPayInfo>> { |
| | | return request().placeOrder(orderFrom, payType, balanceFlag, amount, receiverId, targetId, vipType,orderId) |
| | | } |
| | | |
| | | /** |
| | | * 更新用户头像 |
| | | */ |
| | | fun updateUserAvatar(avatar: String): Flowable<ResultData<Any>> { |
| | | return request().updateUserAvatar(avatar) |
| | | } |
| | | |
| | | /** |
| | | * 钱包 |
| | | */ |
| | | fun wallet(page: Int,year: Int?=null,month:Int?=null,size:Int = Const.PAGE_SIZE): Flowable<ResultData<WalletBean>> { |
| | | return request().wallet(page,month, year,size) |
| | | } |
| | | |
| | | /** |
| | | * 运势 |
| | | */ |
| | | fun constellation(consName: String,type: String): Flowable<ResultData<LuckInfo>> { |
| | | return request().constellation(consName,type) |
| | | } |
| | | |
| | | /** |
| | | * 动态列表 |
| | | */ |
| | | fun findList(page: Int,search: String?): Flowable<ResultData<List<Dynamic>>> { |
| | | return request().findList(page, search) |
| | | } |
| | | |
| | | /** |
| | | * 动态评论列表 |
| | | */ |
| | | fun findCommentList(page: Int,id: String,size: Int): Flowable<ResultData<List<Comment>>> { |
| | | return request().findCommentList(id,page,size) |
| | | } |
| | | |
| | | /** |
| | | * 评论回复列表 |
| | | */ |
| | | fun findCommentListOne(page: Int,id: String,size: Int): Flowable<ResultData<List<ReplyComment>>> { |
| | | return request().findCommentListOne(id,page,size) |
| | | fun wallet(): Flowable<ResultData<WalletBean>> { |
| | | return request().wallet() |
| | | } |
| | | |
| | | /** |
| | | * 举报 |
| | | * @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 addQuestion(id: String,content: String): Flowable<ResultData<Any>> { |
| | | return request().addQuestion(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 getNotice(): Flowable<ResultData<Notice>> { |
| | | return request().getNotice() |
| | | } |
| | | |
| | | /** |
| | | *设置体重 |
| | | * @param type 1=设置目标体重 2=记录体重 |
| | | */ |
| | | fun setWeight(type: Int,weight:String): Flowable<ResultData<Any>> { |
| | | return request().setWeight(type, weight) |
| | | } |
| | | |
| | | /** |
| | | *设置星座 |
| | | */ |
| | | fun changeConstellation(name:String): Flowable<ResultData<Any>> { |
| | | return request().changeConstellation(name) |
| | | fun getUserDetail(): Flowable<ResultData<UserInfo>> { |
| | | return request().getUserDetail() |
| | | } |
| | | } |