| | |
| | | } |
| | | |
| | | /** |
| | | * 支付 |
| | | */ |
| | | fun pay( |
| | | id: String, |
| | | payType: Int, |
| | | buyType: Int |
| | | ): Flowable<ResultData<PayInfo>> { |
| | | return request().pay(id,payType, buyType) |
| | | } |
| | | |
| | | /** |
| | | * 支付结果 |
| | | */ |
| | | fun success( |
| | |
| | | return request().bankList() |
| | | } |
| | | |
| | | fun addBank(bank: String,name: String,phone: String,idCard:String,num: String): Flowable<ResultData<Any>> { |
| | | return request().addBank(Gson().toJson(BankInfo(bank,num,name,phone,idCard))) |
| | | 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>> { |
| | |
| | | /** |
| | | * 微信登录-绑定手机号 |
| | | */ |
| | | fun verifyCellPhone(token:String,phone: String,code: String,openid: String): Flowable<ResultData<Any>> { |
| | | 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?, name: String?,sex: Int?,avatar: String?): Flowable<ResultData<WxLoginBean>> { |
| | | return request().wxLogin(Gson().toJson(ReqWxLogin(avatar,name,sex,openid))) |
| | | 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 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>> { |
| | |
| | | |
| | | 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 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>> { |
| | |
| | | /** |
| | | * 支付 |
| | | */ |
| | | fun placeOrder(orderFrom:Int,payType:Int,balanceFlag:Int,amount:Double?,receiverId:String?,targetId:String?,vipType:Int?): Flowable<ResultData<PayInfo>> { |
| | | return request().placeOrder(orderFrom, payType, balanceFlag, amount, receiverId, targetId, vipType) |
| | | 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) |
| | | } |
| | | |
| | | /** |