|
|
@@ -145,9 +145,17 @@ namespace MySystem.Areas.Api.Controllers
|
|
|
Obj.Add("city", city); //市
|
|
|
Obj.Add("district", district); //区
|
|
|
function.WriteLog(Newtonsoft.Json.JsonConvert.SerializeObject(Obj), "小程序-获取用户信息");
|
|
|
- // Dictionary<string, string> tokens = GetToken(user.Id);
|
|
|
- // Obj.Add("accessToken", tokens["access_token"]);
|
|
|
- // Obj.Add("refreshToken", tokens["refresh_token"]);
|
|
|
+ try
|
|
|
+ {
|
|
|
+ Dictionary<string, string> tokens = GetToken(user.Id);
|
|
|
+ Obj.Add("accessToken", tokens["access_token"]);
|
|
|
+ Obj.Add("refreshToken", tokens["refresh_token"]);
|
|
|
+ }
|
|
|
+ catch
|
|
|
+ {
|
|
|
+ Obj.Add("accessToken", "");
|
|
|
+ Obj.Add("refreshToken", "");
|
|
|
+ }
|
|
|
return Json(new AppResultJson() { Status = "1", Info = "", Data = Obj });
|
|
|
}
|
|
|
public Dictionary<string, string> GetToken(int UserId)
|