diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/DataCollection/DataCollectionService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/DataCollection/DataCollectionService.cs index c24eb19b4..0beba6344 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/DataCollection/DataCollectionService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/DataCollection/DataCollectionService.cs @@ -78,9 +78,12 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop var login_res_str = HttpMethods.Get(login_url); var login_res = JsonConvert.DeserializeObject(login_res_str); var login_data = login_res.data; - _redis.Write($"access_token", ((dynamic)login_data)?.access_token, TimeSpan.FromSeconds(200)); - _redis.Write($"client_secret", ((dynamic)login_data)?.client_secret, TimeSpan.FromSeconds(160000)); - _redis.Write($"refresh_token", ((dynamic)login_data)?.refresh_token, TimeSpan.FromSeconds(250)); + string access_token = ((dynamic)login_data)?.access_token; + string client_secret = ((dynamic)login_data)?.client_secret; + string refresh_token = ((dynamic)login_data)?.refresh_token; + _redis.Write($"access_token", access_token, TimeSpan.FromSeconds(200)); + _redis.Write($"client_secret", client_secret, TimeSpan.FromSeconds(160000)); + _redis.Write($"refresh_token", refresh_token, TimeSpan.FromSeconds(250)); } /// /// 刷新token @@ -101,8 +104,10 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop login(); return; } - _redis.Write($"access_token", ((dynamic)refresh_res)?.access_token, TimeSpan.FromSeconds(200)); - _redis.Write($"refresh_token", ((dynamic)refresh_res)?.refresh_token, TimeSpan.FromSeconds(250)); + string atoken = ((dynamic)refresh_res)?.access_token; + string rtoken = ((dynamic)refresh_res)?.refresh_token; + _redis.Write($"access_token", atoken, TimeSpan.FromSeconds(200)); + _redis.Write($"refresh_token", rtoken, TimeSpan.FromSeconds(250)); } /// /// 校区基础数据