Merge remote-tracking branch 'origin/dev' into dev_lishuo
# Conflicts: # Assets/Scripts/App.cs
This commit is contained in:
commit
614d067d25
39 files changed
+5682
-12276
No files matched your search
@@ -119,7 +119,12 @@ namespace Assets.Scripts.Apis
|
||||
{
|
||||
return await PostAsync<JsonResult<object>>("/MemberFavoriteMap/Cancel", new { routeId });
|
||||
}
|
||||
|
||||
|
||||
public async Task<JsonResult<object>> DeleteRecord(string id)
|
||||
{
|
||||
return await PostAsync<JsonResult<object>>("/MapRecord/Delete", new { id });
|
||||
}
|
||||
|
||||
public JsonResult<MapRouteRankingList> GetRouteRanking(int id,string type, int pageIndex,int pageSize,string name)
|
||||
{
|
||||
var url = $"Map/v1/GetRouteRanking?pageIndex={ 0 }&pageSize={ pageSize }&name={ name }&id={ id }&type={ type }&filterSelf={ true }";
|
||||
|
||||
@@ -1,20 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine.Networking;
|
||||
|
||||
namespace Assets.Scripts.Apis
|
||||
{
|
||||
public class MapBoxApi: ApiBase
|
||||
{
|
||||
public string GetAddressInfo(string address)
|
||||
public async Task<string> GetAddressInfo(string address)
|
||||
{
|
||||
var url = $"https://a.tiles.mapbox.com/geocoding/v5/mapbox.places/{ address }.json?access_token={ App.MapBoxAccessToken }";
|
||||
var res = Get(url);
|
||||
var url = $"https://a.tiles.mapbox.com/geocoding/v5/mapbox.places/{ UnityWebRequest.EscapeURL(address) }.json?access_token={ App.MapBoxAccessToken }";
|
||||
//var res = Get(url);
|
||||
|
||||
//return System.Text.Encoding.UTF8.GetString(res);
|
||||
return res;
|
||||
var result = await new HttpClient().GetAsync(url);
|
||||
return await result.Content.ReadAsStringAsync();
|
||||
//UnityWebRequest.
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -163,5 +163,7 @@ namespace Assets.Scripts.Apis.Models
|
||||
///
|
||||
/// </summary>
|
||||
public string CanShareOnStrava { get; set; }
|
||||
|
||||
public string ViewUrl { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -70,6 +70,7 @@ namespace Assets.Scripts.Apis
|
||||
user.LastUpdateFtpTime = ret.data.LastUpdateFtpTime;
|
||||
user.LastUpdateWeightTime = ret.data.LastUpdateWeightTime;
|
||||
user.LastUpdateBicycleWeightTime = ret.data.LastUpdateBicycleWeightTime;
|
||||
user.Height = ret.data.Height;
|
||||
//todo: check local database, insert new user
|
||||
|
||||
//PubCommData.CurrentUser = user;
|
||||
@@ -178,7 +179,10 @@ namespace Assets.Scripts.Apis
|
||||
public async Task<JsonResult<UserResultModel>> QuickLogin()
|
||||
{
|
||||
var r = await PostAsync<JsonResult<UserResultModel>>("NoAuth/QuickLogin", null);
|
||||
r.data.cookie = cookies[0].Value;
|
||||
if (r.result)
|
||||
{
|
||||
r.data.cookie = cookies[0].Value;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user