杨锴
2024-11-25 b0222c34dcbc7ae27949a605fb4c7cea473844b2
XQMuse/Root/Network/Services.swift
@@ -13,8 +13,8 @@
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"
@@ -367,6 +367,20 @@
        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)
    }
@@ -826,4 +840,23 @@
            .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)
    }
}