| | |
| | | |
| | | #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 { |
| | |
| | | |
| | | // 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]>>{ |
| | |
| | | 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) |
| | | } |
| | | |
| | |
| | | .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) |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | /// 获取参赛人员列表 |
| | | 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) |
| | | } |
| | | |