| | |
| | | import CoreLocation |
| | | |
| | | #if DEBUG |
| | | let All_Url = "https://xq.xqzhihui.com/api" |
| | | //let All_Url = "http://192.168.110.64:9000" |
| | | //let All_Url = "https://xq.xqzhihui.com/api" |
| | | let All_Url = "http://192.168.110.64:9000" |
| | | //let All_Url = "https://mock.apipost.net/mock/31b303c60464000" |
| | | #else |
| | | let All_Url = "https://xq.xqzhihui.com/api" |
| | |
| | | params.interface(url: "/order/mgt/order/order/cancel") |
| | | .append(key: "uid", value: id) |
| | | return NetworkRequest.request(params: params, method: .get, progress: true) |
| | | } |
| | | |
| | | class func placeOrder(orderForm:PaymentOrderVC.PaymentOrderType,payType:Int,amount:Double? = nil,balanceFlag:Int? = nil,orderId:Int? = nil,receiverId:Int? = nil,targetId:Int? = nil,vipType:Int? = nil)->Observable<BaseResponse<PaymentResultModel>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | params.interface(url: "/order/client/order/order/placeOrder") |
| | | .append(key: "orderFrom", value: orderForm.rawValue) |
| | | .append(key: "payType", value: payType) |
| | | .append(key: "amount", value: amount) |
| | | .append(key: "balanceFlag", value: balanceFlag) |
| | | .append(key: "orderId", value: orderId) |
| | | .append(key: "receiverId", value: receiverId) |
| | | .append(key: "targetId", value: targetId) |
| | | .append(key: "vipType", value: vipType) |
| | | return NetworkRequest.request(params: params, method: .post, progress: true) |
| | | } |
| | | |
| | | |
| | |
| | | .append(key: "type", value: type) |
| | | return NetworkRequest.request(params: params, method: .post, progress: false) |
| | | } |
| | | |
| | | class func getVipPrice()->Observable<BaseResponse<VIPContentModel>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | .interface(url: "/system/system/vip-setting/queryVip") |
| | | return NetworkRequest.request(params: params, method: .post,encoding: JSONEncoding(), progress: false) |
| | | } |
| | | |
| | | class func queryPayment(orderId:String)->Observable<BaseResponse<String>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | .interface(url: "/order/client/order/order/queryPayment") |
| | | .append(key: "orderId", value: orderId) |
| | | return NetworkRequest.request(params: params, method: .post, progress: true) |
| | | } |
| | | |
| | | class func getTurn(progress:Bool = true)->Observable<BaseResponse<Bool>>{ |
| | | let params = ParamsAppender.build(url: All_Url) |
| | | .interface(url: "/system/system/home/getTurn") |
| | | return NetworkRequest.request(params: params, method: .get, progress: progress) |
| | | } |
| | | } |