加弹框。修改连接设备样式。
This commit is contained in:
1 parent
07feba912c
commit
5156473bb2
62 files changed
+4963
-5447
No files matched your search
@@ -37,11 +37,11 @@ namespace Assets.Scripts.Apis
|
||||
|
||||
httpClientHandler = new HttpClientHandler();
|
||||
httpClientHandler.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
|
||||
|
||||
httpClientHandler.Proxy = WebRequest.DefaultWebProxy;
|
||||
httpClientHandler.CookieContainer = _cookieCollection;
|
||||
httpClientHandler.UseCookies = true;
|
||||
httpClientHandler.CookieContainer.Add(new Uri(ConfigHelper.Host), new Cookie("PowerFun.AUTH", "E1F130A03C0C2F01DF465A17AAA4740E9C44FC5F7C5077AF5A09B5ED29F0CF4FABE44329111C0BDBC6D97A28E7C7C188250265B37D2E6A849D7F0CAC606490648F17DC7FB9C8778BE7217991EBB6304BD543CFEE55084E54CCD634B49F26A751","/"));
|
||||
|
||||
|
||||
httpClient = new System.Net.Http.HttpClient(httpClientHandler);
|
||||
httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
|
||||
httpClient.DefaultRequestHeaders.UserAgent.Add(new ProductInfoHeaderValue("Unity", ConfigHelper.AppVersion));
|
||||
|
||||
@@ -56,7 +56,12 @@ namespace Assets.Scripts.Apis.Models
|
||||
/// 已连接到Strava
|
||||
/// </summary>
|
||||
public bool ConnectedToStrava { get; set; }
|
||||
|
||||
public DateTime? Birthday { get; set; }
|
||||
//cookie
|
||||
public string cookie { get; set; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -65,6 +65,7 @@ namespace Assets.Scripts.Apis
|
||||
{
|
||||
user.ConnectedToStrava = ret.data.ConnectedToStrava;
|
||||
}
|
||||
user.Birthday = ret.data.Birthday;
|
||||
//todo: check local database, insert new user
|
||||
|
||||
//PubCommData.CurrentUser = user;
|
||||
@@ -137,5 +138,61 @@ namespace Assets.Scripts.Apis
|
||||
return await PostAsync<JsonResult<UserResultModel>>("NoAuth/OnWebWxLogin",
|
||||
new { Phone, Captcha, UnionId, WxWebOpenId, WxHeadImg, NickName, Sex, Password });
|
||||
}
|
||||
|
||||
|
||||
public async Task<JsonResult<dynamic>> Update(UserResultModel currUser, string filePath = "")
|
||||
{
|
||||
//return await PostAsync<JsonResult<dynamic>>("User/UpdateUserSetting", new {
|
||||
// UID = currUser.Id,
|
||||
// Sex = currUser.Sex,
|
||||
// currUser.Unit,
|
||||
// currUser.Weight,
|
||||
// currUser.FTP,
|
||||
// currUser.WheelDiameter,
|
||||
// currUser.Nickname,
|
||||
// currUser.Country,
|
||||
// currUser.Province,
|
||||
// currUser.City,
|
||||
// currUser.Area,
|
||||
// currUser.AutoPause,
|
||||
// currUser.MaxHeartRate,
|
||||
// currUser.BicycleWeight,
|
||||
// currUser.Contact,
|
||||
// currUser.ContactPhone,
|
||||
// currUser.ContactAddress,
|
||||
// currUser.Sensitivity,
|
||||
// imgData = imgData
|
||||
//});
|
||||
var files = new List<string>();
|
||||
if (!string.IsNullOrWhiteSpace(filePath))
|
||||
{
|
||||
files.Add(filePath);
|
||||
}
|
||||
var res = Upload("v1/User/UpdateUserSetting", new
|
||||
{
|
||||
UID = currUser.Id,
|
||||
Sex = currUser.Sex,
|
||||
currUser.Unit,
|
||||
currUser.Weight,
|
||||
currUser.FTP,
|
||||
currUser.WheelDiameter,
|
||||
currUser.Nickname,
|
||||
currUser.Country,
|
||||
currUser.Province,
|
||||
currUser.City,
|
||||
currUser.Area,
|
||||
currUser.AutoPause,
|
||||
currUser.MaxHeartRate,
|
||||
currUser.BicycleWeight,
|
||||
currUser.Contact,
|
||||
currUser.ContactPhone,
|
||||
currUser.ContactAddress,
|
||||
currUser.Sensitivity,
|
||||
currUser.Birthday
|
||||
//imgData = imgData
|
||||
}, files);
|
||||
|
||||
return Newtonsoft.Json.JsonConvert.DeserializeObject<JsonResult<dynamic>>(res);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user