无故事王国
2023-10-28 576aec37fe9b5eb395097be1ced0680ae97590f8
WanPai/Network/Services.swift
@@ -13,13 +13,15 @@
#if DEBUG
//let All_Url = "https://ds867zleb4ow.xiaomiqiu.com"
let All_Url = "http://192.168.110.27:56666"
//let All_Url = "http://192.168.110.27:56666"
let All_Url = "http://8.137.22.229:56666"
let Game_Url = "https://try.daowepark.com"
//let All_Url = "https://console-mock.apipost.cn/mock/b5b2dee0-5564-40ae-f082-a352d502a153"
//let All_Url = "http://192.168.110.165:10393/mock/b5b2dee0-5564-40ae-f082-a352d502a153"
#else
let All_Url = "http://8.137.22.229:56666"
let Game_Url = "https://port.daowepark.com"
let All_Url = "http://8.137.22.229:56666" //正式地址
//let Game_Url = "https://port.daowepark.com"//正式地址
let Game_Url = "https://try.daowepark.com" //测试地址
#endif
class Services: NSObject {
@@ -28,6 +30,15 @@
// MARK: -- 游戏
extension Services{
   class func updateInfo(birthday:String?,gender:Int?,name:String?)->Observable<BaseResponse<SimpleModel>>{
      let params = ParamsAppender.build(url: All_Url)
         .interface(url: "/account/api/appUser/updateInfo")
         .append(key: "birthday", value: birthday)
         .append(key: "gender", value: gender)
         .append(key: "name", value: name)
      return NetworkRequest.request(params: params, method: .post, progress: false)
   }
      /// 本地离线游戏
   class func game_gameList(spaceId:Int,storeId:Int)->Observable<BaseResponse<[GameListModel]>>{
@@ -137,13 +148,15 @@
      return NetworkRequest.request(params: params, method: .post, progress: true)
   }
   class func wxPhoneBind(phone:String,code:String,openId:String,invitePhone:String? = nil)->Observable<BaseResponse<SimpleModel>>{
   class func wxPhoneBind(phone:String,code:String,openId:String,invitePhone:String? = nil)->Observable<BaseResponse<LoginModel>>{
      let params = ParamsAppender.build(url: All_Url)
         .interface(url: "/account/base/appUser/bind")
         .append(key: "phone", value: phone)
         .append(key: "openId", value: openId)
         .append(key: "code", value: code)
         .append(key: "invitePhone", value: invitePhone)
         .append(key: "lat", value: locationTool.currentLocation?.coordinate.latitude.string)
         .append(key: "lon", value: locationTool.currentLocation?.coordinate.longitude.string)
      return NetworkRequest.request(params: params, method: .post, progress: true)
   }
@@ -162,6 +175,8 @@
         .append(key: "password", value: password.jq_md5String().lowercased())
         .append(key: "code", value: code)
         .append(key: "invitePhone", value: invitePhone)
         .append(key: "lat", value: locationTool.currentLocation?.coordinate.latitude.string)
         .append(key: "lon", value: locationTool.currentLocation?.coordinate.longitude.string)
      return NetworkRequest.request(params: params, method: .post, progress: true)
   }
@@ -1034,9 +1049,10 @@
    }
        /// 获取参赛人员列表
    class func queryParticipantList()->Observable<BaseResponse<[ActivityDetailPartModel]>>{
   class func queryParticipantList(isAuth:Int? = nil)->Observable<BaseResponse<[ActivityDetailPartModel]>>{
        let params = ParamsAppender.build(url: All_Url)
            .interface(url: "competition/api/participant/queryParticipantList")
         .append(key: "isPre", value: isAuth)
        return NetworkRequest.request(params: params, method: .post, progress: false)
    }